vendor: 4,041 bytes, lines 1-3
1 2/*! jQuery v1.12.3 | (c) jQuery Foundation | jquery.org/license */ 3!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=a.document,e=c.slice,f=c.concat,g=c.push,h=c.indexOf,i={},j=i.toString,k=i.hasOwnProperty,l={},m="1.12.3",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return e.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:e.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a){return n.each(this,a)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(e.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor()},push:g,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(n.isPlainObject(c)||(b=n.isArray(c)))?(b?(b=!1,f=a&&n.isArray(a)?a:[]):f=a&&n.isPlainObject(a)?a:{},g[d]=n.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray||function(a){return"array"===n.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){var b=a&&a.toString();return!n.isArray(a)&&b-parseFloat(b)+1>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==n.type(a)||a.nodeType||n.isWindow(a))return!1;try{if(a.constructor&&!k.call(a,"constructor")&&!k.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(!l.ownFirst)for(b in a)return k.call(a,b);for(b in a);return void 0===b||k.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?i[j.call(a)]||"object":typeof a},globalEval:function(b){b&&n.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b){var c,d=0;if(s(a)){for(c=a.length;c>d;d++)if(b.call(a[d],d,a[d])===!1)break}else for(d in a)if(b.call(a[d],d,a[d])===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):g.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(h)return h.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,e,g=0,h=[];if(s(a))for(d=a.length;d>g;g++)e=b(a[g],g,c),null!=e&&h.push(e);else for(g in a)e=b(a[g],g,c),null!=e&&h.push(e);return f.apply([],h)},guid:1,proxy:function(a,b){var c,d,f;return"string"==typeof b&&(f=a[b],b=a,a=f),n.isFunction(a)?(c=e.call(arguments,2),d=function(){return a.apply(b||this,c.concat(e.call(arguments)))},d.guid=a.guid=a.guid||n.guid++,d):void 0},now:function(){return+new Date}
vendor: 3,521 bytes, line 3
3,support:l}),"function"==typeof Symbol&&(n.fn[Symbol.iterator]=c[Symbol.iterator]),n.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(a,b){i["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=!!a&&"length"in a&&a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ga(),z=ga(),A=ga(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+M+"))|)"+L+"*\\]",O=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+N+")*)|.*)\\)|)",P=new RegExp(L+"+","g"),Q=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),R=new RegExp("^"+L+"*,"+L+"*"),S=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),T=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),U=new RegExp(O),V=new RegExp("^"+M+"$"),W={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M+"|[*])"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},X=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,Z=/^[^{]+\{\s*\[native \w/,$=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,_=/[+~]/,aa=/'|\\/g,ba=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),ca=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},da=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(ea){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fa(a,b,d,e){var f,h,j,k,l,o,r,s,w=b&&b.ownerDocument,x=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==x&&9!==x&&11!==x)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==x&&(o=$.exec(a)))if(f=o[1]){if(9===x){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(w&&(j=w.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(o[2])return H.apply(d,b.getElementsByTagName(a)),d;if((f=o[3])&&c.getElementsByClassName&&b.getElementsByClassName)return H.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==x)w=b,s=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(aa,"\\$&"):b.setAttribute("id",k=u),r=g(a),h=r.length,l=V.test(k)?"#"+k:"[id='"+k+"']";while(h--)r[h]=l+" "+qa(r[h]);s=r.join(","),w=_.test(a)&&oa(b.parentNode)||b}if(s)try{return H.apply(d,w.querySelectorAll(s)),d}catch(y){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(Q,"$1"),b,d,e)}function ga(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ha(a){return a[u]=!0,a}
vendor: 9,959 bytes, line 3
3function ia(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ja(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function ka(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function la(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function na(a){return ha(function(b){return b=+b,ha(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function oa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=fa.support={},f=fa.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fa.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ia(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ia(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Z.test(n.getElementsByClassName),c.getById=ia(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return"undefined"!=typeof b.getElementsByClassName&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=Z.test(n.querySelectorAll))&&(ia(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\r\\' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ia(function(a){var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Z.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ia(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",O)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Z.test(o.compareDocumentPosition),t=b||Z.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return ka(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?ka(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},fa.matches=function(a,b){return fa(a,null,null,b)},fa.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(T,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fa(b,n,null,[a]).length>0},fa.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fa.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fa.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fa.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fa.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fa.selectors={cacheLength:50,createPseudo:ha,match:W,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ba,ca),a[3]=(a[3]||a[4]||a[5]||"").replace(ba,ca),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fa.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fa.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return W.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&U.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ba,ca).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fa.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(P," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fa.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ha(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ha(function(a){var b=[],c=[],d=h(a.replace(Q,"$1"));return d[u]?ha(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ha(function(a){return function(b){return fa(a,b).length>0}}),contains:ha(function(a){return a=a.replace(ba,ca),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ha(function(a){return V.test(a||"")||fa.error("unsupported lang: "+a),a=a.replace(ba,ca).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Y.test(a.nodeName)}
vendor: 14,558 bytes, line 3
3,input:function(a){return X.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:na(function(){return[0]}),last:na(function(a,b){return[b-1]}),eq:na(function(a,b,c){return[0>c?c+b:c]}),even:na(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:na(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:na(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:na(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=la(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=ma(b);function pa(){}pa.prototype=d.filters=d.pseudos,d.setFilters=new pa,g=fa.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){c&&!(e=R.exec(h))||(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=S.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(Q," ")}),h=h.slice(c.length));for(g in d.filter)!(e=W[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?fa.error(a):z(a,i).slice(0)};function qa(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function ra(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j,k=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(j=b[u]||(b[u]={}),i=j[b.uniqueID]||(j[b.uniqueID]={}),(h=i[d])&&h[0]===w&&h[1]===f)return k[2]=h[2];if(i[d]=k,k[2]=a(b,c,g))return!0}}}function sa(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ta(a,b,c){for(var d=0,e=b.length;e>d;d++)fa(a,b[d],c);return c}function ua(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(c&&!c(f,d,e)||(g.push(f),j&&b.push(h)));return g}function va(a,b,c,d,e,f){return d&&!d[u]&&(d=va(d)),e&&!e[u]&&(e=va(e,f)),ha(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ta(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ua(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ua(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ua(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function wa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ra(function(a){return a===b},h,!0),l=ra(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[ra(sa(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return va(i>1&&sa(m),i>1&&qa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(Q,"$1"),c,e>i&&wa(a.slice(i,e)),f>e&&wa(a=a.slice(e)),f>e&&qa(a))}m.push(c)}return sa(m)}function xa(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=F.call(i));u=ua(u)}H.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&fa.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ha(f):f}return h=fa.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xa(e,d)),f.selector=a}return f},i=fa.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ba,ca),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=W.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ba,ca),_.test(j[0].type)&&oa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qa(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,!b||_.test(a)&&oa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ia(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ia(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||ja("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ia(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ja("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ia(function(a){return null==a.getAttribute("disabled")})||ja(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fa}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.uniqueSort=n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},v=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},w=n.expr.match.needsContext,x=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,y=/^.[^:#\[\.,]*$/;function z(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(y.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return n.inArray(a,b)>-1!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;e>b;b++)if(n.contains(d[b],this))return!0}));for(b=0;e>b;b++)n.find(a,d[b],c);return c=this.pushStack(e>1?n.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(z(this,a||[],!1))},not:function(a){return this.pushStack(z(this,a||[],!0))},is:function(a){return!!z(this,"string"==typeof a&&w.test(a)?n(a):a||[],!1).length}});var A,B=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=n.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||A,"string"==typeof a){if(e="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:B.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),x.test(e[1])&&n.isPlainObject(b))for(e in b)n.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}if(f=d.getElementById(e[2]),f&&f.parentNode){if(f.id!==e[2])return A.find(a);this.length=1,this[0]=f}return this.context=d,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof c.ready?c.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};C.prototype=n.fn,A=n(d);var D=/^(?:parents|prev(?:Until|All))/,E={children:!0,contents:!0,next:!0,prev:!0};n.fn.extend({has:function(a){var b,c=n(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(n.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=w.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?n.inArray(this[0],n(a)):n.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.uniqueSort(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function F(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return u(a,"parentNode")},parentsUntil:function(a,b,c){return u(a,"parentNode",c)},next:function(a){return F(a,"nextSibling")},prev:function(a){return F(a,"previousSibling")},nextAll:function(a){return u(a,"nextSibling")},prevAll:function(a){return u(a,"previousSibling")},nextUntil:function(a,b,c){return u(a,"nextSibling",c)},prevUntil:function(a,b,c){return u(a,"previousSibling",c)},siblings:function(a){return v((a.parentNode||{}).firstChild,a)},children:function(a){return v(a.firstChild)},contents:function(a){return n.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(E[a]||(e=n.uniqueSort(e)),D.test(a)&&(e=e.reverse())),this.pushStack(e)}});var G=/\S+/g;function H(a){var b={};return n.each(a.match(G)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?H(a):n.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h<f.length)f[h].apply(c[0],c[1])===!1&&a.stopOnFalse&&(h=f.length,c=!1)}a.memory||(c=!1),b=!1,e&&(f=c?[]:"")},j={add:function(){return f&&(c&&!b&&(h=f.length-1,g.push(c)),function d(b){n.each(b,function(b,c){n.isFunction(c)?a.unique&&j.has(c)||f.push(c):c&&c.length&&"string"!==n.type(c)&&d(c)})}(arguments),c&&!b&&i()),this},remove:function(){return n.each(arguments,function(a,b){var c;while((c=n.inArray(b,f,c))>-1)f.splice(c,1),h>=c&&h--}),this},has:function(a){return a?n.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=!0,c||j.disable(),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().progress(c.notify).done(c.resolve).fail(c.reject):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=e.call(arguments),d=c.length,f=1!==d||a&&n.isFunction(a.promise)?d:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?e.call(arguments):d,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(d>1)for(i=new Array(d),j=new Array(d),k=new Array(d);d>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().progress(h(b,j,i)).done(h(b,k,c)).fail(g.reject):--f;return f||g.resolveWith(k,c),g.promise()}});var I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(d,[n]),n.fn.triggerHandler&&(n(d).triggerHandler("ready"),n(d).off("ready"))))}});function J(){d.addEventListener?(d.removeEventListener("DOMContentLoaded",K),a.removeEventListener("load",K)):(d.detachEvent("onreadystatechange",K),a.detachEvent("onload",K))}function K(){(d.addEventListener||"load"===a.event.type||"complete"===d.readyState)&&(J(),n.ready())}n.ready.promise=function(b){if(!I)if(I=n.Deferred(),"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll)a.setTimeout(n.ready);else if(d.addEventListener)d.addEventListener("DOMContentLoaded",K),a.addEventListener("load",K);else{d.attachEvent("onreadystatechange",K),a.attachEvent("onload",K);var c=!1;try{c=null==a.frameElement&&d.documentElement}catch(e){}c&&c.doScroll&&!function f(){if(!n.isReady){try{c.doScroll("left")}catch(b){return a.setTimeout(f,50)}J(),n.ready()}}()}return I.promise(b)},n.ready.promise();var L;for(L in n(l))break;l.ownFirst="0"===L,l.inlineBlockNeedsLayout=!1,n(function(){var a,b,c,e;c=d.getElementsByTagName("body")[0],c&&c.style&&(b=d.createElement("div"),e=d.createElement("div"),e.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(e).appendChild(b),"undefined"!=typeof b.style.zoom&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",l.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(e))}),function(){var a=d.createElement("div");l.deleteExpando=!0;try{delete a.test}catch(b){l.deleteExpando=!1}a=null}();var M=function(a){var b=n.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b},N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(O,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}n.data(a,b,c)}else c=void 0;
3�
vendor: 20,723 bytes, lines 3-4
3 4}return c}function Q(a){var b;for(b in a)if(("data"!==b||!n.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function R(a,b,d,e){if(M(a)){var f,g,h=n.expando,i=a.nodeType,j=i?n.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||n.guid++:h),j[k]||(j[k]=i?{}:{toJSON:n.noop}),"object"!=typeof b&&"function"!=typeof b||(e?j[k]=n.extend(j[k],b):j[k].data=n.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[n.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[n.camelCase(b)])):f=g,f}}function S(a,b,c){if(M(a)){var d,e,f=a.nodeType,g=f?n.cache:a,h=f?a[n.expando]:n.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){n.isArray(b)?b=b.concat(n.map(b,n.camelCase)):b in d?b=[b]:(b=n.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!Q(d):!n.isEmptyObject(d))return}(c||(delete g[h].data,Q(g[h])))&&(f?n.cleanData([a],!0):l.deleteExpando||g!=g.window?delete g[h]:g[h]=void 0)}}}n.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?n.cache[a[n.expando]]:a[n.expando],!!a&&!Q(a)},data:function(a,b,c){return R(a,b,c)},removeData:function(a,b){return S(a,b)},_data:function(a,b,c){return R(a,b,c,!0)},_removeData:function(a,b){return S(a,b,!0)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=n.data(f),1===f.nodeType&&!n._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));n._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){n.data(this,a)}):arguments.length>1?this.each(function(){n.data(this,a,b)}):f?P(f,a,n.data(f,a)):void 0},removeData:function(a){return this.each(function(){n.removeData(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=n._data(a,b),c&&(!d||n.isArray(c)?d=n._data(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return n._data(a,c)||n._data(a,c,{empty:n.Callbacks("once memory").add(function(){n._removeData(a,b+"queue"),n._removeData(a,c)})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=n._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}}),function(){var a;l.shrinkWrapBlocks=function(){if(null!=a)return a;a=!1;var b,c,e;return c=d.getElementsByTagName("body")[0],c&&c.style?(b=d.createElement("div"),e=d.createElement("div"),e.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(e).appendChild(b),"undefined"!=typeof b.style.zoom&&(b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",b.appendChild(d.createElement("div")).style.width="5px",a=3!==b.offsetWidth),c.removeChild(e),a):void 0}}();var T=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,U=new RegExp("^(?:([+-])=|)("+T+")([a-z%]*)$","i"),V=["Top","Right","Bottom","Left"],W=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)};function X(a,b,c,d){var e,f=1,g=20,h=d?function(){return d.cur()}:function(){return n.css(a,b,"")},i=h(),j=c&&c[3]||(n.cssNumber[b]?"":"px"),k=(n.cssNumber[b]||"px"!==j&&+i)&&U.exec(n.css(a,b));if(k&&k[3]!==j){j=j||k[3],c=c||[],k=+i||1;do f=f||".5",k/=f,n.style(a,b,k+j);while(f!==(f=h()/i)&&1!==f&&--g)}return c&&(k=+k||+i||0,e=c[1]?k+(c[1]+1)*c[2]:+c[2],d&&(d.unit=j,d.start=k,d.end=e)),e}var Y=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)Y(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},Z=/^(?:checkbox|radio)$/i,$=/<([\w:-]+)/,_=/^$|\/(?:java|ecma)script/i,aa=/^\s+/,ba="abbr|article|aside|audio|bdi|canvas|data|datalist|details|dialog|figcaption|figure|footer|header|hgroup|main|mark|meter|nav|output|picture|progress|section|summary|template|time|video";function ca(a){var b=ba.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}!function(){var a=d.createElement("div"),b=d.createDocumentFragment(),c=d.createElement("input");a.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",l.leadingWhitespace=3===a.firstChild.nodeType,l.tbody=!a.getElementsByTagName("tbody").length,l.htmlSerialize=!!a.getElementsByTagName("link").length,l.html5Clone="<:nav></:nav>"!==d.createElement("nav").cloneNode(!0).outerHTML,c.type="checkbox",c.checked=!0,b.appendChild(c),l.appendChecked=c.checked,a.innerHTML="<textarea>x</textarea>",l.noCloneChecked=!!a.cloneNode(!0).lastChild.defaultValue,b.appendChild(a),c=d.createElement("input"),c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),a.appendChild(c),l.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,l.noCloneEvent=!!a.addEventListener,a[n.expando]=1,l.attributes=!a.getAttribute(n.expando)}();var da={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:l.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]};da.optgroup=da.option,da.tbody=da.tfoot=da.colgroup=da.caption=da.thead,da.th=da.td;function ea(a,b){var c,d,e=0,f="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||n.nodeName(d,b)?f.push(d):n.merge(f,ea(d,b));return void 0===b||b&&n.nodeName(a,b)?n.merge([a],f):f}function fa(a,b){for(var c,d=0;null!=(c=a[d]);d++)n._data(c,"globalEval",!b||n._data(b[d],"globalEval"))}var ga=/<|&#?\w+;/,ha=/<tbody/i;function ia(a){Z.test(a.type)&&(a.defaultChecked=a.checked)}function ja(a,b,c,d,e){for(var f,g,h,i,j,k,m,o=a.length,p=ca(b),q=[],r=0;o>r;r++)if(g=a[r],g||0===g)if("object"===n.type(g))n.merge(q,g.nodeType?[g]:g);else if(ga.test(g)){i=i||p.appendChild(b.createElement("div")),j=($.exec(g)||["",""])[1].toLowerCase(),m=da[j]||da._default,i.innerHTML=m[1]+n.htmlPrefilter(g)+m[2],f=m[0];while(f--)i=i.lastChild;if(!l.leadingWhitespace&&aa.test(g)&&q.push(b.createTextNode(aa.exec(g)[0])),!l.tbody){g="table"!==j||ha.test(g)?"<table>"!==m[1]||ha.test(g)?0:i:i.firstChild,f=g&&g.childNodes.length;while(f--)n.nodeName(k=g.childNodes[f],"tbody")&&!k.childNodes.length&&g.removeChild(k)}n.merge(q,i.childNodes),i.textContent="";while(i.firstChild)i.removeChild(i.firstChild);i=p.lastChild}else q.push(b.createTextNode(g));i&&p.removeChild(i),l.appendChecked||n.grep(ea(q,"input"),ia),r=0;while(g=q[r++])if(d&&n.inArray(g,d)>-1)e&&e.push(g);else if(h=n.contains(g.ownerDocument,g),i=ea(p.appendChild(g),"script"),h&&fa(i),c){f=0;while(g=i[f++])_.test(g.type||"")&&c.push(g)}return i=null,p}!function(){var b,c,e=d.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(l[b]=c in a)||(e.setAttribute(c,"t"),l[b]=e.attributes[c].expando===!1);e=null}();var ka=/^(?:input|select|textarea)$/i,la=/^key/,ma=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,na=/^(?:focusinfocus|focusoutblur)$/,oa=/^([^.]*)(?:\.(.+)|)/;function pa(){return!0}function qa(){return!1}function ra(){try{return d.activeElement}catch(a){}}function sa(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)sa(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=qa;else if(!e)return a;return 1===f&&(g=e,e=function(a){return n().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=n.guid++)),a.each(function(){n.event.add(this,b,e,d,c)})}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=n.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return"undefined"==typeof n||a&&n.event.triggered===a.type?void 0:n.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(G)||[""],h=b.length;while(h--)f=oa.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=n.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=n.event.special[o]||{},l=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},i),(m=g[o])||(m=g[o]=[],m.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,l):m.push(l),n.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=n.hasData(a)&&n._data(a);if(r&&(k=r.events)){b=(b||"").match(G)||[""],j=b.length;while(j--)if(h=oa.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=m.length;while(f--)g=m[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(m.splice(f,1),g.selector&&m.delegateCount--,l.remove&&l.remove.call(a,g));i&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(k)&&(delete r.handle,n._removeData(a,"events"))}},trigger:function(b,c,e,f){var g,h,i,j,l,m,o,p=[e||d],q=k.call(b,"type")?b.type:b,r=k.call(b,"namespace")?b.namespace.split("."):[];if(i=m=e=e||d,3!==e.nodeType&&8!==e.nodeType&&!na.test(q+n.event.triggered)&&(q.indexOf(".")>-1&&(r=q.split("."),q=r.shift(),r.sort()),h=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=f?2:3,b.namespace=r.join("."),b.rnamespace=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=e),c=null==c?[b]:n.makeArray(c,[b]),l=n.event.special[q]||{},f||!l.trigger||l.trigger.apply(e,c)!==!1)){if(!f&&!l.noBubble&&!n.isWindow(e)){for(j=l.delegateType||q,na.test(j+q)||(i=i.parentNode);i;i=i.parentNode)p.push(i),m=i;m===(e.ownerDocument||d)&&p.push(m.defaultView||m.parentWindow||a)}o=0;while((i=p[o++])&&!b.isPropagationStopped())b.type=o>1?j:l.bindType||q,g=(n._data(i,"events")||{})[b.type]&&n._data(i,"handle"),g&&g.apply(i,c),g=h&&i[h],g&&g.apply&&M(i)&&(b.result=g.apply(i,c),b.result===!1&&b.preventDefault());if(b.type=q,!f&&!b.isDefaultPrevented()&&(!l._default||l._default.apply(p.pop(),c)===!1)&&M(e)&&h&&e[q]&&!n.isWindow(e)){m=e[h],m&&(e[h]=null),n.event.triggered=q;try{e[q]()}catch(s){}n.event.triggered=void 0,m&&(e[h]=m)}return b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,d,f,g,h=[],i=e.call(arguments),j=(n._data(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())a.rnamespace&&!a.rnamespace.test(g.namespace)||(a.handleObj=g,a.data=g.data,d=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==d&&(a.result=d)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&("click"!==a.type||isNaN(a.button)||a.button<1))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>-1:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[n.expando])return a;var b,c,e,f=a.type,g=a,h=this.fixHooks[f];h||(this.fixHooks[f]=h=ma.test(f)?this.mouseHooks:la.test(f)?this.keyHooks:{}),e=h.props?this.props.concat(h.props):this.props,a=new n.Event(g),b=e.length;while(b--)c=e[b],a[c]=g[c];return a.target||(a.target=g.srcElement||d),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,h.filter?h.filter(a,g):a},props:"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,e,f,g=b.button,h=b.fromElement;return null==a.pageX&&null!=b.clientX&&(e=a.target.ownerDocument||d,f=e.documentElement,c=e.body,a.pageX=b.clientX+(f&&f.scrollLeft||c&&c.scrollLeft||0)-(f&&f.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(f&&f.scrollTop||c&&c.scrollTop||0)-(f&&f.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&h&&(a.relatedTarget=h===a.target?b.toElement:h),a.which||void 0===g||(a.which=1&g?1:2&g?3:4&g?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==ra()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===ra()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return n.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c){var d=n.extend(new n.Event,c,{type:a,isSimulated:!0});n.event.trigger(d,null,b),d.isDefaultPrevented()&&c.preventDefault()}},n.removeEvent=d.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c)}:function(a,b,c){var d="on"+b;a.detachEvent&&("undefined"==typeof a[d]&&(a[d]=null),a.detachEvent(d,c))},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?pa:qa):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={constructor:n.Event,isDefaultPrevented:qa,isPropagationStopped:qa,isImmediatePropagationStopped:qa,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=pa,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=pa,a&&!this.isSimulated&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=pa,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return e&&(e===d||n.contains(d,e))||(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),l.submit||(n.event.special.submit={setup:function(){return n.nodeName(this,"form")?!1:void n.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=n.nodeName(b,"input")||n.nodeName(b,"button")?n.prop(b,"form"):void 0;c&&!n._data(c,"submit")&&(n.event.add(c,"submit._submit",function(a){a._submitBubble=!0}),n._data(c,"submit",!0))})},postDispatch:function(a){a._submitBubble&&(delete a._submitBubble,this.parentNode&&!a.isTrigger&&n.event.simulate("submit",this.parentNode,a))},teardown:function(){return n.nodeName(this,"form")?!1:void n.event.remove(this,"._submit")}}),l.change||(n.event.special.change={setup:function(){return ka.test(this.nodeName)?("checkbox"!==this.type&&"radio"!==this.type||(n.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._justChanged=!0)}),n.event.add(this,"click._change",function(a){this._justChanged&&!a.isTrigger&&(this._justChanged=!1),n.event.simulate("change",this,a)})),!1):void n.event.add(this,"beforeactivate._change",function(a){var b=a.target;ka.test(b.nodeName)&&!n._data(b,"change")&&(n.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||n.event.simulate("change",this.parentNode,a)}),n._data(b,"change",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return n.event.remove(this,"._change"),!ka.test(this.nodeName)}}),l.focusin||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a))};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=n._data(d,b);e||d.addEventListener(a,c,!0),n._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=n._data(d,b)-1;e?n._data(d,b,e):(d.removeEventListener(a,c,!0),n._removeData(d,b))}}}),n.fn.extend({on:function(a,b,c,d){return sa(this,a,b,c,d)},one:function(a,b,c,d){return sa(this,a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return b!==!1&&"function"!=typeof b||(c=b,b=void 0),c===!1&&(c=qa),this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}});var ta=/ jQuery\d+="(?:null|\d+)"/g,ua=new RegExp("<(?:"+ba+")[\\s/>]","i"),va=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,wa=/<script|<style|<link/i,xa=/checked\s*(?:[^=]|=\s*.checked.)/i,ya=/^true\/(.*)/,za=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,Aa=ca(d),Ba=Aa.appendChild(d.createElement("div"));function Ca(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function Da(a){return a.type=(null!==n.find.attr(a,"type"))+"/"+a.type,a}function Ea(a){var b=ya.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Fa(a,b){if(1===b.nodeType&&n.hasData(a)){var c,d,e,f=n._data(a),g=n._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)n.event.add(b,c,h[c][d])}g.data&&(g.data=n.extend({},g.data))}}function Ga(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!l.noCloneEvent&&b[n.expando]){e=n._data(b);for(d in e.events)n.removeEvent(b,d,e.handle);b.removeAttribute(n.expando)}"script"===c&&b.text!==a.text?(Da(b).text=a.text,Ea(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),l.html5Clone&&a.innerHTML&&!n.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&Z.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:"input"!==c&&"textarea"!==c||(b.defaultValue=a.defaultValue)}}function Ha(a,b,c,d){b=f.apply([],b);var e,g,h,i,j,k,m=0,o=a.length,p=o-1,q=b[0],r=n.isFunction(q);
vendor: 11,307 bytes, line 4
4if(r||o>1&&"string"==typeof q&&!l.checkClone&&xa.test(q))return a.each(function(e){var f=a.eq(e);r&&(b[0]=q.call(this,e,f.html())),Ha(f,b,c,d)});if(o&&(k=ja(b,a[0].ownerDocument,!1,a,d),e=k.firstChild,1===k.childNodes.length&&(k=e),e||d)){for(i=n.map(ea(k,"script"),Da),h=i.length;o>m;m++)g=k,m!==p&&(g=n.clone(g,!0,!0),h&&n.merge(i,ea(g,"script"))),c.call(a[m],g,m);if(h)for(j=i[i.length-1].ownerDocument,n.map(i,Ea),m=0;h>m;m++)g=i[m],_.test(g.type||"")&&!n._data(g,"globalEval")&&n.contains(j,g)&&(g.src?n._evalUrl&&n._evalUrl(g.src):n.globalEval((g.text||g.textContent||g.innerHTML||"").replace(za,"")));k=e=null}return a}function Ia(a,b,c){for(var d,e=b?n.filter(b,a):a,f=0;null!=(d=e[f]);f++)c||1!==d.nodeType||n.cleanData(ea(d)),d.parentNode&&(c&&n.contains(d.ownerDocument,d)&&fa(ea(d,"script")),d.parentNode.removeChild(d));return a}n.extend({htmlPrefilter:function(a){return a.replace(va,"<$1></$2>")},clone:function(a,b,c){var d,e,f,g,h,i=n.contains(a.ownerDocument,a);if(l.html5Clone||n.isXMLDoc(a)||!ua.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(Ba.innerHTML=a.outerHTML,Ba.removeChild(f=Ba.firstChild)),!(l.noCloneEvent&&l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(d=ea(f),h=ea(a),g=0;null!=(e=h[g]);++g)d[g]&&Ga(e,d[g]);if(b)if(c)for(h=h||ea(a),d=d||ea(f),g=0;null!=(e=h[g]);g++)Fa(e,d[g]);else Fa(a,f);return d=ea(f,"script"),d.length>0&&fa(d,!i&&ea(a,"script")),d=h=e=null,f},cleanData:function(a,b){for(var d,e,f,g,h=0,i=n.expando,j=n.cache,k=l.attributes,m=n.event.special;null!=(d=a[h]);h++)if((b||M(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)m[e]?n.event.remove(d,e):n.removeEvent(d,e,g.handle);j[f]&&(delete j[f],k||"undefined"==typeof d.removeAttribute?d[i]=void 0:d.removeAttribute(i),c.push(f))}}}),n.fn.extend({domManip:Ha,detach:function(a){return Ia(this,a,!0)},remove:function(a){return Ia(this,a)},text:function(a){return Y(this,function(a){return void 0===a?n.text(this):this.empty().append((this[0]&&this[0].ownerDocument||d).createTextNode(a))},null,a,arguments.length)},append:function(){return Ha(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ca(this,a);b.appendChild(a)}})},prepend:function(){return Ha(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ca(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return Ha(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return Ha(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&n.cleanData(ea(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&n.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return Y(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(ta,""):void 0;if("string"==typeof a&&!wa.test(a)&&(l.htmlSerialize||!ua.test(a))&&(l.leadingWhitespace||!aa.test(a))&&!da[($.exec(a)||["",""])[1].toLowerCase()]){a=n.htmlPrefilter(a);try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(ea(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=[];return Ha(this,arguments,function(b){var c=this.parentNode;n.inArray(this,a)<0&&(n.cleanData(ea(this)),c&&c.replaceChild(b,this))},a)}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=0,e=[],f=n(a),h=f.length-1;h>=d;d++)c=d===h?this:this.clone(!0),n(f[d])[b](c),g.apply(e,c.get());return this.pushStack(e)}});var Ja,Ka={HTML:"block",BODY:"block"};function La(a,b){var c=n(b.createElement(a)).appendTo(b.body),d=n.css(c[0],"display");return c.detach(),d}function Ma(a){var b=d,c=Ka[a];return c||(c=La(a,b),"none"!==c&&c||(Ja=(Ja||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Ja[0].contentWindow||Ja[0].contentDocument).document,b.write(),b.close(),c=La(a,b),Ja.detach()),Ka[a]=c),c}var Na=/^margin/,Oa=new RegExp("^("+T+")(?!px)[a-z%]+$","i"),Pa=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e},Qa=d.documentElement;!function(){var b,c,e,f,g,h,i=d.createElement("div"),j=d.createElement("div");if(j.style){j.style.cssText="float:left;opacity:.5",l.opacity="0.5"===j.style.opacity,l.cssFloat=!!j.style.cssFloat,j.style.backgroundClip="content-box",j.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===j.style.backgroundClip,i=d.createElement("div"),i.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",j.innerHTML="",i.appendChild(j),l.boxSizing=""===j.style.boxSizing||""===j.style.MozBoxSizing||""===j.style.WebkitBoxSizing,n.extend(l,{reliableHiddenOffsets:function(){return null==b&&k(),f},boxSizingReliable:function(){return null==b&&k(),e},pixelMarginRight:function(){return null==b&&k(),c},pixelPosition:function(){return null==b&&k(),b},reliableMarginRight:function(){return null==b&&k(),g},reliableMarginLeft:function(){return null==b&&k(),h}});function k(){var k,l,m=d.documentElement;m.appendChild(i),j.style.cssText="-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",b=e=h=!1,c=g=!0,a.getComputedStyle&&(l=a.getComputedStyle(j),b="1%"!==(l||{}).top,h="2px"===(l||{}).marginLeft,e="4px"===(l||{width:"4px"}).width,j.style.marginRight="50%",c="4px"===(l||{marginRight:"4px"}).marginRight,k=j.appendChild(d.createElement("div")),k.style.cssText=j.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",k.style.marginRight=k.style.width="0",j.style.width="1px",g=!parseFloat((a.getComputedStyle(k)||{}).marginRight),j.removeChild(k)),j.style.display="none",f=0===j.getClientRects().length,f&&(j.style.display="",j.innerHTML="<table><tr><td></td><td>t</td></tr></table>",k=j.getElementsByTagName("td"),k[0].style.cssText="margin:0;border:0;padding:0;display:none",f=0===k[0].offsetHeight,f&&(k[0].style.display="",k[1].style.display="none",f=0===k[0].offsetHeight)),m.removeChild(i)}}}();var Ra,Sa,Ta=/^(top|right|bottom|left)$/;a.getComputedStyle?(Ra=function(b){var c=b.ownerDocument.defaultView;return c&&c.opener||(c=a),c.getComputedStyle(b)},Sa=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ra(a),g=c?c.getPropertyValue(b)||c[b]:void 0,""!==g&&void 0!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),c&&!l.pixelMarginRight()&&Oa.test(g)&&Na.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f),void 0===g?g:g+""}):Qa.currentStyle&&(Ra=function(a){return a.currentStyle},Sa=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ra(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Oa.test(g)&&!Ta.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function Ua(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}var Va=/alpha\([^)]*\)/i,Wa=/opacity\s*=\s*([^)]*)/i,Xa=/^(none|table(?!-c[ea]).+)/,Ya=new RegExp("^("+T+")(.*)$","i"),Za={position:"absolute",visibility:"hidden",display:"block"},$a={letterSpacing:"0",fontWeight:"400"},_a=["Webkit","O","Moz","ms"],ab=d.createElement("div").style;function bb(a){if(a in ab)return a;var b=a.charAt(0).toUpperCase()+a.slice(1),c=_a.length;while(c--)if(a=_a[c]+b,a in ab)return a}function cb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=n._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&W(d)&&(f[g]=n._data(d,"olddisplay",Ma(d.nodeName)))):(e=W(d),(c&&"none"!==c||!e)&&n._data(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function db(a,b,c){var d=Ya.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function eb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+V[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+V[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+V[f]+"Width",!0,e))):(g+=n.css(a,"padding"+V[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+V[f]+"Width",!0,e)));return g}function fb(b,c,e){var f=!0,g="width"===c?b.offsetWidth:b.offsetHeight,h=Ra(b),i=l.boxSizing&&"border-box"===n.css(b,"boxSizing",!1,h);if(d.msFullscreenElement&&a.top!==a&&b.getClientRects().length&&(g=Math.round(100*b.getBoundingClientRect()[c])),0>=g||null==g){if(g=Sa(b,c,h),(0>g||null==g)&&(g=b.style[c]),Oa.test(g))return g;f=i&&(l.boxSizingReliable()||g===b.style[c]),g=parseFloat(g)||0}return g+eb(b,c,e||(i?"border":"content"),f,h)+"px"}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Sa(a,"opacity");return""===c?"1":c}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":l.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;if(b=n.cssProps[h]||(n.cssProps[h]=bb(h)||h),g=n.cssHooks[b]||n.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=U.exec(c))&&e[1]&&(c=X(a,b,e),f="number"),null!=c&&c===c&&("number"===f&&(c+=e&&e[3]||(n.cssNumber[h]?"":"px")),l.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=bb(h)||h),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Sa(a,b,d)),"normal"===f&&b in $a&&(f=$a[b]),""===c||c?(e=parseFloat(f),c===!0||isFinite(e)?e||0:f):f}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?Xa.test(n.css(a,"display"))&&0===a.offsetWidth?Pa(a,Za,function(){return fb(a,b,d)}):fb(a,b,d):void 0},set:function(a,c,d){var e=d&&Ra(a);return db(a,c,d?eb(a,b,d,l.boxSizing&&"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),l.opacity||(n.cssHooks.opacity={get:function(a,b){return Wa.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=n.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===n.trim(f.replace(Va,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Va.test(f)?f.replace(Va,e):f+" "+e)}}),n.cssHooks.marginRight=Ua(l.reliableMarginRight,function(a,b){return b?Pa(a,{display:"inline-block"},Sa,[a,"marginRight"]):void 0}),n.cssHooks.marginLeft=Ua(l.reliableMarginLeft,function(a,b){
4 5return b?(parseFloat(Sa(a,"marginLeft"))||(n.contains(a.ownerDocument,a)?a.getBoundingClientRect().left-Pa(a,{
vendor: 20,468 bytes, line 5
5marginLeft:0},function(){return a.getBoundingClientRect().left}):0))+"px":void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+V[d]+b]=f[d]||f[d-2]||f[0];return e}},Na.test(a)||(n.cssHooks[a+b].set=db)}),n.fn.extend({css:function(a,b){return Y(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=Ra(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)},a,b,arguments.length>1)},show:function(){return cb(this,!0)},hide:function(){return cb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){W(this)?n(this).show():n(this).hide()})}});function gb(a,b,c,d,e){return new gb.prototype.init(a,b,c,d,e)}n.Tween=gb,gb.prototype={constructor:gb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||n.easing._default,this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=gb.propHooks[this.prop];return a&&a.get?a.get(this):gb.propHooks._default.get(this)},run:function(a){var b,c=gb.propHooks[this.prop];return this.options.duration?this.pos=b=n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):gb.propHooks._default.set(this),this}},gb.prototype.init.prototype=gb.prototype,gb.propHooks={_default:{get:function(a){var b;return 1!==a.elem.nodeType||null!=a.elem[a.prop]&&null==a.elem.style[a.prop]?a.elem[a.prop]:(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0)},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):1!==a.elem.nodeType||null==a.elem.style[n.cssProps[a.prop]]&&!n.cssHooks[a.prop]?a.elem[a.prop]=a.now:n.style(a.elem,a.prop,a.now+a.unit)}}},gb.propHooks.scrollTop=gb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2},_default:"swing"},n.fx=gb.prototype.init,n.fx.step={};var hb,ib,jb=/^(?:toggle|show|hide)$/,kb=/queueHooks$/;function lb(){return a.setTimeout(function(){hb=void 0}),hb=n.now()}function mb(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=V[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function nb(a,b,c){for(var d,e=(qb.tweeners[b]||[]).concat(qb.tweeners["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function ob(a,b,c){var d,e,f,g,h,i,j,k,m=this,o={},p=a.style,q=a.nodeType&&W(a),r=n._data(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,m.always(function(){m.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=n.css(a,"display"),k="none"===j?n._data(a,"olddisplay")||Ma(a.nodeName):j,"inline"===k&&"none"===n.css(a,"float")&&(l.inlineBlockNeedsLayout&&"inline"!==Ma(a.nodeName)?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",l.shrinkWrapBlocks()||m.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],jb.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||n.style(a,d)}else j=void 0;if(n.isEmptyObject(o))"inline"===("none"===j?Ma(a.nodeName):j)&&(p.display=j);else{r?"hidden"in r&&(q=r.hidden):r=n._data(a,"fxshow",{}),f&&(r.hidden=!q),q?n(a).show():m.done(function(){n(a).hide()}),m.done(function(){var b;n._removeData(a,"fxshow");for(b in o)n.style(a,b,o[b])});for(d in o)g=nb(q?r[d]:0,d,m),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function pb(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function qb(a,b,c){var d,e,f=0,g=qb.prefilters.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=hb||lb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{},easing:n.easing._default},c),originalProperties:b,originalOptions:c,startTime:hb||lb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?(h.notifyWith(a,[j,1,0]),h.resolveWith(a,[j,b])):h.rejectWith(a,[j,b]),this}}),k=j.props;for(pb(k,j.opts.specialEasing);g>f;f++)if(d=qb.prefilters[f].call(j,a,k,j.opts))return n.isFunction(d.stop)&&(n._queueHooks(j.elem,j.opts.queue).stop=n.proxy(d.stop,d)),d;return n.map(k,nb,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(qb,{tweeners:{"*":[function(a,b){var c=this.createTween(a,b);return X(c.elem,a,U.exec(b),c),c}]},tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.match(G);for(var c,d=0,e=a.length;e>d;d++)c=a[d],qb.tweeners[c]=qb.tweeners[c]||[],qb.tweeners[c].unshift(b)},prefilters:[ob],prefilter:function(a,b){b?qb.prefilters.unshift(a):qb.prefilters.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,null!=d.queue&&d.queue!==!0||(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(W).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=qb(this,n.extend({},a),f);(e||n._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=n._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&kb.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));!b&&c||n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=n._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(mb(b,!0),a,d,e)}}),n.each({slideDown:mb("show"),slideUp:mb("hide"),slideToggle:mb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=n.timers,c=0;for(hb=n.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||n.fx.stop(),hb=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){ib||(ib=a.setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){a.clearInterval(ib),ib=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(b,c){return b=n.fx?n.fx.speeds[b]||b:b,c=c||"fx",this.queue(c,function(c,d){var e=a.setTimeout(c,b);d.stop=function(){a.clearTimeout(e)}})},function(){var a,b=d.createElement("input"),c=d.createElement("div"),e=d.createElement("select"),f=e.appendChild(d.createElement("option"));c=d.createElement("div"),c.setAttribute("className","t"),c.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",a=c.getElementsByTagName("a")[0],b.setAttribute("type","checkbox"),c.appendChild(b),a=c.getElementsByTagName("a")[0],a.style.cssText="top:1px",l.getSetAttribute="t"!==c.className,l.style=/top/.test(a.getAttribute("style")),l.hrefNormalized="/a"===a.getAttribute("href"),l.checkOn=!!b.value,l.optSelected=f.selected,l.enctype=!!d.createElement("form").enctype,e.disabled=!0,l.optDisabled=!f.disabled,b=d.createElement("input"),b.setAttribute("value",""),l.input=""===b.getAttribute("value"),b.value="t",b.setAttribute("type","radio"),l.radioValue="t"===b.value}();var rb=/\r/g,sb=/[\x20\t\r\n\f]+/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(rb,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.trim(n.text(a)).replace(sb," ")}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],(c.selected||i===e)&&(l.optDisabled?!c.disabled:null===c.getAttribute("disabled"))&&(!c.parentNode.disabled||!n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)if(d=e[g],n.inArray(n.valHooks.option.get(d),f)>-1)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>-1:void 0}},l.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var tb,ub,vb=n.expr.attrHandle,wb=/^(?:checked|selected)$/i,xb=l.getSetAttribute,yb=l.input;n.fn.extend({attr:function(a,b){return Y(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return"undefined"==typeof a.getAttribute?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),e=n.attrHooks[b]||(n.expr.match.bool.test(b)?ub:tb)),void 0!==c?null===c?void n.removeAttr(a,b):e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:(a.setAttribute(b,c+""),c):e&&"get"in e&&null!==(d=e.get(a,b))?d:(d=n.find.attr(a,b),null==d?void 0:d))},attrHooks:{type:{set:function(a,b){if(!l.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(G);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)?yb&&xb||!wb.test(c)?a[d]=!1:a[n.camelCase("default-"+c)]=a[d]=!1:n.attr(a,c,""),a.removeAttribute(xb?c:d)}}),ub={set:function(a,b,c){return b===!1?n.removeAttr(a,c):yb&&xb||!wb.test(c)?a.setAttribute(!xb&&n.propFix[c]||c,c):a[n.camelCase("default-"+c)]=a[c]=!0,c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=vb[b]||n.find.attr;yb&&xb||!wb.test(b)?vb[b]=function(a,b,d){var e,f;return d||(f=vb[b],vb[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,vb[b]=f),e}:vb[b]=function(a,b,c){return c?void 0:a[n.camelCase("default-"+b)]?b.toLowerCase():null}}),yb&&xb||(n.attrHooks.value={set:function(a,b,c){return n.nodeName(a,"input")?void(a.defaultValue=b):tb&&tb.set(a,b,c)}}),xb||(tb={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},vb.id=vb.name=vb.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},n.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:tb.set},n.attrHooks.contenteditable={set:function(a,b,c){tb.set(a,""===b?!1:b,c)}},n.each(["width","height"],function(a,b){n.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),l.style||(n.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var zb=/^(?:input|select|textarea|button|object)$/i,Ab=/^(?:a|area)$/i;n.fn.extend({prop:function(a,b){return Y(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return a=n.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),n.extend({prop:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return 1===f&&n.isXMLDoc(a)||(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=n.find.attr(a,"tabindex");return b?parseInt(b,10):zb.test(a.nodeName)||Ab.test(a.nodeName)&&a.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),l.hrefNormalized||n.each(["href","src"],function(a,b){n.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),l.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null},set:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this}),l.enctype||(n.propFix.enctype="encoding");var Bb=/[\t\r\n\f]/g;function Cb(a){return n.attr(a,"class")||""}n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h,i=0;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,Cb(this)))});if("string"==typeof a&&a){b=a.match(G)||[];while(c=this[i++])if(e=Cb(c),d=1===c.nodeType&&(" "+e+" ").replace(Bb," ")){g=0;while(f=b[g++])d.indexOf(" "+f+" ")<0&&(d+=f+" ");h=n.trim(d),e!==h&&n.attr(c,"class",h)}}return this},removeClass:function(a){var b,c,d,e,f,g,h,i=0;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,Cb(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof a&&a){b=a.match(G)||[];while(c=this[i++])if(e=Cb(c),d=1===c.nodeType&&(" "+e+" ").replace(Bb," ")){g=0;while(f=b[g++])while(d.indexOf(" "+f+" ")>-1)d=d.replace(" "+f+" "," ");h=n.trim(d),e!==h&&n.attr(c,"class",h)}}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):n.isFunction(a)?this.each(function(c){n(this).toggleClass(a.call(this,c,Cb(this),b),b)}):this.each(function(){var b,d,e,f;if("string"===c){d=0,e=n(this),f=a.match(G)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else void 0!==a&&"boolean"!==c||(b=Cb(this),b&&n._data(this,"__className__",b),n.attr(this,"class",b||a===!1?"":n._data(this,"__className__")||""))})},hasClass:function(a){var b,c,d=0;b=" "+a+" ";while(c=this[d++])if(1===c.nodeType&&(" "+Cb(c)+" ").replace(Bb," ").indexOf(b)>-1)return!0;return!1}}),n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var Db=a.location,Eb=n.now(),Fb=/\?/,Gb=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;n.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=n.trim(b+"");return e&&!n.trim(e.replace(Gb,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():n.error("Invalid JSON: "+b)},n.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new a.DOMParser,c=d.parseFromString(b,"text/xml")):(c=new a.ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||n.error("Invalid XML: "+b),c};var Hb=/#.*$/,Ib=/([?&])_=[^&]*/,Jb=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Kb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Lb=/^(?:GET|HEAD)$/,Mb=/^\/\//,Nb=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Ob={},Pb={},Qb="*/".concat("*"),Rb=Db.href,Sb=Nb.exec(Rb.toLowerCase())||[];function Tb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(G)||[];if(n.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Ub(a,b,c,d){var e={},f=a===Pb;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Vb(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&n.extend(!0,a,c),a}function Wb(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Xb(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Rb,type:"GET",isLocal:Kb.test(Sb[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Qb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Vb(Vb(a,n.ajaxSettings),b):Vb(n.ajaxSettings,a)},ajaxPrefilter:Tb(Ob),ajaxTransport:Tb(Pb),ajax:function(b,c){"object"==typeof b&&(c=b,b=void 0),c=c||{};var d,e,f,g,h,i,j,k,l=n.ajaxSetup({},c),m=l.context||l,o=l.context&&(m.nodeType||m.jquery)?n(m):n.event,p=n.Deferred(),q=n.Callbacks("once memory"),r=l.statusCode||{},s={},t={},u=0,v="canceled",w={readyState:0,getResponseHeader:function(a){var b;if(2===u){if(!k){k={};while(b=Jb.exec(g))k[b[1].toLowerCase()]=b[2]}b=k[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===u?g:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return u||(a=t[c]=t[c]||a,s[a]=b),this},overrideMimeType:function(a){return u||(l.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>u)for(b in a)r[b]=[r[b],a[b]];
vendor: 4,549 bytes, line 5
5else w.always(a[w.status]);return this},abort:function(a){var b=a||v;return j&&j.abort(b),y(0,b),this}};if(p.promise(w).complete=q.add,w.success=w.done,w.error=w.fail,l.url=((b||l.url||Rb)+"").replace(Hb,"").replace(Mb,Sb[1]+"//"),l.type=c.method||c.type||l.method||l.type,l.dataTypes=n.trim(l.dataType||"*").toLowerCase().match(G)||[""],null==l.crossDomain&&(d=Nb.exec(l.url.toLowerCase()),l.crossDomain=!(!d||d[1]===Sb[1]&&d[2]===Sb[2]&&(d[3]||("http:"===d[1]?"80":"443"))===(Sb[3]||("http:"===Sb[1]?"80":"443")))),l.data&&l.processData&&"string"!=typeof l.data&&(l.data=n.param(l.data,l.traditional)),Ub(Ob,l,c,w),2===u)return w;i=n.event&&l.global,i&&0===n.active++&&n.event.trigger("ajaxStart"),l.type=l.type.toUpperCase(),l.hasContent=!Lb.test(l.type),f=l.url,l.hasContent||(l.data&&(f=l.url+=(Fb.test(f)?"&":"?")+l.data,delete l.data),l.cache===!1&&(l.url=Ib.test(f)?f.replace(Ib,"$1_="+Eb++):f+(Fb.test(f)?"&":"?")+"_="+Eb++)),l.ifModified&&(n.lastModified[f]&&w.setRequestHeader("If-Modified-Since",n.lastModified[f]),n.etag[f]&&w.setRequestHeader("If-None-Match",n.etag[f])),(l.data&&l.hasContent&&l.contentType!==!1||c.contentType)&&w.setRequestHeader("Content-Type",l.contentType),w.setRequestHeader("Accept",l.dataTypes[0]&&l.accepts[l.dataTypes[0]]?l.accepts[l.dataTypes[0]]+("*"!==l.dataTypes[0]?", "+Qb+"; q=0.01":""):l.accepts["*"]);for(e in l.headers)w.setRequestHeader(e,l.headers[e]);if(l.beforeSend&&(l.beforeSend.call(m,w,l)===!1||2===u))return w.abort();v="abort";for(e in{success:1,error:1,complete:1})w[e](l[e]);if(j=Ub(Pb,l,c,w)){if(w.readyState=1,i&&o.trigger("ajaxSend",[w,l]),2===u)return w;l.async&&l.timeout>0&&(h=a.setTimeout(function(){w.abort("timeout")},l.timeout));try{u=1,j.send(s,y)}catch(x){if(!(2>u))throw x;y(-1,x)}}else y(-1,"No Transport");function y(b,c,d,e){var k,s,t,v,x,y=c;2!==u&&(u=2,h&&a.clearTimeout(h),j=void 0,g=e||"",w.readyState=b>0?4:0,k=b>=200&&300>b||304===b,d&&(v=Wb(l,w,d)),v=Xb(l,v,w,k),k?(l.ifModified&&(x=w.getResponseHeader("Last-Modified"),x&&(n.lastModified[f]=x),x=w.getResponseHeader("etag"),x&&(n.etag[f]=x)),204===b||"HEAD"===l.type?y="nocontent":304===b?y="notmodified":(y=v.state,s=v.data,t=v.error,k=!t)):(t=y,!b&&y||(y="error",0>b&&(b=0))),w.status=b,w.statusText=(c||y)+"",k?p.resolveWith(m,[s,y,w]):p.rejectWith(m,[w,y,t]),w.statusCode(r),r=void 0,i&&o.trigger(k?"ajaxSuccess":"ajaxError",[w,l,k?s:t]),q.fireWith(m,[w,y]),i&&(o.trigger("ajaxComplete",[w,l]),--n.active||n.event.trigger("ajaxStop")))}return w},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax(n.extend({url:a,type:b,dataType:e,data:c,success:d},n.isPlainObject(a)&&a))}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){if(n.isFunction(a))return this.each(function(b){n(this).wrapAll(a.call(this,b))});if(this[0]){var b=n(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return n.isFunction(a)?this.each(function(b){n(this).wrapInner(a.call(this,b))}):this.each(function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}});function Yb(a){return a.style&&a.style.display||n.css(a,"display")}function Zb(a){while(a&&1===a.nodeType){if("none"===Yb(a)||"hidden"===a.type)return!0;a=a.parentNode}return!1}n.expr.filters.hidden=function(a){return l.reliableHiddenOffsets()?a.offsetWidth<=0&&a.offsetHeight<=0&&!a.getClientRects().length:Zb(a)},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var $b=/%20/g,_b=/\[\]$/,ac=/\r?\n/g,bc=/^(?:submit|button|image|reset|file)$/i,cc=/^(?:input|select|textarea|keygen)/i;function dc(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||_b.test(a)?d(a,e):dc(a+"["+("object"==typeof e&&null!=e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)dc(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};
vendor: 6,874 bytes, line 5
5if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)dc(c,a[c],b,e);return d.join("&").replace($b,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&cc.test(this.nodeName)&&!bc.test(a)&&(this.checked||!Z.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(ac,"\r\n")}}):{name:b.name,value:c.replace(ac,"\r\n")}}).get()}}),n.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return this.isLocal?ic():d.documentMode>8?hc():/^(get|post|head|put|delete|options)$/i.test(this.type)&&hc()||ic()}:hc;var ec=0,fc={},gc=n.ajaxSettings.xhr();a.attachEvent&&a.attachEvent("onunload",function(){for(var a in fc)fc[a](void 0,!0)}),l.cors=!!gc&&"withCredentials"in gc,gc=l.ajax=!!gc,gc&&n.ajaxTransport(function(b){if(!b.crossDomain||l.cors){var c;return{send:function(d,e){var f,g=b.xhr(),h=++ec;if(g.open(b.type,b.url,b.async,b.username,b.password),b.xhrFields)for(f in b.xhrFields)g[f]=b.xhrFields[f];b.mimeType&&g.overrideMimeType&&g.overrideMimeType(b.mimeType),b.crossDomain||d["X-Requested-With"]||(d["X-Requested-With"]="XMLHttpRequest");for(f in d)void 0!==d[f]&&g.setRequestHeader(f,d[f]+"");g.send(b.hasContent&&b.data||null),c=function(a,d){var f,i,j;if(c&&(d||4===g.readyState))if(delete fc[h],c=void 0,g.onreadystatechange=n.noop,d)4!==g.readyState&&g.abort();else{j={},f=g.status,"string"==typeof g.responseText&&(j.text=g.responseText);try{i=g.statusText}catch(k){i=""}f||!b.isLocal||b.crossDomain?1223===f&&(f=204):f=j.text?200:404}j&&e(f,i,j,g.getAllResponseHeaders())},b.async?4===g.readyState?a.setTimeout(c):g.onreadystatechange=fc[h]=c:c()},abort:function(){c&&c(void 0,!0)}}}});function hc(){try{return new a.XMLHttpRequest}catch(b){}}function ic(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=d.head||n("head")[0]||d.documentElement;return{send:function(e,f){b=d.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||f(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var jc=[],kc=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=jc.pop()||n.expando+"_"+Eb++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(kc.test(b.url)?"url":"string"==typeof b.data&&0===(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&kc.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(kc,"$1"+e):b.jsonp!==!1&&(b.url+=(Fb.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){void 0===f?n(a).removeProp(e):a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,jc.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||d;var e=x.exec(a),f=!c&&[];return e?[b.createElement(e[1])]:(e=ja([a],b,f),f&&f.length&&n(f).remove(),n.merge([],e.childNodes))};var lc=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&lc)return lc.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>-1&&(d=n.trim(a.slice(h,a.length)),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&n.ajax({url:a,type:e||"GET",dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).always(c&&function(a,b){g.each(function(){c.apply(this,f||[a.responseText,b,a])})}),this},n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};function mc(a){return n.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&n.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,n.extend({},h))),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,n.contains(b,e)?("undefined"!=typeof e.getBoundingClientRect&&(d=e.getBoundingClientRect()),c=mc(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===n.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(c=a.offset()),c.top+=n.css(a[0],"borderTopWidth",!0),c.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-n.css(d,"marginTop",!0),left:b.left-c.left-n.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent;while(a&&!n.nodeName(a,"html")&&"static"===n.css(a,"position"))a=a.offsetParent;return a||Qa})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);n.fn[a]=function(d){return Y(this,function(a,d,e){var f=mc(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?n(f).scrollLeft():e,c?e:n(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=Ua(l.pixelPosition,function(a,c){return c?(c=Sa(a,b),Oa.test(c)?n(a).position()[b]+"px":c):void 0
vendor: 2,793 bytes, lines 5-8
5; 6})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return Y(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.extend({bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}}),n.fn.size=function(){return this.length},n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var nc=a.jQuery,oc=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=oc),b&&a.jQuery===n&&(a.jQuery=nc),n},b||(a.jQuery=a.$=n),n}); 7 8!function(e){"use strict";var t={i18n:{ru:{months:["ЯнваÑÑ","ФевÑалÑ","ÐаÑÑ","ÐпÑелÑ","Ðай","ÐÑнÑ","ÐÑлÑ","ÐвгÑÑÑ","СенÑÑбÑÑ","ÐкÑÑбÑÑ","ÐоÑбÑÑ","ÐекабÑÑ"],dayOfWeek:["ÐÑк","Ðн","ÐÑ","СÑ","ЧÑ","ÐÑ","Сб"]},en:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],dayOfWeek:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},de:{months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],dayOfWeek:["So","Mo","Di","Mi","Do","Fr","Sa"]},nl:{months:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"],dayOfWeek:["zo","ma","di","wo","do","vr","za"]},tr:{months:["Ocak","Åubat","Mart","Nisan","Mayıs","Haziran","Temmuz","AÄustos","Eylül","Ekim","Kasım","Aralık"],dayOfWeek:["Paz","Pts","Sal","Ãar","Per","Cum","Cts"]},fr:{months:["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"],dayOfWeek:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"]},es:{months:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],dayOfWeek:["Dom","Lun","Mar","Mié","Jue","Vie","Sáb"]},th:{months:["มà¸à¸£à¸²à¸à¸¡","à¸à¸¸à¸¡à¸ าà¸à¸±à¸à¸à¹","มีà¸à¸²à¸à¸¡","à¹à¸¡à¸©à¸²à¸¢à¸","à¸à¸¤à¸©à¸ าà¸à¸¡","มิà¸à¸¸à¸à¸²à¸¢à¸","à¸à¸£à¸à¸à¸²à¸à¸¡","สิà¸à¸«à¸²à¸à¸¡","à¸à¸±à¸à¸¢à¸²à¸¢à¸","à¸à¸¸à¸¥à¸²à¸à¸¡","à¸à¸¤à¸¨à¸à¸´à¸à¸²à¸¢à¸","à¸à¸±à¸à¸§à¸²à¸à¸¡"],dayOfWeek:["à¸à¸².","à¸.","à¸.","à¸.","à¸à¸¤.","ศ.","ส."]}
8,pl:{months:["styczeÅ","luty","marzec","kwiecieÅ","maj","czerwiec","lipiec","sierpieÅ","wrzesieÅ","październik","listopad","grudzieÅ"],dayOfWeek:["nd","pn","wt","År","cz","pt","sb"]},pt:{months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],dayOfWeek:["Dom","Seg","Ter","Qua","Qui","Sex","Sab"]},ch:{months:["䏿","äºæ","䏿","åæ","äºæ","å
æ","䏿","å
«æ","乿","åæ","å䏿","åäºæ"],dayOfWeek:["æ¥","ä¸","äº","ä¸","å","äº","å
"]},se:{months:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],dayOfWeek:["Sön","MÃ¥n","Tis","Ons","Tor","Fre","Lör"]},kr:{months:["1ì","2ì","3ì","4ì","5ì","6ì","7ì","8ì","9ì","10ì","11ì","12ì"],dayOfWeek:["ì¼","ì","í","ì","목","ê¸","í "]},it:{months:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"],dayOfWeek:["Dom","Lun","Mar","Mer","Gio","Ven","Sab"]},da:{months:["January","Februar","Marts","April","Maj","Juni","July","August","September","Oktober","November","December"],dayOfWeek:["Søn","Man","Tir","ons","Tor","Fre","lør"]},ja:{months:["1æ","2æ","3æ","4æ","5æ","6æ","7æ","8æ","9æ","10æ","11æ","12æ"],dayOfWeek:["æ¥","æ","ç«","æ°´","æ¨","é","å"]},vi:{months:["Tháng 1","Tháng 2","Tháng 3","Tháng 4","Tháng 5","Tháng 6","Tháng 7","Tháng 8","Tháng 9","Tháng 10","Tháng 11","Tháng 12"],dayOfWeek:["CN","T2","T3","T4","T5","T6","T7"]}},value:"",lang:"en",format:"Y/m/d H:i",formatTime:"H:i",formatDate:"Y/m/d",startDate:!1,step:60,closeOnDateSelect:!1,closeOnWithoutClick:!0,timepicker:!0,datepicker:!0,minDate:!1,maxDate:!1,minTime:!1,maxTime:!1,allowTimes:[],opened:!1,initTime:!0,inline:!1,onSelectDate:function(){},onSelectTime:function(){},onChangeMonth:function(){},onChangeDateTime:function(){},onShow:function(){},onClose:function(){},onGenerate:function(){},withoutCopyright:!0,inverseButton:!1,hours12:!1,next:"xdsoft_next",prev:"xdsoft_prev",dayOfWeekStart:0,timeHeightInTimePicker:25,timepickerScrollbar:!0,todayButton:!0,defaultSelect:!0,scrollMonth:!0,scrollTime:!0,scrollInput:!0,lazyInit:!1,mask:!1,validateOnBlur:!0,allowBlank:!0,yearStart:1950,yearEnd:2050,style:"",id:"",roundTime:"round",className:"",weekends:[],yearOffset:0};Array.prototype.indexOf||(Array.prototype.indexOf=function(e,t){for(var n=t||0,a=this.length;n<a;n++)if(this[n]===e)return n;return-1}),e.fn.xdsoftScroller=function(t){return this.each(function(){var n=e(this);if(!e(this).hasClass("xdsoft_scroller_box")){var a=function(e){var t={x:0,y:0};if("touchstart"==e.type||"touchmove"==e.type||"touchend"==e.type||"touchcancel"==e.type){var n=e.originalEvent.touches[0]||e.originalEvent.changedTouches[0];t.x=n.pageX,t.y=n.pageY}else"mousedown"!=e.type&&"mouseup"!=e.type&&"mousemove"!=e.type&&"mouseover"!=e.type&&"mouseout"!=e.type&&"mouseenter"!=e.type&&"mouseleave"!=e.type||(t.x=e.pageX,t.y=e.pageY);return t},r=0,o=n.children().eq(0),s=n[0].clientHeight,i=o[0].offsetHeight,d=e('<div class="xdsoft_scrollbar"></div>'),u=e('<div class="xdsoft_scroller"></div>'),c=100,l=!1;d.append(u),n.addClass("xdsoft_scroller_box").append(d),u.on("mousedown.xdsoft_scroller",function(a){s||n.trigger("resize_scroll.xdsoft_scroller",[t]);var o=a.pageY,i=parseInt(u.css("margin-top")),l=d[0].offsetHeight;e(document.body).addClass("xdsoft_noselect"),e([document.body,window]).on("mouseup.xdsoft_scroller",function f(){e([document.body,window]).off("mouseup.xdsoft_scroller",f).off("mousemove.xdsoft_scroller",r).removeClass("xdsoft_noselect")}),e(document.body).on("mousemove.xdsoft_scroller",r=function(e){var t=e.pageY-o+i;t<0&&(t=0),t+u[0].offsetHeight>l&&(t=l-u[0].offsetHeight),n.trigger("scroll_element.xdsoft_scroller",[c?t/c:0])})}),n.on("scroll_element.xdsoft_scroller",function(e,t){s||n.trigger("resize_scroll.xdsoft_scroller",[t,!0]),t=t>1?1:t<0||isNaN(t)?0:t,u.css("margin-top",c*t),o.css("marginTop",-parseInt((i-s)*t))}).on("resize_scroll.xdsoft_scroller",function(e,t,a){s=n[0].clientHeight,i=o[0].offsetHeight;var r=s/i,l=r*d[0].offsetHeight;r>1?u.hide():(u.show(),u.css("height",parseInt(l>10?l:10)),c=d[0].offsetHeight-u[0].offsetHeight,a!==!0&&n.trigger("scroll_element.xdsoft_scroller",[t?t:Math.abs(parseInt(o.css("marginTop")))/(i-s)]))}),n.mousewheel&&n.mousewheel(function(e,t,a,r){var d=Math.abs(parseInt(o.css("marginTop")));return n.trigger("scroll_element.xdsoft_scroller",[(d-20*t)/(i-s)]),e.stopPropagation(),!1}),n.on("touchstart",function(e){l=a(e)}),n.on("touchmove",function(e){if(l){var t=a(e),r=Math.abs(parseInt(o.css("marginTop")));n.trigger("scroll_element.xdsoft_scroller",[(r-(t.y-l.y))/(i-s)]),e.stopPropagation(),e.preventDefault()}}),n.on("touchend touchcancel",function(e){l=!1})}n.trigger("resize_scroll.xdsoft_scroller",[t])})},e.fn.datetimepicker=function(n){var a=48,r=57,o=96,s=105,i=17,d=46,u=13,c=27,l=8,f=37,m=38,h=39,g=40,p=9,x=116,v=65,y=67,D=86,T=90,w=89,b=!1,_=e.isPlainObject(n)||!n?e.extend(!0,{},t,n):e.extend({},t),M=0,k=function(e){e.on("open.xdsoft focusin.xdsoft mousedown.xdsoft",function t(n){e.is(":disabled")||e.is(":hidden")||!e.is(":visible")||e.data("xdsoft_datetimepicker")||(clearTimeout(
8M),M=setTimeout(function(){e.data("xdsoft_datetimepicker")||S(e),e.off("open.xdsoft focusin.xdsoft mousedown.xdsoft",t).trigger("open.xdsoft")},100))})},S=function(t){function n(){var e=_.value?_.value:t&&t.val&&t.val()?t.val():"";return e&&W.isValidDate(e=Date.parseDate(e,_.format))?M.data("changed",!0):e="",e||_.startDate===!1||(e=W.strToDateTime(_.startDate)),e?e:0}var M=e("<div "+(_.id?'id="'+_.id+'"':"")+" "+(_.style?'style="'+_.style+'"':"")+' class="xdsoft_datetimepicker xdsoft_noselect '+_.className+'"></div>'),k=e('<div class="xdsoft_copyright"><a target="_blank" href="http://xdsoft.net/jqplugins/datetimepicker/">xdsoft.net</a></div>'),S=e('<div class="xdsoft_datepicker active"></div>'),O=e('<div class="xdsoft_mounthpicker"><button type="button" class="xdsoft_prev"></button><button type="button" class="xdsoft_today_button"></button><div class="xdsoft_label xdsoft_month"><span></span></div><div class="xdsoft_label xdsoft_year"><span></span></div><button type="button" class="xdsoft_next"></button></div>'),F=e('<div class="xdsoft_calendar"></div>'),I=e('<div class="xdsoft_timepicker active"><button type="button" class="xdsoft_prev"></button><div class="xdsoft_time_box"></div><button type="button" class="xdsoft_next"></button></div>'),C=I.find(".xdsoft_time_box").eq(0),H=e('<div class="xdsoft_time_variant"></div>'),Y=e('<div class="xdsoft_scrollbar"></div>'),P=(e('<div class="xdsoft_scroller"></div>'),e('<div class="xdsoft_select xdsoft_monthselect"><div></div></div>')),A=e('<div class="xdsoft_select xdsoft_yearselect"><div></div></div>');O.find(".xdsoft_month span").after(P),O.find(".xdsoft_year span").after(A),O.find(".xdsoft_month,.xdsoft_year").on("mousedown.xdsoft",function(t){O.find(".xdsoft_select").hide();var n=e(this).find(".xdsoft_select").eq(0),a=0,r=0;W.currentTime&&(a=W.currentTime[e(this).hasClass("xdsoft_month")?"getMonth":"getFullYear"]()),n.show();for(var o=n.find("div.xdsoft_option"),s=0;s<o.length&&o.eq(s).data("value")!=a;s++)r+=o[0].offsetHeight;return n.xdsoftScroller(r/(n.children()[0].offsetHeight-n[0].clientHeight)),t.stopPropagation(),!1}),O.find(".xdsoft_select").xdsoftScroller().on("mousedown.xdsoft",function(e){e.stopPropagation(),e.preventDefault()}).on("mousedown.xdsoft",".xdsoft_option",function(t){W&&W.currentTime&&W.currentTime[e(this).parent().parent().hasClass("xdsoft_monthselect")?"setMonth":"setFullYear"](e(this).data("value")),e(this).parent().parent().hide(),M.trigger("xchange.xdsoft"),_.onChangeMonth&&_.onChangeMonth.call&&_.onChangeMonth.call(M,W.currentTime,M.data("input"))}),M.setOptions=function(n){if(_=e.extend(!0,{},_,n),n.allowTimes&&e.isArray(n.allowTimes)&&n.allowTimes.length&&(_.allowTimes=e.extend(!0,[],n.allowTimes)),n.weekends&&e.isArray(n.weekends)&&n.weekends.length&&(_.weekends=e.extend(!0,[],n.weekends)),!_.open&&!_.opened||_.inline||t.trigger("open.xdsoft"),_.inline&&(M.addClass("xdsoft_inline"),t.after(M).hide(),M.trigger("afterOpen.xdsoft")),_.inverseButton&&(_.next="xdsoft_prev",_.prev="xdsoft_next"),_.datepicker?S.addClass("active"):S.removeClass("active"),_.timepicker?I.addClass("active"):I.removeClass("active"),_.value&&(t&&t.val&&t.val(_.value),W.setCurrentTime(_.value)),isNaN(_.dayOfWeekStart)||parseInt(_.dayOfWeekStart)<0||parseInt(_.dayOfWeekStart)>6?_.dayOfWeekStart=0:_.dayOfWeekStart=parseInt(_.dayOfWeekStart),_.timepickerScrollbar||Y.hide(),_.minDate&&/^-(.*)$/.test(_.minDate)&&(_.minDate=W.strToDateTime(_.minDate).dateFormat(_.formatDate)),_.maxDate&&/^\+(.*)$/.test(_.maxDate)&&(_.maxDate=W.strToDateTime(_.maxDate).dateFormat(_.formatDate)),O.find(".xdsoft_today_button").css("visibility",_.todayButton?"visible":"hidden"),_.mask){var k=function(e){try{if(document.selection&&document.selection.createRange){var t=document.selection.createRange();return t.getBookmark().charCodeAt(2)-2}if(e.setSelectionRange)return e.selectionStart}catch(n){return 0}},F=function(e,t){var e="string"==typeof e||e instanceof String?document.getElementById(e):e;if(!e)return!1;if(e.createTextRange){var n=e.createTextRange();return n.collapse(!0),n.moveEnd(t),n.moveStart(t),n.select(),!0}return!!e.setSelectionRange&&(e.setSelectionRange(t,t),!0)},C=function(e,t){var n=e.replace(/([\[\]\/\{\}\(\)\-\.\+]{1})/g,"\\$1").replace(/_/g,"{digit+}").replace(/([0-9]{1})/g,"{digit$1}").replace(/\{digit([0-9]{1})\}/g,"[0-$1_]{1}").replace(/\{digit[\+]\}/g,"[0-9_]{1}");return RegExp(n).test(t)};switch(t.off("keydown.xdsoft"),!0){case _.mask===!0:_.mask=_.format.replace(/Y/g,"9999").replace(/F/g,"9999").replace(/m/g,"19").replace(/d/g,"39").replace(/H/g,"29").replace(/i/g,"59").replace(/s/g,"59");case"string"==e.type(_.mask):C(_.mask,t.val())||t.val(_.mask.replace(/[0-9]/g,"_")),t.on("key
8down.xdsoft",function(n){var M=this.value,S=n.which;switch(!0){case S>=a&&S<=r||S>=o&&S<=s||S==l||S==d:var O=k(this),I=S!=l&&S!=d?String.fromCharCode(o<=S&&S<=s?S-a:S):"_";for(S!=l&&S!=d||!O||(O--,I="_");/[^0-9_]/.test(_.mask.substr(O,1))&&O<_.mask.length&&O>0;)O+=S==l||S==d?-1:1;if(M=M.substr(0,O)+I+M.substr(O+1),""==e.trim(M))M=_.mask.replace(/[0-9]/g,"_");else if(O==_.mask.length)break;for(O+=S==l||S==d?0:1;/[^0-9_]/.test(_.mask.substr(O,1))&&O<_.mask.length&&O>0;)O+=S==l||S==d?-1:1;C(_.mask,M)?(this.value=M,F(this,O)):""==e.trim(M)?this.value=_.mask.replace(/[0-9]/g,"_"):t.trigger("error_input.xdsoft");break;case!!~[v,y,D,T,w].indexOf(S)&&b:case!!~[c,m,g,f,h,x,i,p,u].indexOf(S):return!0}return n.preventDefault(),!1})}}_.validateOnBlur&&t.off("blur.xdsoft").on("blur.xdsoft",function(){_.allowBlank&&!e.trim(e(this).val()).length?(e(this).val(null),M.data("xdsoft_datetime").empty()):Date.parseDate(e(this).val(),_.format)?M.data("xdsoft_datetime").setCurrentTime(e(this).val()):(e(this).val(W.now().dateFormat(_.format)),M.data("xdsoft_datetime").setCurrentTime(e(this).val())),M.trigger("changedatetime.xdsoft")}),_.dayOfWeekStartPrev=0==_.dayOfWeekStart?6:_.dayOfWeekStart-1,M.trigger("xchange.xdsoft")},M.data("options",_).on("mousedown.xdsoft",function(e){return e.stopPropagation(),e.preventDefault(),A.hide(),P.hide(),!1});var N=I.find(".xdsoft_time_box");N.append(H),N.xdsoftScroller(),M.on("afterOpen.xdsoft",function(){N.xdsoftScroller()}),M.append(S).append(I),_.withoutCopyright!==!0&&M.append(k),S.append(O).append(F),e("body").append(M);var W=new function(){var e=this;e.now=function(){var e=new Date;return _.yearOffset&&e.setFullYear(e.getFullYear()+_.yearOffset),e},e.currentTime=this.now(),e.isValidDate=function(e){return"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e.getTime())},e.setCurrentTime=function(t){e.currentTime="string"==typeof t?e.strToDateTime(t):e.isValidDate(t)?t:e.now(),M.trigger("xchange.xdsoft")},e.empty=function(){e.currentTime=null},e.getCurrentTime=function(t){return e.currentTime},e.nextMonth=function(){var t=e.currentTime.getMonth()+1;return 12==t&&(e.currentTime.setFullYear(e.currentTime.getFullYear()+1),t=0),e.currentTime.setDate(Math.min(Date.daysInMonth[t],e.currentTime.getDate())),e.currentTime.setMonth(t),_.onChangeMonth&&_.onChangeMonth.call&&_.onChangeMonth.call(M,W.currentTime,M.data("input")),M.trigger("xchange.xdsoft"),t},e.prevMonth=function(){var t=e.currentTime.getMonth()-1;return t==-1&&(e.currentTime.setFullYear(e.currentTime.getFullYear()-1),t=11),e.currentTime.setDate(Math.min(Date.daysInMonth[t],e.currentTime.getDate())),e.currentTime.setMonth(t),_.onChangeMonth&&_.onChangeMonth.call&&_.onChangeMonth.call(M,W.currentTime,M.data("input")),M.trigger("xchange.xdsoft"),t},e.strToDateTime=function(t){var n,a,r=[];return(r=/^(\+|\-)(.*)$/.exec(t))&&(r[2]=Date.parseDate(r[2],_.formatDate))?(n=r[2].getTime()-1*r[2].getTimezoneOffset()*6e4,a=new Date(W.now().getTime()+parseInt(r[1]+"1")*n)):a=t?Date.parseDate(t,_.format):e.now(),e.isValidDate(a)||(a=e.now()),a},e.strtodate=function(t){var n=t?Date.parseDate(t,_.formatDate):e.now();return e.isValidDate(n)||(n=e.now()),n},e.strtotime=function(t){var n=t?Date.parseDate(t,_.formatTime):e.now();return e.isValidDate(n)||(n=e.now()),n},e.str=function(){return e.currentTime.dateFormat(_.format)}};O.find(".xdsoft_today_button").on("mousedown.xdsoft",function(){M.data("changed",!0),W.setCurrentTime(0),M.trigger("afterOpen.xdsoft")}).on("dblclick.xdsoft",function(){t.val(W.str()),M.trigger("close.xdsoft")}),O.find(".xdsoft_prev,.xdsoft_next").on("mousedown.xdsoft",function(){var t=e(this),n=0,a=!1;!function r(e){W.currentTime.getMonth();t.hasClass(_.next)?W.nextMonth():t.hasClass(_.prev)&&W.prevMonth(),!a&&(n=setTimeout(r,e?e:100))}(500),e([document.body,window]).on("mouseup.xdsoft",function o(){clearTimeout(n),a=!0,e([document.body,window]).off("mouseup.xdsoft",o)})}),I.find(".xdsoft_prev,.xdsoft_next").on("mousedown.xdsoft",function(){var t=e(this),n=0,a=!1,r=110;!function o(e){var s=C[0].clientHeight,i=H[0].offsetHeight,d=Math.abs(parseInt(H.css("marginTop")));t.hasClass(_.next)&&i-s-_.timeHeightInTimePicker>=d?H.css("marginTop","-"+(d+_.timeHeightInTimePicker)+"px"):t.hasClass(_.prev)&&d-_.timeHeightInTimePicker>
8=0&&H.css("marginTop","-"+(d-_.timeHeightInTimePicker)+"px"),C.trigger("scroll_element.xdsoft_scroller",[Math.abs(parseInt(H.css("marginTop"))/(i-s))]),r=r>10?10:r-10,!a&&(n=setTimeout(o,e?e:r))}(500),e([document.body,window]).on("mouseup.xdsoft",function s(){clearTimeout(n),a=!0,e([document.body,window]).off("mouseup.xdsoft",s)})});var z=0;M.on("xchange.xdsoft",function(t){clearTimeout(z),z=setTimeout(function(){for(var t="",n=new Date(W.currentTime.getFullYear(),W.currentTime.getMonth(),1,12,0,0),a=0,r=W.now();n.getDay()!=_.dayOfWeekStart;)n.setDate(n.getDate()-1);t+="<table><thead><tr>";for(var o=0;o<7;o++)t+="<th>"+_.i18n[_.lang].dayOfWeek[o+_.dayOfWeekStart>6?0:o+_.dayOfWeekStart]+"</th>";t+="</tr></thead>",t+="<tbody><tr>";var s=!1,i=!1;_.maxDate!==!1&&(s=W.strtodate(_.maxDate),s=new Date(s.getFullYear(),s.getMonth(),s.getDate(),23,59,59,999)),_.minDate!==!1&&(i=W.strtodate(_.minDate),i=new Date(i.getFullYear(),i.getMonth(),i.getDate()));for(var d,u,c,l=[];a<W.currentTime.getDaysInMonth()||n.getDay()!=_.dayOfWeekStart||W.currentTime.getMonth()==n.getMonth();)l=[],a++,d=n.getDate(),u=n.getFullYear(),c=n.getMonth(),l.push("xdsoft_date"),(s!==!1&&n>s||i!==!1&&n<i)&&l.push("xdsoft_disabled"),W.currentTime.getMonth()!=c&&l.push("xdsoft_other_month"),(_.defaultSelect||M.data("changed"))&&W.currentTime.dateFormat("d.m.Y")==n.dateFormat("d.m.Y")&&l.push("xdsoft_current"),r.dateFormat("d.m.Y")==n.dateFormat("d.m.Y")&&l.push("xdsoft_today"),(0==n.getDay()||6==n.getDay()||~_.weekends.indexOf(n.dateFormat("d.m.Y")))&&l.push("xdsoft_weekend"),_.beforeShowDay&&"function"==typeof _.beforeShowDay&&l.push(_.beforeShowDay(n)),t+='<td data-date="'+d+'" data-month="'+c+'" data-year="'+u+'" class="xdsoft_date xdsoft_day_of_week'+n.getDay()+" "+l.join(" ")+'"><div>'+d+"</div></td>",n.getDay()==_.dayOfWeekStartPrev&&(t+="</tr>"),n.setDate(d+1);t+="</tbody></table>",F.html(t),O.find(".xdsoft_label span").eq(0).text(_.i18n[_.lang].months[W.currentTime.getMonth()]),O.find(".xdsoft_label span").eq(1).text(W.currentTime.getFullYear());var f="",m="",c="",h=function(e,t){var n=W.now();n.setHours(e),e=parseInt(n.getHours()),n.setMinutes(t),t=parseInt(n.getMinutes()),l=[],(_.maxTime!==!1&&W.strtotime(_.maxTime).getTime()<n.getTime()||_.minTime!==!1&&W.strtotime(_.minTime).getTime()>n.getTime())&&l.push("xdsoft_disabled"),(_.initTime||_.defaultSelect||M.data("changed"))&&parseInt(W.currentTime.getHours())==parseInt(e)&&(_.step>59||Math[_.roundTime](W.currentTime.getMinutes()/_.step)*_.step==parseInt(t))&&(_.defaultSelect||M.data("changed")?l.push("xdsoft_current"):_.initTime&&l.push("xdsoft_init_time")),parseInt(r.getHours())==parseInt(e)&&parseInt(r.getMinutes())==parseInt(t)&&l.push("xdsoft_today"),f+='<div class="xdsoft_time '+l.join(" ")+'" data-hour="'+e+'" data-minute="'+t+'">'+n.dateFormat(_.formatTime)+"</div>"};if(_.allowTimes&&e.isArray(_.allowTimes)&&_.allowTimes.length)for(var a=0;a<_.allowTimes.length;a++)m=W.strtotime(_.allowTimes[a]).getHours(),c=W.strtotime(_.allowTimes[a]).getMinutes(),h(m,c);else for(var a=0,o=0;a<(_.hours12?12:24);a++)for(o=0;o<60;o+=_.step)m=(a<10?"0":"")+a,c=(o<10?"0":"")+o,h(m,c);H.html(f);var g="",a=0;for(a=parseInt(_.yearStart,10)+_.yearOffset;a<=parseInt(_.yearEnd,10)+_.yearOffset;a++)g+='<div class="xdsoft_option '+(W.currentTime.getFullYear()==a?"xdsoft_current":"")+'" data-value="'+a+'">'+a+"</div>";for(A.children().eq(0).html(g),a=0,g="";a<=11;a++)g+='<div class="xdsoft_option '+(W.currentTime.getMonth()==a?"xdsoft_current":"")+'" data-value="'+a+'">'+_.i18n[_.lang].months[a]+"</div>";P.children().eq(0).html(g),e(this).trigger("generate.xdsoft")},10),t.stopPropagation()}).on("afterOpen.xdsoft",function(){if(_.timepicker){var e;if(H.find(".xdsoft_current").length?e=".xdsoft_current":H.find(".xdsoft_init_time").length&&(e=".xdsoft_init_time"),e){var t=C[0].clientHeight,n=H[0].offsetHeight,a=H.find(e).index()*_.timeHeightInTimePicker+1;n-t<a&&(a=n-t),H.css("marginTop","-"+parseInt(a)+"px"),C.trigger("scroll_element.xdsoft_scroller",[parseInt(a)/(n-t)])}}});var J=0;F.on("click.xdsoft","td",function(n){n.stopPropagation(),J++;var a=e(this),r=W.currentTime;return!a.hasClass("xdsoft_disabled")&&(r.setDate(a.data("date")),r.setMonth(a.data("month")),r.setFullYear(a.data("year")),M.trigger("select.xdsoft",[r]),t.val(W.str()),(J>1||_.closeOnDateSelect===!0||0===_.closeOnDateSelect&&!_.timepicker)&&!_.inline&&M.trigger("close.xdsoft"),_.onSelectDate&&_.onSelectDate.call&&_.onSelectDate.call(M,W.currentTime,M.data("input")),M.data("changed",!0),M.trigger("xchange.xdsoft"),M.trigger("changedatetime.xdsoft"),void setTimeout(function(){J=0},200))}),H.on("click.xdsoft","div",function(t){t.stopPropagation();var n=e(this),a=W.currentTime;return!n.hasClass("xdsoft_disabled")&&(a.setHours(n.data("hour")),a.setMinutes(n.data("minute")),M.trigger("select.xdsoft",[a]),M.data("input").val(W.str()),!_.inline&&M.trigger("close.xdsoft"),_.onSelectTime&&_.onSelectTime.call&&_.onSelectTime.call(M,W.currentTime,M.data("input")),M.data("changed",!0),M.trigger("xchange.xdsoft"),void M.trigger("changedatetime.xdsoft"))}),M.mousewheel&&S.mousewheel(function(e,t,n,a){return!_.scrollMonth||(t
8<0?W.nextMonth():W.prevMonth(),!1)}),M.mousewheel&&C.unmousewheel().mousewheel(function(e,t,n,a){if(!_.scrollTime)return!0;var r=C[0].clientHeight,o=H[0].offsetHeight,s=Math.abs(parseInt(H.css("marginTop"))),i=!0;return t<0&&o-r-_.timeHeightInTimePicker>=s?(H.css("marginTop","-"+(s+_.timeHeightInTimePicker)+"px"),i=!1):t>0&&s-_.timeHeightInTimePicker>=0&&(H.css("marginTop","-"+(s-_.timeHeightInTimePicker)+"px"),i=!1),C.trigger("scroll_element.xdsoft_scroller",[Math.abs(parseInt(H.css("marginTop"))/(o-r))]),e.stopPropagation(),i}),M.on("changedatetime.xdsoft",function(){if(_.onChangeDateTime&&_.onChangeDateTime.call){var e=M.data("input");_.onChangeDateTime.call(M,W.currentTime,e),e.trigger("change")}}).on("generate.xdsoft",function(){_.onGenerate&&_.onGenerate.call&&_.onGenerate.call(M,W.currentTime,M.data("input"))});var j=0;t.mousewheel&&t.mousewheel(function(e,n,a,r){return!_.scrollInput||(!_.datepicker&&_.timepicker?(j=H.find(".xdsoft_current").length?H.find(".xdsoft_current").eq(0).index():0,j+n>=0&&j+n<H.children().length&&(j+=n),H.children().eq(j).length&&H.children().eq(j).trigger("mousedown"),!1):_.datepicker&&!_.timepicker?(S.trigger(e,[n,a,r]),t.val&&t.val(W.str()),M.trigger("changedatetime.xdsoft"),!1):void 0)});var L=function(){var t=M.data("input").offset(),n=t.top+M.data("input")[0].offsetHeight-1,a=t.left;n+M[0].offsetHeight>e(window).height()+e(window).scrollTop()&&(n=t.top-M[0].offsetHeight+1),n<0&&(n=0),a+M[0].offsetWidth>e(window).width()&&(a=t.left-M[0].offsetWidth+M.data("input")[0].offsetWidth),M.css({left:a,top:n})};M.on("open.xdsoft",function(){var t=!0;_.onShow&&_.onShow.call&&(t=_.onShow.call(M,W.currentTime,M.data("input"))),t!==!1&&(M.show(),M.trigger("afterOpen.xdsoft"),L(),e(window).off("resize.xdsoft",L).on("resize.xdsoft",L),_.closeOnWithoutClick&&e([document.body,window]).on("mousedown.xdsoft",function n(){M.trigger("close.xdsoft"),e([document.body,window]).off("mousedown.xdsoft",n)}))}).on("close.xdsoft",function(e){var t=!0;_.onClose&&_.onClose.call&&(t=_.onClose.call(M,W.currentTime,M.data("input"))),t===!1||_.opened||_.inline||M.hide(),e.stopPropagation()}).data("input",t);var E=0;M.data("xdsoft_datetime",W),M.setOptions(_),W.setCurrentTime(n()),M.trigger("afterOpen.xdsoft"),t.data("xdsoft_datetimepicker",M).on("open.xdsoft focusin.xdsoft mousedown.xdsoft",function(e){t.is(":disabled")||t.is(":hidden")||!t.is(":visible")||(clearTimeout(E),E=setTimeout(function(){t.is(":disabled")||t.is(":hidden")||!t.is(":visible")||(W.setCurrentTime(n()),M.trigger("open.xdsoft"))},100))}).on("keydown.xdsoft",function(t){var n=(this.value,t.which);switch(!0){case!!~[u].indexOf(n):var a=e("input:visible,textarea:visible");return M.trigger("close.xdsoft"),a.eq(a.index(this)+1).focus(),!1;case!!~[p].indexOf(n):return M.trigger("close.xdsoft"),!0}})},O=function(t){var n=t.data("xdsoft_datetimepicker");n&&(n.data("xdsoft_datetime",null),n.remove(),t.data("xdsoft_datetimepicker",null).off("open.xdsoft focusin.xdsoft focusout.xdsoft mousedown.xdsoft blur.xdsoft keydown.xdsoft"),e(window).off("resize.xdsoft"),e([window,document.body]).off("mousedown.xdsoft"),t.unmousewheel&&t.unmousewheel())};return e(document).off("keydown.xdsoftctrl keyup.xdsoftctrl").on("keydown.xdsoftctrl",function(e){e.keyCode==i&&(b=!0)}).on("keyup.xdsoftctrl",function(e){e.keyCode==i&&(b=!1)}),this.each(function(){var t;if(t=e(this).data("xdsoft_datetimepicker")){if("string"===e.type(n))switch(n){case"show":e(this).select().focus(),t.trigger("open.xdsoft");break;case"hide":t.trigger("close.xdsoft");break;case"destroy":O(e(this));break;case"reset":this.value=this.defaultValue,this.value&&t.data("xdsoft_datetime").isValidDate(Date.parseDate(this.value,_.format))||t.data("changed",!1),t.data("xdsoft_datetime").setCurrentTime(this.value)}else t.setOptions(n);return 0}"string"!==e.type(n)&&(!_.lazyInit||_.open||_.inline?S(e(this)):k(e(this)))})}}(jQuery),Date.parseFunctions={count:0},Date.parseRegexes=[],Date.formatFunctions={count:0},Date.prototype.dateFormat=function(e){if("unixtime"==e)return parseInt(this.getTime()/1e3);null==Date.formatFunctions[e]&&Date.createNewFormat(e);var t=Date.formatFunctions[e];return this[t]()},Date.createNewFormat=function(format){var funcName="format"+Date.formatFunctions.count++;Date.formatFunctions[format]=funcName;for(var code="Date.prototype."+funcName+" = function() {return ",special=!1,ch="",i=0;i<format.length;++i)ch=format.charAt(i),special||"\\"!=ch?special?(special=!1,code+="'"+String.escape(ch)+"' + "):code+=Date.getFormatCode(ch):special=!0;eval(code.substring(0,code.length-3)+";}")},Date.getFormatCode=function(e){switch(e){case"d":return"String.leftPad(this.getDate(), 2, '0') + ";case"D":return"Date.dayNames[this.getDay()].substring(0, 3) + ";case"j":return"this.getDate() + ";case"l":return"Date.dayNames[this.getDay()] + ";
8case"S":return"this.getSuffix() + ";case"w":return"this.getDay() + ";case"z":return"this.getDayOfYear() + ";case"W":return"this.getWeekOfYear() + ";case"F":return"Date.monthNames[this.getMonth()] + ";case"m":return"String.leftPad(this.getMonth() + 1, 2, '0') + ";case"M":return"Date.monthNames[this.getMonth()].substring(0, 3) + ";case"n":return"(this.getMonth() + 1) + ";case"t":return"this.getDaysInMonth() + ";case"L":return"(this.isLeapYear() ? 1 : 0) + ";case"Y":return"this.getFullYear() + ";case"y":return"('' + this.getFullYear()).substring(2, 4) + ";case"a":return"(this.getHours() < 12 ? 'am' : 'pm') + ";case"A":return"(this.getHours() < 12 ? 'AM' : 'PM') + ";case"g":return"((this.getHours() %12) ? this.getHours() % 12 : 12) + ";case"G":return"this.getHours() + ";case"h":return"String.leftPad((this.getHours() %12) ? this.getHours() % 12 : 12, 2, '0') + ";case"H":return"String.leftPad(this.getHours(), 2, '0') + ";case"i":return"String.leftPad(this.getMinutes(), 2, '0') + ";case"s":return"String.leftPad(this.getSeconds(), 2, '0') + ";case"O":return"this.getGMTOffset() + ";case"T":return"this.getTimezone() + ";case"Z":return"(this.getTimezoneOffset() * -60) + ";default:return"'"+String.escape(e)+"' + "}},Date.parseDate=function(e,t){if("unixtime"==t)return new Date(isNaN(parseInt(e))?0:1e3*parseInt(e));null==Date.parseFunctions[t]&&Date.createParser(t);var n=Date.parseFunctions[t];return Date[n](e)},Date.createParser=function(format){var funcName="parse"+Date.parseFunctions.count++,regexNum=Date.parseRegexes.length,currentGroup=1;Date.parseFunctions[format]=funcName;for(var code="Date."+funcName+" = function(input) {\nvar y = -1, m = -1, d = -1, h = -1, i = -1, s = -1, z = -1;\nvar d = new Date();\ny = d.getFullYear();\nm = d.getMonth();\nd = d.getDate();\nvar results = input.match(Date.parseRegexes["+regexNum+"]);\nif (results && results.length > 0) {",regex="",special=!1,ch="",i=0;i<format.length;++i)ch=format.charAt(i),special||"\\"!=ch?special?(special=!1,regex+=String.escape(ch)):(obj=Date.formatCodeToRegex(ch,currentGroup),currentGroup+=obj.g,regex+=obj.s,obj.g&&obj.c&&(code+=obj.c)):special=!0;code+="if (y > 0 && z > 0){\nvar doyDate = new Date(y,0);\ndoyDate.setDate(z);\nm = doyDate.getMonth();\nd = doyDate.getDate();\n}",code+="if (y > 0 && m >= 0 && d > 0 && h >= 0 && i >= 0 && s >= 0)\n{return new Date(y, m, d, h, i, s);}\nelse if (y > 0 && m >= 0 && d > 0 && h >= 0 && i >= 0)\n{return new Date(y, m, d, h, i);}\nelse if (y > 0 && m >= 0 && d > 0 && h >= 0)\n{return new Date(y, m, d, h);}\nelse if (y > 0 && m >= 0 && d > 0)\n{return new Date(y, m, d);}\nelse if (y > 0 && m >= 0)\n{return new Date(y, m);}\nelse if (y > 0)\n{return new Date(y);}\n}return null;}",Date.parseRegexes[regexNum]=new RegExp("^"+regex+"$"),eval(code)},Date.formatCodeToRegex=function(e,t){switch(e){case"D":return{g:0,c:null,s:"(?:Sun|Mon|Tue|Wed|Thu|Fri|Sat)"};case"j":case"d":return{g:1,c:"d = parseInt(results["+t+"], 10);\n",s:"(\\d{1,2})"};case"l":return{g:0,c:null,s:"(?:"+Date.dayNames.join("|")+")"};case"S":return{g:0,c:null,s:"(?:st|nd|rd|th)"};case"w":return{g:0,c:null,s:"\\d"};case"z":return{g:1,c:"z = parseInt(results["+t+"], 10);\n",s:"(\\d{1,3})"};case"W":return{g:0,c:null,s:"(?:\\d{2})"};case"F":return{g:1,c:"m = parseInt(Date.monthNumbers[results["+t+"].substring(0, 3)], 10);\n",s:"("+Date.monthNames.join("|")+")"};case"M":return{g:1,c:"m = parseInt(Date.monthNumbers[results["+t+"]], 10);\n",s:"(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)"};case"n":case"m":return{g:1,c:"m = parseInt(results["+t+"], 10) - 1;\n",s:"(\\d{1,2})"};case"t":return{g:0,c:null,s:"\\d{1,2}"};case"L":return{g:0,c:null,s:"(?:1|0)"};case"Y":return{g:1,c:"y = parseInt(results["+t+"], 10);\n",s:"(\\d{4})"};case"y":return{g:1,c:"var ty = parseInt(results["+t+"], 10);\ny = ty > Date.y2kYear ? 1900 + ty : 2000 + ty;\n",s:"(\\d{1,2})"};case"a":return{g:1,c:"if (results["+t+"] == 'am') {\nif (h == 12) { h = 0; }\n} else { if (h < 12) { h += 12; }}",s:"(am|pm)"};case"A":return{g:1,c:"if (results["+t+"] == 'AM') {\nif (h == 12) { h = 0; }\n} else { if (h < 12) { h += 12; }}",s:"(AM|PM)"};case"g":case"G":case"h":case"H":return{g:1,c:"h = parseInt(results["+t+"], 10);\n",s:"(\\d{1,2})"};case"i":return{g:1,c:"i = parseInt(results["+t+"], 10);\n",s:"(\\d{2})"};case"s":return{g:1,c:"s = parseInt(results["+t+"], 10);\n",s:"(\\d{2})"};
8case"O":return{g:0,c:null,s:"[+-]\\d{4}"};case"T":return{g:0,c:null,s:"[A-Z]{3}"};case"Z":return{g:0,c:null,s:"[+-]\\d{1,5}"};default:return{g:0,c:null,s:String.escape(e)}}},Date.prototype.getTimezone=function(){return this.toString().replace(/^.*? ([A-Z]{3}) [0-9]{4}.*$/,"$1").replace(/^.*?\(([A-Z])[a-z]+ ([A-Z])[a-z]+ ([A-Z])[a-z]+\)$/,"$1$2$3")},Date.prototype.getGMTOffset=function(){return(this.getTimezoneOffset()>0?"-":"+")+String.leftPad(Math.floor(Math.abs(this.getTimezoneOffset())/60),2,"0")+String.leftPad(Math.abs(this.getTimezoneOffset())%60,2,"0")},Date.prototype.getDayOfYear=function(){var e=0;Date.daysInMonth[1]=this.isLeapYear()?29:28;for(var t=0;t<this.getMonth();++t)e+=Date.daysInMonth[t];return e+this.getDate()},Date.prototype.getWeekOfYear=function(){var e=this.getDayOfYear()+(4-this.getDay()),t=new Date(this.getFullYear(),0,1),n=7-t.getDay()+4;return String.leftPad(Math.ceil((e-n)/7)+1,2,"0")},Date.prototype.isLeapYear=function(){var e=this.getFullYear();return 0==(3&e)&&(e%100||e%400==0&&e)},Date.prototype.getFirstDayOfMonth=function(){var e=(this.getDay()-(this.getDate()-1))%7;return e<0?e+7:e},Date.prototype.getLastDayOfMonth=function(){var e=(this.getDay()+(Date.daysInMonth[this.getMonth()]-this.getDate()))%7;return e<0?e+7:e},Date.prototype.getDaysInMonth=function(){return Date.daysInMonth[1]=this.isLeapYear()?29:28,Date.daysInMonth[this.getMonth()]},Date.prototype.getSuffix=function(){switch(this.getDate()){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}},String.escape=function(e){return e.replace(/('|\\)/g,"\\$1")},String.leftPad=function(e,t,n){var a=new String(e);for(null==n&&(n=" ");a.length<t;)a=n+a;return a},Date.daysInMonth=[31,28,31,30,31,30,31,31,30,31,30,31],Date.monthNames=["January","February","March","April","May","June","July","August","September","October","November","December"],Date.dayNames=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Date.y2kYear=50,Date.monthNumbers={Jan:0,Feb:1,Mar:2, 9Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11},Date.patterns={ISO8601LongPattern:"Y-m-d H:i:s",ISO8601ShortPattern:"Y-m-d",ShortDatePattern:"n/j/Y",LongDatePattern:"l, F d, Y",FullDateTimePattern:"l, F d, Y g:i:s A",MonthDayPattern:"F d",ShortTimePattern:"g:i A",LongTimePattern:"g:i:s A",SortableDateTimePattern:"Y-m-d\\TH:i:s",UniversalSortableDateTimePattern:"Y-m-d H:i:sO",YearMonthPattern:"F, Y"},function(e){"function"==typeof define&&define.amd?define(["jquery.flot.min"],e):"object"==typeof exports?module.exports=e:e(jQuery)}(function(e){function t(t){var r,o=t||window.event,s=[].slice.call(arguments,1),i=0,d=0,u=0,c=0,l=0;return t=e.event.fix(o),t.type="mousewheel",o.wheelDelta&&(i=o.wheelDelta),o.detail&&(i=o.detail*-1),o.deltaY&&(u=o.deltaY*-1,i=u),o.deltaX&&(d=o.deltaX,i=d*-1),void 0!==o.wheelDeltaY&&(u=o.wheelDeltaY),void 0!==o.wheelDeltaX&&(d=o.wheelDeltaX*-1),c=Math.abs(i),(!n||c<n)&&(n=c),l=Math.max(Math.abs(u),Math.abs(d)),(!a||l<a)&&(a=l),r=i>0?"floor":"ceil",i=Math[r](i/n),d=Math[r](d/a),u=Math[r](u/a),s.unshift(t,i,d,u),(e.event.dispatch||e.event.handle).apply(this,s)}var n,a,r=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],o="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"];if(e.event.fixHooks)for(var s=r.length;s;)e.event.fixHooks[r[--s]]=e.event.mouseHooks;e.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var e=o.length;e;)this.addEventListener(o[--e],t,!1);else this.onmousewheel=t},teardown:function(){if(this.removeEventListener)for(var e=o.length;e;)this.removeEventListener(o[--e],t,!1);else this.onmousewheel=null}},e.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})}); 10function _toConsumableArray(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t<e.length;t++)i[t]=e[t];return i}return Array.from(e)}var _slice=Array.prototype.slice,_slicedToArray=function(){function e(e,t){var i=[],n=!0,r=!1,s=void 0;try{for(var a,o=e[Symbol.iterator]();!(n=(a=o.next()).done)&&(i.push(a.value),!t||i.length!==t);n=!0);}catch(l){r=!0,s=l}finally{try{!n&&o["return"]&&o["return"]()}finally{if(r)throw s}}return i}return function(t,i){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,i);
10throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e};!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],t):e.parsley=t(e.jQuery)}(this,function(e){"use strict";function t(e,t){return e.parsleyAdaptedCallback||(e.parsleyAdaptedCallback=function(){var i=Array.prototype.slice.call(arguments,0);i.unshift(this),e.apply(t||T,i)}),e.parsleyAdaptedCallback}function i(e){return 0===e.lastIndexOf(D,0)?e.substr(D.length):e}function n(){var t=this,i=window||global;_extends(this,{isNativeEvent:function(e){return e.originalEvent&&e.originalEvent.isTrusted!==!1},fakeInputEvent:function(i){t.isNativeEvent(i)&&e(i.target).trigger("input")},misbehaves:function(i){t.isNativeEvent(i)&&(t.behavesOk(i),e(document).on("change.inputevent",i.data.selector,t.fakeInputEvent),t.fakeInputEvent(i))},behavesOk:function(i){t.isNativeEvent(i)&&e(document).off("input.inputevent",i.data.selector,t.behavesOk).off("change.inputevent",i.data.selector,t.misbehaves)},install:function(){if(!i.inputEventPatched){i.inputEventPatched="0.0.3";for(var n=["select",'input[type="checkbox"]','input[type="radio"]','input[type="file"]'],r=0;r<n.length;r++){var s=n[r];e(document).on("input.inputevent",s,{selector:s},t.behavesOk).on("change.inputevent",s,{selector:s},t.misbehaves)}}},uninstall:function(){delete i.inputEventPatched,e(document).off(".inputevent")}})}var r=1,s={},a={attr:function(e,t,i){var n,r,s,a=new RegExp("^"+t,"i");if("undefined"==typeof i)i={};else for(n in i)i.hasOwnProperty(n)&&delete i[n];if(!e)return i;for(s=e.attributes,n=s.length;n--;)r=s[n],r&&r.specified&&a.test(r.name)&&(i[this.camelize(r.name.slice(t.length))]=this.deserializeValue(r.value));return i},checkAttr:function(e,t,i){return e.hasAttribute(t+i)},setAttr:function(e,t,i,n){e.setAttribute(this.dasherize(t+i),String(n))},generateID:function(){return""+r++},deserializeValue:function(t){var i;try{return t?"true"==t||"false"!=t&&("null"==t?null:isNaN(i=Number(t))?/^[\[\{]/.test(t)?e.parseJSON(t):t:i):t}catch(n){return t}},camelize:function(e){return e.replace(/-+(.)?/g,function(e,t){return t?t.toUpperCase():""})},dasherize:function(e){return e.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()},warn:function(){var e;window.console&&"function"==typeof window.console.warn&&(e=window.console).warn.apply(e,arguments)},warnOnce:function(e){s[e]||(s[e]=!0,this.warn.apply(this,arguments))},_resetWarnings:function(){s={}},trimString:function(e){return e.replace(/^\s+|\s+$/g,"")},parse:{date:function S(e){var t=e.match(/^(\d{4,})-(\d\d)-(\d\d)$/);if(!t)return null;var i=t.map(function(e){return parseInt(e,10)}),n=_slicedToArray(i,4),r=(n[0],n[1]),s=n[2],a=n[3],S=new Date(r,s-1,a);return S.getFullYear()!==r||S.getMonth()+1!==s||S.getDate()!==a?null:S},string:function(e){return e},integer:function(e){return isNaN(e)?null:parseInt(e,10)},number:function(e){if(isNaN(e))throw null;return parseFloat(e)},"boolean":function(e){return!/^\s*false\s*$/i.test(e)},object:function(e){return a.deserializeValue(e)},regexp:function(e){var t="";return/^\/.*\/(?:[gimy]*)$/.test(e)?(t=e.replace(/.*\/([gimy]*)$/,"$1"),e=e.replace(new RegExp("^/(.*?)/"+t+"$"),"$1")):e="^"+e+"$",new RegExp(e,t)}},parseRequirement:function(e,t){var i=this.parse[e||"string"];if(!i)throw'Unknown requirement specification: "'+e+'"';var n=i(t);if(null===n)throw"Requirement is not a "+e+': "'+t+'"';return n},namespaceEvents:function(t,i){return t=this.trimString(t||"").split(/\s+/),t[0]?e.map(t,function(e){return e+"."+i}).join(" "):""},difference:function(t,i){var n=[];return e.each(t,function(e,t){i.indexOf(t)==-1&&n.push(t)}),n},all:function(t){return e.when.apply(e,_toConsumableArray(t).concat([42,42]))},objectCreate:Object.create||function(){var e=function(){};return function(t){if(arguments.length>1)throw Error("Second argument not supported");if("object"!=typeof t)throw TypeError("Argument must be an object");e.prototype=t;var i=new e;return e.prototype=null,i}}(),_SubmitSelector:'input[type="submit"], button:submit'},o={namespace:"data-parsley-",inputs:"input, textarea, select",excluded:"input[type=button], input[type=submit], input[type=reset], input[type=hidden]",priorityEnabled:!0,multiple:null,group:null,uiEnabled:!0,validationThreshold:3,focu
10s:"first",trigger:!1,triggerAfterFailure:"input",errorClass:"parsley-error",successClass:"parsley-success",classHandler:function(e){},errorsContainer:function(e){},errorsWrapper:'<ul class="parsley-errors-list"></ul>',errorTemplate:"<li></li>"},l=function(){this.__id__=a.generateID()};l.prototype={asyncSupport:!0,_pipeAccordingToValidationResult:function(){var t=this,i=function(){var i=e.Deferred();return!0!==t.validationResult&&i.reject(),i.resolve().promise()};return[i,i]},actualizeOptions:function(){return a.attr(this.element,this.options.namespace,this.domOptions),this.parent&&this.parent.actualizeOptions&&this.parent.actualizeOptions(),this},_resetOptions:function(e){this.domOptions=a.objectCreate(this.parent.options),this.options=a.objectCreate(this.domOptions);for(var t in e)e.hasOwnProperty(t)&&(this.options[t]=e[t]);this.actualizeOptions()},_listeners:null,on:function(e,t){this._listeners=this._listeners||{};var i=this._listeners[e]=this._listeners[e]||[];return i.push(t),this},subscribe:function(t,i){e.listenTo(this,t.toLowerCase(),i)},off:function(e,t){var i=this._listeners&&this._listeners[e];if(i)if(t)for(var n=i.length;n--;)i[n]===t&&i.splice(n,1);else delete this._listeners[e];return this},unsubscribe:function(t,i){e.unsubscribeTo(this,t.toLowerCase())},trigger:function(e,t,i){t=t||this;var n,r=this._listeners&&this._listeners[e];if(r)for(var s=r.length;s--;)if(n=r[s].call(t,t,i),n===!1)return n;return!this.parent||this.parent.trigger(e,t,i)},asyncIsValid:function(e,t){return a.warnOnce("asyncIsValid is deprecated; please use whenValid instead"),this.whenValid({group:e,force:t})},_findRelated:function(){return this.options.multiple?e(this.parent.element.querySelectorAll("["+this.options.namespace+'multiple="'+this.options.multiple+'"]')):this.$element}};var u=function(e,t){var i=e.match(/^\s*\[(.*)\]\s*$/);if(!i)throw'Requirement is not an array: "'+e+'"';var n=i[1].split(",").map(a.trimString);if(n.length!==t)throw"Requirement has "+n.length+" values when "+t+" are needed";return n},d=function(e,t,i){var n=null,r={};for(var s in e)if(s){var o=i(s);"string"==typeof o&&(o=a.parseRequirement(e[s],o)),r[s]=o}else n=a.parseRequirement(e[s],t);return[n,r]},h=function(t){e.extend(!0,this,t)};h.prototype={validate:function(e,t){if(this.fn)return arguments.length>3&&(t=[].slice.call(arguments,1,-1)),this.fn(e,t);if(Array.isArray(e)){if(!this.validateMultiple)throw"Validator `"+this.name+"` does not handle multiple values";return this.validateMultiple.apply(this,arguments)}var i=arguments[arguments.length-1];if(this.validateDate&&i._isDateInput())return arguments[0]=a.parse.date(arguments[0]),null!==arguments[0]&&this.validateDate.apply(this,arguments);if(this.validateNumber)return!isNaN(e)&&(arguments[0]=parseFloat(arguments[0]),this.validateNumber.apply(this,arguments));if(this.validateString)return this.validateString.apply(this,arguments);throw"Validator `"+this.name+"` only handles multiple values"},parseRequirements:function(t,i){if("string"!=typeof t)return Array.isArray(t)?t:[t];var n=this.requirementType;if(Array.isArray(n)){for(var r=u(t,n.length),s=0;s<r.length;s++)r[s]=a.parseRequirement(n[s],r[s]);return r}return e.isPlainObject(n)?d(n,t,i):[a.parseRequirement(n,t)]},requirementType:"string",priority:2};var p=function(e,t){this.__class__="ValidatorRegistry",this.locale="en",this.init(e||{},t||{})},c={email:/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i,number:/^-?(\d*\.)?\d+(e[-+]?\d+)?$/i,integer:/^-?\d+$/,digits:/^\d+$/,alphanum:/^\w+$/i,date:{test:function(e){return null!==a.parse.date(e)}},url:new RegExp("^(?:(?:https?|ftp)://)?(?:\\S+(?::\\S*)?@)?(?:(?:[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")};c.range=c.number;var f=function(e){var t=(""+e).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return t?Math.max(0,(t[1]?t[1].length:0)-(t[2]?+t[2]:0)):0},m=function(e,t){return t.map(a.parse[e])},g=function(e,t){return function(i){for(var n=arguments.length,r=Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];return r.pop(),t.apply(void 0,[i].concat(_toConsumableArray(m(e,r))))}},v=function(e){return{validateDate:g("date",e),validateNumber:g("number",e),requirementType:e.length<=2?"string":["string","string"],priority:30}};p.prototype={init:function(e,t){this.catalog=t,this.validators=_extends({},this.validators);for(var i in e)this.addValidator(i,e[i].fn,e[i].priority);window.Parsley.trigger("parsley:validator:init")},setLocale:function(e){if("undefined"==typeof this.catalog[e])throw new Error(e+" is not available in the catalog");return this.locale=e,this},addCatalog:function(e,t,i){return"object"==typeof t&&(this.catalog[e]=t),!0===i?this.setLocale(e):this},addMessage:function(e,t,i){return"undefined"==typeof this.catalog[e]&&(this.catalog[e]={}),this.catalog[e][t]=i,this},addMessages:function(e,t){for(var i in t)this.addMessage(e,i,t[i]);return this},addValidator:function(e,t,i){if(this.validators[e])a.warn('Validator "'+e+'" is already defined.');else if(o.hasOwnProperty(e))return void a.warn('"'+e+'" is a restricted keyword and is not a valid validator name.');return this._setValidator.apply(this,arguments)}
10,updateValidator:function(e,t,i){return this.validators[e]?this._setValidator.apply(this,arguments):(a.warn('Validator "'+e+'" is not already defined.'),this.addValidator.apply(this,arguments))},removeValidator:function(e){return this.validators[e]||a.warn('Validator "'+e+'" is not defined.'),delete this.validators[e],this},_setValidator:function(e,t,i){"object"!=typeof t&&(t={fn:t,priority:i}),t.validate||(t=new h(t)),this.validators[e]=t;for(var n in t.messages||{})this.addMessage(n,e,t.messages[n]);return this},getErrorMessage:function(e){var t;if("type"===e.name){var i=this.catalog[this.locale][e.name]||{};t=i[e.requirements]}else t=this.formatMessage(this.catalog[this.locale][e.name],e.requirements);return t||this.catalog[this.locale].defaultMessage||this.catalog.en.defaultMessage},formatMessage:function(e,t){if("object"==typeof t){for(var i in t)e=this.formatMessage(e,t[i]);return e}return"string"==typeof e?e.replace(/%s/i,t):""},validators:{notblank:{validateString:function(e){return/\S/.test(e)},priority:2},required:{validateMultiple:function(e){return e.length>0},validateString:function(e){return/\S/.test(e)},priority:512},type:{validateString:function(e,t){var i=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],n=i.step,r=void 0===n?"any":n,s=i.base,a=void 0===s?0:s,o=c[t];if(!o)throw new Error("validator type `"+t+"` is not supported");if(!o.test(e))return!1;if("number"===t&&!/^any$/i.test(r||"")){var l=Number(e),u=Math.max(f(r),f(a));if(f(l)>u)return!1;var d=function(e){return Math.round(e*Math.pow(10,u))};if((d(l)-d(a))%d(r)!=0)return!1}return!0},requirementType:{"":"string",step:"string",base:"number"},priority:256},pattern:{validateString:function(e,t){return t.test(e)},requirementType:"regexp",priority:64},minlength:{validateString:function(e,t){return e.length>=t},requirementType:"integer",priority:30},maxlength:{validateString:function(e,t){return e.length<=t},requirementType:"integer",priority:30},length:{validateString:function(e,t,i){return e.length>=t&&e.length<=i},requirementType:["integer","integer"],priority:30},mincheck:{validateMultiple:function(e,t){return e.length>=t},requirementType:"integer",priority:30},maxcheck:{validateMultiple:function(e,t){return e.length<=t},requirementType:"integer",priority:30},check:{validateMultiple:function(e,t,i){return e.length>=t&&e.length<=i},requirementType:["integer","integer"],priority:30},min:v(function(e,t){return e>=t}),max:v(function(e,t){return e<=t}),range:v(function(e,t,i){return e>=t&&e<=i}),equalto:{validateString:function(t,i){var n=e(i);return n.length?t===n.val():t===i},priority:256}}};var y={},_=function k(e,t,i){for(var n=[],r=[],s=0;s<e.length;s++){for(var a=!1,o=0;o<t.length;o++)if(e[s].assert.name===t[o].assert.name){a=!0;break}a?r.push(e[s]):n.push(e[s])}return{kept:r,added:n,removed:i?[]:k(t,e,!0).added}};y.Form={_actualizeTriggers:function(){var e=this;this.$element.on("submit.Parsley",function(t){e.onSubmitValidate(t)}),this.$element.on("click.Parsley",a._SubmitSelector,function(t){e.onSubmitButton(t)}),!1!==this.options.uiEnabled&&this.element.setAttribute("novalidate","")},focus:function(){if(this._focusedField=null,!0===this.validationResult||"none"===this.options.focus)return null;for(var e=0;e<this.fields.length;e++){var t=this.fields[e];if(!0!==t.validationResult&&t.validationResult.length>0&&"undefined"==typeof t.options.noFocus&&(this._focusedField=t.$element,"first"===this.options.focus))break}return null===this._focusedField?null:this._focusedField.focus()},_destroyUI:function(){this.$element.off(".Parsley")}},y.Field={_reflowUI:function(){if(this._buildUI(),this._ui){var e=_(this.validationResult,this._ui.lastValidationResult);this._ui.lastValidationResult=this.validationResult,this._manageStatusClass(),this._manageErrorsMessages(e),this._actualizeTriggers(),!e.kept.length&&!e.added.length||this._failedOnce||(this._failedOnce=!0,this._actualizeTriggers())}},getErrorsMessages:function(){if(!0===this.validationResult)return[];for(var e=[],t=0;t<this.validationResult.length;t++)e.push(this.validationResult[t].errorMessage||this._getErrorMessage(this.validationResult[t].assert));return e},addError:function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],i=t.message,n=t.assert,r=t.updateClass,s=void 0===r||r;this._buildUI(),this._addError(e,{message:i,assert:n}),s&&this._errorClass()},updateError:function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],i=t.message,n=t.assert,r=t.updateClass,s=void 0===r||r;this._buildUI(),this._updateError(e,{message:i,assert:n}),s&&this._errorClass()},removeError:function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],i=t.updateClass,n=void 0===i||i;this._buildUI(),this._removeError(e),n&&this._manageStatusClass()},_manageStatusClass:function(){this.hasConstraints()&&this.needsValidation()&&
10!0===this.validationResult?this._successClass():this.validationResult.length>0?this._errorClass():this._resetClass()},_manageErrorsMessages:function(t){if("undefined"==typeof this.options.errorsMessagesDisabled){if("undefined"!=typeof this.options.errorMessage)return t.added.length||t.kept.length?(this._insertErrorWrapper(),0===this._ui.$errorsWrapper.find(".parsley-custom-error-message").length&&this._ui.$errorsWrapper.append(e(this.options.errorTemplate).addClass("parsley-custom-error-message")),this._ui.$errorsWrapper.addClass("filled").find(".parsley-custom-error-message").html(this.options.errorMessage)):this._ui.$errorsWrapper.removeClass("filled").find(".parsley-custom-error-message").remove();for(var i=0;i<t.removed.length;i++)this._removeError(t.removed[i].assert.name);for(i=0;i<t.added.length;i++)this._addError(t.added[i].assert.name,{message:t.added[i].errorMessage,assert:t.added[i].assert});for(i=0;i<t.kept.length;i++)this._updateError(t.kept[i].assert.name,{message:t.kept[i].errorMessage,assert:t.kept[i].assert})}},_addError:function(t,i){var n=i.message,r=i.assert;this._insertErrorWrapper(),this._ui.$errorsWrapper.addClass("filled").append(e(this.options.errorTemplate).addClass("parsley-"+t).html(n||this._getErrorMessage(r)))},_updateError:function(e,t){var i=t.message,n=t.assert;this._ui.$errorsWrapper.addClass("filled").find(".parsley-"+e).html(i||this._getErrorMessage(n))},_removeError:function(e){this._ui.$errorsWrapper.removeClass("filled").find(".parsley-"+e).remove()},_getErrorMessage:function(e){var t=e.name+"Message";return"undefined"!=typeof this.options[t]?window.Parsley.formatMessage(this.options[t],e.requirements):window.Parsley.getErrorMessage(e)},_buildUI:function(){if(!this._ui&&!1!==this.options.uiEnabled){var t={};this.element.setAttribute(this.options.namespace+"id",this.__id__),t.$errorClassHandler=this._manageClassHandler(),t.errorsWrapperId="parsley-id-"+(this.options.multiple?"multiple-"+this.options.multiple:this.__id__),t.$errorsWrapper=e(this.options.errorsWrapper).attr("id",t.errorsWrapperId),t.lastValidationResult=[],t.validationInformationVisible=!1,this._ui=t}},_manageClassHandler:function(){if("string"==typeof this.options.classHandler)return 0===e(this.options.classHandler).length&&ParsleyUtils.warn("No elements found that match the selector `"+this.options.classHandler+"` set in options.classHandler or data-parsley-class-handler"),e(this.options.classHandler);if("function"==typeof this.options.classHandler)var t=this.options.classHandler.call(this,this);return"undefined"!=typeof t&&t.length?t:this._inputHolder()},_inputHolder:function(){return this.options.multiple&&"SELECT"!==this.element.nodeName?this.$element.parent():this.$element},_insertErrorWrapper:function(){var t;if(0!==this._ui.$errorsWrapper.parent().length)return this._ui.$errorsWrapper.parent();if("string"==typeof this.options.errorsContainer){if(e(this.options.errorsContainer).length)return e(this.options.errorsContainer).append(this._ui.$errorsWrapper);a.warn("The errors container `"+this.options.errorsContainer+"` does not exist in DOM")}else"function"==typeof this.options.errorsContainer&&(t=this.options.errorsContainer.call(this,this));return"undefined"!=typeof t&&t.length?t.append(this._ui.$errorsWrapper):this._inputHolder().after(this._ui.$errorsWrapper)},_actualizeTriggers:function(){var e,t=this,i=this._findRelated();i.off(".Parsley"),this._failedOnce?i.on(a.namespaceEvents(this.options.triggerAfterFailure,"Parsley"),function(){t._validateIfNeeded()}):(e=a.namespaceEvents(this.options.trigger,"Parsley"))&&i.on(e,function(e){t._validateIfNeeded(e)})},_validateIfNeeded:function(e){var t=this;e&&/key|input/.test(e.type)&&(!this._ui||!this._ui.validationInformationVisible)&&this.getValue().length<=this.options.validationThreshold||(this.options.debounce?(window.clearTimeout(this._debounced),this._debounced=window.setTimeout(function(){return t.validate()},this.options.debounce)):this.validate())},_resetUI:function(){this._failedOnce=!1,this._actualizeTriggers(),"undefined"!=typeof this._ui&&(this._ui.$errorsWrapper.removeClass("filled").children().remove(),this._resetClass(),this._ui.lastValidationResult=[],this._ui.validationInformationVisible=!1)},_destroyUI:function(){this._resetUI(),"undefined"!=typeof this._ui&&this._ui.$errorsWrapper.remove(),delete this._ui},_successClass:function(){this._ui.validationInformationVisible=!0,this._ui.$errorClassHandler.removeClass(this.options.errorClass).addClass(this.options.successClass)},_errorClass:function(){this._ui.validationInformationVisible=!0,this._ui.$errorClassHandler.removeClass(this.options.successClass).addClass(this.options.errorClass)},_resetClass:function(){this._ui.$errorClassHandler.removeClass(this.options.successClass).removeClass(this.options.errorClass)}};var w=function(t,i,n){this.__class__="Form",this.element=t,this.$element=e(t),this.domOptions=i,this.options=n,this.parent=window.Parsley,this.fields=[],this.validationResult=null},b={pending:null,resolved:!0,rejected:!1};w.prototype={onSubmitValidate:function(e){var t=this;if(!0!==e.parsley){var i=this._submitSource||this.$element.find(a._SubmitSelector)[0];if(this._submitSource=null,this.$element.find(".parsley-synthetic-submit-button").prop("disabled",!0),!i||null===i.getAttribute("formnovalidate")){window.Parsley._remoteCache={};var n=this.whenValidate({event:e});"resolved"===n.state()&&!1!==this._trigger("submit")||(e.stopImmediatePropagation(),e.preventDefault(),"pending"===n.state()&&n.done(function(){t._submit(i)}))}}},onSubmitButton:function(e){this._submitSource=e.currentTarget},_submit:function(t){if(!1!==this._trigger("submit")){if(t){var i=this.$element.find(".parsley-synthetic-submit-button").prop("disabled",!1);0===i.length&&(i=e('<input class="parsley-synthetic-submit-button" type="hidden">').appendTo(this.$element)),i.attr({name:t.getAttribute("name"),value:t.getAttribute("value")})}this.$element.trigger(_extends(e.Event("submit"),{parsley:!0}))}},validate:function(t){if(arguments.length>=1&&!e.isPlainObject(t)){a.warnOnce("Calling validate on a parsley form without passing arguments as an object is deprecated.");var i=_slice.call(arguments),n=i[0],r=i[1],s=i[2];t={group:n,force:r,event:s}}return b[this.whenValidate(t).state()]},whenValidate:function(){var t,i=this,n=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],r=n.group,s=n.force,o=n.event;this.submitEvent=o,o&&(this.submitEvent=_extends({},o,{preventDefault:function(){a.warnOnce("Using `this.submitEvent.preventDefault()` is deprecated; instead, call `this.validationResult = false`"),i.validationResult=!1}})),this.validationResult=!0,this._trigger("validate"),this._refreshFields();var l=this._withoutReactualizingFormOptions(function(){return e.map(i.fields,function(e){return e.whenValidate({force:s,group:r})})});return(t=a.all(l).done(function(){i._trigger("success")}).fail(function(){i.validationResult=!1,i.focus(),i._trigger("error")}).always(function(){i._trigger("validated")})).pipe.apply(t,_toConsumableArray(this._pipeAccordingToValidationResult()))},isValid:function(t){if(arguments.length>=1&&!e.isPlainObject(t)){a.warnOnce("Calling isValid on a parsley form without passing arguments as an object is deprecated.");var i=_slice.call(arguments),n=i[0],r=i[1];t={group:n,force:r}}return b[this.whenValid(t).state()]},whenValid:function(){var t=this,i=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=i.group,r=i.force;this._refreshFields();var s=this._withoutReactualizingFormOptions(function(){return e.map(t.fields,function(e){return e.whenValid({group:n,force:r})})});return a.all(s)},reset:function(){for(var e=0;e<this.fields.length;e++)this.fields[e].reset();this._trigger("reset")},destroy:function(){this._destroyUI();for(var e=0;e<this.fields.length;e++)this.fields[e].destroy();this.$element.removeData("Parsley"),this._trigger("destroy")},_refreshFields:function(){return this.actualizeOptions()._bindFields()},_bindFields:function(){var t=this,i=this.fields;return this.fields=[],this.fieldsMappedById={},this._withoutReactualizingFormOptions(function(){t.$element.find(t.options.inputs).not(t.options.excluded).each(function(e,i){var n=new window.Parsley.Factory(i,{},t);if(("Field"===n.__class__||"FieldMultiple"===n.__class__)&&!0!==n.options.excluded){var r=n.__class__+"-"+n.__id__;"undefined"==typeof t.fieldsMappedById[r]&&(t.fieldsMappedById[r]=n,t.fields.push(n))}}),e.each(a.difference(i,t.fields),function(e,t){t.reset()})}),this},_withoutReactualizingFormOptions:function(e){var t=this.actualizeOptions;this.actualizeOptions=function(){return this};var i=e();return this.actualizeOptions=t,i},_trigger:function(e){return this.trigger("form:"+e)}};var F=function(e,t,i,n,r){var s=window.Parsley._validatorRegistry.validators[t],a=new h(s);n=n||e.options[t+"Priority"]||a.priority,r=!0===r,_extends(this,{validator:a,name:t,requirements:i,priority:n,isDomConstraint:r}),this._parseRequirements(e.options)},C=function(e){var t=e[0].toUpperCase();return t+e.slice(1)};F.prototype={validate:function(e,t){var i;
10return(i=this.validator).validate.apply(i,[e].concat(_toConsumableArray(this.requirementList),[t]))},_parseRequirements:function(e){var t=this;this.requirementList=this.validator.parseRequirements(this.requirements,function(i){return e[t.name+C(i)]})}};var E=function(t,i,n,r){this.__class__="Field",this.element=t,this.$element=e(t),"undefined"!=typeof r&&(this.parent=r),this.options=n,this.domOptions=i,this.constraints=[],this.constraintsByName={},this.validationResult=!0,this._bindConstraints()},A={pending:null,resolved:!0,rejected:!1};E.prototype={validate:function(t){arguments.length>=1&&!e.isPlainObject(t)&&(a.warnOnce("Calling validate on a parsley field without passing arguments as an object is deprecated."),t={options:t});var i=this.whenValidate(t);if(!i)return!0;switch(i.state()){case"pending":return null;case"resolved":return!0;case"rejected":return this.validationResult}},whenValidate:function(){var e,t=this,i=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=i.force,r=i.group;if(this.refreshConstraints(),!r||this._isInGroup(r))return this.value=this.getValue(),this._trigger("validate"),(e=this.whenValid({force:n,value:this.value,_refreshed:!0}).always(function(){t._reflowUI()}).done(function(){t._trigger("success")}).fail(function(){t._trigger("error")}).always(function(){t._trigger("validated")})).pipe.apply(e,_toConsumableArray(this._pipeAccordingToValidationResult()))},hasConstraints:function(){return 0!==this.constraints.length},needsValidation:function(e){return"undefined"==typeof e&&(e=this.getValue()),!(!e.length&&!this._isRequired()&&"undefined"==typeof this.options.validateIfEmpty)},_isInGroup:function(t){return Array.isArray(this.options.group)?-1!==e.inArray(t,this.options.group):this.options.group===t},isValid:function(t){if(arguments.length>=1&&!e.isPlainObject(t)){a.warnOnce("Calling isValid on a parsley field without passing arguments as an object is deprecated.");var i=_slice.call(arguments),n=i[0],r=i[1];t={force:n,value:r}}var s=this.whenValid(t);return!s||A[s.state()]},whenValid:function(){var t=this,i=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=i.force,r=void 0!==n&&n,s=i.value,o=i.group,l=i._refreshed;if(l||this.refreshConstraints(),!o||this._isInGroup(o)){if(this.validationResult=!0,!this.hasConstraints())return e.when();if("undefined"!=typeof s&&null!==s||(s=this.getValue()),!this.needsValidation(s)&&!0!==r)return e.when();var u=this._getGroupedConstraints(),d=[];return e.each(u,function(i,n){var r=a.all(e.map(n,function(e){return t._validateConstraint(s,e)}));if(d.push(r),"rejected"===r.state())return!1}),a.all(d)}},_validateConstraint:function(t,i){var n=this,r=i.validate(t,this);return!1===r&&(r=e.Deferred().reject()),a.all([r]).fail(function(e){n.validationResult instanceof Array||(n.validationResult=[]),n.validationResult.push({assert:i,errorMessage:"string"==typeof e&&e})})},getValue:function(){var e;return e="function"==typeof this.options.value?this.options.value(this):"undefined"!=typeof this.options.value?this.options.value:this.$element.val(),"undefined"==typeof e||null===e?"":this._handleWhitespace(e)},reset:function(){return this._resetUI(),this._trigger("reset")},destroy:function(){this._destroyUI(),this.$element.removeData("Parsley"),this.$element.removeData("FieldMultiple"),this._trigger("destroy")},refreshConstraints:function(){return this.actualizeOptions()._bindConstraints()},addConstraint:function(e,t,i,n){if(window.Parsley._validatorRegistry.validators[e]){var r=new F(this,e,t,i,n);"undefined"!==this.constraintsByName[r.name]&&this.removeConstraint(r.name),this.constraints.push(r),this.constraintsByName[r.name]=r}return this},removeConstraint:function(e){for(var t=0;t<this.constraints.length;t++)if(e===this.constraints[t].name){this.constraints.splice(t,1);break}return delete this.constraintsByName[e],this},updateConstraint:function(e,t,i){return this.removeConstraint(e).addConstraint(e,t,i)},_bindConstraints:function(){for(var e=[],t={},i=0;i<this.constraints.length;i++)!1===this.constraints[i].isDomConstraint&&(e.push(this.constraints[i]),t[this.constraints[i].name]=this.constraints[i]);this.constraints=e,this.constraintsByName=t;for(var n in this.options)this.addConstraint(n,this.options[n],void 0,!0);return this._bindHtml5Constraints()},_bindHtml5Constraints:function(){null!==this.element.getAttribute("required")&&this.addConstraint("required",!0,void 0,!0),null!==this.element.getAttribute("pattern")&&this.addConstraint("pattern",this.element.getAttribute("pattern"),void 0,!0);var e=this.element.getAttribute("min"),t=this.element.getAttribute("max");null!==e&&null!==t?this.addConstraint("range",[e,t],void 0,!0):null!==e?this.addConstraint("min",e,void 0,!0):null!==t&&this.addConstraint("max",t,void 0,!0),null!==this.element.getAttribute("minlength")&&null!==this.element.getAttribute("maxlength")?this.addConstraint("length",[this.element.getAttribute("minlength"),this.element.getAttribute("maxlength")],void 0,!0):null!==this.element.getAttribute("minlength")?this.addConstraint("minlength",this.element.getAttribute("minlength"),void 0,!0):null!==this.element.getAttribute("maxlength")&&this.addConstraint("maxlength",this.element.getAttribute("maxlength"),void 0,!0);var i=this.element.type;return"number"===i?this.addConstraint("type",["number",{step:this.element.getAttribute("step")||"1",base
10:e||this.element.getAttribute("value")}],void 0,!0):/^(email|url|range|date)$/i.test(i)?this.addConstraint("type",i,void 0,!0):this},_isRequired:function(){return"undefined"!=typeof this.constraintsByName.required&&!1!==this.constraintsByName.required.requirements},_trigger:function(e){return this.trigger("field:"+e)},_handleWhitespace:function(e){return!0===this.options.trimValue&&a.warnOnce('data-parsley-trim-value="true" is deprecated, please use data-parsley-whitespace="trim"'),"squish"===this.options.whitespace&&(e=e.replace(/\s{2,}/g," ")),"trim"!==this.options.whitespace&&"squish"!==this.options.whitespace&&!0!==this.options.trimValue||(e=a.trimString(e)),e},_isDateInput:function(){var e=this.constraintsByName.type;return e&&"date"===e.requirements},_getGroupedConstraints:function(){if(!1===this.options.priorityEnabled)return[this.constraints];for(var e=[],t={},i=0;i<this.constraints.length;i++){var n=this.constraints[i].priority;t[n]||e.push(t[n]=[]),t[n].push(this.constraints[i])}return e.sort(function(e,t){return t[0].priority-e[0].priority}),e}};var x=E,$=function(){this.__class__="FieldMultiple"};$.prototype={addElement:function(e){return this.$elements.push(e),this},refreshConstraints:function(){var t;if(this.constraints=[],"SELECT"===this.element.nodeName)return this.actualizeOptions()._bindConstraints(), 11this;for(var i=0;i<this.$elements.length;i++)if(e("html").has(this.$elements[i]).length){t=this.$elements[i].data("FieldMultiple").refreshConstraints().constraints;for(var n=0;n<t.length;n++)this.addConstraint(t[n].name,t[n].requirements,t[n].priority,t[n].isDomConstraint)}else this.$elements.splice(i,1);return this},getValue:function(){if("function"==typeof this.options.value)return this.options.value(this);if("undefined"!=typeof this.options.value)return this.options.value;if("INPUT"===this.element.nodeName){if("radio"===this.element.type)return this._findRelated().filter(":checked").val()||"";if("checkbox"===this.element.type){var t=[];return this._findRelated().filter(":checked").each(function(){t.push(e(this).val())}),t}}return"SELECT"===this.element.nodeName&&null===this.$element.val()?[]:this.$element.val()},_init:function(){return this.$elements=[this.$element],this}};var P=function(t,i,n){this.element=t,this.$element=e(t);var r=this.$element.data("Parsley");if(r)return"undefined"!=typeof n&&r.parent===window.Parsley&&(r.parent=n,r._resetOptions(r.options)),"object"==typeof i&&_extends(r.options,i),r;if(!this.$element.length)throw new Error("You must bind Parsley on an existing element.");if("undefined"!=typeof n&&"Form"!==n.__class__)throw new Error("Parent instance must be a Form instance");return this.parent=n||window.Parsley,this.init(i)};P.prototype={init:function(e){return this.__class__="Parsley",this.__version__="2.7.2",this.__id__=a.generateID(),this._resetOptions(e),"FORM"===this.element.nodeName||a.checkAttr(this.element,this.options.namespace,"validate")&&!this.$element.is(this.options.inputs)?this.bind("parsleyForm"):this.isMultiple()?this.handleMultiple():this.bind("parsleyField")},isMultiple:function(){return"radio"===this.element.type||"checkbox"===this.element.type||"SELECT"===this.element.nodeName&&null!==this.element.getAttribute("multiple")},handleMultiple:function(){var t,i,n=this;if(this.options.multiple=this.options.multiple||(t=this.element.getAttribute("name"))||this.element.getAttribute("id"),"SELECT"===this.element.nodeName&&null!==this.element.getAttribute("multiple"))return this.options.multiple=this.options.multiple||this.__id__,this.bind("parsleyFieldMultiple");if(!this.options.multiple)return a.warn("To be bound by Parsley, a radio, a checkbox and a multiple select input must have either a name or a multiple option.",this.$element),this;this.options.multiple=this.options.multiple.replace(/(:|\.|\[|\]|\{|\}|\$)/g,""),t&&e('input[name="'+t+'"]').each(function(e,t){"radio"!==t.type&&"checkbox"!==t.type||t.setAttribute(n.options.namespace+"multiple",n.options.multiple)});for(var r=this._findRelated(),s=0;s<r.length;s++)if(i=e(r.get(s)).data("Parsley"),"undefined"!=typeof i){this.$element.data("FieldMultiple")||i.addElement(this.$element);break}return this.bind("parsleyField",!0),i||this.bind("parsleyFieldMultiple")},bind:function(t,i){var n;switch(t){case"parsleyForm":n=e.extend(new w(this.element,this.domOptions,this.options),new l,window.ParsleyExtend)._bindFields();break;case"parsleyField":n=e.extend(new x(this.element,this.domOptions,this.options,this.parent),new l,window.ParsleyExtend);break;case"parsleyFieldMultiple":n=e.extend(new x(this.element,this.domOptions,this.options,this.parent),new $,new l,window.ParsleyExtend)._init();break;default:throw new Error(t+"is not a supported Parsley type")}return this.options.multiple&&a.setAttr(this.element,this.options.namespace,"multiple",this.options.multiple),"undefined"!=typeof i?(this.$element.data("FieldMultiple",n),n):(this.$element.data("Parsley",n),n._actualizeTriggers(),n._trigger("init"),n)}};var V=e.fn.jquery.split(".");if(parseInt(V[0])<=1&&parseInt(V[1])<8)throw"The loaded version of jQuery is too old. Please upgrade to 1.8.x or better.";
11V.forEach||a.warn("Parsley requires ES5 to run properly. Please include https://github.com/es-shims/es5-shim");var O=_extends(new l,{element:document,$element:e(document),actualizeOptions:null,_resetOptions:null,Factory:P,version:"2.7.2"});_extends(x.prototype,y.Field,l.prototype),_extends(w.prototype,y.Form,l.prototype),_extends(P.prototype,l.prototype),e.fn.parsley=e.fn.psly=function(t){if(this.length>1){var i=[];return this.each(function(){i.push(e(this).parsley(t))}),i}return e(this).length?new P(this[0],t):void a.warn("You must bind Parsley on an existing element.")},"undefined"==typeof window.ParsleyExtend&&(window.ParsleyExtend={}),O.options=_extends(a.objectCreate(o),window.ParsleyConfig),window.ParsleyConfig=O.options,window.Parsley=window.psly=O,O.Utils=a,window.ParsleyUtils={},e.each(a,function(e,t){"function"==typeof t&&(window.ParsleyUtils[e]=function(){return a.warnOnce("Accessing `window.ParsleyUtils` is deprecated. Use `window.Parsley.Utils` instead."),a[e].apply(a,arguments)})});var M=window.Parsley._validatorRegistry=new p(window.ParsleyConfig.validators,window.ParsleyConfig.i18n);window.ParsleyValidator={},e.each("setLocale addCatalog addMessage addMessages getErrorMessage formatMessage addValidator updateValidator removeValidator".split(" "),function(e,t){window.Parsley[t]=function(){return M[t].apply(M,arguments)},window.ParsleyValidator[t]=function(){var e;return a.warnOnce("Accessing the method '"+t+"' through Validator is deprecated. Simply call 'window.Parsley."+t+"(...)'"),(e=window.Parsley)[t].apply(e,arguments)}}),window.Parsley.UI=y,window.ParsleyUI={removeError:function(e,t,i){var n=!0!==i;return a.warnOnce("Accessing UI is deprecated. Call 'removeError' on the instance directly. Please comment in issue 1073 as to your need to call this method."),e.removeError(t,{updateClass:n})},getErrorsMessages:function(e){return a.warnOnce("Accessing UI is deprecated. Call 'getErrorsMessages' on the instance directly."),e.getErrorsMessages()}},e.each("addError updateError".split(" "),function(e,t){window.ParsleyUI[t]=function(e,i,n,r,s){var o=!0!==s;return a.warnOnce("Accessing UI is deprecated. Call '"+t+"' on the instance directly. Please comment in issue 1073 as to your need to call this method."),e[t](i,{message:n,assert:r,updateClass:o})}}),!1!==window.ParsleyConfig.autoBind&&e(function(){e("[data-parsley-validate]").length&&e("[data-parsley-validate]").parsley()});var T=e({}),R=function(){a.warnOnce("Parsley's pubsub module is deprecated; use the 'on' and 'off' methods on parsley instances or window.Parsley")},D="parsley:";e.listen=function(e,n){var r;if(R(),"object"==typeof arguments[1]&&"function"==typeof arguments[2]&&(r=arguments[1],n=arguments[2]),"function"!=typeof n)throw new Error("Wrong parameters");window.Parsley.on(i(e),t(n,r))},e.listenTo=function(e,n,r){if(R(),!(e instanceof x||e instanceof w))throw new Error("Mu
11st give Parsley instance");if("string"!=typeof n||"function"!=typeof r)throw new Error("Wrong parameters");e.on(i(n),t(r))},e.unsubscribe=function(e,t){if(R(),"string"!=typeof e||"function"!=typeof t)throw new Error("Wrong arguments");window.Parsley.off(i(e),t.parsleyAdaptedCallback)},e.unsubscribeTo=function(e,t){if(R(),!(e instanceof x||e instanceof w))throw new Error("Must give Parsley instance");e.off(i(t))},e.unsubscribeAll=function(t){R(),window.Parsley.off(i(t)),e("form,input,textarea,select").each(function(){var n=e(this).data("Parsley");n&&n.off(i(t))})},e.emit=function(e,t){var n;R();var r=t instanceof x||t instanceof w,s=Array.prototype.slice.call(arguments,r?2:1);s.unshift(i(e)),r||(t=window.Parsley),(n=t).trigger.apply(n,_toConsumableArray(s))};e.extend(!0,O,{asyncValidators:{"default":{fn:function(e){return e.status>=200&&e.status<300},url:!1},reverse:{fn:function(e){return e.status<200||e.status>=300},url:!1}},addAsyncValidator:function(e,t,i,n){return O.asyncValidators[e]={fn:t,url:i||!1,options:n||{}},this}}),O.addValidator("remote",{requirementType:{"":"string",validator:"string",reverse:"boolean",options:"object"},validateString:function(t,i,n,r){var s,a,o={},l=n.validator||(!0===n.reverse?"reverse":"default");if("undefined"==typeof O.asyncValidators[l])throw new Error("Calling an undefined async validator: `"+l+"`");i=O.asyncValidators[l].url||i,i.indexOf("{value}")>-1?i=i.replace("{value}",encodeURIComponent(t)):o[r.element.getAttribute("name")||r.element.getAttribute("id")]=t;var u=e.extend(!0,n.options||{},O.asyncValidators[l].options);s=e.extend(!0,{},{url:i,data:o,type:"GET"},u),r.trigger("field:ajaxoptions",r,s),a=e.param(s),"undefined"==typeof O._remoteCache&&(O._remoteCache={});var d=O._remoteCache[a]=O._remoteCache[a]||e.ajax(s),h=function(){var t=O.asyncValidators[l].fn.call(r,d,i,n);return t||(t=e.Deferred().reject()),e.when(t)};return d.then(h,h)},priority:-1}),O.on("form:submit",function(){O._remoteCache={}}),l.prototype.addAsyncValidator=function(){return a.warnOnce("Accessing the method `addAsyncValidator` through an instance is deprecated. Simply call `Parsley.addAsyncValidator(...)`"),O.addAsyncValidator.apply(O,arguments)},O.addMessages("en",{defaultMessage:"This value seems to be invalid.",type:{email:"This value should be a valid email.",url:"This value should be a valid url.",number:"This value should be a valid number.",integer:"This value should be a valid integer.",digits:"This value should be digits.",alphanum:"This value should be alphanumeric."},notblank:"This value should not be blank.",required:"This value is required.",pattern:"This value seems to be invalid.",min:"This value should be greater than or equal to %s.",max:"This value should be lower than or equal to %s.",range:"This value should be between %s and %s.",minlength:"This value is too short. It should have %s characters or more.",maxlength:"This value is too long. It should have %s characters or fewer.",length:"This value length is invalid. It should be between %s and %s characters long.",mincheck:"You must select at least %s choices.",maxcheck:"You must select %s choices or fewer.",check:"You must select between %s and %s choices.",equalto:"This value should be the same."}),O.setLocale("en");var I=new n;I.install();var q=O;return q}); 12jQuery(document).ready(function(e){function a(e,a){l(e,a),e.find(a.container).first().show()}function n(a,n){if(n.tabs){var t=e("<div />",{"class":n.tabMenuClassName}).insertBefore(a.children(n.container).filter(":first"));a.children(n.container).each(function(i,r){var l=e("<button/>").html(e(this).children(n.header).html()).addClass(0==i?n.tabMenuItemActiveClassName:"").addClass("item"+i).addClass("btn btn-default").prop("type","button").on("click keypress",{container:a.children(n.container),fieldset:e(r)},function(){var t=e(this),i=t.parent().children().index(t);s(a,n,t,i)});n.tabIndex&&l.prop("tabindex",i),t.append(l)})}}function t(a,n){n.navigation&&a.children(n.container).each(function(t){var i=e("<div />").addClass("powermail_fieldwrap").addClass("powermail_tab_navigation").appendTo(e(this));t>0&&i.append(c(a,n)),t<a.children(n.container).length-1&&i.append(o(a,n))})}function i(a,n){e.fn.parsley&&"data-parsley-validate"===a.data("parsley-validate")&&a.parsley().subscribe("parsley:field:validated",function(){v(a,n),C(a,n)})}function r(a,n){n.openTabOnError&&e.listen("parsley:field:error",function(){setTimeout(function(){a.find("."+n.tabMenuClassName+" > ."+n.tabMenuItemErrorClassName+":first").click()},50)})}function s(a,n,t,i){$activeTab=p(a,n),$activeTab.removeClass(n.tabMenuItemActiveClassName),t.addClass(n.tabMenuItemActiveClassName),l(a,n),e(".powermail_fieldset",a).slice(i,i+1).show()}function l(e,a){e.children(a.container).hide()}function c(a,n){return e("<a />").prop("href","#").addClass("btn btn-warning").html("<").click(function(e){e.preventDefault(),u(a,n)})}function o(a,n){return e("<a />").prop("href","#").addClass("btn btn-primary pull-right").html(">").click(function(e){e.preventDefault(),d(a,n)})}function d(e,a){var n=m(e,a);$activeTab=p(e,a),$activeTab.removeClass(a.tabMenuItemActiveClassName).next().addClass(a.tabMenuItemActiveClassName),f(e,a,n+1)}function u(e,a){var n=m(e,a);$activeTab=p(e,a),$activeTab.removeClass(a.tabMenuItemActiveClassName).prev().addClass(a.tabMenuItemActiveClassName),f(e,a,n-1)}function f(e,a,n){l(e,a),e.find(".powermail_fieldset").slice(n,n+1).show()}function m(e,a){var n=b(e,a),t=n.index(p(e,a));return parseInt(t)}function b(e,a){return e.find("."+a.tabMenuClassName).children()}function p(e,a){var n=b(e,a);return n.filter("."+a.tabMenuItemActiveClassName)}function v(e,a){var n=b(e,a);n.removeClass(a.tabMenuItemErrorClassName)}function C(a,n){a.parsley().isValid()||a.find(".parsley-error").each(function(){var t=a.find(".powermail_fieldset").index(e(this).closest(".powermail_fieldset")),i=b(a,n),r=i.slice(t,t+1);r.addClass(n.tabMenuItemErrorClassName)})}e.fn.powermailTabs=function(e){"use strict";var s=jQuery(this);e=jQuery.extend({container:"fieldset",header:"legend",tabs:!0,navigation:!0,openTabOnError:!0,tabIndex:!0,tabMenuClassName:"btn-group",tabMenuItemActiveClassName:"btn-primary",tabMenuItemErrorClassName:"btn-danger"},e),a(s,e),n(s,e),t(s,e),i(s,e),r(s,e)}}); 13function PowermailForm(e){"use strict";this.initialize=function(){a(),t(),i(),r(),o(),n(),c(),l()};var a=function(){e.fn.powermailTabs&&e(".powermail_morestep").each(function(){e(this).powermailTabs()})},t=function(){e("form[data-powermail-ajax]").length&&p()},i=function(){if(e('*[data-powermail-location="prefill"]').length&&navigator.geolocation){e(this);navigator.geolocation.getCurrentPosition(function(a){var t=a.coords.latitude,i=a.coords.longitude,r=D()+"/index.php?eID=powermailEidGetLocation";jQuery.ajax({url:r,data:"lat="+t+"&lng="+i,cache:!1,success:function(a){a&&e('*[data-powermail-location="prefill"]').val(a)}})})}},r=function(){e.fn.datetimepicker&&e(".powermail_date").each(function(){var a=e(this);if("date"===a.prop("type")||"datetime-local"===a.prop("type")||"time"===a.prop("type")){if(!a.data("datepicker-force")){if(e(this).data("date-value")){var t=v(e(this).data("date-value"),e(this).data("datepicker-format"),a.prop("type"));null!==t&&e(this).val(t)}return}a.prop("type","text")}var i=!0,r=!0;"date"===a.data("datepicker-settings")?r=!1:"time"===a.data("datepicker-settings")&&(i=!1),a.datetimepicker({format:a.data("datepicker-format"),timepicker:r,datepicker:i,lang:"en",i18n:{en:{months:a.data("datepicker-months").split(","),dayOfWeek:a.data("datepicker-days").split(",")}}})})},o=function(){e(".powermail_all_type_password.powermail_all_value").html("********")},n=function(){e.fn.parsley&&e(".powermail_reset").on("click","",function(){e('form[data-parsley-validate="data-parsley-validate"]').parsley().reset()})},l=function(){window.Parsley&&(_(),x())},p=function(){var a,t=!1;e(document).on("submit","form[data-powermail-ajax]",function(i){var r=e(this);r.data("powermail-ajax-uri")&&(a=r.data("powermail-ajax-uri"));var o=r.data("powermail-form");t||(e.ajax({type:"POST",url:r.prop("action"),data:new FormData(r.get(0)),c
13ontentType:!1,processData:!1,beforeSend:function(){s(r)},complete:function(){d(r),c()},success:function(i){var n=e('*[data-powermail-form="'+o+'"]:first',i);n.length?(e('*[data-powermail-form="'+o+'"]:first').closest(".tx-powermail").html(n),e.fn.powermailTabs&&e(".powermail_morestep").powermailTabs(),e.fn.parsley&&e('form[data-parsley-validate="data-parsley-validate"]').parsley(),m()):(a?j(a):r.submit(),t=!0)}}),i.preventDefault())})},s=function(a){d(a),e(".powermail_submit",a).length?e(".powermail_submit",a).parent().append(g()):a.closest(".tx-powermail").append(g())},d=function(e){e.closest(".tx-powermail").find(".powermail_progressbar").remove()},c=function(){e(".powermail_fieldwrap_file").find(".deleteAllFiles").each(function(){f(e(this).closest(".powermail_fieldwrap_file").find('input[type="file"]'))}),e(".deleteAllFiles").click(function(){u(e(this).closest(".powermail_fieldwrap_file").find('input[type="hidden"]')),e(this).closest("ul").fadeOut(function(){e(this).remove()})})},f=function(e){e.prop("disabled","disabled").addClass("hide").prop("type","hidden")},u=function(e){e.prop("disabled",!1).removeClass("hide").prop("type","file")},m=function(){e("img.powermail_captchaimage").each(function(){var a=w(e(this).prop("src"));e(this).prop("src",a+"?hash="+h(5))})},w=function(e){var a=e.split("?");return a[0]},h=function(e){for(var a="",t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",i=0;i<e;i++)a+=t.charAt(Math.floor(Math.random()*t.length));return a},v=function(e,a,t){var i=Date.parseDate(e,a);if(null===i)return null;var r=new Date(i),o=r.getFullYear()+"-";o+=("0"+(r.getMonth()+1)).slice(-2)+"-",o+=("0"+r.getDate()).slice(-2);var n=("0"+r.getHours()).slice(-2)+":"+("0"+r.getMinutes()).slice(-2),l=o+"T"+n;return"date"===t?o:"datetime-local"===t?l:"time"===t?n:null},g=function(){return e("<div />").addClass("powermail_progressbar").html(e("<div />").addClass("powermail_progress").html(e("<div />").addClass("powermail_progess_inner")))},y=function(e){for(var a=e.get(0),t=0,i=0;i<a.files.length;i++){var r=a.files[i];r.size>t&&(t=r.size)}return parseInt(t)},_=function(){window.Parsley.addValidator("powermailfilesize",function(a,t){if(t.indexOf(",")!==-1){var i=t.split(","),r=parseInt(i[0]),o=e('*[name="tx_powermail_pi1[field]['+i[1]+'][]"]');if(o.length&&y(o)>r)return!1}return!0},32).addMessage("en","powermailfilesize","Error")},x=function(){window.Parsley.addValidator("powermailfileextensions",function(a,t){var i=e('*[name="tx_powermail_pi1[field]['+t+'][]"]');return!i.length||b(k(a),i.prop("accept"))},32).addMessage("en","powermailfileextensions","Error")},b=function(e,a){return a.indexOf("."+e)!==-1},k=function(e){return e.split(".").pop().toLowerCase()},j=function(e){e.indexOf("http")!==-1?window.location=e:window.location.pathname=e},D=function(){var a;return a=e("base").length>0?jQuery("base").prop("href"):"https:"!=window.location.protocol?"http://"+window.location.hostname:"https://"+window.location.hostname}}jQuery(document).ready(function(e){"use strict";var a=new window.PowermailForm(e);a.initialize()}); 14!function(t,e){"function"==typeof define&&define.amd?define(e):"object"==typeof exports?module.exports=e(require,exports,module):t.Tether=e()}(this,function(t,e,o){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t){var e=getComputedStyle(t)||{},o=e.position,n=[];if("fixed"===o)return[t];for(var i=t;(i=i.parentNode)&&i&&1===i.nodeType;){var r=void 0;try{r=getComputedStyle(i)}catch(s){}if("undefined"==typeof r||null===r)return n.push(i),n;var a=r,f=a.overflow,l=a.overflowX,h=a.overflowY;/(auto|scroll)/.test(f+h+l)&&("absolute"!==o||["relative","absolute","fixed"].indexOf(r.position)>=0)&&n.push(i)}return n.push(document.body),n}function r(){x&&document.body.removeChild(x),x=null}function s(t){var e=void 0;t===document?(e=document,t=document.documentElement):e=t.ownerDocument;var o=e.documentElement,n={},i=t.getBoundingClientRect();for(var r in i)n[r]=i[r];var s=S();return n.top-=s.top,n.left-=s.left,"undefined"==typeof n.width&&(n.width=document.body.scrollWidth-n.left-n.r
vendor: 5,642 bytes, line 14
14ight),"undefined"==typeof n.height&&(n.height=document.body.scrollHeight-n.top-n.bottom),n.top=n.top-o.clientTop,n.left=n.left-o.clientLeft,n.right=e.body.clientWidth-n.width-n.left,n.bottom=e.body.clientHeight-n.height-n.top,n}function a(t){return t.offsetParent||document.documentElement}function f(){var t=document.createElement("div");t.style.width="100%",t.style.height="200px";var e=document.createElement("div");l(e.style,{position:"absolute",top:0,left:0,pointerEvents:"none",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}),e.appendChild(t),document.body.appendChild(e);var o=t.offsetWidth;e.style.overflow="scroll";var n=t.offsetWidth;o===n&&(n=e.clientWidth),document.body.removeChild(e);var i=o-n;return{width:i,height:i}}function l(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],e=[];return Array.prototype.push.apply(e,arguments),e.slice(1).forEach(function(e){if(e)for(var o in e)({}).hasOwnProperty.call(e,o)&&(t[o]=e[o])}),t}function h(t,e){if("undefined"!=typeof t.classList)e.split(" ").forEach(function(e){e.trim()&&t.classList.remove(e)});else{var o=new RegExp("(^| )"+e.split(" ").join("|")+"( |$)","gi"),n=p(t).replace(o," ");c(t,n)}}function d(t,e){if("undefined"!=typeof t.classList)e.split(" ").forEach(function(e){e.trim()&&t.classList.add(e)});else{h(t,e);var o=p(t)+(" "+e);c(t,o)}}function u(t,e){if("undefined"!=typeof t.classList)return t.classList.contains(e);var o=p(t);return new RegExp("(^| )"+e+"( |$)","gi").test(o)}function p(t){return t.className instanceof SVGAnimatedString?t.className.baseVal:t.className}function c(t,e){t.setAttribute("class",e)}function g(t,e,o){o.forEach(function(o){-1===e.indexOf(o)&&u(t,o)&&h(t,o)}),e.forEach(function(e){u(t,e)||d(t,e)})}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function m(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function v(t,e){var o=arguments.length<=2||void 0===arguments[2]?1:arguments[2];return t+o>=e&&e>=t-o}function y(){return"undefined"!=typeof performance&&"undefined"!=typeof performance.now?performance.now():+new Date}function b(){for(var t={top:0,left:0},e=arguments.length,o=Array(e),n=0;e>n;n++)o[n]=arguments[n];return o.forEach(function(e){var o=e.top,n=e.left;"string"==typeof o&&(o=parseFloat(o,10)),"string"==typeof n&&(n=parseFloat(n,10)),t.top+=o,t.left+=n}),t}function w(t,e){return"string"==typeof t.left&&-1!==t.left.indexOf("%")&&(t.left=parseFloat(t.left,10)/100*e.width),"string"==typeof t.top&&-1!==t.top.indexOf("%")&&(t.top=parseFloat(t.top,10)/100*e.height),t}function C(t,e){return"scrollParent"===e?e=t.scrollParents[0]:"window"===e&&(e=[pageXOffset,pageYOffset,innerWidth+pageXOffset,innerHeight+pageYOffset]),e===document&&(e=e.documentElement),"undefined"!=typeof e.nodeType&&!function(){var t=s(e),o=t,n=getComputedStyle(e);e=[o.left,o.top,t.width+o.left,t.height+o.top],V.forEach(function(t,o){t=t[0].toUpperCase()+t.substr(1),"Top"===t||"Left"===t?e[o]+=parseFloat(n["border"+t+"Width"]):e[o]-=parseFloat(n["border"+t+"Width"])})}(),e}var O=function(){function t(t,e){for(var o=0;o<e.length;o++){var n=e[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,o,n){return o&&t(e.prototype,o),n&&t(e,n),e}}(),E=void 0;"undefined"==typeof E&&(E={modules:[]});var x=null,T=function(){var t=0;return function(){return++t}}(),A={},S=function(){var t=x;t||(t=document.createElement("div"),t.setAttribute("data-tether-id",T()),l(t.style,{top:0,left:0,position:"absolute"}),document.body.appendChild(t),x=t);var e=t.getAttribute("data-tether-id");if("undefined"==typeof A[e]){A[e]={};var o=t.getBoundingClientRect();for(var n in o)A[e][n]=o[n];W(function(){delete A[e]})}return A[e]},P=[],W=function(t){P.push(t)},M=function(){for(var t=void 0;t=P.pop();)t()},_=function(){function t(){n(this,t)}return O(t,[{key:"on",value:function(t,e,o){var n=arguments.length<=3||void 0===arguments[3]?!1:arguments[3];"undefined"==typeof this.bindings&&(this.bindings={}),"undefined"==typeof this.bindings[t]&&(this.bindings[t]=[]),this.bindings[t].push({handler:e,ctx:o,once:n})}},{key:"once",value:function(t,e,o){this.on(t,e,o,!0)}},{key:"off",value:function(t,e){if("undefined"!=typeof this.bindings&&"undefined"!=typeof this.bindings[t])if("undefined"==typeof e)delete this.bindings[t];else for(var o=0;o<this.bindings[t].length;)this.bindings[t][o].handler===e?this.bindings[t].splice(o,1):++o}},{key:"trigger",value:function(t){if("undefined"!=typeof this.bindings&&this.bindings[t]){for(var e=0,o=arguments.length,n=Array(o>1?o-1:0),i=1;o>i;i++)n[i-1]=arguments[i];for(;e<this.bindings[t].length;){var r=this.bindings[t][e],s=r.handler,a=r.ctx,f=r.once,l=a;"undefined"==typeof l&&(l=this),s.apply(l,n),f?this.bindings[t].splice(e,1):++e}}}}]),t}();E.Utils={getScrollParents:i,getBounds:s,getOffsetParent:a,extend:l,addClass:d,removeClass:h,hasClass:u,updateClasses:g,defer:W,flush:M,uniqueId:T,Evented:_,getScrollBarSize:f,removeUtilElements:r};var k=function(){function t(t,e){var o=[],n=!0,i=!1,r=void 0;try{for(var s,a=t[Symbol.iterator]();!(n=(s=a.next()).done)&&(o.push(s.value),!e||o.length!==e);n=!0);}catch(f){i=!0,r=f}finally{try{!n&&a["return"]&&a["return"]()}finally{if(i)throw r}}return o}return function(e,o){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,o);
14throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),O=function(){function t(t,e){for(var o=0;o<e.length;o++){var n=e[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,o,n){return o&&t(e.prototype,o),n&&t(e,n),e}}(),B=function(t,e,o){for(var n=!0;n;){var i=t,r=e,s=o;n=!1,null===i&&(i=Function.prototype);var a=Object.getOwnPropertyDescriptor(i,r);if(void 0!==a){if("value"in a)return a.value;var f=a.get;if(void 0===f)return;return f.call(s)}var l=Object.getPrototypeOf(i);if(null===l)return;t=l,e=r,o=s,n=!0,a=l=void 0}};if("undefined"==typeof E)throw new Error("You must include the utils.js file before tether.js");var z=E.Utils,i=z.getScrollParents,s=z.getBounds,a=z.getOffsetParent,l=z.extend,d=z.addClass,h=z.removeClass,g=z.updateClasses,W=z.defer,M=z.flush,f=z.getScrollBarSize,r=z.removeUtilElements,j=function(){if("undefined"==typeof document)return"";for(var t=document.createElement("div"),e=["transform","webkitTransform","OTransform","MozTransform","msTransform"],o=0;o<e.length;++o){var n=e[o];if(void 0!==t.style[n])return n}}(),L=[],Y=function(){L.forEach(function(t){t.position(!1)}),M()};!function(){var t=null,e=null,o=null,n=function i(){return"undefined"!=typeof e&&e>16?(e=Math.min(e-16,250),void(o=setTimeout(i,250))):void("undefined"!=typeof t&&y()-t<10||(null!=o&&(clearTimeout(o),o=null),t=y(),Y(),e=y()-t))};"undefined"!=typeof window&&"undefined"!=typeof window.addEventListener&&["resize","scroll","touchmove"].forEach(function(t){window.addEventListener(t,n)})}();var F={center:"center",left:"right",right:"left"},H={middle:"middle",top:"bottom",bottom:"top"},X={top:0,left:0,middle:"50%",center:"50%",bottom:"100%",right:"100%"},N=function(t,e){var o=t.left,n=t.top;return"auto"===o&&(o=F[e.left]),"auto"===n&&(n=H[e.top]),{left:o,top:n}},U=function(t){var e=t.left,o=t.top;return"undefined"!=typeof X[t.left]&&(e=X[t.left]),"undefined"!=typeof X[t.top]&&(o=X[t.top]),{left:e,top:o}},R=function(t){var e=t.split(" "),o=k(e,2),n=o[0],i=o[1];return{top:n,left:i}},q=R,D=function(t){function e(t){var o=this;n(this,e),B(Object.getPrototypeOf(e.prototype),"constructor",this).call(this),this.position=this.position.bind(this),L.push(this),this.history=[],this.setOptions(t,!1),E.modules.forEach(function(t){"undefined"!=typeof t.initialize&&t.initialize.call(o)}),this.position()}return m(e,t),O(e,[{key:"getClass",value:function(){var t=arguments.length<=0||void 0===arguments[0]?"":arguments[0],e=this.options.classes;return"undefined"!=typeof e&&e[t]?this.options.classes[t]:this.options.classPrefix?this.options.classPrefix+"-"+t:t}},{key:"setOptions",value:function(t){var e=this,o=arguments.length<=1||void 0===arguments[1]?!0:arguments[1],n={offset:"0 0",targetOffset:"0 0",targetAttachment:"auto auto",classPrefix:"tether"};this.options=l(n,t);var r=this.options,s=r.element,a=r.target,f=r.targetModifier;if(this.element=s,this.target=a,this.targetModifier=f,"viewport"===this.target?(this.target=document.body,this.targetModifier="visible"):"scroll-handle"===this.target&&(this.target=document.body,this.targetModifier="scroll-handle"),["element","target"].forEach(function(t){if("undefined"==typeof e[t])throw new Error("Tether Error: Both element and target must be defined");"undefined"!=typeof e[t].jquery?e[t]=e[t][0]:"string"==typeof e[t]&&(e[t]=document.querySelector(e[t]))}),d(this.element,this.getClass("element")),this.options.addTargetClasses!==!1&&d(this.target,this.getClass("target")),!this.options.attachment)throw new Error("Tether Error: You must provide an attachment");this.targetAttachment=q(this.options.targetAttachment),this.attachment=q(this.options.attachment),this.offset=R(this.options.offset),this.targetOffset=R(this.options.targetOffset),"undefined"!=typeof this.scrollParents&&this.disable(),"scroll-handle"===this.targetModifier?this.scrollParents=[this.target]:this.scrollParents=i(this.target),this.options.enabled!==!1&&this.enable(o)}},{key:"getTargetBounds",value:function(){if("undefined"==typeof this.targetModifier)return s(this.target);if("visible"===this.targetModifier){if(this.target===document.body)return{top:pageYOffset,left:pageXOffset,height:innerHeight,width:innerWidth};var t=s(this.target),e={height:t.height,width:t.width,top:t.top,left
vendor: 8,436 bytes, line 14
14:t.left};return e.height=Math.min(e.height,t.height-(pageYOffset-t.top)),e.height=Math.min(e.height,t.height-(t.top+t.height-(pageYOffset+innerHeight))),e.height=Math.min(innerHeight,e.height),e.height-=2,e.width=Math.min(e.width,t.width-(pageXOffset-t.left)),e.width=Math.min(e.width,t.width-(t.left+t.width-(pageXOffset+innerWidth))),e.width=Math.min(innerWidth,e.width),e.width-=2,e.top<pageYOffset&&(e.top=pageYOffset),e.left<pageXOffset&&(e.left=pageXOffset),e}if("scroll-handle"===this.targetModifier){var t=void 0,o=this.target;o===document.body?(o=document.documentElement,t={left:pageXOffset,top:pageYOffset,height:innerHeight,width:innerWidth}):t=s(o);var n=getComputedStyle(o),i=o.scrollWidth>o.clientWidth||[n.overflow,n.overflowX].indexOf("scroll")>=0||this.target!==document.body,r=0;i&&(r=15);var a=t.height-parseFloat(n.borderTopWidth)-parseFloat(n.borderBottomWidth)-r,e={width:15,height:.975*a*(a/o.scrollHeight),left:t.left+t.width-parseFloat(n.borderLeftWidth)-15},f=0;408>a&&this.target===document.body&&(f=-11e-5*Math.pow(a,2)-.00727*a+22.58),this.target!==document.body&&(e.height=Math.max(e.height,24));var l=this.target.scrollTop/(o.scrollHeight-a);return e.top=l*(a-e.height-f)+t.top+parseFloat(n.borderTopWidth),this.target===document.body&&(e.height=Math.max(e.height,24)),e}}},{key:"clearCache",value:function(){this._cache={}}},{key:"cache",value:function(t,e){return"undefined"==typeof this._cache&&(this._cache={}),"undefined"==typeof this._cache[t]&&(this._cache[t]=e.call(this)),this._cache[t]}},{key:"enable",value:function(){var t=this,e=arguments.length<=0||void 0===arguments[0]?!0:arguments[0];this.options.addTargetClasses!==!1&&d(this.target,this.getClass("enabled")),d(this.element,this.getClass("enabled")),this.enabled=!0,this.scrollParents.forEach(function(e){e!==document&&e.addEventListener("scroll",t.position)}),e&&this.position()}},{key:"disable",value:function(){var t=this;h(this.target,this.getClass("enabled")),h(this.element,this.getClass("enabled")),this.enabled=!1,"undefined"!=typeof this.scrollParents&&this.scrollParents.forEach(function(e){e.removeEventListener("scroll",t.position)})}},{key:"destroy",value:function(){var t=this;this.disable(),L.forEach(function(e,o){e===t&&L.splice(o,1)}),0===L.length&&r()}},{key:"updateAttachClasses",value:function(t,e){var o=this;t=t||this.attachment,e=e||this.targetAttachment;var n=["left","top","bottom","right","middle","center"];"undefined"!=typeof this._addAttachClasses&&this._addAttachClasses.length&&this._addAttachClasses.splice(0,this._addAttachClasses.length),"undefined"==typeof this._addAttachClasses&&(this._addAttachClasses=[]);var i=this._addAttachClasses;t.top&&i.push(this.getClass("element-attached")+"-"+t.top),t.left&&i.push(this.getClass("element-attached")+"-"+t.left),e.top&&i.push(this.getClass("target-attached")+"-"+e.top),e.left&&i.push(this.getClass("target-attached")+"-"+e.left);var r=[];n.forEach(function(t){r.push(o.getClass("element-attached")+"-"+t),r.push(o.getClass("target-attached")+"-"+t)}),W(function(){"undefined"!=typeof o._addAttachClasses&&(g(o.element,o._addAttachClasses,r),o.options.addTargetClasses!==!1&&g(o.target,o._addAttachClasses,r),delete o._addAttachClasses)})}},{key:"position",value:function(){var t=this,e=arguments.length<=0||void 0===arguments[0]?!0:arguments[0];if(this.enabled){this.clearCache();var o=N(this.targetAttachment,this.attachment);this.updateAttachClasses(this.attachment,o);var n=this.cache("element-bounds",function(){return s(t.element)}),i=n.width,r=n.height;if(0===i&&0===r&&"undefined"!=typeof this.lastSize){var l=this.lastSize;i=l.width,r=l.height}else this.lastSize={width:i,height:r};var h=this.cache("target-bounds",function(){return t.getTargetBounds()}),d=h,u=w(U(this.attachment),{width:i,height:r}),p=w(U(o),d),c=w(this.offset,{width:i,height:r}),g=w(this.targetOffset,d);u=b(u,c),p=b(p,g);for(var m=h.left+p.left-u.left,v=h.top+p.top-u.top,y=0;y<E.modules.length;++y){var C=E.modules[y],O=C.position.call(this,{left:m,top:v,targetAttachment:o,targetPos:h,elementPos:n,offset:u,targetOffset:p,manualOffset:c,manualTargetOffset:g,scrollbarSize:T,attachment:this.attachment});if(O===!1)return!1;"undefined"!=typeof O&&"object"==typeof O&&(v=O.top,m=O.left)}var x={page:{top:v,left:m},viewport:{top:v-pageYOffset,bottom:pageYOffset-v-r+innerHeight,left:m-pageXOffset,right:pageXOffset-m-i+innerWidth}},T=void 0;return document.body.scrollWidth>window.innerWidth&&(T=this.cache("scrollbar-size",f),x.viewport.bottom-=T.height),document.body.scrollHeight>window.innerHeight&&(T=this.cache("scrollbar-size",f),x.viewport.right-=T.width),(-1===["","static"].indexOf(document.body.style.position)||-1===["","static"].indexOf(document.body.parentElement.style.position))&&(x.page.bottom=document.body.scrollHeight-v-r,x.page.right=document.body.scrollWidth-m-i),"undefined"!=typeof this.options.optimizations&&this.options.optimizations.moveElement!==!1&&"undefined"==typeof this.targetModifier&&!function(){var e=t.cache("target-offsetparent",function(){return a(t.target)}),o=t.cache("target-offsetparent-bounds",function(){return s(e)}),n=getComputedStyle(e),i=o,r={};if(["Top","Left","Bottom","Right"].forEach(function(t){r[t.toLowerCase()]=parseFloat(n["border"+t+"Width"])}),o.right=document.body.scrollWidth-o.left-i.width+r.right,o.bottom=document.body.scrollHeight-o.top-i.height+r.bottom,x.page.top>=o.top+r.top&&x.page.bottom>=o.bottom&&x.page.left>=o.left+r.left&&x.page.right>=o.right){var f=e.scrollTop,l=e.scrollLeft;x.offset={top:x.page.top-o.top+f-r.top,left:x.page.left-o.left+l-r.left}}}(),this.move(x),this.history.unshift(x),this.history.length>3&&this.history.pop(),e&&M(),!0}}},{key:"move",value:function(t){var e=this;if("undefined"!=typeof this.element.parentNode){var o={};for(var n in t){o[n]={};for(var i in t[n]){for(var r=!1,s=0;s<this.history.length;++s){var f=this.history[s];if("undefined"!=typeof f[n]&&!v(f[n][i],t[n][i])){r=!0;break}}r||(o[n][i]=!0)}}var h={top:"",left:"",right:"",bottom:""},d=function(t,o){var n="undefined"!=typeof e.options.optimizations,i=n?e.options.optimizations.gpu:null;if(i!==!1){var r=void 0,s=void 0;t.top?(h.top=0,r=o.top):(h.bottom=0,r=-o.bottom),t.left?(h.left=0,s=o.left):(h.right=0,s=-o.right),h[j]="translateX("+Math.round(s)+"px) translateY("+Math.round(r)+"px)","msTransform"!==j&&(h[j]+=" translateZ(0)")}else t.top?h.top=o.top+"px":h.bottom=o.bottom+"px",t.left?h.left=o.left+"px":h.right=o.right+"px"},u=!1;if((o.page.top||o.page.bottom)&&(o.page.left||o.page.right)?(h.position="absolute",d(o.page,t.page)):(o.viewport.top||o.viewport.bottom)&&(o.viewport.left||o.viewport.right)?(h.position="fixed",d(o.viewport,t.viewport)):"undefined"!=typeof o.offset&&o.offset.top&&o.offset.left?!function(){h.position="absolute";var n=e.cache("target-offsetparent",function(){return a(e.target)});a(e.element)!==n&&W(function(){e.element.parentNode.removeChild(e.element),n.appendChild(e.element)}),d(o.offset,t.offset),u=!0}():(h.position="absolute",d({top:!0,left:!0},t.page)),!u){for(var p=!0,c=this.element.parentNode;c&&1===c.nodeType&&"BODY"!==c.tagName;){if("static"!==getComputedStyle(c).position){p=!1;break}c=c.parentNode}p||(this.element.parentNode.removeChild(this.element),document.body.appendChild(this.element))}var g={},m=!1;for(var i in h){var y=h[i],b=this.element.style[i];b!==y&&(m=!0,g[i]=y)}m&&W(function(){l(e.element.style,g)})}}}]),e}(_);D.modules=[],E.position=Y;var I=l(D,E),k=function(){function t(t,e){var o=[],n=!0,i=!1,r=void 0;try{for(var s,a=t[Symbol.iterator]();!(n=(s=a.next()).done)&&(o.push(s.value),!e||o.length!==e);n=!0);}catch(f){i=!0,r=f}finally{try{!n&&a["return"]&&a["return"]()}finally{if(i)throw r}}return o}return function(e,o){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),z=E.Utils,s=z.getBounds,l=z.extend,g=z.updateClasses,W=z.defer,V=["left","top","right","bottom"];E.modules.push({position:function(t){var e=this,o=t.top,n=t.left,i=t.targetAttachment;if(!this.options.constraints)return!0;var r=this.cache("element-bounds",function(){return s(e.element)}),a=r.height,f=r.width;if(0===f&&0===a&&"undefined"!=typeof this.lastSize){var h=this.lastSize;f=h.width,a=h.height}var d=this.cache("target-bounds",function(){return e.getTargetBounds()}),u=d.height,p=d.width,c=[this.getClass("pinned"),this.getClass("out-of-bounds")];
14this.options.constraints.forEach(function(t){var e=t.outOfBoundsClass,o=t.pinnedClass;e&&c.push(e),o&&c.push(o)}),c.forEach(function(t){["left","top","right","bottom"].forEach(function(e){c.push(t+"-"+e)})});var m=[],v=l({},i),y=l({},this.attachment);return this.options.constraints.forEach(function(t){var r=t.to,s=t.attachment,l=t.pin;"undefined"==typeof s&&(s="");var h=void 0,d=void 0;if(s.indexOf(" ")>=0){var c=s.split(" "),g=k(c,2);d=g[0],h=g[1]}else h=d=s;var b=C(e,r);("target"===d||"both"===d)&&(o<b[1]&&"top"===v.top&&(o+=u,v.top="bottom"),o+a>b[3]&&"bottom"===v.top&&(o-=u,v.top="top")),"together"===d&&("top"===v.top&&("bottom"===y.top&&o<b[1]?(o+=u,v.top="bottom",o+=a,y.top="top"):"top"===y.top&&o+a>b[3]&&o-(a-u)>=b[1]&&(o-=a-u,v.top="bottom",y.top="bottom")),"bottom"===v.top&&("top"===y.top&&o+a>b[3]?(o-=u,v.top="top",o-=a,y.top="bottom"):"bottom"===y.top&&o<b[1]&&o+(2*a-u)<=b[3]&&(o+=a-u,v.top="top",y.top="top")),"middle"===v.top&&(o+a>b[3]&&"top"===y.top?(o-=a,y.top="bottom"):o<b[1]&&"bottom"===y.top&&(o+=a,y.top="top"))),("target"===h||"both"===h)&&(n<b[0]&&"left"===v.left&&(n+=p,v.left="right"),n+f>b[2]&&"right"===v.left&&(n-=p,v.left="left")),"together"===h&&(n<b[0]&&"left"===v.left?"right"===y.left?(n+=p,v.left="right",n+=f,y.left="left"):"left"===y.left&&(n+=p,v.left="right",n-=f,y.left="right"):n+f>b[2]&&"right"===v.left?"left"===y.left?(n-=p,v.left="left",n-=f,y.left="right"):"right"===y.left&&(n-=p,v.left="left",n+=f,y.left="left"):"center"===v.left&&(n+f>b[2]&&"left"===y.left?(n-=f,y.left="right"):n<b[0]&&"right"===y.left&&(n+=f,y.left="left"))),("element"===d||"both"===d)&&(o<b[1]&&"bottom"===y.top&&(o+=a,y.top="top"),o+a>b[3]&&"top"===y.top&&(o-=a,y.top="bottom")),("element"===h||"both"===h)&&(n<b[0]&&("right"===y.left?(n+=f,y.left="left"):"center"===y.left&&(n+=f/2,y.left="left")),n+f>b[2]&&("left"===y.left?(n-=f,y.left="right"):"center"===y.left&&(n-=f/2,y.left="right"))),"string"==typeof l?l=l.split(",").map(function(t){return t.trim()}):l===!0&&(l=["top","left","right","bottom"]),l=l||[];var w=[],O=[];o<b[1]&&(l.indexOf("top")>=0?(o=b[1],w.push("top")):O.push("top")),o+a>b[3]&&(l.indexOf("bottom")>=0?(o=b[3]-a,w.push("bottom")):O.push("bottom")),n<b[0]&&(l.indexOf("left")>=0?(n=b[0],w.push("left")):O.push("left")),n+f>b[2]&&(l.indexOf("right")>=0?(n=b[2]-f,w.push("right")):O.push("right")),w.length&&!function(){var t=void 0;t="undefined"!=typeof e.options.pinnedClass?e.options.pinnedClass:e.getClass("pinned"),m.push(t),w.forEach(function(e){m.push(t+"-"+e)})}(),O.length&&!function(){var t=void 0;t="undefined"!=typeof e.options.outOfBoundsClass?e.options.outOfBoundsClass:e.getClass("out-of-bounds"),m.push(t),O.forEach(function(e){m.push(t+"-"+e)})}(),(w.indexOf("left")>=0||w.indexOf("right")>=0)&&(y.left=v.left=!1),(w.indexOf("top")>=0||w.indexOf("bottom")>=0)&&(y.top=v.top=!1),(v.top!==i.top||v.left!==i.left||y.top!==e.attachment.top||y.left!==e.attachment.left)&&(e.updateAttachClasses(y,v),e.trigger("update",{attachment:y,targetAttachment:v}))}),W(function(){e.options.addTargetClasses!==!1&&g(e.target,m,c),g(e.element,m,c)}),{top:o,left:n}}});var z=E.Utils,s=z.getBounds,g=z.updateClasses,W=z.defer;E.modules.push({position:function(t){var e=this,o=t.top,n=t.left,i=this.cache("element-bounds",function(){return s(e.element)}),r=i.height,a=i.width,f=this.getTargetBounds(),l=o+r,h=n+a,d=[];o<=f.bottom&&l>=f.top&&["left","right"].forEach(function(t){var e=f[t];(e===n||e===h)&&d.push(t)}),n<=f.right&&h>=f.left&&["top","bottom"].forEach(function(t){var e=f[t];(e===o||e===l)&&d.push(t)});var u=[],p=[],c=["left","top","right","bottom"];return u.push(this.getClass("abutted")),c.forEach(function(t){u.push(e.getClass("abutted")+"-"+t)}),d.length&&p.push(this.getClass("abutted")),d.forEach(function(t){p.push(e.getClass("abutted")+"-"+t)}),W(function(){e.options.addTargetClasses!==!1&&g(e.target,p,u),g(e.element,p,u)}),!0}});var k=function(){function t(t,e){var o=[],n=!0,i=!1,r=void 0;try{for(var s,a=t[Symbol.iterator]();!(n=(s=a.next()).done)&&(o.push(s.value),!e||o.length!==e);n=!0);}catch(f){i=!0,r=f}finally{try{!n&&a["return"]&&a["return"]()}finally{if(i)throw r}}return o}return function(e,o){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,o);
14throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();return E.modules.push({position:function(t){var e=t.top,o=t.left;if(this.options.shift){var n=this.options.shift;"function"==typeof this.options.shift&&(n=this.options.shift.call(this,{top:e,left:o}));var i=void 0,r=void 0;if("string"==typeof n){n=n.split(" "),n[1]=n[1]||n[0];var s=n,a=k(s,2);i=a[0],r=a[1],i=parseFloat(i,10),r=parseFloat(r,10)}else i=n.top,r=n.left;return e+=i,o+=r,{top:e,left:o}}}}),I}); 15/*! 16 * Bootstrap v4.0.0-alpha.4 (http://getbootstrap.com) 17 * Copyright 2011-2016 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) 18 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 19 */ 20 21if (typeof jQuery === 'undefined') { 22 throw new Error('Bootstrap\'s JavaScript requires jQuery') 23} 24 25+function ($) { 26 var version = $.fn.jquery.split(' ')[0].split('.') 27 if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] >= 4)) { 28 throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0') 29 } 30}(jQuery); 31 32 33+function ($) { 34 35/** 36 * -------------------------------------------------------------------------- 37 * Bootstrap (v4.0.0-alpha.4): util.js 38 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 39 * -------------------------------------------------------------------------- 40 */ 41 42'use strict'; 43 44var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; 45 46var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); 47 48function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } 49 50function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } } 51 52var Util = (function ($) { 53 54 /** 55 * ------------------------------------------------------------------------ 56 * Private TransitionEnd Helpers 57 * ------------------------------------------------------------------------ 58 */ 59 60 var transition = false; 61 62 var MAX_UID = 1000000; 63 64 var TransitionEndEvent = { 65 WebkitTransition: 'webkitTransitionEnd', 66 MozTransition: 'transitionend', 67 OTransition: 'oTransitionEnd otransitionend', 68 transition: 'transitionend' 69 }; 70 71 // shoutout AngusCroll (https://goo.gl/pxwQGp) 72 function toType(obj) { 73 return ({}).toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase(); 74 } 75 76 function isElement(obj) { 77 return (obj[0] || obj).nodeType; 78 } 79 80 function getSpecialTransitionEndEvent() { 81 return { 82 bindType: transition.end, 83 delegateType: transition.end, 84 handle: function handle(event) { 85 if ($(event.target).is(this)) { 86 return event.handleObj.handler.apply(this, arguments); // eslint-disable-line prefer-rest-params 87 } 88 return undefined; 89 } 90 }; 91 } 92 93 function transitionEndTest() { 94 if (window.QUnit) { 95 return false; 96 } 97 98 var el = document.createElement('bootstrap'); 99 100 for (var _name in TransitionEndEvent) { 101 if (el.style[_name] !== undefined) { 102 return { end: TransitionEndEvent[_name] }; 103 } 104 } 105 106 return false; 107 } 108 109 function transitionEndEmulator(duration) { 110 var _this = this; 111 112 var called = false; 113 114 $(this).one(Util.TRANSITION_END, function () { 115 called = true; 116 });
117 118 setTimeout(function () { 119 if (!called) { 120 Util.triggerTransitionEnd(_this); 121 } 122 }, duration); 123 124 return this; 125 } 126 127 function setTransitionEndSupport() { 128 transition = transitionEndTest(); 129 130 $.fn.emulateTransitionEnd = transitionEndEmulator; 131 132 if (Util.supportsTransitionEnd()) { 133 $.event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent(); 134 } 135 } 136 137 /** 138 * -------------------------------------------------------------------------- 139 * Public Util Api 140 * -------------------------------------------------------------------------- 141 */ 142 143 var Util = { 144 145 TRANSITION_END: 'bsTransitionEnd', 146 147 getUID: function getUID(prefix) { 148 do { 149 /* eslint-disable no-bitwise */ 150 prefix += ~ ~(Math.random() * MAX_UID); // "~~" acts like a faster Math.floor() here 151 /* eslint-enable no-bitwise */ 152 } while (document.getElementById(prefix)); 153 return prefix; 154 }, 155 156 getSelectorFromElement: function getSelectorFromElement(element) { 157 var selector = element.getAttribute('data-target'); 158 159 if (!selector) { 160 selector = element.getAttribute('href') || ''; 161 selector = /^#[a-z]/i.test(selector) ? selector : null; 162 } 163 164 return selector; 165 }, 166 167 reflow: function reflow(element) { 168 new Function('bs', 'return bs')(element.offsetHeight); 169 }, 170 171 triggerTransitionEnd: function triggerTransitionEnd(element) { 172 $(element).trigger(transition.end); 173 }, 174 175 supportsTransitionEnd: function supportsTransitionEnd() { 176 return Boolean(transition); 177 }, 178 179 typeCheckConfig: function typeCheckConfig(componentName, config, configTypes) { 180 for (var property in configTypes) { 181 if (configTypes.hasOwnProperty(property)) { 182 var expectedTypes = configTypes[property]; 183 var value = config[property]; 184 var valueType = undefined; 185 186 if (value && isElement(value)) { 187 valueType = 'element'; 188 } else { 189 valueType = toType(value); 190 } 191 192 if (!new RegExp(expectedTypes).test(valueType)) { 193 throw new Error(componentName.toUpperCase() + ': ' + ('Option "' + property + '" provided type "' + valueType + '" ') + ('but expected type "' + expectedTypes + '".')); 194 } 195 } 196 } 197 } 198 }; 199 200 setTransitionEndSupport(); 201 202 return Util; 203})(jQuery); 204 205/** 206 * -------------------------------------------------------------------------- 207 * Bootstrap (v4.0.0-alpha.4): alert.js 208 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 209 * -------------------------------------------------------------------------- 210 */ 211 212var Alert = (function ($) { 213 214 /** 215 * ------------------------------------------------------------------------ 216 * Constants 217 * ------------------------------------------------------------------------ 218 */ 219 220 var NAME = 'alert'; 221 var VERSION = '4.0.0-alpha.4'; 222 var DATA_KEY = 'bs.alert'; 223 var EVENT_KEY = '.' + DATA_KEY; 224 var DATA_API_KEY = '.data-api'; 225 var JQUERY_NO_CONFLICT = $.fn[NAME]; 226 var TRANSITION_DURATION = 150; 227 228 var Selector = { 229 DISMISS: '[data-dismiss="alert"]' 230 }; 231 232 var Event = { 233 CLOSE: 'close' + EVENT_KEY, 234 CLOSED: 'closed' + EVENT_KEY, 235 CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY 236 }; 237 238 var ClassName = { 239 ALERT: 'alert', 240 FADE: 'fade', 241 IN: 'in' 242 }; 243 244 /** 245 * ------------------------------------------------------------------------ 246 * Class Definition 247 * ------------------------------------------------------------------------ 248 */ 249 250 var Alert = (function () { 251 function Alert(element) { 252 _classCallCheck(this, Alert); 253 254 this._element = element; 255 } 256 257 /** 258 * ------------------------------------------------------------------------ 259 * Data Api implementation 260 * ------------------------------------------------------------------------ 261 */ 262 263 // getters 264 265 _createClass(Alert, [{ 266 key: 'close', 267 268 // public 269 270 value: function close(element) { 271 element = element || this._element; 272 273 var rootElement = this._getRootElement(element); 274 var customEvent = this._triggerCloseEvent(rootElement); 275 276 if (customEvent.isDefaultPrevented()) { 277 return; 278 } 279 280 this._removeElement(rootElement); 281 } 282 }, { 283 key: 'dispose', 284 value: function dispose() { 285 $.removeData(this._element, DATA_KEY); 286 this._element = null; 287 } 288 289 // private 290 291 }, { 292 key: '_getRootElement', 293 value: function _getRootElement(element) { 294 var selector = Util.getSelectorFromElement(element); 295 var parent = false; 296 297 if (selector) { 298 parent = $(selector)[0]; 299 } 300 301 if (!parent) { 302 parent = $(element).closest('.' + ClassName.ALERT)[0]; 303 } 304 305 return parent; 306 } 307 }, { 308 key: '_triggerCloseEvent', 309 value: function _triggerCloseEvent(element) { 310 var closeEvent = $.Event(Event.CLOSE); 311 312 $(element).trigger(closeEvent); 313 return closeEvent; 314 } 315 }, { 316 key: '_removeElement', 317 value: function _removeElement(element) { 318 $(element).removeClass(ClassName.IN); 319 320 if (!Util.supportsTransitionEnd() || !$(element).hasClass(ClassName.FADE)) { 321 this._destroyElement(element); 322 return; 323 } 324 325 $(element).one(Util.TRANSITION_END, $.proxy(this._destroyElement, this, element)).emulateTransitionEnd(TRANSITION_DURATION); 326 } 327 }, { 328 key: '_destroyElement', 329 value: function _destroyElement(element) { 330 $(element).detach().trigger(Event.CLOSED).remove(); 331 } 332 333 // static 334 335 }], [{ 336 key: '_jQueryInterface', 337 value: function _jQueryInterface(config) { 338 return this.each(function () { 339 var $element = $(this); 340 var data = $element.data(DATA_KEY); 341 342 if (!data) { 343 data = new Alert(this); 344 $element.data(DATA_KEY, data); 345 } 346 347 if (config === 'close') { 348 data[config](this); 349 } 350 }); 351 } 352 }, { 353 key: '_handleDismiss', 354 value: function _handleDismiss(alertInstance) { 355 return function (event) { 356 if (event) { 357 event.preventDefault(); 358 } 359 360 alertInstance.close(this); 361 }; 362 } 363 }, { 364 key: 'VERSION', 365 get: function get() { 366 return VERSION; 367 } 368 }]); 369 370 return Alert; 371 })();
372 373 $(document).on(Event.CLICK_DATA_API, Selector.DISMISS, Alert._handleDismiss(new Alert())); 374 375 /** 376 * ------------------------------------------------------------------------ 377 * jQuery 378 * ------------------------------------------------------------------------ 379 */ 380 381 $.fn[NAME] = Alert._jQueryInterface; 382 $.fn[NAME].Constructor = Alert; 383 $.fn[NAME].noConflict = function () { 384 $.fn[NAME] = JQUERY_NO_CONFLICT; 385 return Alert._jQueryInterface; 386 }; 387 388 return Alert; 389})(jQuery); 390 391/** 392 * -------------------------------------------------------------------------- 393 * Bootstrap (v4.0.0-alpha.4): button.js 394 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 395 * -------------------------------------------------------------------------- 396 */ 397 398var Button = (function ($) { 399 400 /** 401 * ------------------------------------------------------------------------ 402 * Constants 403 * ------------------------------------------------------------------------ 404 */ 405 406 var NAME = 'button'; 407 var VERSION = '4.0.0-alpha.4'; 408 var DATA_KEY = 'bs.button'; 409 var EVENT_KEY = '.' + DATA_KEY; 410 var DATA_API_KEY = '.data-api'; 411 var JQUERY_NO_CONFLICT = $.fn[NAME]; 412 413 var ClassName = { 414 ACTIVE: 'active', 415 BUTTON: 'btn', 416 FOCUS: 'focus' 417 }; 418 419 var Selector = { 420 DATA_TOGGLE_CARROT: '[data-toggle^="button"]', 421 DATA_TOGGLE: '[data-toggle="buttons"]', 422 INPUT: 'input', 423 ACTIVE: '.active', 424 BUTTON: '.btn' 425 }; 426 427 var Event = { 428 CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY, 429 FOCUS_BLUR_DATA_API: 'focus' + EVENT_KEY + DATA_API_KEY + ' ' + ('blur' + EVENT_KEY + DATA_API_KEY) 430 }; 431 432 /** 433 * ------------------------------------------------------------------------ 434 * Class Definition 435 * ------------------------------------------------------------------------ 436 */ 437 438 var Button = (function () { 439 function Button(element) { 440 _classCallCheck(this, Button); 441 442 this._element = element; 443 } 444 445 /** 446 * ------------------------------------------------------------------------ 447 * Data Api implementation 448 * ------------------------------------------------------------------------ 449 */ 450 451 // getters 452 453 _createClass(Button, [{ 454 key: 'toggle', 455 456 // public 457 458 value: function toggle() { 459 var triggerChangeEvent = true; 460 var rootElement = $(this._element).closest(Selector.DATA_TOGGLE)[0]; 461 462 if (rootElement) { 463 var input = $(this._element).find(Selector.INPUT)[0]; 464 465 if (input) { 466 if (input.type === 'radio') { 467 if (input.checked && $(this._element).hasClass(ClassName.ACTIVE)) { 468 triggerChangeEvent = false; 469 } else { 470 var activeElement = $(rootElement).find(Selector.ACTIVE)[0]; 471 472 if (activeElement) { 473 $(activeElement).removeClass(ClassName.ACTIVE); 474 } 475 } 476 } 477 478 if (triggerChangeEvent) { 479 input.checked = !$(this._element).hasClass(ClassName.ACTIVE); 480 $(this._element).trigger('change'); 481 } 482 483 input.focus(); 484 } 485 } else { 486 this._element.setAttribute('aria-pressed', !$(this._element).hasClass(ClassName.ACTIVE)); 487 } 488 489 if (triggerChangeEvent) { 490 $(this._element).toggleClass(ClassName.ACTIVE); 491 } 492 } 493 }, { 494 key: 'dispose', 495 value: function dispose() { 496 $.removeData(this._element, DATA_KEY); 497 this._element = null; 498 } 499 500 // static 501 502 }], [{ 503 key: '_jQueryInterface', 504 value: function _jQueryInterface(config) { 505 return this.each(function () { 506 var data = $(this).data(DATA_KEY); 507 508 if (!data) { 509 data = new Button(this); 510 $(this).data(DATA_KEY, data); 511 } 512 513 if (config === 'toggle') { 514 data[config](); 515 } 516 }); 517 } 518 }, { 519 key: 'VERSION', 520 get: function get() { 521 return VERSION; 522 } 523 }]); 524 525 return Button; 526 })();
527 528 $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) { 529 event.preventDefault(); 530 531 var button = event.target; 532 533 if (!$(button).hasClass(ClassName.BUTTON)) { 534 button = $(button).closest(Selector.BUTTON); 535 } 536 537 Button._jQueryInterface.call($(button), 'toggle'); 538 }).on(Event.FOCUS_BLUR_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) { 539 var button = $(event.target).closest(Selector.BUTTON)[0]; 540 $(button).toggleClass(ClassName.FOCUS, /^focus(in)?$/.test(event.type)); 541 }); 542 543 /** 544 * ------------------------------------------------------------------------ 545 * jQuery 546 * ------------------------------------------------------------------------ 547 */ 548 549 $.fn[NAME] = Button._jQueryInterface; 550 $.fn[NAME].Constructor = Button; 551 $.fn[NAME].noConflict = function () { 552 $.fn[NAME] = JQUERY_NO_CONFLICT; 553 return Button._jQueryInterface; 554 }; 555 556 return Button; 557})(jQuery); 558 559/** 560 * -------------------------------------------------------------------------- 561 * Bootstrap (v4.0.0-alpha.4): carousel.js 562 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 563 * -------------------------------------------------------------------------- 564 */ 565 566var Carousel = (function ($) { 567 568 /** 569 * ------------------------------------------------------------------------ 570 * Constants 571 * ------------------------------------------------------------------------ 572 */ 573 574 var NAME = 'carousel'; 575 var VERSION = '4.0.0-alpha.4'; 576 var DATA_KEY = 'bs.carousel'; 577 var EVENT_KEY = '.' + DATA_KEY; 578 var DATA_API_KEY = '.data-api'; 579 var JQUERY_NO_CONFLICT = $.fn[NAME]; 580 var TRANSITION_DURATION = 600; 581 var ARROW_LEFT_KEYCODE = 37; // KeyboardEvent.which value for left arrow key 582 var ARROW_RIGHT_KEYCODE = 39; // KeyboardEvent.which value for right arrow key 583 584 var Default = { 585 interval: 5000, 586 keyboard: true, 587 slide: false, 588 pause: 'hover', 589 wrap: true 590 }; 591 592 var DefaultType = { 593 interval: '(number|boolean)', 594 keyboard: 'boolean', 595 slide: '(boolean|string)', 596 pause: '(string|boolean)', 597 wrap: 'boolean' 598 }; 599 600 var Direction = { 601 NEXT: 'next', 602 PREVIOUS: 'prev' 603 }; 604 605 var Event = { 606 SLIDE: 'slide' + EVENT_KEY, 607 SLID: 'slid' + EVENT_KEY, 608 KEYDOWN: 'keydown' + EVENT_KEY, 609 MOUSEENTER: 'mouseenter' + EVENT_KEY, 610 MOUSELEAVE: 'mouseleave' + EVENT_KEY, 611 LOAD_DATA_API: 'load' + EVENT_KEY + DATA_API_KEY, 612 CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY 613 }; 614 615 var ClassName = { 616 CAROUSEL: 'carousel', 617 ACTIVE: 'active', 618 SLIDE: 'slide', 619 RIGHT: 'right', 620 LEFT: 'left', 621 ITEM: 'carousel-item' 622 }; 623 624 var Selector = { 625 ACTIVE: '.active', 626 ACTIVE_ITEM: '.active.carousel-item', 627 ITEM: '.carousel-item', 628 NEXT_PREV: '.next, .prev', 629 INDICATORS: '.carousel-indicators', 630 DATA_SLIDE: '[data-slide], [data-slide-to]', 631 DATA_RIDE: '[data-ride="carousel"]' 632 }; 633 634 /** 635 * ------------------------------------------------------------------------ 636 * Class Definition 637 * ------------------------------------------------------------------------ 638 */ 639 640 var Carousel = (function () { 641 function Carousel(element, config) { 642 _classCallCheck(this, Carousel); 643 644 this._items = null; 645 this._interval = null; 646 this._activeElement = null; 647 648 this._isPaused = false; 649 this._isSliding = false; 650 651 this._config = this._getConfig(config); 652 this._element = $(element)[0]; 653 this._indicatorsElement = $(this._element).find(Selector.INDICATORS)[0]; 654 655 this._addEventListeners(); 656 } 657 658 /** 659 * ------------------------------------------------------------------------ 660 * Data Api implementation 661 * ------------------------------------------------------------------------ 662 */ 663 664 // getters 665 666 _createClass(Carousel, [{ 667 key: 'next', 668 669 // public 670 671 value: function next() { 672 if (!this._isSliding) { 673 this._slide(Direction.NEXT); 674 } 675 } 676 }, { 677 key: 'nextWhenVisible', 678 value: function nextWhenVisible() { 679 // Don't call next when the page isn't visible 680 if (!document.hidden) { 681 this.next(); 682 } 683 } 684 }, { 685 key: 'prev', 686 value: function prev() { 687 if (!this._isSliding) { 688 this._slide(Direction.PREVIOUS); 689 } 690 } 691 }, { 692 key: 'pause', 693 value: function pause(event) { 694 if (!event) { 695 this._isPaused = true; 696 } 697 698 if ($(this._element).find(Selector.NEXT_PREV)[0] && Util.supportsTransitionEnd()) { 699 Util.triggerTransitionEnd(this._element); 700 this.cycle(true); 701 } 702 703 clearInterval(this._interval); 704 this._interval = null; 705 } 706 }, { 707 key: 'cycle', 708 value: function cycle(event) { 709 if (!event) { 710 this._isPaused = false; 711 } 712 713 if (this._interval) { 714 clearInterval(this._interval); 715 this._interval = null; 716 } 717 718 if (this._config.interval && !this._isPaused) { 719 this._interval = setInterval($.proxy(document.visibilityState ? this.nextWhenVisible : this.next, this), this._config.interval); 720 } 721 } 722 }, { 723 key: 'to', 724 value: function to(index) { 725 var _this2 = this; 726 727 this._activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0]; 728 729 var activeIndex = this._getItemIndex(this._activeElement); 730 731 if (index > this._items.length - 1 || index < 0) { 732 return; 733 } 734 735 if (this._isSliding) { 736 $(this._element).one(Event.SLID, function () { 737 return _this2.to(index); 738 }); 739 return; 740 } 741 742 if (activeIndex === index) { 743 this.pause(); 744 this.cycle(); 745 return; 746 } 747 748 var direction = index > activeIndex ? Direction.NEXT : Direction.PREVIOUS; 749 750 this._slide(direction, this._items[index]); 751 } 752 }, { 753 key: 'dispose', 754 value: function dispose() { 755 $(this._element).off(EVENT_KEY); 756 $.removeData(this._element, DATA_KEY); 757 758 this._items = null; 759 this._config = null; 760 this._element = null; 761 this._interval = null; 762 this._isPaused = null; 763 this._isSliding = null; 764 this._activeElement = null; 765 this._indicatorsElement = null; 766 } 767 768 // private 769 770 }, { 771 key: '_getConfig', 772 value: function _getConfig(config) { 773 config = $.extend({}, Default, config); 774 Util.typeCheckConfig(NAME, config, DefaultType); 775 return config; 776 } 777 }, { 778 key: '_addEventListeners', 779 value: function _addEventListeners() { 780 if (this._config.keyboard) {
781 $(this._element).on(Event.KEYDOWN, $.proxy(this._keydown, this)); 782 } 783 784 if (this._config.pause === 'hover' && !('ontouchstart' in document.documentElement)) { 785 $(this._element).on(Event.MOUSEENTER, $.proxy(this.pause, this)).on(Event.MOUSELEAVE, $.proxy(this.cycle, this)); 786 } 787 } 788 }, { 789 key: '_keydown', 790 value: function _keydown(event) { 791 event.preventDefault(); 792 793 if (/input|textarea/i.test(event.target.tagName)) { 794 return; 795 } 796 797 switch (event.which) { 798 case ARROW_LEFT_KEYCODE: 799 this.prev(); 800 break; 801 case ARROW_RIGHT_KEYCODE: 802 this.next(); 803 break; 804 default: 805 return; 806 } 807 } 808 }, { 809 key: '_getItemIndex', 810 value: function _getItemIndex(element) { 811 this._items = $.makeArray($(element).parent().find(Selector.ITEM)); 812 return this._items.indexOf(element); 813 } 814 }, { 815 key: '_getItemByDirection', 816 value: function _getItemByDirection(direction, activeElement) { 817 var isNextDirection = direction === Direction.NEXT; 818 var isPrevDirection = direction === Direction.PREVIOUS; 819 var activeIndex = this._getItemIndex(activeElement); 820 var lastItemIndex = this._items.length - 1; 821 var isGoingToWrap = isPrevDirection && activeIndex === 0 || isNextDirection && activeIndex === lastItemIndex; 822 823 if (isGoingToWrap && !this._config.wrap) { 824 return activeElement; 825 } 826 827 var delta = direction === Direction.PREVIOUS ? -1 : 1; 828 var itemIndex = (activeIndex + delta) % this._items.length; 829 830 return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex]; 831 } 832 }, { 833 key: '_triggerSlideEvent', 834 value: function _triggerSlideEvent(relatedTarget, directionalClassname) { 835 var slideEvent = $.Event(Event.SLIDE, { 836 relatedTarget: relatedTarget, 837 direction: directionalClassname 838 }); 839 840 $(this._element).trigger(slideEvent); 841 842 return slideEvent; 843 } 844 }, { 845 key: '_setActiveIndicatorElement', 846 value: function _setActiveIndicatorElement(element) { 847 if (this._indicatorsElement) { 848 $(this._indicatorsElement).find(Selector.ACTIVE).removeClass(ClassName.ACTIVE); 849 850 var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)]; 851 852 if (nextIndicator) { 853 $(nextIndicator).addClass(ClassName.ACTIVE); 854 } 855 } 856 } 857 }, { 858 key: '_slide', 859 value: function _slide(direction, element) { 860 var _this3 = this; 861 862 var activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0]; 863 var nextElement = element || activeElement && this._getItemByDirection(direction, activeElement); 864 865 var isCycling = Boolean(this._interval); 866 867 var directionalClassName = direction === Direction.NEXT ? ClassName.LEFT : ClassName.RIGHT; 868 869 if (nextElement && $(nextElement).hasClass(ClassName.ACTIVE)) { 870 this._isSliding = false; 871 return; 872 } 873 874 var slideEvent = this._triggerSlideEvent(nextElement, directionalClassName); 875 if (slideEvent.isDefaultPrevented()) { 876 return; 877 } 878 879 if (!activeElement || !nextElement) { 880 // some weirdness is happening, so we bail 881 return; 882 } 883 884 this._isSliding = true; 885 886 if (isCycling) { 887 this.pause(); 888 } 889 890 this._setActiveIndicatorElement(nextElement); 891 892 var slidEvent = $.Event(Event.SLID, { 893 relatedTarget: nextElement, 894 direction: directionalClassName 895 }); 896 897 if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.SLIDE)) { 898 899 $(nextElement).addClass(direction); 900 901 Util.reflow(nextElement); 902 903 $(activeElement).addClass(directionalClassName); 904 $(nextElement).addClass(directionalClassName); 905 906 $(activeElement).one(Util.TRANSITION_END, function () { 907 $(nextElement).removeClass(directionalClassName).removeClass(direction); 908 909 $(nextElement).addClass(ClassName.ACTIVE); 910 911 $(activeElement).removeClass(ClassName.ACTIVE).removeClass(direction).removeClass(directionalClassName); 912 913 _this3._isSliding = false; 914 915 setTimeout(function () { 916 return $(_this3._element).trigger(slidEvent); 917 }, 0); 918 }).emulateTransitionEnd(TRANSITION_DURATION); 919 } else { 920 $(activeElement).removeClass(ClassName.ACTIVE); 921 $(nextElement).addClass(ClassName.ACTIVE); 922 923 this._isSliding = false; 924 $(this._element).trigger(slidEvent); 925 } 926 927 if (isCycling) { 928 this.cycle(); 929 } 930 } 931 932 // static 933 934 }], [{ 935 key: '_jQueryInterface', 936 value: function _jQueryInterface(config) { 937 return this.each(function () { 938 var data = $(this).data(DATA_KEY); 939 var _config = $.extend({}, Default, $(this).data()); 940 941 if (typeof config === 'object') { 942 $.extend(_config, config); 943 } 944 945 var action = typeof config === 'string' ? config : _config.slide; 946 947 if (!data) { 948 data = new Carousel(this, _config); 949 $(this).data(DATA_KEY, data); 950 } 951 952 if (typeof config === 'number') { 953 data.to(config); 954 } else if (typeof action === 'string') { 955 if (data[action] === undefined) {
956 throw new Error('No method named "' + action + '"'); 957 } 958 data[action](); 959 } else if (_config.interval) { 960 data.pause(); 961 data.cycle(); 962 } 963 }); 964 } 965 }, { 966 key: '_dataApiClickHandler', 967 value: function _dataApiClickHandler(event) { 968 var selector = Util.getSelectorFromElement(this); 969 970 if (!selector) { 971 return; 972 } 973 974 var target = $(selector)[0]; 975 976 if (!target || !$(target).hasClass(ClassName.CAROUSEL)) { 977 return; 978 } 979 980 var config = $.extend({}, $(target).data(), $(this).data()); 981 var slideIndex = this.getAttribute('data-slide-to'); 982 983 if (slideIndex) { 984 config.interval = false; 985 } 986 987 Carousel._jQueryInterface.call($(target), config); 988 989 if (slideIndex) { 990 $(target).data(DATA_KEY).to(slideIndex); 991 } 992 993 event.preventDefault(); 994 } 995 }, { 996 key: 'VERSION', 997 get: function get() { 998 return VERSION; 999 } 1000 }, { 1001 key: 'Default', 1002 get: function get() { 1003 return Default; 1004 } 1005 }]); 1006 1007 return Carousel; 1008 })(); 1009 1010 $(document).on(Event.CLICK_DATA_API, Selector.DATA_SLIDE, Carousel._dataApiClickHandler); 1011 1012 $(window).on(Event.LOAD_DATA_API, function () { 1013 $(Selector.DATA_RIDE).each(function () { 1014 var $carousel = $(this); 1015 Carousel._jQueryInterface.call($carousel, $carousel.data()); 1016 }); 1017 }); 1018 1019 /** 1020 * ------------------------------------------------------------------------ 1021 * jQuery 1022 * ------------------------------------------------------------------------ 1023 */ 1024 1025 $.fn[NAME] = Carousel._jQueryInterface; 1026 $.fn[NAME].Constructor = Carousel; 1027 $.fn[NAME].noConflict = function () { 1028 $.fn[NAME] = JQUERY_NO_CONFLICT; 1029 return Carousel._jQueryInterface; 1030 }; 1031 1032 return Carousel; 1033})(jQuery); 1034 1035/** 1036 * -------------------------------------------------------------------------- 1037 * Bootstrap (v4.0.0-alpha.4): collapse.js 1038 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 1039 * -------------------------------------------------------------------------- 1040 */ 1041 1042var Collapse = (function ($) { 1043 1044 /** 1045 * ------------------------------------------------------------------------ 1046 * Constants 1047 * ------------------------------------------------------------------------ 1048 */ 1049 1050 var NAME = 'collapse'; 1051 var VERSION = '4.0.0-alpha.4'; 1052 var DATA_KEY = 'bs.collapse'; 1053 var EVENT_KEY = '.' + DATA_KEY; 1054 var DATA_API_KEY = '.data-api'; 1055 var JQUERY_NO_CONFLICT = $.fn[NAME]; 1056 var TRANSITION_DURATION = 600; 1057 1058 var Default = { 1059 toggle: true, 1060 parent: '' 1061 }; 1062 1063 var DefaultType = { 1064 toggle: 'boolean', 1065 parent: 'string' 1066 }; 1067 1068 var Event = { 1069 SHOW: 'show' + EVENT_KEY, 1070 SHOWN: 'shown' + EVENT_KEY, 1071 HIDE: 'hide' + EVENT_KEY, 1072 HIDDEN: 'hidden' + EVENT_KEY, 1073 CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY 1074 }; 1075 1076 var ClassName = { 1077 IN: 'in', 1078 COLLAPSE: 'collapse', 1079 COLLAPSING: 'collapsing', 1080 COLLAPSED: 'collapsed' 1081 }; 1082 1083 var Dimension = { 1084 WIDTH: 'width', 1085 HEIGHT: 'height' 1086 }; 1087 1088 var Selector = { 1089 ACTIVES: '.panel > .in, .panel > .collapsing', 1090 DATA_TOGGLE: '[data-toggle="collapse"]' 1091 }; 1092 1093 /** 1094 * ------------------------------------------------------------------------ 1095 * Class Definition 1096 * ------------------------------------------------------------------------ 1097 */ 1098 1099 var Collapse = (function () { 1100 function Collapse(element, config) { 1101 _classCallCheck(this, Collapse); 1102 1103 this._isTransitioning = false; 1104 this._element = element; 1105 this._config = this._getConfig(config); 1106 this._triggerArray = $.makeArray($('[data-toggle="collapse"][href="#' + element.id + '"],' + ('[data-toggle="collapse"][data-target="#' + element.id + '"]'))); 1107 1108 this._parent = this._config.parent ? this._getParent() : null; 1109 1110 if (!this._config.parent) { 1111 this._addAriaAndCollapsedClass(this._element, this._triggerArray); 1112 } 1113 1114 if (this._config.toggle) { 1115 this.toggle(); 1116 } 1117 } 1118 1119 /** 1120 * ------------------------------------------------------------------------ 1121 * Data Api implementation 1122 * ------------------------------------------------------------------------ 1123 */ 1124 1125 // getters 1126 1127 _createClass(Collapse, [{ 1128 key: 'toggle', 1129 1130 // public 1131
1132 value: function toggle() { 1133 if ($(this._element).hasClass(ClassName.IN)) { 1134 this.hide(); 1135 } else { 1136 this.show(); 1137 } 1138 } 1139 }, { 1140 key: 'show', 1141 value: function show() { 1142 var _this4 = this; 1143 1144 if (this._isTransitioning || $(this._element).hasClass(ClassName.IN)) { 1145 return; 1146 } 1147 1148 var actives = undefined; 1149 var activesData = undefined; 1150 1151 if (this._parent) { 1152 actives = $.makeArray($(Selector.ACTIVES)); 1153 if (!actives.length) { 1154 actives = null; 1155 } 1156 } 1157 1158 if (actives) { 1159 activesData = $(actives).data(DATA_KEY); 1160 if (activesData && activesData._isTransitioning) { 1161 return; 1162 } 1163 } 1164 1165 var startEvent = $.Event(Event.SHOW); 1166 $(this._element).trigger(startEvent); 1167 if (startEvent.isDefaultPrevented()) { 1168 return; 1169 } 1170 1171 if (actives) { 1172 Collapse._jQueryInterface.call($(actives), 'hide'); 1173 if (!activesData) { 1174 $(actives).data(DATA_KEY, null); 1175 } 1176 } 1177 1178 var dimension = this._getDimension(); 1179 1180 $(this._element).removeClass(ClassName.COLLAPSE).addClass(ClassName.COLLAPSING); 1181 1182 this._element.style[dimension] = 0; 1183 this._element.setAttribute('aria-expanded', true); 1184 1185 if (this._triggerArray.length) { 1186 $(this._triggerArray).removeClass(ClassName.COLLAPSED).attr('aria-expanded', true); 1187 } 1188 1189 this.setTransitioning(true); 1190 1191 var complete = function complete() { 1192 $(_this4._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).addClass(ClassName.IN); 1193 1194 _this4._element.style[dimension] = ''; 1195 1196 _this4.setTransitioning(false); 1197 1198 $(_this4._element).trigger(Event.SHOWN); 1199 }; 1200 1201 if (!Util.supportsTransitionEnd()) { 1202 complete(); 1203 return; 1204 } 1205 1206 var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1); 1207 var scrollSize = 'scroll' + capitalizedDimension; 1208 1209 $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION); 1210 1211 this._element.style[dimension] = this._element[scrollSize] + 'px'; 1212 } 1213 }, { 1214 key: 'hide', 1215 value: function hide() { 1216 var _this5 = this; 1217 1218 if (this._isTransitioning || !$(this._element).hasClass(ClassName.IN)) { 1219 return; 1220 } 1221 1222 var startEvent = $.Event(Event.HIDE); 1223 $(this._element).trigger(startEvent); 1224 if (startEvent.isDefaultPrevented()) { 1225 return; 1226 } 1227 1228 var dimension = this._getDimension(); 1229 var offsetDimension = dimension === Dimension.WIDTH ? 'offsetWidth' : 'offsetHeight'; 1230 1231 this._element.style[dimension] = this._element[offsetDimension] + 'px'; 1232 1233 Util.reflow(this._element); 1234 1235 $(this._element).addClass(ClassName.COLLAPSING).removeClass(ClassName.COLLAPSE).removeClass(ClassName.IN); 1236 1237 this._element.setAttribute('aria-expanded', false); 1238 1239 if (this._triggerArray.length) { 1240 $(this._triggerArray).addClass(ClassName.COLLAPSED).attr('aria-expanded', false); 1241 } 1242 1243 this.setTransitioning(true); 1244 1245 var complete = function complete() { 1246 _this5.setTransitioning(false); 1247 $(_this5._element).removeClass(ClassName.COLLAPSING).addClass(ClassName.COLLAPSE).trigger(Event.HIDDEN); 1248 }; 1249 1250 this._element.style[dimension] = 0; 1251 1252 if (!Util.supportsTransitionEnd()) { 1253 complete(); 1254 return; 1255 } 1256 1257 $(this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION); 1258 } 1259 }, { 1260 key: 'setTransitioning', 1261 value: function setTransitioning(isTransitioning) { 1262 this._isTransitioning = isTransitioning; 1263 } 1264 }, { 1265 key: 'dispose', 1266 value: function dispose() { 1267 $.removeData(this._element, DATA_KEY); 1268 1269 this._config = null; 1270 this._parent = null; 1271 this._element = null; 1272 this._triggerArray = null; 1273 this._isTransitioning = null; 1274 } 1275 1276 // private 1277 1278 }, { 1279 key: '_getConfig', 1280 value: function _getConfig(config) { 1281 config = $.extend({}, Default, config); 1282 config.toggle = Boolean(config.toggle); // coerce string values 1283 Util.typeCheckConfig(NAME, config, DefaultType); 1284 return config; 1285 } 1286 }, { 1287 key: '_getDimension', 1288 value: function _getDimension() { 1289 var hasWidth = $(this._element).hasClass(Dimension.WIDTH); 1290 return hasWidth ? Dimension.WIDTH : Dimension.HEIGHT; 1291 } 1292 }, { 1293 key: '_getParent', 1294 value: function _getParent() { 1295 var _this6 = this; 1296 1297 var parent = $(this._config.parent)[0]; 1298 var selector = '[data-toggle="collapse"][data-parent="' + this._config.parent + '"]'; 1299 1300 $(parent).find(selector).each(function (i, element) { 1301 _this6._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element), [element]);
1302 }); 1303 1304 return parent; 1305 } 1306 }, { 1307 key: '_addAriaAndCollapsedClass', 1308 value: function _addAriaAndCollapsedClass(element, triggerArray) { 1309 if (element) { 1310 var isOpen = $(element).hasClass(ClassName.IN); 1311 element.setAttribute('aria-expanded', isOpen); 1312 1313 if (triggerArray.length) { 1314 $(triggerArray).toggleClass(ClassName.COLLAPSED, !isOpen).attr('aria-expanded', isOpen); 1315 } 1316 } 1317 } 1318 1319 // static 1320 1321 }], [{ 1322 key: '_getTargetFromElement', 1323 value: function _getTargetFromElement(element) { 1324 var selector = Util.getSelectorFromElement(element); 1325 return selector ? $(selector)[0] : null; 1326 } 1327 }, { 1328 key: '_jQueryInterface', 1329 value: function _jQueryInterface(config) { 1330 return this.each(function () { 1331 var $this = $(this); 1332 var data = $this.data(DATA_KEY); 1333 var _config = $.extend({}, Default, $this.data(), typeof config === 'object' && config); 1334 1335 if (!data && _config.toggle && /show|hide/.test(config)) { 1336 _config.toggle = false; 1337 } 1338 1339 if (!data) { 1340 data = new Collapse(this, _config); 1341 $this.data(DATA_KEY, data); 1342 } 1343 1344 if (typeof config === 'string') { 1345 if (data[config] === undefined) { 1346 throw new Error('No method named "' + config + '"'); 1347 } 1348 data[config](); 1349 } 1350 }); 1351 } 1352 }, { 1353 key: 'VERSION', 1354 get: function get() { 1355 return VERSION; 1356 } 1357 }, { 1358 key: 'Default', 1359 get: function get() { 1360 return Default; 1361 } 1362 }]); 1363 1364 return Collapse; 1365 })();
1366 1367 $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { 1368 event.preventDefault(); 1369 1370 var target = Collapse._getTargetFromElement(this); 1371 var data = $(target).data(DATA_KEY); 1372 var config = data ? 'toggle' : $(this).data(); 1373 1374 Collapse._jQueryInterface.call($(target), config); 1375 }); 1376 1377 /** 1378 * ------------------------------------------------------------------------ 1379 * jQuery 1380 * ------------------------------------------------------------------------ 1381 */ 1382 1383 $.fn[NAME] = Collapse._jQueryInterface; 1384 $.fn[NAME].Constructor = Collapse; 1385 $.fn[NAME].noConflict = function () { 1386 $.fn[NAME] = JQUERY_NO_CONFLICT; 1387 return Collapse._jQueryInterface; 1388 }; 1389 1390 return Collapse; 1391})(jQuery); 1392 1393/** 1394 * -------------------------------------------------------------------------- 1395 * Bootstrap (v4.0.0-alpha.4): dropdown.js 1396 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 1397 * -------------------------------------------------------------------------- 1398 */ 1399 1400var Dropdown = (function ($) { 1401 1402 /** 1403 * ------------------------------------------------------------------------ 1404 * Constants 1405 * ------------------------------------------------------------------------ 1406 */ 1407 1408 var NAME = 'dropdown'; 1409 var VERSION = '4.0.0-alpha.4'; 1410 var DATA_KEY = 'bs.dropdown'; 1411 var EVENT_KEY = '.' + DATA_KEY; 1412 var DATA_API_KEY = '.data-api'; 1413 var JQUERY_NO_CONFLICT = $.fn[NAME]; 1414 var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key 1415 var ARROW_UP_KEYCODE = 38; // KeyboardEvent.which value for up arrow key 1416 var ARROW_DOWN_KEYCODE = 40; // KeyboardEvent.which value for down arrow key 1417 var RIGHT_MOUSE_BUTTON_WHICH = 3; // MouseEvent.which value for the right button (assuming a right-handed mouse) 1418 1419 var Event = { 1420 HIDE: 'hide' + EVENT_KEY, 1421 HIDDEN: 'hidden' + EVENT_KEY, 1422 SHOW: 'show' + EVENT_KEY, 1423 SHOWN: 'shown' + EVENT_KEY, 1424 CLICK: 'click' + EVENT_KEY, 1425 CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY, 1426 KEYDOWN_DATA_API: 'keydown' + EVENT_KEY + DATA_API_KEY 1427 }; 1428 1429 var ClassName = { 1430 BACKDROP: 'dropdown-backdrop', 1431 DISABLED: 'disabled', 1432 OPEN: 'open' 1433 }; 1434 1435 var Selector = { 1436 BACKDROP: '.dropdown-backdrop', 1437 DATA_TOGGLE: '[data-toggle="dropdown"]', 1438 FORM_CHILD: '.dropdown form', 1439 ROLE_MENU: '[role="menu"]', 1440 ROLE_LISTBOX: '[role="listbox"]', 1441 NAVBAR_NAV: '.navbar-nav', 1442 VISIBLE_ITEMS: '[role="menu"] li:not(.disabled) a, ' + '[role="listbox"] li:not(.disabled) a' 1443 }; 1444 1445 /** 1446 * ------------------------------------------------------------------------ 1447 * Class Definition 1448 * ------------------------------------------------------------------------ 1449 */ 1450 1451 var Dropdown = (function () { 1452 function Dropdown(element) { 1453 _classCallCheck(this, Dropdown); 1454 1455 this._element = element; 1456 1457 this._addEventListeners(); 1458 } 1459 1460 /** 1461 * ------------------------------------------------------------------------ 1462 * Data Api implementation 1463 * ------------------------------------------------------------------------ 1464 */ 1465 1466 // getters 1467 1468 _createClass(Dropdown, [{ 1469 key: 'toggle', 1470 1471 // public 1472 1473 value: function toggle() { 1474 if (this.disabled || $(this).hasClass(ClassName.DISABLED)) { 1475 return false; 1476 } 1477 1478 var parent = Dropdown._getParentFromElement(this); 1479 var isActive = $(parent).hasClass(ClassName.OPEN); 1480 1481 Dropdown._clearMenus(); 1482 1483 if (isActive) { 1484 return false; 1485 } 1486 1487 if ('ontouchstart' in document.documentElement && !$(parent).closest(Selector.NAVBAR_NAV).length) { 1488 1489 // if mobile we use a backdrop because click events don't delegate 1490 var dropdown = document.createElement('div'); 1491 dropdown.className = ClassName.BACKDROP; 1492 $(dropdown).insertBefore(this); 1493 $(dropdown).on('click', Dropdown._clearMenus); 1494 } 1495 1496 var relatedTarget = { relatedTarget: this }; 1497 var showEvent = $.Event(Event.SHOW, relatedTarget); 1498 1499 $(parent).trigger(showEvent); 1500 1501 if (showEvent.isDefaultPrevented()) { 1502 return false; 1503 } 1504 1505 this.focus(); 1506 this.setAttribute('aria-expanded', 'true'); 1507 1508 $(parent).toggleClass(ClassName.OPEN); 1509 $(parent).trigger($.Event(Event.SHOWN, relatedTarget)); 1510 1511 return false; 1512 } 1513 }, { 1514 key: 'dispose', 1515 value: function dispose() { 1516 $.removeData(this._element, DATA_KEY); 1517 $(this._element).off(EVENT_KEY); 1518 this._element = null; 1519 } 1520 1521 // private 1522 1523 }, { 1524 key: '_addEventListeners', 1525 value: function _addEventListeners() { 1526 $(this._element).on(Event.CLICK, this.toggle); 1527 } 1528 1529 // static 1530 1531 }], [{ 1532 key: '_jQueryInterface', 1533 value: function _jQueryInterface(config) { 1534 return this.each(function () { 1535 var data = $(this).data(DATA_KEY); 1536 1537 if (!data) { 1538 $(this).data(DATA_KEY, data = new Dropdown(this)); 1539 } 1540 1541 if (typeof config === 'string') { 1542 if (data[config] === undefined) {
1543 throw new Error('No method named "' + config + '"'); 1544 } 1545 data[config].call(this); 1546 } 1547 }); 1548 } 1549 }, { 1550 key: '_clearMenus', 1551 value: function _clearMenus(event) { 1552 if (event && event.which === RIGHT_MOUSE_BUTTON_WHICH) { 1553 return; 1554 } 1555 1556 var backdrop = $(Selector.BACKDROP)[0]; 1557 if (backdrop) { 1558 backdrop.parentNode.removeChild(backdrop); 1559 } 1560 1561 var toggles = $.makeArray($(Selector.DATA_TOGGLE)); 1562 1563 for (var i = 0; i < toggles.length; i++) { 1564 var _parent = Dropdown._getParentFromElement(toggles[i]); 1565 var relatedTarget = { relatedTarget: toggles[i] }; 1566 1567 if (!$(_parent).hasClass(ClassName.OPEN)) { 1568 continue; 1569 } 1570 1571 if (event && event.type === 'click' && /input|textarea/i.test(event.target.tagName) && $.contains(_parent, event.target)) { 1572 continue; 1573 } 1574 1575 var hideEvent = $.Event(Event.HIDE, relatedTarget); 1576 $(_parent).trigger(hideEvent); 1577 if (hideEvent.isDefaultPrevented()) { 1578 continue; 1579 } 1580 1581 toggles[i].setAttribute('aria-expanded', 'false'); 1582 1583 $(_parent).removeClass(ClassName.OPEN).trigger($.Event(Event.HIDDEN, relatedTarget)); 1584 } 1585 } 1586 }, { 1587 key: '_getParentFromElement', 1588 value: function _getParentFromElement(element) { 1589 var parent = undefined; 1590 var selector = Util.getSelectorFromElement(element); 1591 1592 if (selector) { 1593 parent = $(selector)[0]; 1594 } 1595 1596 return parent || element.parentNode; 1597 } 1598 }, { 1599 key: '_dataApiKeydownHandler', 1600 value: function _dataApiKeydownHandler(event) { 1601 if (!/(38|40|27|32)/.test(event.which) || /input|textarea/i.test(event.target.tagName)) { 1602 return; 1603 } 1604 1605 event.preventDefault(); 1606 event.stopPropagation(); 1607 1608 if (this.disabled || $(this).hasClass(ClassName.DISABLED)) { 1609 return; 1610 } 1611 1612 var parent = Dropdown._getParentFromElement(this); 1613 var isActive = $(parent).hasClass(ClassName.OPEN); 1614 1615 if (!isActive && event.which !== ESCAPE_KEYCODE || isActive && event.which === ESCAPE_KEYCODE) { 1616 1617 if (event.which === ESCAPE_KEYCODE) { 1618 var toggle = $(parent).find(Selector.DATA_TOGGLE)[0]; 1619 $(toggle).trigger('focus'); 1620 } 1621 1622 $(this).trigger('click'); 1623 return; 1624 } 1625 1626 var items = $.makeArray($(Selector.VISIBLE_ITEMS)); 1627 1628 items = items.filter(function (item) { 1629 return item.offsetWidth || item.offsetHeight; 1630 }); 1631 1632 if (!items.length) { 1633 return; 1634 } 1635 1636 var index = items.indexOf(event.target); 1637 1638 if (event.which === ARROW_UP_KEYCODE && index > 0) { 1639 // up 1640 index--; 1641 } 1642 1643 if (event.which === ARROW_DOWN_KEYCODE && index < items.length - 1) { 1644 // down 1645 index++; 1646 } 1647 1648 if (index < 0) { 1649 index = 0; 1650 } 1651 1652 items[index].focus(); 1653 } 1654 }, { 1655 key: 'VERSION', 1656 get: function get() { 1657 return VERSION; 1658 } 1659 }]); 1660 1661 return Dropdown; 1662 })(); 1663 1664 $(document).on(Event.KEYDOWN_DATA_API, Selector.DATA_TOGGLE, Dropdown._dataApiKeydownHandler).on(Event.KEYDOWN_DATA_API, Selector.ROLE_MENU, Dropdown._dataApiKeydownHandler).on(Event.KEYDOWN_DATA_API, Selector.ROLE_LISTBOX, Dropdown._dataApiKeydownHandler).on(Event.CLICK_DATA_API, Dropdown._clearMenus).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, Dropdown.prototype.toggle).on(Event.CLICK_DATA_API, Selector.FORM_CHILD, function (e) { 1665 e.stopPropagation(); 1666 }); 1667 1668 /** 1669 * ------------------------------------------------------------------------ 1670 * jQuery 1671 * ------------------------------------------------------------------------ 1672 */ 1673 1674 $.fn[NAME] = Dropdown._jQueryInterface; 1675 $.fn[NAME].Constructor = Dropdown; 1676 $.fn[NAME].noConflict = function () { 1677 $.fn[NAME] = JQUERY_NO_CONFLICT; 1678 return Dropdown._jQueryInterface; 1679 }; 1680 1681 return Dropdown; 1682})(jQuery); 1683 1684/** 1685 * -------------------------------------------------------------------------- 1686 * Bootstrap (v4.0.0-alpha.4): modal.js 1687 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 1688 * -------------------------------------------------------------------------- 1689 */ 1690 1691var Modal = (function ($) { 1692 1693 /** 1694 * ------------------------------------------------------------------------ 1695 * Constants 1696 * ------------------------------------------------------------------------ 1697 */ 1698 1699 var NAME = 'modal'; 1700 var VERSION = '4.0.0-alpha.4'; 1701 var DATA_KEY = 'bs.modal'; 1702 var EVENT_KEY = '.' + DATA_KEY; 1703 var DATA_API_KEY = '.data-api'; 1704 var JQUERY_NO_CONFLICT = $.fn[NAME]; 1705 var TRANSITION_DURATION = 300; 1706 var BACKDROP_TRANSITION_DURATION = 150; 1707 var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key 1708 1709 var Default = { 1710 backdrop: true, 1711 keyboard: true, 1712 focus: true, 1713 show: true 1714 }; 1715 1716 var DefaultType = { 1717 backdrop: '(boolean|string)', 1718 keyboard: 'boolean', 1719 focus: 'boolean', 1720 show: 'boolean' 1721 }; 1722 1723 var Event = { 1724 HIDE: 'hide' + EVENT_KEY, 1725 HIDDEN: 'hidden' + EVENT_KEY, 1726 SHOW: 'show' + EVENT_KEY, 1727 SHOWN: 'shown' + EVENT_KEY, 1728 FOCUSIN: 'focusin' + EVENT_KEY, 1729 RESIZE: 'resize' + EVENT_KEY, 1730 CLICK_DISMISS: 'click.dismiss' + EVENT_KEY, 1731 KEYDOWN_DISMISS: 'keydown.dismiss' + EVENT_KEY, 1732 MOUSEUP_DISMISS: 'mouseup.dismiss' + EVENT_KEY, 1733 MOUSEDOWN_DISMISS: 'mousedown.dismiss' + EVENT_KEY, 1734 CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY 1735 }; 1736 1737 var ClassName = {
1738 SCROLLBAR_MEASURER: 'modal-scrollbar-measure', 1739 BACKDROP: 'modal-backdrop', 1740 OPEN: 'modal-open', 1741 FADE: 'fade', 1742 IN: 'in' 1743 }; 1744 1745 var Selector = { 1746 DIALOG: '.modal-dialog', 1747 DATA_TOGGLE: '[data-toggle="modal"]', 1748 DATA_DISMISS: '[data-dismiss="modal"]', 1749 FIXED_CONTENT: '.navbar-fixed-top, .navbar-fixed-bottom, .is-fixed' 1750 }; 1751 1752 /** 1753 * ------------------------------------------------------------------------ 1754 * Class Definition 1755 * ------------------------------------------------------------------------ 1756 */ 1757 1758 var Modal = (function () { 1759 function Modal(element, config) { 1760 _classCallCheck(this, Modal); 1761 1762 this._config = this._getConfig(config); 1763 this._element = element; 1764 this._dialog = $(element).find(Selector.DIALOG)[0]; 1765 this._backdrop = null; 1766 this._isShown = false; 1767 this._isBodyOverflowing = false; 1768 this._ignoreBackdropClick = false; 1769 this._originalBodyPadding = 0; 1770 this._scrollbarWidth = 0; 1771 } 1772 1773 /** 1774 * ------------------------------------------------------------------------ 1775 * Data Api implementation 1776 * ------------------------------------------------------------------------ 1777 */ 1778 1779 // getters 1780 1781 _createClass(Modal, [{ 1782 key: 'toggle', 1783 1784 // public 1785 1786 value: function toggle(relatedTarget) { 1787 return this._isShown ? this.hide() : this.show(relatedTarget); 1788 } 1789 }, { 1790 key: 'show', 1791 value: function show(relatedTarget) { 1792 var _this7 = this; 1793 1794 var showEvent = $.Event(Event.SHOW, { 1795 relatedTarget: relatedTarget 1796 }); 1797 1798 $(this._element).trigger(showEvent); 1799 1800 if (this._isShown || showEvent.isDefaultPrevented()) { 1801 return; 1802 } 1803 1804 this._isShown = true; 1805 1806 this._checkScrollbar(); 1807 this._setScrollbar(); 1808 1809 $(document.body).addClass(ClassName.OPEN); 1810 1811 this._setEscapeEvent(); 1812 this._setResizeEvent(); 1813 1814 $(this._element).on(Event.CLICK_DISMISS, Selector.DATA_DISMISS, $.proxy(this.hide, this)); 1815 1816 $(this._dialog).on(Event.MOUSEDOWN_DISMISS, function () { 1817 $(_this7._element).one(Event.MOUSEUP_DISMISS, function (event) { 1818 if ($(event.target).is(_this7._element)) { 1819 _this7._ignoreBackdropClick = true; 1820 } 1821 }); 1822 }); 1823 1824 this._showBackdrop($.proxy(this._showElement, this, relatedTarget)); 1825 } 1826 }, { 1827 key: 'hide', 1828 value: function hide(event) { 1829 if (event) { 1830 event.preventDefault(); 1831 } 1832 1833 var hideEvent = $.Event(Event.HIDE); 1834 1835 $(this._element).trigger(hideEvent); 1836 1837 if (!this._isShown || hideEvent.isDefaultPrevented()) { 1838 return; 1839 } 1840 1841 this._isShown = false; 1842 1843 this._setEscapeEvent(); 1844 this._setResizeEvent(); 1845 1846 $(document).off(Event.FOCUSIN); 1847 1848 $(this._element).removeClass(ClassName.IN); 1849 1850 $(this._element).off(Event.CLICK_DISMISS); 1851 $(this._dialog).off(Event.MOUSEDOWN_DISMISS); 1852 1853 if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE)) { 1854 1855 $(this._element).one(Util.TRANSITION_END, $.proxy(this._hideModal, this)).emulateTransitionEnd(TRANSITION_DURATION); 1856 } else { 1857 this._hideModal(); 1858 } 1859 } 1860 }, { 1861 key: 'dispose', 1862 value: function dispose() { 1863 $.removeData(this._element, DATA_KEY); 1864 1865 $(window).off(EVENT_KEY); 1866 $(document).off(EVENT_KEY); 1867 $(this._element).off(EVENT_KEY); 1868 $(this._backdrop).off(EVENT_KEY); 1869 1870 this._config = null; 1871 this._element = null; 1872 this._dialog = null; 1873 this._backdrop = null; 1874 this._isShown = null; 1875 this._isBodyOverflowing = null; 1876 this._ignoreBackdropClick = null; 1877 this._originalBodyPadding = null; 1878 this._scrollbarWidth = null; 1879 } 1880 1881 // private 1882 1883 }, { 1884 key: '_getConfig', 1885 value: function _getConfig(config) { 1886 config = $.extend({}, Default, config); 1887 Util.typeCheckConfig(NAME, config, DefaultType); 1888 return config; 1889 } 1890 }, { 1891 key: '_showElement', 1892 value: function _showElement(relatedTarget) { 1893 var _this8 = this; 1894 1895 var transition = Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE); 1896 1897 if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) { 1898 // don't move modals dom position 1899 document.body.appendChild(this._element); 1900 } 1901 1902 this._element.style.display = 'block'; 1903 this._element.removeAttribute('aria-hidden'); 1904 this._element.scrollTop = 0; 1905 1906 if (transition) { 1907 Util.reflow(this._element); 1908 } 1909 1910 $(this._element).addClass(ClassName.IN); 1911 1912 if (this._config.focus) { 1913 this._enforceFocus(); 1914 } 1915 1916 var shownEvent = $.Event(Event.SHOWN, { 1917 relatedTarget: relatedTarget 1918 }); 1919 1920 var transitionComplete = function transitionComplete() { 1921 if (_this8._config.focus) { 1922 _this8._element.focus(); 1923 } 1924 $(_this8._element).trigger(shownEvent); 1925 }; 1926 1927 if (transition) { 1928 $(this._dialog).one(Util.TRANSITION_END, transitionComplete).emulateTransitionEnd(TRANSITION_DURATION); 1929 } else { 1930 transitionComplete(); 1931 } 1932 } 1933 }, { 1934 key: '_enforceFocus', 1935 value: function _enforceFocus() { 1936 var _this9 = this; 1937 1938 $(document).off(Event.FOCUSIN) // guard against infinite focus loop 1939 .on(Event.FOCUSIN, function (event) { 1940 if (document !== event.target && _this9._element !== event.target && !$(_this9._element).has(event.target).length) { 1941 _this9._element.focus(); 1942 } 1943 }); 1944 } 1945 }, { 1946 key: '_setEscapeEvent', 1947 value: function _setEscapeEvent() { 1948 var _this10 = this; 1949 1950 if (this._isShown && this._config.keyboard) { 1951 $(this._element).on(Event.KEYDOWN_DISMISS, function (event) { 1952 if (event.which === ESCAPE_KEYCODE) { 1953 _this10.hide(); 1954 } 1955 }); 1956 } else if (!this._isShown) { 1957 $(this._element).off(Event.KEYDOWN_DISMISS); 1958 } 1959 } 1960 }, { 1961 key: '_setResizeEvent', 1962 value: function _setResizeEvent() { 1963 if (this._isShown) { 1964 $(window).on(Event.RESIZE, $.proxy(this._handleUpdate, this)); 1965 } else { 1966 $(window).off(Event.RESIZE); 1967 } 1968 } 1969 }, { 1970 key: '_hideModal', 1971 value: function _hideModal() { 1972 var _this11 = this; 1973 1974 this._element.style.display = 'none'; 1975 this._element.setAttribute('aria-hidden', 'true'); 1976 this._showBackdrop(function () { 1977 $(document.body).removeClass(ClassName.OPEN); 1978 _this11._resetAdjustments(); 1979 _this11._resetScrollbar(); 1980 $(_this11._element).trigger(Event.HIDDEN); 1981 }); 1982 } 1983 }, { 1984 key: '_removeBackdrop', 1985 value: function _removeBackdrop() { 1986 if (this._backdrop) { 1987 $(this._backdrop).remove(); 1988 this._backdrop = null; 1989 } 1990 } 1991 }, { 1992 key: '_showBackdrop', 1993 value: function _showBackdrop(callback) { 1994 var _this12 = this; 1995 1996 var animate = $(this._element).hasClass(ClassName.FADE) ? ClassName.FADE : ''; 1997 1998 if (this._isShown && this._config.backdrop) { 1999 var doAnimate = Util.supportsTransitionEnd() && animate; 2000 2001 this._backdrop = document.createElement('div'); 2002 this._backdrop.className = ClassName.BACKDROP; 2003 2004 if (animate) { 2005 $(this._backdrop).addClass(animate); 2006 } 2007 2008 $(this._backdrop).appendTo(document.body); 2009 2010 $(this._element).on(Event.CLICK_DISMISS, function (event) { 2011 if (_this12._ignoreBackdropClick) { 2012 _this12._ignoreBackdropClick = false; 2013 return; 2014 } 2015 if (event.target !== event.currentTarget) { 2016 return; 2017 } 2018 if (_this12._config.backdrop === 'static') { 2019 _this12._element.focus(); 2020 } else { 2021 _this12.hide(); 2022 } 2023 }); 2024 2025 if (doAnimate) { 2026 Util.reflow(this._backdrop); 2027 } 2028 2029 $(this._backdrop).addClass(ClassName.IN); 2030 2031 if (!callback) { 2032 return; 2033 } 2034 2035 if (!doAnimate) { 2036 callback(); 2037 return; 2038 } 2039 2040 $(this._backdrop).one(Util.TRANSITION_END, callback).emulateTransitionEnd(BACKDROP_TRANSITION_DURATION); 2041 } else if (!this._isShown && this._backdrop) { 2042 $(this._backdrop).removeClass(ClassName.IN); 2043 2044 var callbackRemove = function callbackRemove() { 2045 _this12._removeBackdrop(); 2046 if (callback) { 2047 callback(); 2048 } 2049 }; 2050 2051 if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.FADE)) { 2052 $(this._backdrop).one(Util.TRANSITION_END, callbackRemove).emulateTransitionEnd(BACKDROP_TRANSITION_DURATION); 2053 } else { 2054 callbackRemove(); 2055 } 2056 } else if (callback) { 2057 callback(); 2058 } 2059 } 2060 2061 // ---------------------------------------------------------------------- 2062 // the following methods are used to handle overflowing modals 2063 // todo (fat): these should probably be refactored out of modal.js 2064 // ---------------------------------------------------------------------- 2065 2066 }, { 2067 key: '_handleUpdate', 2068 value: function _handleUpdate() { 2069 this._adjustDialog(); 2070 } 2071 }, { 2072 key: '_adjustDialog', 2073 value: function _adjustDialog() { 2074 var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight; 2075 2076 if (!this._isBodyOverflowing && isModalOverflowing) { 2077 this._element.style.paddingLeft = this._scrollbarWidth + 'px'; 2078 } 2079 2080 if (this._isBodyOverflowing && !isModalOverflowing) { 2081 this._element.style.paddingRight = this._scrollbarWidth + 'px'; 2082 } 2083 } 2084 }, { 2085 key: '_resetAdjustments', 2086 value: function _resetAdjustments() { 2087 this._element.style.paddingLeft = ''; 2088 this._element.style.paddingRight = ''; 2089 } 2090 }, { 2091 key: '_checkScrollbar', 2092 value: function _checkScrollbar() { 2093 this._isBodyOverflowing = document.body.clientWidth < window.innerWidth; 2094 this._scrollbarWidth = this._getScrollbarWidth(); 2095 } 2096 }, { 2097 key: '_setScrollbar', 2098 value: function _setScrollbar() { 2099 var bodyPadding = parseInt($(Selector.FIXED_CONTENT).css('padding-right') || 0, 10); 2100 2101 this._originalBodyPadding = document.body.style.paddingRight || ''; 2102 2103 if (this._isBodyOverflowing) { 2104 document.body.style.paddingRight = bodyPadding + this._scrollbarWidth + 'px'; 2105 } 2106 } 2107 }, { 2108 key: '_resetScrollbar', 2109 value: function _resetScrollbar() { 2110 document.body.style.paddingRight = this._originalBodyPadding; 2111 } 2112 }, { 2113 key: '_getScrollbarWidth', 2114 value: function _getScrollbarWidth() { 2115 // thx d.walsh 2116 var scrollDiv = document.createElement('div'); 2117 scrollDiv.className = ClassName.SCROLLBAR_MEASURER; 2118 document.body.appendChild(scrollDiv); 2119 var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth; 2120 document.body.removeChild(scrollDiv); 2121 return scrollbarWidth; 2122 } 2123 2124 // static 2125 2126 }], [{ 2127 key: '_jQueryInterface', 2128 value: function _jQueryInterface(config, relatedTarget) { 2129 return this.each(function () { 2130 var data = $(this).data(DATA_KEY); 2131 var _config = $.extend({}, Modal.Default, $(this).data(), typeof config === 'object' && config); 2132 2133 if (!data) { 2134 data = new Modal(this, _config); 2135 $(this).data(DATA_KEY, data); 2136 } 2137 2138 if (typeof config === 'string') { 2139 if (data[config] === undefined) {
2140 throw new Error('No method named "' + config + '"'); 2141 } 2142 data[config](relatedTarget); 2143 } else if (_config.show) { 2144 data.show(relatedTarget); 2145 } 2146 }); 2147 } 2148 }, { 2149 key: 'VERSION', 2150 get: function get() { 2151 return VERSION; 2152 } 2153 }, { 2154 key: 'Default', 2155 get: function get() { 2156 return Default; 2157 } 2158 }]); 2159 2160 return Modal; 2161 })(); 2162 2163 $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { 2164 var _this13 = this; 2165 2166 var target = undefined; 2167 var selector = Util.getSelectorFromElement(this); 2168 2169 if (selector) { 2170 target = $(selector)[0]; 2171 } 2172 2173 var config = $(target).data(DATA_KEY) ? 'toggle' : $.extend({}, $(target).data(), $(this).data()); 2174 2175 if (this.tagName === 'A') { 2176 event.preventDefault(); 2177 } 2178 2179 var $target = $(target).one(Event.SHOW, function (showEvent) { 2180 if (showEvent.isDefaultPrevented()) { 2181 // only register focus restorer if modal will actually get shown 2182 return; 2183 } 2184 2185 $target.one(Event.HIDDEN, function () { 2186 if ($(_this13).is(':visible')) { 2187 _this13.focus(); 2188 } 2189 }); 2190 }); 2191 2192 Modal._jQueryInterface.call($(target), config, this); 2193 }); 2194 2195 /** 2196 * ------------------------------------------------------------------------ 2197 * jQuery 2198 * ------------------------------------------------------------------------ 2199 */ 2200 2201 $.fn[NAME] = Modal._jQueryInterface; 2202 $.fn[NAME].Constructor = Modal; 2203 $.fn[NAME].noConflict = function () { 2204 $.fn[NAME] = JQUERY_NO_CONFLICT; 2205 return Modal._jQueryInterface; 2206 }; 2207 2208 return Modal; 2209})(jQuery); 2210 2211/** 2212 * -------------------------------------------------------------------------- 2213 * Bootstrap (v4.0.0-alpha.4): scrollspy.js 2214 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 2215 * -------------------------------------------------------------------------- 2216 */ 2217 2218var ScrollSpy = (function ($) { 2219 2220 /** 2221 * ------------------------------------------------------------------------ 2222 * Constants 2223 * ------------------------------------------------------------------------ 2224 */ 2225 2226 var NAME = 'scrollspy'; 2227 var VERSION = '4.0.0-alpha.4'; 2228 var DATA_KEY = 'bs.scrollspy'; 2229 var EVENT_KEY = '.' + DATA_KEY; 2230 var DATA_API_KEY = '.data-api'; 2231 var JQUERY_NO_CONFLICT = $.fn[NAME]; 2232 2233 var Default = { 2234 offset: 10, 2235 method: 'auto', 2236 target: '' 2237 }; 2238 2239 var DefaultType = { 2240 offset: 'number', 2241 method: 'string', 2242 target: '(string|element)' 2243 }; 2244 2245 var Event = { 2246 ACTIVATE: 'activate' + EVENT_KEY, 2247 SCROLL: 'scroll' + EVENT_KEY, 2248 LOAD_DATA_API: 'load' + EVENT_KEY + DATA_API_KEY 2249 }; 2250 2251 var ClassName = { 2252 DROPDOWN_ITEM: 'dropdown-item', 2253 DROPDOWN_MENU: 'dropdown-menu', 2254 NAV_LINK: 'nav-link', 2255 NAV: 'nav', 2256 ACTIVE: 'active' 2257 }; 2258 2259 var Selector = { 2260 DATA_SPY: '[data-spy="scroll"]', 2261 ACTIVE: '.active', 2262 LIST_ITEM: '.list-item', 2263 LI: 'li', 2264 LI_DROPDOWN: 'li.dropdown', 2265 NAV_LINKS: '.nav-link', 2266 DROPDOWN: '.dropdown', 2267 DROPDOWN_ITEMS: '.dropdown-item', 2268 DROPDOWN_TOGGLE: '.dropdown-toggle' 2269 }; 2270 2271 var OffsetMethod = { 2272 OFFSET: 'offset', 2273 POSITION: 'position' 2274 }; 2275 2276 /** 2277 * ------------------------------------------------------------------------ 2278 * Class Definition 2279 * ------------------------------------------------------------------------ 2280 */ 2281 2282 var ScrollSpy = (function () { 2283 function ScrollSpy(element, config) { 2284 _classCallCheck(this, ScrollSpy); 2285 2286 this._element = element; 2287 this._scrollElement = element.tagName === 'BODY' ? window : element; 2288 this._config = this._getConfig(config); 2289 this._selector = this._config.target + ' ' + Selector.NAV_LINKS + ',' + (this._config.target + ' ' + Selector.DROPDOWN_ITEMS); 2290 this._offsets = []; 2291 this._targets = []; 2292 this._activeTarget = null; 2293 this._scrollHeight = 0; 2294 2295 $(this._scrollElement).on(Event.SCROLL, $.proxy(this._process, this)); 2296 2297 this.refresh();
2298 this._process(); 2299 } 2300 2301 /** 2302 * ------------------------------------------------------------------------ 2303 * Data Api implementation 2304 * ------------------------------------------------------------------------ 2305 */ 2306 2307 // getters 2308 2309 _createClass(ScrollSpy, [{ 2310 key: 'refresh', 2311 2312 // public 2313 2314 value: function refresh() { 2315 var _this14 = this; 2316 2317 var autoMethod = this._scrollElement !== this._scrollElement.window ? OffsetMethod.POSITION : OffsetMethod.OFFSET; 2318 2319 var offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method; 2320 2321 var offsetBase = offsetMethod === OffsetMethod.POSITION ? this._getScrollTop() : 0; 2322 2323 this._offsets = []; 2324 this._targets = []; 2325 2326 this._scrollHeight = this._getScrollHeight(); 2327 2328 var targets = $.makeArray($(this._selector)); 2329 2330 targets.map(function (element) { 2331 var target = undefined; 2332 var targetSelector = Util.getSelectorFromElement(element); 2333 2334 if (targetSelector) { 2335 target = $(targetSelector)[0]; 2336 } 2337 2338 if (target && (target.offsetWidth || target.offsetHeight)) { 2339 // todo (fat): remove sketch reliance on jQuery position/offset 2340 return [$(target)[offsetMethod]().top + offsetBase, targetSelector]; 2341 } 2342 return null; 2343 }).filter(function (item) { 2344 return item; 2345 }).sort(function (a, b) { 2346 return a[0] - b[0]; 2347 }
2347).forEach(function (item) { 2348 _this14._offsets.push(item[0]); 2349 _this14._targets.push(item[1]); 2350 }); 2351 } 2352 }, { 2353 key: 'dispose', 2354 value: function dispose() { 2355 $.removeData(this._element, DATA_KEY); 2356 $(this._scrollElement).off(EVENT_KEY); 2357 2358 this._element = null; 2359 this._scrollElement = null; 2360 this._config = null; 2361 this._selector = null; 2362 this._offsets = null; 2363 this._targets = null; 2364 this._activeTarget = null; 2365 this._scrollHeight = null; 2366 } 2367 2368 // private 2369 2370 }, { 2371 key: '_getConfig', 2372 value: function _getConfig(config) { 2373 config = $.extend({}, Default, config); 2374 2375 if (typeof config.target !== 'string') { 2376 var id = $(config.target).attr('id'); 2377 if (!id) { 2378 id = Util.getUID(NAME); 2379 $(config.target).attr('id', id); 2380 } 2381 config.target = '#' + id; 2382 } 2383 2384 Util.typeCheckConfig(NAME, config, DefaultType); 2385 2386 return config; 2387 } 2388 }, { 2389 key: '_getScrollTop', 2390 value: function _getScrollTop() { 2391 return this._scrollElement === window ? this._scrollElement.scrollY : this._scrollElement.scrollTop; 2392 } 2393 }, { 2394 key: '_getScrollHeight', 2395 value: function _getScrollHeight() { 2396 return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight); 2397 } 2398 }, { 2399 key: '_process', 2400 value: function _process() { 2401 var scrollTop = this._getScrollTop() + this._config.offset; 2402 var scrollHeight = this._getScrollHeight(); 2403 var maxScroll = this._config.offset + scrollHeight - this._scrollElement.offsetHeight; 2404 2405 if (this._scrollHeight !== scrollHeight) { 2406 this.refresh(); 2407 } 2408 2409 if (scrollTop >= maxScroll) { 2410 var target = this._targets[this._targets.length - 1]; 2411 2412 if (this._activeTarget !== target) { 2413 this._activate(target); 2414 } 2415 } 2416 2417 if (this._activeTarget && scrollTop < this._offsets[0]) { 2418 this._activeTarget = null; 2419 this._clear(); 2420 return; 2421 } 2422 2423 for (var i = this._offsets.length; i--;) { 2424 var isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (this._offsets[i + 1] === undefined || scrollTop < this._offsets[i + 1]); 2425 2426 if (isActiveTarget) { 2427 this._activate(this._targets[i]); 2428 } 2429 } 2430 } 2431 }, { 2432 key: '_activate', 2433 value: function _activate(target) { 2434 this._activeTarget = target; 2435 2436 this._clear(); 2437 2438 var queries = this._selector.split(','); 2439 queries = queries.map(function (selector) { 2440 return selector + '[data-target="' + target + '"],' + (selector + '[href="' + target + '"]'); 2441 }); 2442 2443 var $link = $(queries.join(',')); 2444 2445 if ($link.hasClass(ClassName.DROPDOWN_ITEM)) { 2446 $link.closest(Selector.DROPDOWN).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE); 2447 $link.addClass(ClassName.ACTIVE); 2448 } else { 2449 // todo (fat) this is kinda sus... 2450 // recursively add actives to tested nav-links 2451 $link.parents(Selector.LI).find(Selector.NAV_LINKS).addClass(ClassName.ACTIVE); 2452 } 2453 2454 $(this._scrollElement).trigger(Event.ACTIVATE, { 2455 relatedTarget: target 2456 }); 2457 } 2458 }, { 2459 key: '_clear', 2460 value: function _clear() { 2461 $(this._selector).filter(Selector.ACTIVE).removeClass(ClassName.ACTIVE); 2462 } 2463 2464 // static 2465 2466 }], [{ 2467 key: '_jQueryInterface', 2468 value: function _jQueryInterface(config) { 2469 return this.each(function () { 2470 var data = $(this).data(DATA_KEY); 2471 var _config = typeof config === 'object' && config || null; 2472 2473 if (!data) { 2474 data = new ScrollSpy(this, _config); 2475 $(this).data(DATA_KEY, data); 2476 } 2477 2478 if (typeof config === 'string') { 2479 if (data[config] === undefined) {
2480 throw new Error('No method named "' + config + '"'); 2481 } 2482 data[config](); 2483 } 2484 }); 2485 } 2486 }, { 2487 key: 'VERSION', 2488 get: function get() { 2489 return VERSION; 2490 } 2491 }, { 2492 key: 'Default', 2493 get: function get() { 2494 return Default; 2495 } 2496 }]); 2497 2498 return ScrollSpy; 2499 })(); 2500 2501 $(window).on(Event.LOAD_DATA_API, function () { 2502 var scrollSpys = $.makeArray($(Selector.DATA_SPY)); 2503 2504 for (var i = scrollSpys.length; i--;) { 2505 var $spy = $(scrollSpys[i]); 2506 ScrollSpy._jQueryInterface.call($spy, $spy.data()); 2507 } 2508 }); 2509 2510 /** 2511 * ------------------------------------------------------------------------ 2512 * jQuery 2513 * ------------------------------------------------------------------------ 2514 */ 2515 2516 $.fn[NAME] = ScrollSpy._jQueryInterface; 2517 $.fn[NAME].Constructor = ScrollSpy; 2518 $.fn[NAME].noConflict = function () { 2519 $.fn[NAME] = JQUERY_NO_CONFLICT; 2520 return ScrollSpy._jQueryInterface; 2521 }; 2522 2523 return ScrollSpy; 2524})(jQuery); 2525 2526/** 2527 * -------------------------------------------------------------------------- 2528 * Bootstrap (v4.0.0-alpha.4): tab.js 2529 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 2530 * -------------------------------------------------------------------------- 2531 */ 2532 2533var Tab = (function ($) { 2534 2535 /** 2536 * ------------------------------------------------------------------------ 2537 * Constants 2538 * ------------------------------------------------------------------------ 2539 */ 2540 2541 var NAME = 'tab'; 2542 var VERSION = '4.0.0-alpha.4'; 2543 var DATA_KEY = 'bs.tab'; 2544 var EVENT_KEY = '.' + DATA_KEY; 2545 var DATA_API_KEY = '.data-api'; 2546 var JQUERY_NO_CONFLICT = $.fn[NAME]; 2547 var TRANSITION_DURATION = 150; 2548 2549 var Event = { 2550 HIDE: 'hide' + EVENT_KEY, 2551 HIDDEN: 'hidden' + EVENT_KEY, 2552 SHOW: 'show' + EVENT_KEY, 2553 SHOWN: 'shown' + EVENT_KEY, 2554 CLICK_DATA_API: 'click' + EVENT_KEY + DATA_API_KEY 2555 }; 2556 2557 var ClassName = { 2558 DROPDOWN_MENU: 'dropdown-menu', 2559 ACTIVE: 'active', 2560 FADE: 'fade', 2561 IN: 'in' 2562 }; 2563 2564 var Selector = { 2565 A: 'a', 2566 LI: 'li', 2567 DROPDOWN: '.dropdown', 2568 UL: 'ul:not(.dropdown-menu)', 2569 FADE_CHILD: '> .nav-item .fade, > .fade', 2570 ACTIVE: '.active', 2571 ACTIVE_CHILD: '> .nav-item > .active, > .active', 2572 DATA_TOGGLE: '[data-toggle="tab"], [data-toggle="pill"]', 2573 DROPDOWN_TOGGLE: '.dropdown-toggle', 2574 DROPDOWN_ACTIVE_CHILD: '> .dropdown-menu .active' 2575 }; 2576 2577 /** 2578 * ------------------------------------------------------------------------ 2579 * Class Definition 2580 * ------------------------------------------------------------------------ 2581 */ 2582 2583 var Tab = (function () { 2584 function Tab(element) { 2585 _classCallCheck(this, Tab); 2586 2587 this._element = element; 2588 } 2589 2590 /** 2591 * ------------------------------------------------------------------------ 2592 * Data Api implementation 2593 * ------------------------------------------------------------------------ 2594 */ 2595 2596 // getters 2597 2598 _createClass(Tab, [{ 2599 key: 'show', 2600 2601 // public 2602 2603 value: function show() { 2604 var _this15 = this; 2605 2606 if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && $(this._element).hasClass(ClassName.ACTIVE)) { 2607 return; 2608 } 2609 2610 var target = undefined; 2611 var previous = undefined; 2612 var ulElement = $(this._element).closest(Selector.UL)[0]; 2613 var selector = Util.getSelectorFromElement(this._element); 2614 2615 if (ulElement) { 2616 previous = $.makeArray($(ulElement).find(Selector.ACTIVE)); 2617 previous = previous[previous.length - 1]; 2618 } 2619 2620 var hideEvent = $.Event(Event.HIDE, { 2621 relatedTarget: this._element 2622 }); 2623 2624 var showEvent = $.Event(Event.SHOW, { 2625 relatedTarget: previous 2626 }); 2627 2628 if (previous) { 2629 $(previous).trigger(hideEvent); 2630 } 2631 2632 $(this._element).trigger(showEvent); 2633 2634 if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) { 2635 return; 2636 } 2637 2638 if (selector) { 2639 target = $(selector)[0]; 2640 } 2641 2642 this._activate(this._element, ulElement); 2643 2644 var complete = function complete() { 2645 var hiddenEvent = $.Event(Event.HIDDEN, { 2646 relatedTarget: _this15._element 2647 }); 2648 2649 var shownEvent = $.Event(Event.SHOWN, { 2650 relatedTarget: previous 2651 }); 2652 2653 $(previous).trigger(hiddenEvent); 2654 $(_this15._element).trigger(shownEvent); 2655 }; 2656 2657 if (target) { 2658 this._activate(target, target.parentNode, complete); 2659 } else { 2660 complete(); 2661 } 2662 } 2663 }, { 2664 key: 'dispose', 2665 value: function dispose() { 2666 $.removeClass(this._element, DATA_KEY); 2667 this._element = null; 2668 } 2669 2670 // private 2671 2672 }, { 2673 key: '_activate',
2674 value: function _activate(element, container, callback) { 2675 var active = $(container).find(Selector.ACTIVE_CHILD)[0]; 2676 var isTransitioning = callback && Util.supportsTransitionEnd() && (active && $(active).hasClass(ClassName.FADE) || Boolean($(container).find(Selector.FADE_CHILD)[0])); 2677 2678 var complete = $.proxy(this._transitionComplete, this, element, active, isTransitioning, callback); 2679 2680 if (active && isTransitioning) { 2681 $(active).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION); 2682 } else { 2683 complete(); 2684 } 2685 2686 if (active) { 2687 $(active).removeClass(ClassName.IN); 2688 } 2689 } 2690 }, { 2691 key: '_transitionComplete', 2692 value: function _transitionComplete(element, active, isTransitioning, callback) { 2693 if (active) { 2694 $(active).removeClass(ClassName.ACTIVE); 2695 2696 var dropdownChild = $(active).find(Selector.DROPDOWN_ACTIVE_CHILD)[0]; 2697 2698 if (dropdownChild) { 2699 $(dropdownChild).removeClass(ClassName.ACTIVE); 2700 } 2701 2702 active.setAttribute('aria-expanded', false); 2703 } 2704 2705 $(element).addClass(ClassName.ACTIVE); 2706 element.setAttribute('aria-expanded', true); 2707 2708 if (isTransitioning) { 2709 Util.reflow(element); 2710 $(element).addClass(ClassName.IN); 2711 } else { 2712 $(element).removeClass(ClassName.FADE); 2713 } 2714 2715 if (element.parentNode && $(element.parentNode).hasClass(ClassName.DROPDOWN_MENU)) { 2716 2717 var dropdownElement = $(element).closest(Selector.DROPDOWN)[0]; 2718 if (dropdownElement) { 2719 $(dropdownElement).find(Selector.DROPDOWN_TOGGLE).addClass(ClassName.ACTIVE); 2720 } 2721 2722 element.setAttribute('aria-expanded', true); 2723 } 2724 2725 if (callback) { 2726 callback(); 2727 } 2728 } 2729 2730 // static 2731 2732 }], [{ 2733 key: '_jQueryInterface', 2734 value: function _jQueryInterface(config) { 2735 return this.each(function () { 2736 var $this = $(this); 2737 var data = $this.data(DATA_KEY); 2738 2739 if (!data) { 2740 data = data = new Tab(this); 2741 $this.data(DATA_KEY, data); 2742 } 2743 2744 if (typeof config === 'string') { 2745 if (data[config] === undefined) { 2746 throw new Error('No method named "' + config + '"'); 2747 } 2748 data[config](); 2749 } 2750 }); 2751 } 2752 }, { 2753 key: 'VERSION', 2754 get: function get() { 2755 return VERSION; 2756 } 2757 }]); 2758 2759 return Tab; 2760 })(); 2761 2762 $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) { 2763 event.preventDefault(); 2764 Tab._jQueryInterface.call($(this), 'show'); 2765 }); 2766 2767 /** 2768 * ------------------------------------------------------------------------ 2769 * jQuery 2770 * ------------------------------------------------------------------------ 2771 */ 2772 2773 $.fn[NAME] = Tab._jQueryInterface; 2774 $.fn[NAME].Constructor = Tab; 2775 $.fn[NAME].noConflict = function () { 2776 $.fn[NAME] = JQUERY_NO_CONFLICT; 2777 return Tab._jQueryInterface; 2778 }; 2779 2780 return Tab; 2781})(jQuery); 2782 2783/* global Tether */ 2784 2785/** 2786 * -------------------------------------------------------------------------- 2787 * Bootstrap (v4.0.0-alpha.4): tooltip.js 2788 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 2789 * -------------------------------------------------------------------------- 2790 */ 2791 2792var Tooltip = (function ($) { 2793 2794 /** 2795 * Check for Tether dependency 2796 * Tether - http://github.hubspot.com/tether/ 2797 */ 2798 if (window.Tether === undefined) { 2799 throw new Error('Bootstrap tooltips require Tether (http://github.hubspot.com/tether/)'); 2800 } 2801 2802 /** 2803 * ------------------------------------------------------------------------ 2804 * Constants 2805 * ------------------------------------------------------------------------ 2806 */ 2807 2808 var NAME = 'tooltip'; 2809 var VERSION = '4.0.0-alpha.4'; 2810 var DATA_KEY = 'bs.tooltip'; 2811 var EVENT_KEY = '.' + DATA_KEY; 2812 var JQUERY_NO_CONFLICT = $.fn[NAME]; 2813 var TRANSITION_DURATION = 150; 2814 var CLASS_PREFIX = 'bs-tether'; 2815 2816 var Default = { 2817 animation: true, 2818 template: '<div class="tooltip" role="tooltip">' + '<div class="tooltip-arrow"></div>' + '<div class="tooltip-inner"></div></div>', 2819 trigger: 'hover focus', 2820 title: '', 2821 delay: 0, 2822 html: false, 2823 selector: false, 2824 placement: 'top', 2825 offset: '0 0', 2826 constraints: [] 2827 }; 2828 2829 var DefaultType = { 2830 animation: 'boolean', 2831 template: 'string', 2832 title: '(string|element|function)', 2833 trigger: 'string', 2834 delay: '(number|object)', 2835 html: 'boolean', 2836 selector: '(string|boolean)', 2837 placement: '(string|function)', 2838 offset: 'string', 2839 constraints: 'array' 2840 }; 2841 2842 var AttachmentMap = { 2843 TOP: 'bottom center', 2844 RIGHT: 'middle left', 2845 BOTTOM: 'top center', 2846 LEFT: 'middle right' 2847 }; 2848 2849 var HoverState = { 2850 IN: 'in', 2851 OUT: 'out' 2852 }; 2853 2854 var Event = { 2855 HIDE: 'hide' + EVENT_KEY, 2856 HIDDEN: 'hidden' + EVENT_KEY, 2857 SHOW: 'show' + EVENT_KEY, 2858 SHOWN: 'shown' + EVENT_KEY,
2859 INSERTED: 'inserted' + EVENT_KEY, 2860 CLICK: 'click' + EVENT_KEY, 2861 FOCUSIN: 'focusin' + EVENT_KEY, 2862 FOCUSOUT: 'focusout' + EVENT_KEY, 2863 MOUSEENTER: 'mouseenter' + EVENT_KEY, 2864 MOUSELEAVE: 'mouseleave' + EVENT_KEY 2865 }; 2866 2867 var ClassName = { 2868 FADE: 'fade', 2869 IN: 'in' 2870 }; 2871 2872 var Selector = { 2873 TOOLTIP: '.tooltip', 2874 TOOLTIP_INNER: '.tooltip-inner' 2875 }; 2876 2877 var TetherClass = { 2878 element: false, 2879 enabled: false 2880 }; 2881 2882 var Trigger = { 2883 HOVER: 'hover', 2884 FOCUS: 'focus', 2885 CLICK: 'click', 2886 MANUAL: 'manual' 2887 }; 2888 2889 /** 2890 * ------------------------------------------------------------------------ 2891 * Class Definition 2892 * ------------------------------------------------------------------------ 2893 */ 2894 2895 var Tooltip = (function () { 2896 function Tooltip(element, config) { 2897 _classCallCheck(this, Tooltip); 2898 2899 // private 2900 this._isEnabled = true; 2901 this._timeout = 0; 2902 this._hoverState = ''; 2903 this._activeTrigger = {}; 2904 this._tether = null; 2905 2906 // protected 2907 this.element = element; 2908 this.config = this._getConfig(config); 2909 this.tip = null; 2910 2911 this._setListeners(); 2912 } 2913 2914 /** 2915 * ------------------------------------------------------------------------ 2916 * jQuery 2917 * ------------------------------------------------------------------------ 2918 */ 2919 2920 // getters 2921 2922 _createClass(Tooltip, [{ 2923 key: 'enable', 2924 2925 // public 2926 2927 value: function enable() { 2928 this._isEnabled = true; 2929 } 2930 }, { 2931 key: 'disable', 2932 value: function disable() { 2933 this._isEnabled = false; 2934 } 2935 }, { 2936 key: 'toggleEnabled', 2937 value: function toggleEnabled() { 2938 this._isEnabled = !this._isEnabled; 2939 } 2940 }, { 2941 key: 'toggle', 2942 value: function toggle(event) { 2943 if (event) { 2944 var dataKey = this.constructor.DATA_KEY; 2945 var context = $(event.currentTarget).data(dataKey); 2946 2947 if (!context) { 2948 context = new this.constructor(event.currentTarget, this._getDelegateConfig()); 2949 $(event.currentTarget).data(dataKey, context); 2950 } 2951 2952 context._activeTrigger.click = !context._activeTrigger.click; 2953 2954 if (context._isWithActiveTrigger()) { 2955 context._enter(null, context); 2956 } else { 2957 context._leave(null, context); 2958 } 2959 } else { 2960 2961 if ($(this.getTipElement()).hasClass(ClassName.IN)) { 2962 this._leave(null, this); 2963 return; 2964 } 2965 2966 this._enter(null, this); 2967 } 2968 } 2969 }, { 2970 key: 'dispose', 2971 value: function dispose() { 2972 clearTimeout(this._timeout); 2973 2974 this.cleanupTether(); 2975 2976 $.removeData(this.element, this.constructor.DATA_KEY); 2977 2978 $(this.element).off(this.constructor.EVENT_KEY); 2979 2980 if (this.tip) { 2981 $(this.tip).remove(); 2982 } 2983 2984 this._isEnabled = null; 2985 this._timeout = null; 2986 this._hoverState = null; 2987 this._activeTrigger = null; 2988 this._tether = null; 2989 2990 this.element = null; 2991 this.config = null; 2992 this.tip = null; 2993 } 2994 }, { 2995 key: 'show', 2996 value: function show() { 2997 var _this16 = this; 2998 2999 var showEvent = $.Event(this.constructor.Event.SHOW); 3000 3001 if (this.isWithContent() && this._isEnabled) { 3002 $(this.element).trigger(showEvent); 3003 3004 var isInTheDom = $.contains(this.element.ownerDocument.documentElement, this.element); 3005 3006 if (showEvent.isDefaultPrevented() || !isInTheDom) { 3007 return; 3008 } 3009 3010 var tip = this.getTipElement(); 3011 var tipId = Util.getUID(this.constructor.NAME); 3012
3013 tip.setAttribute('id', tipId); 3014 this.element.setAttribute('aria-describedby', tipId); 3015 3016 this.setContent(); 3017 3018 if (this.config.animation) { 3019 $(tip).addClass(ClassName.FADE); 3020 } 3021 3022 var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement; 3023 3024 var attachment = this._getAttachment(placement); 3025 3026 $(tip).data(this.constructor.DATA_KEY, this).appendTo(document.body); 3027 3028 $(this.element).trigger(this.constructor.Event.INSERTED); 3029 3030 this._tether = new Tether({ 3031 attachment: attachment, 3032 element: tip, 3033 target: this.element, 3034 classes: TetherClass, 3035 classPrefix: CLASS_PREFIX, 3036 offset: this.config.offset, 3037 constraints: this.config.constraints, 3038 addTargetClasses: false 3039 }); 3040 3041 Util.reflow(tip); 3042 this._tether.position(); 3043 3044 $(tip).addClass(ClassName.IN); 3045 3046 var complete = function complete() { 3047 var prevHoverState = _this16._hoverState; 3048 _this16._hoverState = null; 3049 3050 $(_this16.element).trigger(_this16.constructor.Event.SHOWN); 3051 3052 if (prevHoverState === HoverState.OUT) { 3053 _this16._leave(null, _this16); 3054 } 3055 }; 3056 3057 if (Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) { 3058 $(this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(Tooltip._TRANSITION_DURATION); 3059 return; 3060 } 3061 3062 complete(); 3063 } 3064 } 3065 }, { 3066 key: 'hide', 3067 value: function hide(callback) { 3068 var _this17 = this; 3069 3070 var tip = this.getTipElement(); 3071 var hideEvent = $.Event(this.constructor.Event.HIDE); 3072 var complete = function complete() { 3073 if (_this17._hoverState !== HoverState.IN && tip.parentNode) { 3074 tip.parentNode.removeChild(tip); 3075 } 3076 3077 _this17.element.removeAttribute('aria-describedby'); 3078 $(_this17.element).trigger(_this17.constructor.Event.HIDDEN); 3079 _this17.cleanupTether(); 3080 3081 if (callback) { 3082 callback(); 3083 } 3084 }; 3085 3086 $(this.element).trigger(hideEvent); 3087 3088 if (hideEvent.isDefaultPrevented()) { 3089 return; 3090 } 3091 3092 $(tip).removeClass(ClassName.IN); 3093 3094 if (Util.supportsTransitionEnd() && $(this.tip).hasClass(ClassName.FADE)) { 3095 3096 $(tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(TRANSITION_DURATION); 3097 } else { 3098 complete(); 3099 } 3100 3101 this._hoverState = ''; 3102 } 3103 3104 // protected 3105 3106 }, { 3107 key: 'isWithContent', 3108 value: function isWithContent() { 3109 return Boolean(this.getTitle()); 3110 } 3111 }, { 3112 key: 'getTipElement', 3113 value: function getTipElement() { 3114 return this.tip = this.tip || $(this.config.template)[0]; 3115 } 3116 }, { 3117 key: 'setContent', 3118 value: function setContent() { 3119 var $tip = $(this.getTipElement()); 3120 3121 this.setElementContent($tip.find(Selector.TOOLTIP_INNER), this.getTitle()); 3122 3123 $tip.removeClass(ClassName.FADE).removeClass(ClassName.IN); 3124 3125 this.cleanupTether(); 3126 } 3127 }, { 3128 key: 'setElementContent', 3129 value: function setElementContent($element, content) { 3130 var html = this.config.html; 3131 if (typeof content === 'object' && (content.nodeType || content.jquery)) { 3132 // content is a DOM node or a jQuery 3133 if (html) { 3134 if (!$(content).parent().is($element)) { 3135 $element.empty().append(content); 3136 } 3137 } else { 3138 $element.text($(content).text()); 3139 } 3140 } else { 3141 $element[html ? 'html' : 'text'](content); 3142 } 3143 } 3144 }, { 3145 key: 'getTitle', 3146 value: function getTitle() { 3147 var title = this.element.getAttribute('data-original-title'); 3148 3149 if (!title) { 3150 title = typeof this.config.title === 'function' ? this.config.title.call(this.element) : this.config.title; 3151 } 3152 3153 return title; 3154 } 3155 }, { 3156 key: 'cleanupTether', 3157 value: function cleanupTether() { 3158 if (this._tether) { 3159 this._tether.destroy(); 3160 } 3161 } 3162 3163 // private 3164 3165 }, { 3166 key: '_getAttachment', 3167 value: function _getAttachment(placement) { 3168 return AttachmentMap[placement.toUpperCase()]; 3169 } 3170 }, { 3171 key: '_setListeners', 3172 value: function _setListeners() { 3173 var _this18 = this; 3174 3175 var triggers = this.config.trigger.split(' '); 3176
3177 triggers.forEach(function (trigger) { 3178 if (trigger === 'click') { 3179 $(_this18.element).on(_this18.constructor.Event.CLICK, _this18.config.selector, $.proxy(_this18.toggle, _this18)); 3180 } else if (trigger !== Trigger.MANUAL) { 3181 var eventIn = trigger === Trigger.HOVER ? _this18.constructor.Event.MOUSEENTER : _this18.constructor.Event.FOCUSIN; 3182 var eventOut = trigger === Trigger.HOVER ? _this18.constructor.Event.MOUSELEAVE : _this18.constructor.Event.FOCUSOUT; 3183 3184 $(_this18.element).on(eventIn, _this18.config.selector, $.proxy(_this18._enter, _this18)).on(eventOut, _this18.config.selector, $.proxy(_this18._leave, _this18)); 3185 } 3186 }); 3187 3188 if (this.config.selector) { 3189 this.config = $.extend({}, this.config, { 3190 trigger: 'manual', 3191 selector: '' 3192 }); 3193 } else { 3194 this._fixTitle(); 3195 } 3196 } 3197 }, { 3198 key: '_fixTitle', 3199 value: function _fixTitle() { 3200 var titleType = typeof this.element.getAttribute('data-original-title'); 3201 if (this.element.getAttribute('title') || titleType !== 'string') { 3202 this.element.setAttribute('data-original-title', this.element.getAttribute('title') || ''); 3203 this.element.setAttribute('title', ''); 3204 } 3205 } 3206 }, { 3207 key: '_enter', 3208 value: function _enter(event, context) { 3209 var dataKey = this.constructor.DATA_KEY; 3210 3211 context = context || $(event.currentTarget).data(dataKey); 3212 3213 if (!context) { 3214 context = new this.constructor(event.currentTarget, this._getDelegateConfig()); 3215 $(event.currentTarget).data(dataKey, context); 3216 } 3217 3218 if (event) { 3219 context._activeTrigger[event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER] = true; 3220 } 3221 3222 if ($(context.getTipElement()).hasClass(ClassName.IN) || context._hoverState === HoverState.IN) { 3223 context._hoverState = HoverState.IN; 3224 return; 3225 } 3226 3227 clearTimeout(context._timeout); 3228 3229 context._hoverState = HoverState.IN; 3230 3231 if (!context.config.delay || !context.config.delay.show) { 3232 context.show(); 3233 return; 3234 } 3235 3236 context._timeout = setTimeout(function () { 3237 if (context._hoverState === HoverState.IN) { 3238 context.show(); 3239 } 3240 }, context.config.delay.show); 3241 } 3242 }, { 3243 key: '_leave', 3244 value: function _leave(event, context) { 3245 var dataKey = this.constructor.DATA_KEY; 3246 3247 context = context || $(event.currentTarget).data(dataKey); 3248 3249 if (!context) { 3250 context = new this.constructor(event.currentTarget, this._getDelegateConfig()); 3251 $(event.currentTarget).data(dataKey, context); 3252 } 3253 3254 if (event) { 3255 context._activeTrigger[event.type === 'focusout' ? Trigger.FOCUS : Trigger.HOVER] = false; 3256 } 3257 3258 if (context._isWithActiveTrigger()) { 3259 return; 3260 } 3261 3262 clearTimeout(context._timeout); 3263 3264 context._hoverState = HoverState.OUT; 3265 3266 if (!context.config.delay || !context.config.delay.hide) { 3267 context.hide(); 3268 return; 3269 } 3270 3271 context._timeout = setTimeout(function () { 3272 if (context._hoverState === HoverState.OUT) { 3273 context.hide(); 3274 } 3275 }, context.config.delay.hide); 3276 } 3277 }, { 3278 key: '_isWithActiveTrigger', 3279 value: function _isWithActiveTrigger() { 3280 for (var trigger in this._activeTrigger) { 3281 if (this._activeTrigger[trigger]) { 3282 return true; 3283 } 3284 } 3285 3286 return false; 3287 } 3288 }, { 3289 key: '_getConfig', 3290 value: function _getConfig(config) { 3291 config = $.extend({}, this.constructor.Default, $(this.element).data(), config); 3292 3293 if (config.delay && typeof config.delay === 'number') { 3294 config.delay = { 3295 show: config.delay, 3296 hide: config.delay 3297 }; 3298 } 3299 3300 Util.typeCheckConfig(NAME, config, this.constructor.DefaultType); 3301 3302 return config; 3303 } 3304 }, { 3305 key: '_getDelegateConfig', 3306 value: function _getDelegateConfig() { 3307 var config = {}; 3308 3309 if (this.config) { 3310 for (var key in this.config) { 3311 if (this.constructor.Default[key] !== this.config[key]) { 3312 config[key] = this.config[key]; 3313 } 3314 } 3315 } 3316 3317 return config; 3318 } 3319 3320 // static 3321 3322 }], [{ 3323 key: '_jQueryInterface', 3324 value: function _jQueryInterface(config) { 3325 return this.each(function () { 3326 var data = $(this).data(DATA_KEY); 3327 var _config = typeof config === 'object' ? config : null; 3328 3329 if (!data && /destroy|hide/.test(config)) { 3330 return; 3331 } 3332 3333 if (!data) { 3334 data = new Tooltip(this, _config); 3335 $(this).data(DATA_KEY, data); 3336 } 3337 3338 if (typeof config === 'string') { 3339 if (data[config] === undefined) {
3340 throw new Error('No method named "' + config + '"'); 3341 } 3342 data[config](); 3343 } 3344 }); 3345 } 3346 }, { 3347 key: 'VERSION', 3348 get: function get() { 3349 return VERSION; 3350 } 3351 }, { 3352 key: 'Default', 3353 get: function get() { 3354 return Default; 3355 } 3356 }, { 3357 key: 'NAME', 3358 get: function get() { 3359 return NAME; 3360 } 3361 }, { 3362 key: 'DATA_KEY', 3363 get: function get() { 3364 return DATA_KEY; 3365 } 3366 }, { 3367 key: 'Event', 3368 get: function get() { 3369 return Event; 3370 } 3371 }, { 3372 key: 'EVENT_KEY', 3373 get: function get() { 3374 return EVENT_KEY; 3375 } 3376 }, { 3377 key: 'DefaultType', 3378 get: function get() { 3379 return DefaultType; 3380 } 3381 }]); 3382 3383 return Tooltip; 3384 })(); 3385 3386 $.fn[NAME] = Tooltip._jQueryInterface; 3387 $.fn[NAME].Constructor = Tooltip; 3388 $.fn[NAME].noConflict = function () { 3389 $.fn[NAME] = JQUERY_NO_CONFLICT; 3390 return Tooltip._jQueryInterface; 3391 }; 3392 3393 return Tooltip; 3394})(jQuery); 3395 3396/** 3397 * -------------------------------------------------------------------------- 3398 * Bootstrap (v4.0.0-alpha.4): popover.js 3399 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 3400 * -------------------------------------------------------------------------- 3401 */ 3402 3403var Popover = (function ($) { 3404 3405 /** 3406 * ------------------------------------------------------------------------ 3407 * Constants 3408 * ------------------------------------------------------------------------ 3409 */ 3410 3411 var NAME = 'popover'; 3412 var VERSION = '4.0.0-alpha.4'; 3413 var DATA_KEY = 'bs.popover'; 3414 var EVENT_KEY = '.' + DATA_KEY; 3415 var JQUERY_NO_CONFLICT = $.fn[NAME]; 3416 3417 var Default = $.extend({}, Tooltip.Default, { 3418 placement: 'right', 3419 trigger: 'click', 3420 content: '', 3421 template: '<div class="popover" role="tooltip">' + '<div class="popover-arrow"></div>' + '<h3 class="popover-title"></h3>' + '<div class="popover-content"></div></div>' 3422 }); 3423 3424 var DefaultType = $.extend({}, Tooltip.DefaultType, { 3425 content: '(string|element|function)' 3426 }); 3427 3428 var ClassName = { 3429 FADE: 'fade', 3430 IN: 'in' 3431 }; 3432 3433 var Selector = { 3434 TITLE: '.popover-title', 3435 CONTENT: '.popover-content', 3436 ARROW: '.popover-arrow' 3437 }; 3438 3439 var Event = { 3440 HIDE: 'hide' + EVENT_KEY, 3441 HIDDEN: 'hidden' + EVENT_KEY, 3442 SHOW: 'show' + EVENT_KEY, 3443 SHOWN: 'shown' + EVENT_KEY, 3444 INSERTED: 'inserted' + EVENT_KEY, 3445 CLICK: 'click' + EVENT_KEY, 3446 FOCUSIN: 'focusin' + EVENT_KEY, 3447 FOCUSOUT: 'focusout' + EVENT_KEY, 3448 MOUSEENTER: 'mouseenter' + EVENT_KEY, 3449 MOUSELEAVE: 'mouseleave' + EVENT_KEY 3450 }; 3451 3452 /** 3453 * ------------------------------------------------------------------------ 3454 * Class Definition 3455 * ------------------------------------------------------------------------ 3456 */ 3457 3458 var Popover = (function (_Tooltip) { 3459 _inherits(Popover, _Tooltip); 3460 3461 function Popover() { 3462 _classCallCheck(this, Popover); 3463 3464 _get(Object.getPrototypeOf(Popover.prototype), 'constructor', this).apply(this, arguments); 3465 } 3466 3467 /** 3468 * ------------------------------------------------------------------------ 3469 * jQuery 3470 * ------------------------------------------------------------------------ 3471 */ 3472 3473 _createClass(Popover, [{ 3474 key: 'isWithContent', 3475 3476 // overrides 3477 3478 value: function isWithContent() { 3479 return this.getTitle() || this._getContent(); 3480 } 3481 }, { 3482 key: 'getTipElement', 3483 value: function getTipElement() { 3484 return this.tip = this.tip || $(this.config.template)[0]; 3485 } 3486 }, { 3487 key: 'setContent', 3488 value: function setContent() { 3489 var $tip = $(this.getTipElement()); 3490 3491 // we use append for html objects to maintain js events 3492 this.setElementContent($tip.find(Selector.TITLE), this.getTitle()); 3493 this.setElementContent($tip.find(Selector.CONTENT), this._getContent()); 3494 3495 $tip.removeClass(ClassName.FADE).removeClass(ClassName.IN); 3496 3497 this.cleanupTether(); 3498 } 3499 3500 // private 3501 3502 }, { 3503 key: '_getContent', 3504 value: function _getContent() { 3505 return this.element.getAttribute('data-content') || (typeof this.config.content === 'function' ? this.config.content.call(this.element) : this.config.content); 3506 } 3507 3508 // static 3509 3510 }], [{ 3511 key: '_jQueryInterface', 3512 value: function _jQueryInterface(config) { 3513 return this.each(function () { 3514 var data = $(this).data(DATA_KEY); 3515 var _config = typeof config === 'object' ? config : null; 3516 3517 if (!data && /destroy|hide/.test(config)) { 3518 return; 3519 } 3520 3521 if (!data) { 3522 data = new Popover(this, _config); 3523 $(this).data(DATA_KEY, data); 3524 } 3525 3526 if (typeof config === 'string') { 3527 if (data[config] === undefined) {
vendor: 19,710 bytes, lines 3528-3602
3528 throw new Error('No method named "' + config + '"'); 3529 } 3530 data[config](); 3531 } 3532 }); 3533 } 3534 }, { 3535 key: 'VERSION', 3536 3537 // getters 3538 3539 get: function get() { 3540 return VERSION; 3541 } 3542 }, { 3543 key: 'Default', 3544 get: function get() { 3545 return Default; 3546 } 3547 }, { 3548 key: 'NAME', 3549 get: function get() { 3550 return NAME; 3551 } 3552 }, { 3553 key: 'DATA_KEY', 3554 get: function get() { 3555 return DATA_KEY; 3556 } 3557 }, { 3558 key: 'Event', 3559 get: function get() { 3560 return Event; 3561 } 3562 }, { 3563 key: 'EVENT_KEY', 3564 get: function get() { 3565 return EVENT_KEY; 3566 } 3567 }, { 3568 key: 'DefaultType', 3569 get: function get() { 3570 return DefaultType; 3571 } 3572 }]); 3573 3574 return Popover; 3575 })(Tooltip); 3576 3577 $.fn[NAME] = Popover._jQueryInterface; 3578 $.fn[NAME].Constructor = Popover; 3579 $.fn[NAME].noConflict = function () { 3580 $.fn[NAME] = JQUERY_NO_CONFLICT; 3581 return Popover._jQueryInterface; 3582 }; 3583 3584 return Popover; 3585})(jQuery); 3586 3587}(jQuery); 3588 3589/*! 3590 * @fileOverview TouchSwipe - jQuery Plugin 3591 * @version 1.6.18 3592 * 3593 * @author Matt Bryson http://www.github.com/mattbryson 3594 * @see https://github.com/mattbryson/TouchSwipe-Jquery-Plugin 3595 * @see http://labs.rampinteractive.co.uk/touchSwipe/ 3596 * @see http://plugins.jquery.com/project/touchSwipe 3597 * @license 3598 * Copyright (c) 2010-2015 Matt Bryson 3599 * Dual licensed under the MIT or GPL Version 2 licenses. 3600 * 3601 */ 3602!function(factory){"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],factory):factory("undefined"!=typeof module&&module.exports?require("jquery"):jQuery)}(function($){"use strict";function init(options){return!options||void 0!==options.allowPageScroll||void 0===options.swipe&&void 0===options.swipeStatus||(options.allowPageScroll=NONE),void 0!==options.click&&void 0===options.tap&&(options.tap=options.click),options||(options={}),options=$.extend({},$.fn.swipe.defaults,options),this.each(function(){var $this=$(this),plugin=$this.data(PLUGIN_NS);plugin||(plugin=new TouchSwipe(this,options),$this.data(PLUGIN_NS,plugin))})}function TouchSwipe(element,options){function touchStart(jqEvent){if(!(getTouchInProgress()||$(jqEvent.target).closest(options.excludedElements,$element).length>0)){var event=jqEvent.originalEvent?jqEvent.originalEvent:jqEvent;if(!event.pointerType||"mouse"!=event.pointerType||0!=options.fallbackToMouseEvents){var ret,touches=event.touches,evt=touches?touches[0]:event;return phase=PHASE_START,touches?fingerCount=touches.length:options.preventDefaultEvents!==!1&&jqEvent.preventDefault(),distance=0,direction=null,currentDirection=null,pinchDirection=null,duration=0,startTouchesDistance=0,endTouchesDistance=0,pinchZoom=1,pinchDistance=0,maximumsMap=createMaximumsData(),cancelMultiFingerRelease(),createFingerData(0,evt),!touches||fingerCount===options.fingers||options.fingers===ALL_FINGERS||hasPinches()?(startTime=getTimeStamp(),2==fingerCount&&(createFingerData(1,touches[1]),startTouchesDistance=endTouchesDistance=calculateTouchesDistance(fingerData[0].start,fingerData[1].start)),(options.swipeStatus||options.pinchStatus)&&(ret=triggerHandler(event,phase))):ret=!1,ret===!1?(phase=PHASE_CANCEL,triggerHandler(event,phase),ret):(options.hold&&(holdTimeout=setTimeout($.proxy(function(){$element.trigger("hold",[event.target]),options.hold&&(ret=options.hold.call($element,event,event.target))},this),options.longTapThreshold)),setTouchInProgress(!0),null)}}}function touchMove(jqEvent){var event=jqEvent.originalEvent?jqEvent.originalEvent:jqEvent;if(phase!==PHASE_END&&phase!==PHASE_CANCEL&&!inMultiFingerRelease()){var ret,touches=event.touches,evt=touches?touches[0]:event,currentFinger=updateFingerData(evt);if(endTime=getTimeStamp(),touches&&(fingerCount=touches.length),options.hold&&clearTimeout(holdTimeout),phase=PHASE_MOVE,2==fingerCount&&(0==startTouchesDistance?(createFingerData(1,touches[1]),startTouchesDistance=endTouchesDistance=calculateTouchesDistance(fingerData[0].start,fingerData[1].start)):(updateFingerData(touches[1]),endTouchesDistance=calculateTouchesDistance(fingerData[0].end,fingerData[1].end),pinchDirection=calculatePinchDirection(fingerData[0].end,fingerData[1].end)),pinchZoom=calculatePinchZoom(startTouchesDistance,endTouchesDistance),pinchDistance=Math.abs(startTouchesDistance-endTouchesDistance)),fingerCount===options.fingers||options.fingers===ALL_FINGERS||!touches||hasPinches()){if(direction=calculateDirection(currentFinger.start,currentFinger.end),currentDirection=calculateDirection(currentFinger.last,currentFinger.end),validateDefaultEvent(jqEvent,currentDirection),distance=calculateDistance(currentFinger.start,currentFinger.end),duration=calculateDuration(),setMaxDistance(direction,distance),ret=triggerHandler(event,phase),!options.triggerOnTouchEnd||options.triggerOnTouchLeave){var inBounds=!0;if(options.triggerOnTouchLeave){var bounds=getbounds(this);inBounds=isInBounds(currentFinger.end,bounds)}!options.triggerOnTouchEnd&&inBounds?phase=getNextPhase(PHASE_MOVE):options.triggerOnTouchLeave&&!inBounds&&(phase=getNextPhase(PHASE_END)),phase!=PHASE_CANCEL&&phase!=PHASE_END||triggerHandler(event,phase)}}else phase=PHASE_CANCEL,triggerHandler(event,phase);ret===!1&&(phase=PHASE_CANCEL,triggerHandler(event,phase))}}function touchEnd(jqEvent){var event=jqEvent.originalEvent?jqEvent.originalEvent:jqEvent,touches=event.touches;if(touches){if(touches.length&&!inMultiFingerRelease())return startMultiFingerRelease(event),!0;if(touches.length&&inMultiFingerRelease())return!0}return inMultiFingerRelease()&&(fingerCount=fingerCountAtRelease),endTime=getTimeStamp(),duration=calculateDuration(),didSwipeBackToCancel()||!validateSwipeDistance()?(phase=PHASE_CANCEL,triggerHandler(event,phase)):options.triggerOnTouchEnd||options.triggerOnTouchEnd===!1&&phase===PHASE_MOVE?(options.preventDefaultEvents!==!1&&jqEvent.cancelable!==!1&&jqEvent.preventDefault(),phase=PHASE_END,triggerHandler(event,phase)):!options.triggerOnTouchEnd&&hasTap()?(phase=PHASE_END,triggerHandlerForGesture(event,phase,TAP)):phase===PHASE_MOVE&&(phase=PHASE_CANCEL,triggerHandler(event,phase)),setTouchInProgress(!1),null}function touchCancel(){fingerCount=0,endTime=0,startTime=0,startTouchesDistance=0,endTouchesDistance=0,pinchZoom=1,cancelMultiFingerRelease(),setTouchInProgress(!1)}function touchLeave(jqEvent){var event=jqEvent.originalEvent?jqEvent.originalEvent:jqEvent;options.triggerOnTouchLeave&&(phase=getNextPhase(PHASE_END),triggerHandler(event,phase))}function removeListeners(){$element.unbind(START_EV,touchStart),$element.unbind(CANCEL_EV,touchCancel),$element.unbind(MOVE_EV,touchMove),$element.unbind(END_EV,touchEnd),LEAVE_EV&&$element.unbind(LEAVE_EV,touchLeave),setTouchInProgress(!1)}function getNextPhase(currentPhase){var nextPhase=currentPhase,validTime=validateSwipeTime(),validDistance=validateSwipeDistance(),didCancel=didSwipeBackToCancel();return!validTime||didCancel?nextPhase=PHASE_CANCEL:!validDistance||currentPhase!=PHASE_MOVE||options.triggerOnTouchEnd&&!options.triggerOnTouchLeave?!validDistance&¤tPhase==PHASE_END&&options.triggerOnTouchLeave&&(nextPhase=PHASE_CANCEL):nextPhase=PHASE_END,nextPhase}function triggerHandler(event,phase){var ret,touches=event.touches;return(didSwipe()||hasSwipes())&&(ret=triggerHandlerForGesture(event,phase,SWIPE)),(didPinch()||hasPinches())&&ret!==!1&&(ret=triggerHandlerForGesture(event,phase,PINCH)),didDoubleTap()&&ret!==!1?ret=triggerHandlerForGesture(event,phase,DOUBLE_TAP):didLongTap()&&ret!==!1?ret=triggerHandlerForGesture(event,phase,LONG_TAP):didTap()&&ret!==!1&&(ret=triggerHandlerForGesture(event,phase,TAP)),phase===PHASE_CANCEL&&touchCancel(event),phase===PHASE_END&&(touches?touches.length||touchCancel(event):touchCancel(event)),ret}function triggerHandlerForGesture(event,phase,gesture){var ret;if(gesture==SWIPE){if($element.trigger("swipeStatus",[phase,direction||null,distance||0,duration||0,fingerCount,fingerData,currentDirection]),options.swipeStatus&&(ret=options.swipeStatus.call($element,event,phase,direction||null,distance||0,duration||0,fingerCount,fingerData,currentDirection),ret===!1))return!1;if(phase==PHASE_END&&validateSwipe()){if(clearTimeout(singleTapTimeout),clearTimeout(holdTimeout),$element.trigger("swipe",[direction,distance,duration,fingerCount,fingerData,currentDirection]),options.swipe&&(ret=options.swipe.call($element,event,direction,distance,duration,fingerCount,fingerData,currentDirection),ret===!1))return!1;switch(direction){case LEFT:$element.trigger("swipeLeft",[direction,distance,duration,fingerCount,fingerData,currentDirection]),options.swipeLeft&&(ret=options.swipeLeft.call($element,event,direction,distance,duration,fingerCount,fingerData,currentDirection));break;case RIGHT:$element.trigger("swipeRight",[direction,distance,duration,fingerCount,fingerData,currentDirection]),options.swipeRight&&(ret=options.swipeRight.call($element,event,direction,distance,duration,fingerCount,fingerData,currentDirection));break;case UP:$element.trigger("swipeUp",[direction,distance,duration,fingerCount,fingerData,currentDirection]),options.swipeUp&&(ret=options.swipeUp.call($element,event,direction,distance,duration,fingerCount,fingerData,currentDirection));break;case DOWN:$element.trigger("swipeDown",[direction,distance,duration,fingerCount,fingerData,currentDirection]),options.swipeDown&&(ret=options.swipeDown.call($element,event,direction,distance,duration,fingerCount,fingerData,currentDirection))}}}if(gesture==PINCH){if($element.trigger("pinchStatus",[phase,pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData]),options.pinchStatus&&(ret=options.pinchStatus.call($element,event,phase,pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData),ret===!1))return!1;if(phase==PHASE_END&&validatePinch())switch(pinchDirection){case IN:$element.trigger("pinchIn",[pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData]),options.pinchIn&&(ret=options.pinchIn.call($element,event,pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData));break;case OUT:$element.trigger("pinchOut",[pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData]),options.pinchOut&&(ret=options.pinchOut.call($element,event,pinchDirection||null,pinchDistance||0,duration||0,fingerCount,pinchZoom,fingerData))}}return gesture==TAP?phase!==PHASE_CANCEL&&phase!==PHASE_END||(clearTimeout(singleTapTimeout),clearTimeout(holdTimeout),hasDoubleTap()&&!inDoubleTap()?(doubleTapStartTime=getTimeStamp(),singleTapTimeout=setTimeout($.proxy(function(){doubleTapStartTime=null,$element.trigger("tap",[event.target]),options.tap&&(ret=options.tap.call($element,event,event.target))},this),options.doubleTapThreshold)):(doubleTapStartTime=null,$element.trigger("tap",[event.target]),options.tap&&(ret=options.tap.call($element,event,event.target)))):gesture==DOUBLE_TAP?phase!==PHASE_CANCEL&&phase!==PHASE_END||(clearTimeout(singleTapTimeout),clearTimeout(holdTimeout),doubleTapStartTime=null,$element.trigger("doubletap",[event.target]),options.doubleTap&&(ret=options.doubleTap.call($element,event,event.target))):gesture==LONG_TAP&&(phase!==PHASE_CANCEL&&phase!==PHASE_END||(clearTimeout(singleTapTimeout),doubleTapStartTime=null,$element.trigger("longtap",[event.target]),options.longTap&&(ret=options.longTap.call($element,event,event.target)))),ret}function validateSwipeDistance(){var valid=!0;return null!==options.threshold&&(valid=distance>=options.threshold),valid}function didSwipeBackToCancel(){var cancelled=!1;return null!==options.cancelThreshold&&null!==direction&&(cancelled=getMaxDistance(direction)-distance>=options.cancelThreshold),cancelled}function validatePinchDistance(){return null===options.pinchThreshold||pinchDistance>=options.pinchThreshold}function validateSwipeTime(){var result;return result=!options.maxTimeThreshold||!(duration>=options.maxTimeThreshold)}function validateDefaultEvent(jqEvent,direction){if(options.preventDefaultEvents!==!1)if(options.allowPageScroll===NONE)jqEvent.preventDefault();else{var auto=options.allowPageScroll===AUTO;switch(direction){case LEFT:(options.swipeLeft&&auto||!auto&&options.allowPageScroll!=HORIZONTAL)&&jqEvent.preventDefault();break;case RIGHT:(options.swipeRight&&auto||!auto&&options.allowPageScroll!=HORIZONTAL)&&jqEvent.preventDefault();break;case UP:(options.swipeUp&&auto||!auto&&options.allowPageScroll!=VERTICAL)&&jqEvent.preventDefault();break;case DOWN:(options.swipeDown&&auto||!auto&&options.allowPageScroll!=VERTICAL)&&jqEvent.preventDefault();break;case NONE:}}}function validatePinch(){var hasCorrectFingerCount=validateFingers(),hasEndPoint=validateEndPoint(),hasCorrectDistance=validatePinchDistance();return hasCorrectFingerCount&&hasEndPoint&&hasCorrectDistance}function hasPinches(){return!!(options.pinchStatus||options.pinchIn||options.pinchOut)}function didPinch(){return!(!validatePinch()||!hasPinches())}function validateSwipe(){var hasValidTime=validateSwipeTime(),hasValidDistance=validateSwipeDistance(),hasCorrectFingerCount=validateFingers(),hasEndPoint=validateEndPoint(),didCancel=didSwipeBackToCancel(),valid=!didCancel&&hasEndPoint&&hasCorrectFingerCount&&hasValidDistance&&hasValidTime;return valid}function hasSwipes(){return!!(options.swipe||options.swipeStatus||options.swipeLeft||options.swipeRight||options.swipeUp||options.swipeDown)}function didSwipe(){return!(!validateSwipe()||!hasSwipes())}function validateFingers(){return fingerCount===options.fingers||options.fingers===ALL_FINGERS||!SUPPORTS_TOUCH}function validateEndPoint(){return 0!==fingerData[0].end.x}function hasTap(){return!!options.tap}function hasDoubleTap(){return!!options.doubleTap}function hasLongTap(){return!!options.longTap}function validateDoubleTap(){if(null==doubleTapStartTime)return!1;var now=getTimeStamp();return hasDoubleTap()&&now-doubleTapStartTime<=options.doubleTapThreshold}function inDoubleTap(){return validateDoubleTap()}function validateTap(){return(1===fingerCount||!SUPPORTS_TOUCH)&&(isNaN(distance)||distance<options.threshold)}function validateLongTap(){return duration>options.longTapThreshold&&distance<DOUBLE_TAP_THRESHOLD}function didTap(){return!(!validateTap()||!hasTap())}function didDoubleTap(){return!(!validateDoubleTap()||!hasDoubleTap())}function didLongTap(){return!(!validateLongTap()||!hasLongTap())}function startMultiFingerRelease(event){previousTouchEndTime=getTimeStamp(),fingerCountAtRelease=event.touches.length+1}function cancelMultiFingerRelease(){previousTouchEndTime=0,fingerCountAtRelease=0}function inMultiFingerRelease(){var withinThreshold=!1;if(previousTouchEndTime){var diff=getTimeStamp()-previousTouchEndTime;diff<=options.fingerReleaseThreshold&&(withinThreshold=!0)}return withinThreshold}function getTouchInProgress(){return!($element.data(PLUGIN_NS+"_intouch")!==!0)}function setTouchInProgress(val){$element&&(val===!0?($element.bind(MOVE_EV,touchMove),$element.bind(END_EV,touchEnd),LEAVE_EV&&$element.bind(LEAVE_EV,touchLeave)):($element.unbind(MOVE_EV,touchMove,!1),$element.unbind(END_EV,touchEnd,!1),LEAVE_EV&&$element.unbind(LEAVE_EV,touchLeave,!1)),$element.data(PLUGIN_NS+"_intouch",val===!0))}function createFingerData(id,evt){var f={start:{x:0,y:0},last:{x:0,y:0},end:{x:0,y:0}};return f.start.x=f.last.x=f.end.x=evt.pageX||evt.clientX,f.start.y=f.last.y=f.end.y=evt.pageY||evt.clientY,fingerData[id]=f,f}function updateFingerData(evt){var id=void 0!==evt.identifier?evt.identifier:0,f=getFingerData(id);return null===f&&(f=createFingerData(id,evt)),f.last.x=f.end.x,f.last.y=f.end.y,f.end.x=evt.pageX||evt.clientX,f.end.y=evt.pageY||evt.clientY,f}function getFingerData(id){return fingerData[id]||null}function setMaxDistance(direction,distance){direction!=NONE&&(distance=Math.max(distance,getMaxDistance(direction)),maximumsMap[direction].distance=distance)}function getMaxDistance(direction){if(maximumsMap[direction])return maximumsMap[direction].distance}function createMaximumsData(){var maxData={};return maxData[LEFT]=createMaximumVO(LEFT),maxData[RIGHT]=createMaximumVO(RIGHT),maxData[UP]=createMaximumVO(UP),maxData[DOWN]=createMaximumVO(DOWN),maxData}function createMaximumVO(dir){return{direction:dir,distance:0}}function calculateDuration(){return endTime-startTime}function calculateTouchesDistance(startPoint,endPoint){var diffX=Math.abs(startPoint.x-endPoint.x),diffY=Math.abs(startPoint.y-endPoint.y);return Math.round(Math.sqrt(diffX*diffX+diffY*diffY))}function calculatePinchZoom(startDistance,endDistance){var percent=endDistance/startDistance*1;return percent.toFixed(2)}function calculatePinchDirection(){return pinchZoom<1?OUT:IN}function calculateDistance(startPoint,endPoint){return Math.round(Math.sqrt(Math.pow(endPoint.x-startPoint.x,2)+Math.pow(endPoint.y-startPoint.y,2)))}function calculateAngle(startPoint,endPoint){var x=startPoint.x-endPoint.x,y=endPoint.y-startPoint.y,r=Math.atan2(y,x),angle=Math.round(180*r/Math.PI);return angle<0&&(angle=360-Math.abs(angle)),angle}function calculateDirection(startPoint,endPoint){if(comparePoints(startPoint,endPoint))return NONE;var angle=calculateAngle(startPoint,endPoint);return angle<=45&&angle>=0?LEFT:angle<=360&&angle>=315?LEFT:angle>=135&&angle<=225?RIGHT:angle>45&&angle<135?DOWN:UP}function getTimeStamp(){var now=new Date;return now.getTime()}function getbounds(el){el=$(el);var offset=el.offset(),bounds={left:offset.left,right:offset.left+el.outerWidth(),top:offset.top,bottom:offset.top+el.outerHeight()};return bounds}function isInBounds(point,bounds){return point.x>bounds.left&&point.x<bounds.right&&point.y>bounds.top&&point.y<bounds.bottom}function comparePoints(pointA,pointB){return pointA.x==pointB.x&&pointA.y==pointB.y}var options=$.extend({},options),useTouchEvents=SUPPORTS_TOUCH||SUPPORTS_POINTER||!options.fallbackToMouseEvents,START_EV=useTouchEvents?SUPPORTS_POINTER?SUPPORTS_POINTER_IE10?"MSPointerDown":"pointerdown":"touchstart":"mousedown",MOVE_EV=useTouchEvents?SUPPORTS_POINTER?SUPPORTS_POINTER_IE10?"MSPointerMove":"pointermove":"touchmove":"mousemove",END_EV=useTouchEvents?SUPPORTS_POINTER?SUPPORTS_POINTER_IE10?"MSPointerUp":"pointerup":"touchend":"mouseup",LEAVE_EV=useTouchEvents?SUPPORTS_POINTER?"mouseleave":null:"mouseleave",CANCEL_EV=SUPPORTS_POINTER?SUPPORTS_POINTER_IE10?"MSPointerCancel":"pointercancel":"touchcancel",distance=0,direction=null,currentDirection=null,duration=0,startTouchesDistance=0,endTouchesDistance=0,pinchZoom=1,pinchDistance=0,pinchDirection=0,maximumsMap=null,$element=$(element),phase="start",fingerCount=0,fingerData={},startTime=0,endTime=0,previousTouchEndTime=0,fingerCountAtRelease=0,doubleTapStartTime=0,singleTapTimeout=null,holdTimeout=null;try{$element.bind(START_EV,touchStart),$element.bind(CANCEL_EV,touchCancel)}catch(e){$.error("events not supported "+START_EV+","+CANCEL_EV+" on jQuery.swipe")}this.enable=function(){return this.disable(),$element.bind(START_EV,touchStart),$element.bind(CANCEL_EV,touchCancel),$element},this.disable=function(){return removeListeners(),$element},this.destroy=function(){removeListeners(),$element.data(PLUGIN_NS,null),$element=null},this.option=function(property,value){if("object"==typeof property)options=$.extend(options,property);else if(void 0!==options[property]){if(void 0===value)return options[property];options[property]=value}else{if(!property)return options;$.error("Option "+property+" does not exist on jQuery.swipe.options")}return null}}var VERSION="1.6.18",LEFT="left",RIGHT="right",UP="up",DOWN="down",IN="in",OUT="out",
3602NONE="none",AUTO="auto",SWIPE="swipe",PINCH="pinch",TAP="tap",DOUBLE_TAP="doubletap",LONG_TAP="longtap",HORIZONTAL="horizontal",VERTICAL="vertical",ALL_FINGERS="all",DOUBLE_TAP_THRESHOLD=10,PHASE_START="start",PHASE_MOVE="move",PHASE_END="end",PHASE_CANCEL="cancel",SUPPORTS_TOUCH="ontouchstart"in window,SUPPORTS_POINTER_IE10=window.navigator.msPointerEnabled&&!window.navigator.pointerEnabled&&!SUPPORTS_TOUCH,SUPPORTS_POINTER=(window.navigator.pointerEnabled||window.navigator.msPointerEnabled)&&!SUPPORTS_TOUCH,PLUGIN_NS="TouchSwipe",defaults={fingers:1,threshold:75,cancelThreshold:null,pinchThreshold:20,maxTimeThreshold:null,fingerReleaseThreshold:250,longTapThreshold:500,doubleTapThreshold:200,swipe:null,swipeLeft:null,swipeRight:null,swipeUp:null,swipeDown:null,swipeStatus:null,pinchIn:null,pinchOut:null,pinchStatus:null,click:null,tap:null,doubleTap:null,longTap:null,hold:null,triggerOnTouchEnd:!0,triggerOnTouchLeave:!1,allowPageScroll:"auto",fallbackToMouseEvents:!0,excludedElements:".noSwipe",preventDefaultEvents:!0};$.fn.swipe=function(method){var $this=$(this),plugin=$this.data(PLUGIN_NS);if(plugin&&"string"==typeof method){if(plugin[method])return plugin[method].apply(plugin,Array.prototype.slice.call(arguments,1));$.error("Method "+method+" does not exist on jQuery.swipe")}else if(plugin&&"object"==typeof method)plugin.option.apply(plugin,arguments);else if(!(plugin||"object"!=typeof method&&method))return init.apply(this,arguments);return $this},$.fn.swipe.version=VERSION,$.fn.swipe.defaults=defaults,$.fn.swipe.phases={PHASE_START:PHASE_START,PHASE_MOVE:PHASE_MOVE,PHASE_END:PHASE_END,PHASE_CANCEL:PHASE_CANCEL},$.fn.swipe.directions={LEFT:LEFT,RIGHT:RIGHT,UP:UP,DOWN:DOWN,IN:IN,OUT:OUT},$.fn.swipe.pageScroll={NONE:NONE,HORIZONTAL:HORIZONTAL,VERTICAL:VERTICAL,AUTO:AUTO},$.fn.swipe.fingers={ONE:1,TWO:2,THREE:3,FOUR:4,FIVE:5,ALL:ALL_FINGERS}}); 3603 3604!function(t){var i=t(window);t.fn.visible=function(t,e,o){if(!(this.length<1)){var r=this.length>1?this.eq(0):this,n=r.get(0),f=i.width(),h=i.height(),o=o?o:"both",l=e===!0?n.offsetWidth*n.offsetHeight:!0;if("function"==typeof n.getBoundingClientRect){var g=n.getBoundingClientRect(),u=g.top>=0&&g.top<h,s=g.bottom>0&&g.bottom<=h,c=g.left>=0&&g.left<f,a=g.right>0&&g.right<=f,v=t?u||s:u&&s,b=t?c||a:c&&a;if("both"===o)return l&&v&&b;if("vertical"===o)return l&&v;if("horizontal"===o)return l&&b}else{var d=i.scrollTop(),p=d+h,w=i.scrollLeft(),m=w+f,y=r.offset(),z=y.top,B=z+r.height(),C=y.left,R=C+r.width(),j=t===!0?B:z,q=t===!0?z:B,H=t===!0?R:C,L=t===!0?C:R;if("both"===o)return!!l&&p>=q&&j>=d&&m>=L&&H>=w;if("vertical"===o)return!!l&&p>=q&&j>=d;if("horizontal"===o)return!!l&&m>=L&&H>=w}}}}(jQuery); 3605 3606function setUrl(sUrl) { 3607 if (sUrl.substr(0, 4) !== 'http') 3608 sUrl = (sUrl.substr(0, 1) === '/' ? '' : '/') + sUrl; 3609 3610 document.location.href = sUrl; 3611} 3612 3613$(document).ready(function() { 3614 3615 /* Set caching cookie */ 3616 if (document.location.pathname.indexOf('index.php') > -1) 3617 document.cookie = 'be_typo_user=1'; 3618 3619 if ($.isFunction('tooltip')) { 3620 $('[data-toggle="tooltip"]').tooltip(); 3621 } 3622 3623 /* fix for missing title attribute in lightbox a tags */ 3624 if ($.fn.fancybox) { 3625// if ($.isFunction('fancybox')) { 3626 3627 // Auto lightbox gallery (local) 3628 $(".lightbox[href^='"+window.location.protocol+"//"+window.location.hostname+"']:not([href$='#'])").each(function(){ 3629 if (this.title == "") { 3630 $(this).attr('title',$("img",$(this)).attr('title')); 3631 } 3632 }).fancybox(); 3633 3634 // Auto lightbox gallery (external iframe) 3635 $(".lightbox:not([href^='"+window.location.protocol+"//"+window.location.hostname+"'])").fancybox({type:'iframe',minHeight:320,afterShow: function() { 3636 window.setTimeout(() => { 3637 $.fancybox.update(); 3638 },2000); 3639 }}); 3640 3641 // Manual lightbox gallery 3642 // Manual link must have rel-attribute "lightbox-gallery-[CE-ID]" 3643 $(".lightbox[href$='#']").each(function() { 3644 3645 if($(this).attr('rel') && window[$(this).attr('rel')]) { 3646 3647 $(this).click(function(e) { 3648 var gallery = window[$(this).attr('rel')]; 3649 e.preventDefault(); 3650 $.fancybox.open(gallery, {'padding': 0,'transitionIn':'none','transitionOut':'none','type':'image','changeFade': 0}); 3651 return false; 3652 }); 3653 } 3654 3655 }); 3656 } 3657 3658 //$('.nav-tabs').tabCollapse(); 3659 3660 3661 /* Init mmenu (not used) */ 3662 if ($.isFunction('mmenu')) { 3663 $("#sidemenu").mmenu({ 3664 extensions : [ 'effect-slide-menu', 'pageshadow' ], 3665 navbar : { 3666 title : $('title').html() 3667 }, 3668 navbars : [{ 3669 position: 'top' 3670 }, { 3671 position: 'bottom', 3672 height: 2, 3673 content : ['<div id="mobile-footer"></div>'] 3674 }] 3675 },{ 3676 classNames : { 3677 selected : 'current' 3678 } 3679 }); 3680 $('#mobile-footer').html($('#nav-mobile-footer').html()); 3681 } 3682 3683 if ($.isFunction('cookieBar')) {
3684 $.cookieBar(); 3685 } 3686 3687 /* flexslider im hero */ 3688 if ($.isFunction('flexslider')) { 3689 $('.hero .flexslider').flexslider({ 3690 'controlNav': false, 3691 'selector': '.slides > div' 3692 }); 3693 } 3694 3695// $('.row.row-eq-height, .row-eq-height > .row > div').matchHeight(); 3696 3697 3698 /* Reactivate dropdown toggle link */ 3699 $('.navbar-nav.megamenu .dropdown-toggle').on('click', function(e) { 3700 if($(this).hasClass('nolink')) { 3701 e.preventDefault(); 3702 return; 3703 } 3704 3705 if($(window).width() > 768) { 3706 window.location.href = $(this).attr('href'); 3707 } 3708 }); 3709 3710 // set mobile menu position when scrolling 3711 if($('#mobilemenu').length) { 3712 $(window).scroll(function(event){ 3713 var st = $(this).scrollTop(), 3714 jNav = $('#mobilemenu'); 3715 3716 jNav.css('top', st); 3717 }); 3718 } 3719 3720 3721 if($('.navbar-toggle').length) { 3722 // Update toggles 3723 $(window).scroll(function(event){ 3724 setNavbarToggle(); 3725 }); 3726 } 3727 3728 3729 3730 /*********************************************************************/ 3731 // Make linked card elements clickable (reduce content links) 3732 // With event delegation, 'click' does not catch middle mouse clicks ... 3733 $('body').on('click', '.linked-card', function(oEvt) { 3734 if ((oEvt.button == 1) || (oEvt.button == 2)) return; 3735 if($(this).hasClass('image-popup') || $(oEvt.target).parents('.not-linked').length) return; 3736 3737 oEvt.preventDefault(); 3738 setUrl($(this).find('a').attr('href')); 3739 }); 3740 $('body').on('mouseup', '.linked-card', function(oEvt) { 3741 if (oEvt.button !== 1) return; 3742 if($(this).hasClass('image-popup') || $(oEvt.target).parents('.not-linked').length) return; 3743 3744 oEvt.preventDefault(); 3745 setUrl($(this).find('a').attr('href')); 3746 }); 3747 3748 3749 // Set scroll top btn 3750 if($('#up-btn').length) { 3751 $(window).scroll(function(evt) { 3752 var st = $(document).scrollTop(), 3753 wh = $(window).height(), 3754 btn = $('#up-btn'); 3755 3756 if(st > wh && !btn.hasClass('active')) { 3757 btn.addClass('active'); 3758 } else if(st < wh && btn.hasClass('active')) { 3759 btn.removeClass('active'); 3760 } 3761 }); 3762 $('#up-btn').click(function(evt){ 3763 evt.preventDefault(); 3764 $('html,body').animate({scrollTop:0}, '500', 'swing'); 3765 }); 3766 } 3767 if($('.up-btn').length) { 3768 $('.up-btn').click(function(evt){ 3769 evt.preventDefault(); 3770 $('html,body').animate({scrollTop:0}, '500', 'swing'); 3771 }); 3772 } 3773 3774 // Set sticky sidebars 3775 if ($.isFunction('stick_in_parent')) { 3776 3777 var stickyOptions = {offset_top: 10, inner_scrolling: false}; 3778 if($(window).width() >= 544) { 3779 $('.sticky-sm, .sticky-md, .sticky-lg, .sticky-xl').stick_in_parent(stickyOptions); 3780 } 3781 if($(window).width() >= 768) { 3782 $('.sticky-md, .sticky-lg, .sticky-xl').stick_in_parent(stickyOptions); 3783 } 3784 if($(window).width() >= 992) { 3785 $('.sticky-lg, .sticky-xl').stick_in_parent(stickyOptions); 3786 } 3787 if($(window).width() >= 1200) { 3788 $('.sticky-xl').stick_in_parent(stickyOptions); 3789 } 3790 3791 } 3792 3793 // Carousel Swipe 3794 jQuery(".carousel-inner").swipe( { 3795 swipeLeft:function(event, direction, distance, duration, fingerCount) { 3796 $(this).parent().carousel('next'); 3797 }, 3798 swipeRight: function() { 3799 $(this).parent().carousel('prev'); 3800 }, 3801 threshold:40 3802 }); 3803 3804 // Accordion open-all (lg up) 3805 if(jQuery(window).width() < 992) { 3806 jQuery(".panel-collapse.in-lg-up").removeClass('in'); 3807 } else { 3808 jQuery(".panel-collapse.in-lg-up").parent().find('.btn-accordion').attr('aria-expanded', 'true'); 3809 } 3810}); 3811 3812 3813jQuery(window).load(function() { 3814 3815 if ($.fn.twentytwenty) { 3816 jQuery(".twentytwenty-container").twentytwenty({ 3817 no_overlay:true 3818 }); 3819 } 3820 3821}); 3822 3823 3824// set top fixed navigations (mobile / desktop) 3825var lastScrollTop = 0, 3826 sleepTime = 20, 3827 startTime = new Date().getTime(); 3828 3829function setNavbarToggle() { 3830 /* 3831 var curTime = new Date().getTime(); 3832 if(startTime + sleepTime > curTime) 3833 return; 3834 */ 3835 3836 var st = $(this).scrollTop(), 3837 jNav = $('.navbar-toggle'), 3838 jNavMobile = $('.navbar-toggle.hidden-md-up, .navbar-toggle.hidden-lg-up'), 3839 jNavDesktop = $('.navbar-toggle.hidden-sm-down, .navbar-toggle.hidden-md-down'), 3840 hH = $('#header').outerHeight(), 3841 change = false; 3842 3843 // Desktop menu 3844 if(st > hH) { 3845 if(!jNavDesktop.hasClass('open')) { 3846 change = true; 3847 jNavDesktop.addClass('open'); 3848 jNavDesktop.slideDown(); 3849 $('body').addClass('navbar-toggle-open'); 3850 } 3851 } else if(jNavDesktop.hasClass('open')) { 3852 change = true; 3853 jNavDesktop.removeClass('open'); 3854 jNavDesktop.fadeOut('fast'); 3855 $('body').removeClass('navbar-toggle-open'); 3856 } 3857 3858 // Mobile menu 3859 if (st > hH){ 3860 if(!jNavMobile.hasClass('open') && !$('body').hasClass('menu-visible')) { 3861 change = true; 3862 jNavMobile.addClass('open'); 3863 jNavMobile.slideDown(); 3864 $('body').addClass('navbar-toggle-open'); 3865 } 3866 } else { 3867 if(jNavMobile.hasClass('open')) { 3868 change = true; 3869 jNavMobile.removeClass('open'); 3870 jNavMobile.fadeOut('fast'); 3871 $('body').removeClass('navbar-toggle-open'); 3872 } 3873 } 3874 3875 // Set change time after animation 3876 if(change) { 3877// startTime = curTime; 3878 3879 3880 setStickyOffsetNavbarToggle($('.navbar-toggle.hidden-md-up'), 'sm'); 3881 3882 setStickyOffsetNavbarToggle($('.navbar-toggle.hidden-lg-up'), 'sm'); 3883 setStickyOffsetNavbarToggle($('.navbar-toggle.hidden-lg-up'), 'md'); 3884 3885 setStickyOffsetNavbarToggle($('.navbar-toggle.hidden-sm-down'), 'md'); 3886 setStickyOffsetNavbarToggle($('.navbar-toggle.hidden-sm-down'), 'lg'); 3887 setStickyOffsetNavbarToggle($('.navbar-toggle.hidden-sm-down'), 'xl'); 3888 3889 setStickyOffsetNavbarToggle($('.navbar-toggle.hidden-md-down'), 'lg'); 3890 setStickyOffsetNavbarToggle($('.navbar-toggle.hidden-md-down'), 'xl'); 3891 } 3892 3893// lastScrollTop = st; 3894} 3895 3896function setStickyOffsetNavbarToggle(jNav, size) { 3897 if(jNav.length == 0) 3898 return; 3899 3900 if(jNav.css('display') == 'none') 3901 return; 3902 3903 var offset = 10, 3904 jSticky = $('.sticky-offset-navbar-toggle.sticky-'+size); 3905 3906 if(jNav.hasClass('open')) { 3907 // wait until navbar toggle has shown 3908 setTimeout(function(){ 3909 var h = jNav.outerHeight() + parseInt(jNav.css('top')); 3910 jSticky.css('margin-top', h); 3911 //var h = jNav.outerHeight() + offset + parseInt(jNav.css('top')); 3912 //jSticky.css('top', h); 3913 }, 400); 3914 } else { 3915 //jSticky.css('top', offset); 3916 jSticky.css('margin-top', 0); 3917 } 3918} 3919// Avoid `console` errors in browsers that lack a console. 3920(function() { 3921 var method; 3922 var noop = function () {}; 3923 var methods = [ 3924 'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error', 3925 'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log', 3926 'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd', 3927 'timeStamp', 'trace', 'warn' 3928 ]; 3929 var length = methods.length; 3930 var console = (window.console = window.console || {}); 3931 3932 while (length--) { 3933 method = methods[length]; 3934 3935 // Only stub undefined methods. 3936 if (!console[method]) { 3937 console[method] = noop; 3938 } 3939 } 3940}()); 3941 3942// Place any jQuery/helper plugins in here. 3943 3944 3945/** 3946 * @author Kai Vier 3947 */ 3948 3949 3950;jQuery(window).load(function () { 3951 jQuery('.wh-video > .embed-responsive').click(function(evt) { 3952 var jV = jQuery(this).parent(); 3953 if(!jV.hasClass('loaded')) { 3954 evt.preventDefault(); 3955 jV.addClass('loaded'); 3956 if(jV.find('video').length) { 3957 var jVv = jV.find('video'); 3958 var jVv2 = jVv.clone(); 3959 jVv2.find('source').each(function(i) { 3960 var src = $(this).attr('data-src'); 3961 $(this).attr('src', src); 3962 }); 3963 jVv.after(jVv2); 3964 jVv.remove(); 3965 } else { 3966 var src = jV.attr('data-src'); 3967 if(typeof src !== 'undefined' && src !== false) { 3968 src += ((src.indexOf('?') >
3968 0) ? '&' : '?') + 'autoplay=1'; 3969 jV.find('.embed-responsive').append('<iframe src="'+src+'" style="width:100%; height:100%;"></iframe>'); 3970 jV.find('iframe').show(); 3971 } 3972 } 3973 jV.find('i').fadeOut(); 3974 jV.find('img').fadeOut('slow'); 3975 } 3976 }); 3977 jQuery(window).scroll(onVideoVisibleStart); 3978 onVideoVisibleStart(); 3979}); 3980 3981function onVideoVisibleStart() { 3982 jQuery('.wh-video').each(function() { 3983 if (jQuery(this).find('video').length && jQuery(this).visible(true)) { 3984 jQuery(this).find('.embed-responsive').click(); 3985 } 3986 }) 3987} 3988/*! 3989 * SmartMenus jQuery Plugin - v1.0.0-beta1 - June 1, 2015 3990 * http://www.smartmenus.org/ 3991 * 3992 * Copyright 2015 Vasil Dinkov, Vadikom Web Ltd. 3993 * http://vadikom.com 3994 * 3995 * Licensed MIT 3996 */ 3997 3998(function($) { 3999 4000 var menuTrees = [], 4001 IE = !!window.createPopup, // detect it for the iframe shim 4002 mouse = false, // optimize for touch by default - we will detect for mouse input 4003 mouseDetectionEnabled = false; 4004 4005 // Handle detection for mouse input (i.e. desktop browsers, tablets with a mouse, etc.) 4006 function initMouseDetection(disable) { 4007 var eNS = '.smartmenus_mouse'; 4008 if (!mouseDetectionEnabled && !disable) { 4009 // if we get two consecutive mousemoves within 2 pixels from each other and within 300ms, we assume a real mouse/cursor is present 4010 // in practice, this seems like impossible to trick unintentianally with a real mouse and a pretty safe detection on touch devices (even with older browsers that do not support touch events) 4011 var firstTime = true, 4012 lastMove = null; 4013 $(document).bind(getEventsNS([ 4014 ['mousemove', function(e) { 4015 var thisMove = { x: e.pageX, y: e.pageY, timeStamp: new Date().getTime() }; 4016 if (lastMove) { 4017 var deltaX = Math.abs(lastMove.x - thisMove.x), 4018 deltaY = Math.abs(lastMove.y - thisMove.y); 4019 if ((deltaX > 0 || deltaY > 0) && deltaX <= 2 && deltaY <= 2 && thisMove.timeStamp - lastMove.timeStamp <= 300) { 4020 mouse = true; 4021 // if this is the first check after page load, check if we are not over some item by chance and call the mouseenter handler if yes 4022 if (firstTime) { 4023 var $a = $(e.target).closest('a'); 4024 if ($a.is('a')) { 4025 $.each(menuTrees, function() { 4026 if ($.contains(this.$root[0], $a[0])) { 4027 this.itemEnter({ currentTarget: $a[0] }); 4028 return false; 4029 } 4030 }); 4031 } 4032 firstTime = false; 4033 } 4034 } 4035 } 4036 lastMove = thisMove; 4037 }], 4038 [touchEvents() ? 'touchstart' : 'pointerover pointermove pointerout MSPointerOver MSPointerMove MSPointerOut', function(e) { 4039 if (isTouchEvent(e.originalEvent)) { 4040 mouse = false; 4041 } 4042 }] 4043 ], eNS)); 4044 mouseDetectionEnabled = true; 4045 } else if (mouseDetectionEnabled && disable) { 4046 $(document).unbind(eNS); 4047 mouseDetectionEnabled = false; 4048 } 4049 } 4050 4051 function isTouchEvent(e) { 4052 return !/^(4|mouse)$/.test(e.pointerType); 4053 } 4054 4055 // we use this just to choose between toucn and pointer events when we need to, not for touch screen detection 4056 function touchEvents() { 4057 return 'ontouchstart' in window; 4058 } 4059 4060 // returns a jQuery bind() ready object 4061 function getEventsNS(defArr, eNS) { 4062 if (!eNS) { 4063 eNS = ''; 4064 } 4065 var obj = {}; 4066 $.each(defArr, function(index, value) { 4067 obj[value[0].split(' ').join(eNS + ' ') + eNS] = value[1]; 4068 }); 4069 return obj; 4070 } 4071 4072 $.SmartMenus = function(elm, options) { 4073 this.$root = $(elm); 4074 this.opts = options; 4075 this.rootId = ''; // internal 4076 this.accessIdPrefix = ''; 4077 this.$subArrow = null; 4078 this.activatedItems = []; // stores last activated A's for each level 4079 this.visibleSubMenus = []; // stores visible sub menus UL's (might be in no particular order) 4080 this.showTimeout = 0; 4081 this.hideTimeout = 0; 4082 this.scrollTimeout = 0; 4083 this.clickActivated = false; 4084 this.focusActivated = false; 4085 this.zIndexInc = 0; 4086 this.idInc = 0; 4087 this.$firstLink = null; // we'll use these for some tests 4088 this.$firstSub = null; // at runtime so we'll cache them 4089 this.disabled = false; 4090 this.$disableOverlay = null; 4091 this.isTouchScrolling = false; 4092 this.wasCollapsible = false; 4093 this.init(); 4094 }; 4095 4096 $.extend($.SmartMenus, { 4097 hideAll: function() { 4098 $.each(menuTrees, function() { 4099 this.menuHideAll(); 4100 }); 4101 }, 4102 destroy: function() { 4103 while (menuTrees.length) { 4104 menuTrees[0].destroy(); 4105 } 4106 initMouseDetection(true); 4107 }, 4108 prototype: { 4109 init: function(refresh) { 4110 var self = this; 4111 4112 if (!refresh) { 4113 menuTrees.push(this); 4114 4115 this.rootId = (new Date().getTime() + Math.random() + '').replace(/\D/g, ''); 4116 this.accessIdPrefix = 'sm-' + this.rootId + '-'; 4117 4118 if (this.$root.hasClass('sm-rtl')) { 4119 this.opts.rightToLeftSubMenus = true; 4120 } 4121 4122 // init root (main menu) 4123 var eNS = '.smartmenus'; 4124 this.$root 4125 .data('smartmenus', this) 4126 .attr('data-smartmenus-id', this.rootId) 4127 .dataSM('level', 1) 4128 .bind(getEventsNS([ 4129 ['mouseover focusin', $.proxy(this.rootOver, this)], 4130 ['mouseout focusout', $.proxy(this.rootOut, this)], 4131 ['keydown', $.proxy(this.rootKeyDown, this)] 4132 ], eNS)) 4133 .delegate('a', getEventsNS([ 4134 ['mouseenter', $.proxy(this.itemEnter, this)], 4135 ['mouseleave', $.proxy(this.itemLeave, this)], 4136 ['mousedown', $.proxy(this.itemDown, this)], 4137 ['focus', $.proxy(this.itemFocus, this)], 4138 ['blur', $.proxy(this.itemBlur, this)], 4139 ['click', $.proxy(this.itemClick, this)], 4140 ['touchend', $.proxy(this.itemTouchEnd, this)] 4141 ], eNS)); 4142 4143 // hide menus on tap or click outside the root UL 4144 eNS += this.rootId; 4145 if (this.opts.hideOnClick) { 4146 $(document).bind(getEventsNS([ 4147 ['touchstart', $.proxy(this.docTouchStart, this)], 4148 ['touchmove', $.proxy(this.docTouchMove, this)], 4149 ['touchend', $.proxy(this.docTouchEnd, this)], 4150 // for Opera Mobile < 11.5, webOS browser, etc. we'll check click too 4151 ['click', $.proxy(this.docClick, this)] 4152 ], eNS)); 4153 } 4154 // hide sub menus on resize 4155 $(window).bind(getEventsNS([['resize orientationchange', $.proxy(this.winResize, this)]], eNS)); 4156 4157 if (this.opts.subIndicators) { 4158 this.$subArrow = $('<span/>').addClass('sub-arrow'); 4159 if (this.opts.subIndicatorsText) { 4160 this.$subArrow.html(this.opts.subIndicatorsText); 4161 } 4162 } 4163 4164 // make sure mouse detection is enabled 4165 initMouseDetection(); 4166 } 4167 4168 // init sub menus 4169 this.$firstSub = this.$root.find('ul').each(function() { self.menuInit($(this)); }).eq(0); 4170 4171 this.$firstLink = this.$root.find('a').eq(0); 4172 4173 // find current item 4174 if (this.opts.markCurrentItem) { 4175 var reDefaultDoc = /(index|default)\.[^#\?\/]*/i, 4176 reHash = /#.*/, 4177 locHref = window.location.href.replace(reDefaultDoc, ''), 4178 locHrefNoHash = locHref.replace(reHash, ''); 4179 this.$root.find('a').each(function() { 4180 var href = this.href.replace(reDefaultDoc, ''), 4181 $this = $(this); 4182 if (href == locHref || href == locHrefNoHash) { 4183 $this.addClass('current'); 4184 if (self.opts.markCurrentTree) { 4185 $this.parentsUntil('[data-smartmenus-id]', 'ul').each(function() { 4186 $(this).dataSM('parent-a').addClass('current'); 4187 });
4188 } 4189 } 4190 }); 4191 } 4192 4193 // save initial state 4194 this.wasCollapsible = this.isCollapsible(); 4195 }, 4196 destroy: function(refresh) { 4197 if (!refresh) { 4198 var eNS = '.smartmenus'; 4199 this.$root 4200 .removeData('smartmenus') 4201 .removeAttr('data-smartmenus-id') 4202 .removeDataSM('level') 4203 .unbind(eNS) 4204 .undelegate(eNS); 4205 eNS += this.rootId; 4206 $(document).unbind(eNS); 4207 $(window).unbind(eNS); 4208 if (this.opts.subIndicators) { 4209 this.$subArrow = null; 4210 } 4211 } 4212 this.menuHideAll(); 4213 var self = this; 4214 this.$root.find('ul').each(function() { 4215 var $this = $(this); 4216 if ($this.dataSM('scroll-arrows')) { 4217 $this.dataSM('scroll-arrows').remove(); 4218 } 4219 if ($this.dataSM('shown-before')) { 4220 if (self.opts.subMenusMinWidth || self.opts.subMenusMaxWidth) { 4221 $this.css({ width: '', minWidth: '', maxWidth: '' }).removeClass('sm-nowrap'); 4222 } 4223 if ($this.dataSM('scroll-arrows')) { 4224 $this.dataSM('scroll-arrows').remove(); 4225 } 4226 $this.css({ zIndex: '', top: '', left: '', marginLeft: '', marginTop: '', display: '' }); 4227 } 4228 if ($this.attr('id').indexOf(self.accessIdPrefix) == 0) { 4229 $this.removeAttr('id'); 4230 } 4231 }) 4232 .removeDataSM('in-mega') 4233 .removeDataSM('shown-before') 4234 .removeDataSM('ie-shim') 4235 .removeDataSM('scroll-arrows') 4236 .removeDataSM('parent-a') 4237 .removeDataSM('level') 4238 .removeDataSM('beforefirstshowfired') 4239 .removeAttr('role') 4240 .removeAttr('aria-hidden') 4241 .removeAttr('aria-labelledby') 4242 .removeAttr('aria-expanded'); 4243 this.$root.find('a.has-submenu').each(function() { 4244 var $this = $(this); 4245 if ($this.attr('id').indexOf(self.accessIdPrefix) == 0) { 4246 $this.removeAttr('id'); 4247 } 4248 }) 4249 .removeClass('has-submenu') 4250 .removeDataSM('sub') 4251 .removeAttr('aria-haspopup') 4252 .removeAttr('aria-controls') 4253 .removeAttr('aria-expanded') 4254 .closest('li').removeDataSM('sub'); 4255 if (this.opts.subIndicators) { 4256 this.$root.find('span.sub-arrow').remove(); 4257 } 4258 if (this.opts.markCurrentItem) { 4259 this.$root.find('a.current').removeClass('current'); 4260 } 4261 if (!refresh) { 4262 this.$root = null; 4263 this.$firstLink = null; 4264 this.$firstSub = null; 4265 if (this.$disableOverlay) { 4266 this.$disableOverlay.remove(); 4267 this.$disableOverlay = null; 4268 } 4269 menuTrees.splice($.inArray(this, menuTrees), 1); 4270 } 4271 }, 4272 disable: function(noOverlay) { 4273 if (!this.disabled) { 4274 this.menuHideAll(); 4275 // display overlay over the menu to prevent interaction 4276 if (!noOverlay && !this.opts.isPopup && this.$root.is(':visible')) { 4277 var pos = this.$root.offset(); 4278 this.$disableOverlay = $('<div class="sm-jquery-disable-overlay"/>').css({ 4279 position: 'absolute', 4280 top: pos.top, 4281 left: pos.left, 4282 width: this.$root.outerWidth(), 4283 height: this.$root.outerHeight(), 4284 zIndex: this.getStartZIndex(true), 4285 opacity: 0 4286 }).appendTo(document.body); 4287 } 4288 this.disabled = true; 4289 } 4290 }, 4291 docClick: function(e) { 4292 if (this.isTouchScrolling) { 4293 this.isTouchScrolling = false; 4294 return; 4295 } 4296 // hide on any click outside the menu or on a menu link 4297 if (this.visibleSubMenus.length && !$.contains(this.$root[0], e.target) || $(e.target).is('a')) { 4298 this.menuHideAll(); 4299 } 4300 }, 4301 docTouchEnd: function(e) { 4302 if (!this.lastTouch) { 4303 return; 4304 } 4305 if (this.visibleSubMenus.length && (this.lastTouch.x2 === undefined || this.lastTouch.x1 == this.lastTouch.x2) && (this.lastTouch.y2 === undefined || this.lastTouch.y1 == this.lastTouch.y2) && (!this.lastTouch.target || !$.contains(this.$root[0], this.lastTouch.target))) { 4306 if (this.hideTimeout) { 4307 clearTimeout(this.hideTimeout); 4308 this.hideTimeout = 0; 4309 } 4310 // hide with a delay to prevent triggering accidental unwanted click on some page element 4311 var self = this; 4312 this.hideTimeout = setTimeout(function() { self.menuHideAll(); }, 350); 4313 } 4314 this.lastTouch = null; 4315 }, 4316 docTouchMove: function(e) { 4317 if (!this.lastTouch) { 4318 return; 4319 } 4320 var touchPoint = e.originalEvent.touches[0]; 4321 this.lastTouch.x2 = touchPoint.pageX; 4322 this.lastTouch.y2 = touchPoint.pageY; 4323 }, 4324 docTouchStart: function(e) { 4325 var touchPoint = e.originalEvent.touches[0]; 4326 this.lastTouch = { x1: touchPoint.pageX, y1: touchPoint.pageY, target: touchPoint.target }; 4327 }, 4328 enable: function() { 4329 if (this.disabled) { 4330 if (this.$disableOverlay) { 4331 this.$disableOverlay.remove(); 4332 this.$disableOverlay = null; 4333 } 4334 this.disabled = false; 4335 } 4336 }, 4337 getClosestMenu: function(elm) { 4338 var $closestMenu = $(elm).closest('ul'); 4339 while ($closestMenu.dataSM('in-mega')) { 4340 $closestMenu = $closestMenu.parent().closest('ul'); 4341 } 4342 return $closestMenu[0] || null; 4343 }, 4344 getHeight: function($elm) { 4345 return this.getOffset($elm, true); 4346 }, 4347 // returns precise width/height float values 4348 getOffset: function($elm, height) { 4349 var old; 4350 if ($elm.css('display') == 'none') { 4351 old = { position: $elm[0].style.position, visibility: $elm[0].style.visibility }; 4352 $elm.css({ position: 'absolute', visibility: 'hidden' }).show(); 4353 } 4354 var box = $elm[0].getBoundingClientRect && $elm[0].getBoundingClientRect(), 4355 val = box && (height ? box.height || box.bottom - box.top : box.width || box.right - box.left); 4356 if (!val && val !== 0) { 4357 val = height ? $elm[0].offsetHeight : $elm[0].offsetWidth; 4358 } 4359 if (old) { 4360 $elm.hide().css(old); 4361 } 4362 return val; 4363 }, 4364 getStartZIndex: function(root) { 4365 var zIndex = parseInt(this[root ? '$root' : '$firstSub'].css('z-index')); 4366 if (!root && isNaN(zIndex)) { 4367 zIndex = parseInt(this.$root.css('z-index')); 4368 } 4369 return !isNaN(zIndex) ? zIndex : 1; 4370 }, 4371 getTouchPoint: function(e) { 4372 return e.touches && e.touches[0] || e.changedTouches && e.changedTouches[0] || e; 4373 }, 4374 getViewport: function(height) { 4375 var name = height ? 'Height' : 'Width', 4376 val = document.documentElement['client' + name], 4377 val2 = window['inner' + name]; 4378 if (val2) { 4379 val = Math.min(val, val2); 4380 } 4381 return val; 4382 },
4383 getViewportHeight: function() { 4384 return this.getViewport(true); 4385 }, 4386 getViewportWidth: function() { 4387 return this.getViewport(); 4388 }, 4389 getWidth: function($elm) { 4390 return this.getOffset($elm); 4391 }, 4392 handleEvents: function() { 4393 return !this.disabled && this.isCSSOn(); 4394 }, 4395 handleItemEvents: function($a) { 4396 return this.handleEvents() && !this.isLinkInMegaMenu($a); 4397 }, 4398 isCollapsible: function() { 4399 return this.$firstSub.css('position') == 'static'; 4400 }, 4401 isCSSOn: function() { 4402 return this.$firstLink.css('display') == 'block'; 4403 }, 4404 isFixed: function() { 4405 var isFixed = this.$root.css('position') == 'fixed'; 4406 if (!isFixed) { 4407 this.$root.parentsUntil('body').each(function() { 4408 if ($(this).css('position') == 'fixed') { 4409 isFixed = true; 4410 return false; 4411 } 4412 }); 4413 } 4414 return isFixed; 4415 }, 4416 isLinkInMegaMenu: function($a) { 4417 return $(this.getClosestMenu($a[0])).hasClass('mega-menu'); 4418 }, 4419 isTouchMode: function() { 4420 return !mouse || this.isCollapsible(); 4421 }, 4422 itemActivate: function($a, focus) { 4423 var $ul = $a.closest('ul'), 4424 level = $ul.dataSM('level'); 4425 // if for some reason the parent item is not activated (e.g. this is an API call to activate the item), activate all parent items first 4426 if (level > 1 && (!this.activatedItems[level - 2] || this.activatedItems[level - 2][0] != $ul.dataSM('parent-a')[0])) { 4427 var self = this; 4428 $($ul.parentsUntil('[data-smartmenus-id]', 'ul').get().reverse()).add($ul).each(function() { 4429 self.itemActivate($(this).dataSM('parent-a')); 4430 }); 4431 } 4432 // hide any visible deeper level sub menus 4433 if (!this.isCollapsible() || focus) { 4434 this.menuHideSubMenus(!this.activatedItems[level - 1] || this.activatedItems[level - 1][0] != $a[0] ? level - 1 : level); 4435 } 4436 // save new active item for this level 4437 this.activatedItems[level - 1] = $a; 4438 if (this.$root.triggerHandler('activate.smapi', $a[0]) === false) { 4439 return; 4440 } 4441 // show the sub menu if this item has one 4442 var $sub = $a.dataSM('sub'); 4443 if ($sub && (this.isTouchMode() || (!this.opts.showOnClick || this.clickActivated))) { 4444 this.menuShow($sub); 4445 } 4446 }, 4447 itemBlur: function(e) { 4448 var $a = $(e.currentTarget); 4449 if (!this.handleItemEvents($a)) { 4450 return; 4451 } 4452 this.$root.triggerHandler('blur.smapi', $a[0]); 4453 }, 4454 itemClick: function(e) { 4455 if (this.isTouchScrolling) { 4456 this.isTouchScrolling = false; 4457 e.stopPropagation(); 4458 return false; 4459 } 4460 var $a = $(e.currentTarget); 4461 if (!this.handleItemEvents($a)) { 4462 return; 4463 } 4464 if (this.$root.triggerHandler('click.smapi', $a[0]) === false) { 4465 return false; 4466 } 4467 // undo fix: prevent the address bar on iPhone from sliding down when expanding a sub menu 4468 if ($a.dataSM('href')) { 4469 $a.attr('href', $a.dataSM('href')).removeDataSM('href'); 4470 } 4471 var subArrowClicked = $(e.target).is('span.sub-arrow'), 4472 $sub = $a.dataSM('sub'); 4473 // if the sub is not visible 4474 if ($sub && !$sub.is(':visible')) { 4475 // try to activate the item and show the sub 4476 this.itemActivate($a); 4477 // if "itemActivate" showed the sub, prevent the click so that the link is not loaded 4478 // if it couldn't show it, then the sub menus are disabled with an !important declaration (e.g. via mobile styles) so let the link get loaded 4479 if ($sub.is(':visible')) { 4480 this.focusActivated = true; 4481 return false; 4482 } 4483 } else if (this.isCollapsible() && subArrowClicked) { 4484 this.itemActivate($a); 4485 this.menuHide($sub); 4486 return false; 4487 } 4488 if (this.opts.showOnClick && $sub && $sub.dataSM('level') == 2) { 4489 this.clickActivated = true; 4490 this.menuShow($sub); 4491 return false; 4492 } 4493 if ($a.hasClass('disabled')) { 4494 return false; 4495 } 4496 if (this.$root.triggerHandler('select.smapi', $a[0]) === false) { 4497 return false; 4498 } 4499 }, 4500 itemDown: function(e) { 4501 var $a = $(e.currentTarget); 4502 if (!this.handleItemEvents($a)) { 4503 return; 4504 } 4505 $a.dataSM('mousedown', true); 4506 }, 4507 itemEnter: function(e) { 4508 var $a = $(e.currentTarget); 4509 if (!this.handleItemEvents($a)) { 4510 return; 4511 } 4512 if (!this.isTouchMode()) { 4513 if (this.showTimeout) { 4514 clearTimeout(this.showTimeout); 4515 this.showTimeout = 0; 4516 } 4517 var self = this; 4518 this.showTimeout = setTimeout(function() { self.itemActivate($a); }, this.opts.showOnClick && $a.closest('ul').dataSM('level') == 1 ? 1 : this.opts.showTimeout); 4519 } 4520 this.$root.triggerHandler('mouseenter.smapi', $a[0]); 4521 }, 4522 itemFocus: function(e) { 4523 var $a = $(e.currentTarget); 4524 if (!this.handleItemEvents($a)) { 4525 return; 4526 } 4527 // fix (the mousedown check): in some browsers a tap/click produces consecutive focus + click events so we don't need to activate the item on focus 4528 if (this.focusActivated && (!this.isTouchMode() || !$a.dataSM('mousedown')) && (!this.activatedItems.length || this.activatedItems[this.activatedItems.length - 1][0] != $a[0])) { 4529 this.itemActivate($a, true); 4530 } 4531 this.$root.triggerHandler('focus.smapi', $a[0]); 4532 }, 4533 itemLeave: function(e) { 4534 var $a = $(e.currentTarget); 4535 if (!this.handleItemEvents($a)) { 4536 return; 4537 } 4538 if (!this.isTouchMode()) { 4539 if (this.showTimeout) { 4540 clearTimeout(this.showTimeout); 4541 this.showTimeout = 0; 4542 } 4543 } 4544 $a.removeDataSM('mousedown');
4545 this.$root.triggerHandler('mouseleave.smapi', $a[0]); 4546 }, 4547 itemTouchEnd: function(e) { 4548 var $a = $(e.currentTarget); 4549 if (!this.handleItemEvents($a)) { 4550 return; 4551 } 4552 // prevent the address bar on iPhone from sliding down when expanding a sub menu 4553 var $sub = $a.dataSM('sub'); 4554 if ($a.attr('href').charAt(0) !== '#' && $sub && !$sub.is(':visible')) { 4555 $a.dataSM('href', $a.attr('href')) 4556 .attr('href', '#'); 4557 } 4558 }, 4559 menuHide: function($sub) { 4560 if (this.$root.triggerHandler('beforehide.smapi', $sub[0]) === false) { 4561 return; 4562 } 4563 $sub.stop(true, true); 4564 if ($sub.css('display') != 'none') { 4565 var complete = function() { 4566 // unset z-index 4567 $sub.css('z-index', ''); 4568 }; 4569 // if sub is collapsible (mobile view) 4570 if (this.isCollapsible()) { 4571 if (this.opts.collapsibleHideFunction) { 4572 this.opts.collapsibleHideFunction.call(this, $sub, complete); 4573 } else { 4574 $sub.hide(this.opts.collapsibleHideDuration, complete); 4575 } 4576 } else { 4577 if (this.opts.hideFunction) { 4578 this.opts.hideFunction.call(this, $sub, complete); 4579 } else { 4580 $sub.hide(this.opts.hideDuration, complete); 4581 } 4582 } 4583 // remove IE iframe shim 4584 if ($sub.dataSM('ie-shim')) { 4585 $sub.dataSM('ie-shim').remove(); 4586 } 4587 // deactivate scrolling if it is activated for this sub 4588 if ($sub.dataSM('scroll')) { 4589 this.menuScrollStop($sub); 4590 $sub.css({ 'touch-action': '', '-ms-touch-action': '' }) 4591 .unbind('.smartmenus_scroll').removeDataSM('scroll').dataSM('scroll-arrows').hide(); 4592 } 4593 // unhighlight parent item + accessibility 4594 $sub.dataSM('parent-a').removeClass('highlighted').attr('aria-expanded', 'false'); 4595 $sub.attr({ 4596 'aria-expanded': 'false', 4597 'aria-hidden': 'true' 4598 }); 4599 var level = $sub.dataSM('level'); 4600 this.activatedItems.splice(level - 1, 1); 4601 this.visibleSubMenus.splice($.inArray($sub, this.visibleSubMenus), 1); 4602 this.$root.triggerHandler('hide.smapi', $sub[0]); 4603 } 4604 }, 4605 menuHideAll: function() { 4606 if (this.showTimeout) { 4607 clearTimeout(this.showTimeout); 4608 this.showTimeout = 0; 4609 } 4610 // hide all subs 4611 // if it's a popup, this.visibleSubMenus[0] is the root UL 4612 var level = this.opts.isPopup ? 1 : 0; 4613 for (var i = this.visibleSubMenus.length - 1; i >= level; i--) { 4614 this.menuHide(this.visibleSubMenus[i]); 4615 } 4616 // hide root if it's popup 4617 if (this.opts.isPopup) { 4618 this.$root.stop(true, true); 4619 if (this.$root.is(':visible')) { 4620 if (this.opts.hideFunction) { 4621 this.opts.hideFunction.call(this, this.$root); 4622 } else { 4623 this.$root.hide(this.opts.hideDuration); 4624 } 4625 // remove IE iframe shim 4626 if (this.$root.dataSM('ie-shim')) { 4627 this.$root.dataSM('ie-shim').remove(); 4628 } 4629 } 4630 } 4631 this.activatedItems = []; 4632 this.visibleSubMenus = []; 4633 this.clickActivated = false; 4634 this.focusActivated = false; 4635 // reset z-index increment 4636 this.zIndexInc = 0; 4637 }, 4638 menuHideSubMenus: function(level) { 4639 for (var i = this.activatedItems.length - 1; i >= level; i--) { 4640 var $sub = this.activatedItems[i].dataSM('sub'); 4641 if ($sub) { 4642 this.menuHide($sub); 4643 } 4644 } 4645 }, 4646 menuIframeShim: function($ul) { 4647 // create iframe shim for the menu 4648 if (IE && this.opts.overlapControlsInIE && !$ul.dataSM('ie-shim')) { 4649 $ul.dataSM('ie-shim', $('<iframe/>').attr({ src: 'javascript:0', tabindex: -9 }) 4650 .css({ position: 'absolute', top: 'auto', left: '0', opacity: 0, border: '0' }) 4651 ); 4652 } 4653 }, 4654 menuInit: function($ul) { 4655 if (!$ul.dataSM('in-mega')) { 4656 // mark UL's in mega drop downs (if any) so we can neglect them 4657 if ($ul.hasClass('mega-menu')) { 4658 $ul.find('ul').dataSM('in-mega', true); 4659 } 4660 // get level (much faster than, for example, using parentsUntil) 4661 var level = 2, 4662 par = $ul[0]; 4663 while ((par = par.parentNode.parentNode) != this.$root[0]) { 4664 level++; 4665 } 4666 // cache stuff for quick access 4667 var $a = $ul.prevAll('a').eq(-1); 4668 // if the link is nested (e.g. in a heading) 4669 if (!$a.length) { 4670 $a = $ul.prevAll().find('a').eq(-1); 4671 } 4672 $a.addClass('has-submenu').dataSM('sub', $ul); 4673 $ul.dataSM('parent-a', $a) 4674 .dataSM('level', level) 4675 .parent().dataSM('sub', $ul); 4676 // accessibility 4677 var aId = $a.attr('id') || this.accessIdPrefix + (++this.idInc), 4678 ulId = $ul.attr('id') || this.accessIdPrefix + (++this.idInc); 4679 $a.attr({ 4680 id: aId, 4681 'aria-haspopup': 'true', 4682 'aria-controls': ulId, 4683 'aria-expanded': 'false' 4684 });
4685 $ul.attr({ 4686 id: ulId, 4687 'role': 'group', 4688 'aria-hidden': 'true', 4689 'aria-labelledby': aId, 4690 'aria-expanded': 'false' 4691 }); 4692 // add sub indicator to parent item 4693 if (this.opts.subIndicators) { 4694 $a[this.opts.subIndicatorsPos](this.$subArrow.clone()); 4695 } 4696 } 4697 }, 4698 menuPosition: function($sub) { 4699 var $a = $sub.dataSM('parent-a'), 4700 $li = $a.closest('li'), 4701 $ul = $li.parent(), 4702 level = $sub.dataSM('level'), 4703 subW = this.getWidth($sub), 4704 subH = this.getHeight($sub), 4705 itemOffset = $a.offset(), 4706 itemX = itemOffset.left, 4707 itemY = itemOffset.top, 4708 itemW = this.getWidth($a), 4709 itemH = this.getHeight($a), 4710 $win = $(window), 4711 winX = $win.scrollLeft(), 4712 winY = $win.scrollTop(), 4713 winW = this.getViewportWidth(), 4714 winH = this.getViewportHeight(), 4715 horizontalParent = $ul.hasClass('sm') && !$ul.hasClass('sm-vertical'), 4716 rightToLeft = this.opts.rightToLeftSubMenus && !$li.is('[data-sm-reverse]') || !this.opts.rightToLeftSubMenus && $li.is('[data-sm-reverse]'), 4717 subOffsetX = level == 2 ? this.opts.mainMenuSubOffsetX : this.opts.subMenusSubOffsetX, 4718 subOffsetY = level == 2 ? this.opts.mainMenuSubOffsetY : this.opts.subMenusSubOffsetY, 4719 x, y; 4720 if (horizontalParent) { 4721 x = rightToLeft ? itemW - subW - subOffsetX : subOffsetX; 4722 y = this.opts.bottomToTopSubMenus ? -subH - subOffsetY : itemH + subOffsetY; 4723 } else { 4724 x = rightToLeft ? subOffsetX - subW : itemW - subOffsetX; 4725 y = this.opts.bottomToTopSubMenus ? itemH - subOffsetY - subH : subOffsetY; 4726 } 4727 if (this.opts.keepInViewport) { 4728 var absX = itemX + x, 4729 absY = itemY + y; 4730 if (rightToLeft && absX < winX) { 4731 x = horizontalParent ? winX - absX + x : itemW - subOffsetX; 4732 } else if (!rightToLeft && absX + subW > winX + winW) { 4733 x = horizontalParent ? winX + winW - subW - absX + x : subOffsetX - subW; 4734 } 4735 if (!horizontalParent) { 4736 if (subH < winH && absY + subH > winY + winH) { 4737 y += winY + winH - subH - absY; 4738 } else if (subH >= winH || absY < winY) { 4739 y += winY - absY; 4740 } 4741 } 4742 // do we need scrolling? 4743 // 0.49 used for better precision when dealing with float values 4744 if (horizontalParent && (absY + subH > winY + winH + 0.49 || absY < winY) || !horizontalParent && subH > winH + 0.49) { 4745 var self = this; 4746 if (!$sub.dataSM('scroll-arrows')) { 4747 $sub.dataSM('scroll-arrows', $([$('<span class="scroll-up"><span class="scroll-up-arrow"></span></span>')[0], $('<span class="scroll-down"><span class="scroll-down-arrow"></span></span>')[0]]) 4748 .bind({ 4749 mouseenter: function() { 4750 $sub.dataSM('scroll').up = $(this).hasClass('scroll-up'); 4751 self.menuScroll($sub); 4752 }, 4753 mouseleave: function(e) { 4754 self.menuScrollStop($sub); 4755 self.menuScrollOut($sub, e); 4756 }, 4757 'mousewheel DOMMouseScroll': function(e) { e.preventDefault(); } 4758 }) 4759 .insertAfter($sub) 4760 ); 4761 } 4762 // bind scroll events and save scroll data for this sub 4763 var eNS = '.smartmenus_scroll'; 4764 $sub.dataSM('scroll', { 4765 step: 1, 4766 // cache stuff for faster recalcs later 4767 itemH: itemH, 4768 subH: subH, 4769 arrowDownH: this.getHeight($sub.dataSM('scroll-arrows').eq(1)) 4770 }) 4771 .bind(getEventsNS([ 4772 ['mouseover', function(e) { self.menuScrollOver($sub, e); }], 4773 ['mouseout', function(e) { self.menuScrollOut($sub, e); }], 4774 ['mousewheel DOMMouseScroll', function(e) { self.menuScrollMousewheel($sub, e); }] 4775 ], eNS)) 4776 .dataSM('scroll-arrows').css({ top: 'auto', left: '0', marginLeft: x + (parseInt($sub.css('border-left-width')) || 0), width: subW - (parseInt($sub.css('border-left-width')) || 0) - (parseInt($sub.css('border-right-width')) || 0), zIndex: $sub.css('z-index') }) 4777 .eq(horizontalParent && this.opts.bottomToTopSubMenus ? 0 : 1).show(); 4778 // when a menu tree is fixed positioned we allow scrolling via touch too 4779 // since there is no other way to access such long sub menus if no mouse is present 4780 if (this.isFixed()) { 4781 $sub.css({ 'touch-action': 'none', '-ms-touch-action': 'none' }) 4782 .bind(getEventsNS([ 4783 [touchEvents() ? 'touchstart touchmove touchend' : 'pointerdown pointermove pointerup MSPointerDown MSPointerMove MSPointerUp', function(e) { 4784 self.menuScrollTouch($sub, e); 4785 }] 4786 ], eNS)); 4787 } 4788 } 4789 } 4790 $sub.css({ top: 'auto', left: '0', marginLeft: x, marginTop: y - itemH }); 4791 // IE iframe shim 4792 this.menuIframeShim($sub); 4793 if ($sub.dataSM('ie-shim')) { 4794 $sub.dataSM('ie-shim').css({ zIndex: $sub.css('z-index'), width: subW, height: subH, marginLeft: x, marginTop: y - itemH }); 4795 } 4796 }, 4797 menuScroll: function($sub, once, step) { 4798 var data = $sub.dataSM('scroll'), 4799 $arrows = $sub.dataSM('scroll-arrows'), 4800 y = parseFloat($sub.css('margin-top')), 4801 end = data.up ? data.upEnd : data.downEnd, 4802 diff; 4803 if (!once && data.velocity) { 4804 data.velocity *= 0.9; 4805 diff = data.velocity; 4806 if (diff < 0.5) { 4807 this.menuScrollStop($sub); 4808 return; 4809 } 4810 } else { 4811 diff = step || (once || !this.opts.scrollAccelerate ? this.opts.scrollStep : Math.floor(data.step)); 4812 } 4813 // hide any visible deeper level sub menus 4814 var level = $sub.dataSM('level'); 4815 if (this.activatedItems[level - 1] && this.activatedItems[level - 1].dataSM('sub') && this.activatedItems[level - 1].dataSM('sub').is(':visible')) {
4816 this.menuHideSubMenus(level - 1); 4817 } 4818 var newY = data.up && end <= y || !data.up && end >= y ? y : (Math.abs(end - y) > diff ? y + (data.up ? diff : -diff) : end); 4819 $sub.add($sub.dataSM('ie-shim')).css('margin-top', newY); 4820 // show opposite arrow if appropriate 4821 if (mouse && (data.up && newY > data.downEnd || !data.up && newY < data.upEnd)) { 4822 $arrows.eq(data.up ? 1 : 0).show(); 4823 } 4824 // if we've reached the end 4825 if (newY == end) { 4826 if (mouse) { 4827 $arrows.eq(data.up ? 0 : 1).hide(); 4828 } 4829 this.menuScrollStop($sub); 4830 } else if (!once) { 4831 if (this.opts.scrollAccelerate && data.step < this.opts.scrollStep) { 4832 data.step += 0.5; 4833 } 4834 var self = this; 4835 this.scrollTimeout = setTimeout(function() { self.menuScroll($sub); }, this.opts.scrollInterval); 4836 } 4837 }, 4838 menuScrollMousewheel: function($sub, e) { 4839 if (this.getClosestMenu(e.target) == $sub[0]) { 4840 e = e.originalEvent; 4841 var up = (e.wheelDelta || -e.detail) > 0; 4842 if ($sub.dataSM('scroll-arrows').eq(up ? 0 : 1).is(':visible')) { 4843 $sub.dataSM('scroll').up = up; 4844 this.menuScroll($sub, true); 4845 } 4846 } 4847 e.preventDefault(); 4848 }, 4849 menuScrollOut: function($sub, e) { 4850 if (mouse) { 4851 if (!/^scroll-(up|down)/.test((e.relatedTarget || '').className) && ($sub[0] != e.relatedTarget && !$.contains($sub[0], e.relatedTarget) || this.getClosestMenu(e.relatedTarget) != $sub[0])) { 4852 $sub.dataSM('scroll-arrows').css('visibility', 'hidden'); 4853 } 4854 } 4855 }, 4856 menuScrollOver: function($sub, e) { 4857 if (mouse) { 4858 if (!/^scroll-(up|down)/.test(e.target.className) && this.getClosestMenu(e.target) == $sub[0]) { 4859 this.menuScrollRefreshData($sub); 4860 var data = $sub.dataSM('scroll'); 4861 $sub.dataSM('scroll-arrows').eq(0).css('margin-top', data.upEnd).end() 4862 .eq(1).css('margin-top', data.downEnd + data.subH - data.arrowDownH).end() 4863 .css('visibility', 'visible'); 4864 } 4865 } 4866 }, 4867 menuScrollRefreshData: function($sub) { 4868 var data = $sub.dataSM('scroll'), 4869 $win = $(window), 4870 vportY = $win.scrollTop() - $sub.dataSM('parent-a').offset().top - data.itemH; 4871 $.extend(data, { 4872 upEnd: vportY, 4873 downEnd: vportY + this.getViewportHeight() - data.subH 4874 }); 4875 }, 4876 menuScrollStop: function($sub) { 4877 if (this.scrollTimeout) { 4878 clearTimeout(this.scrollTimeout); 4879 this.scrollTimeout = 0; 4880 $.extend($sub.dataSM('scroll'), { 4881 step: 1, 4882 velocity: 0 4883 }); 4884 return true; 4885 } 4886 }, 4887 menuScrollTouch: function($sub, e) { 4888 e = e.originalEvent; 4889 if (isTouchEvent(e)) { 4890 var touchPoint = this.getTouchPoint(e); 4891 // neglect event if we touched a visible deeper level sub menu 4892 if (this.getClosestMenu(touchPoint.target) == $sub[0]) { 4893 var data = $sub.dataSM('scroll'); 4894 if (/(start|down)$/i.test(e.type)) { 4895 if (this.menuScrollStop($sub)) { 4896 // if we were scrolling, just stop and don't activate any link on the first touch 4897 e.preventDefault(); 4898 this.isTouchScrolling = true; 4899 } else { 4900 this.isTouchScrolling = false; 4901 } 4902 // update scroll data since the user might have zoomed, etc. 4903 this.menuScrollRefreshData($sub); 4904 // extend it with the touch properties 4905 $.extend(data, { 4906 touchY: touchPoint.pageY, 4907 touchTimestamp: e.timeStamp, 4908 velocity: 0 4909 }); 4910 } else if (/move$/i.test(e.type)) { 4911 var prevY = data.touchY; 4912 if (prevY !== undefined && prevY != touchPoint.pageY) { 4913 this.isTouchScrolling = true; 4914 $.extend(data, { 4915 up: prevY < touchPoint.pageY, 4916 touchY: touchPoint.pageY, 4917 touchTimestamp: e.timeStamp, 4918 velocity: data.velocity + Math.abs(touchPoint.pageY - prevY) * 0.5 4919 });
4920 this.menuScroll($sub, true, Math.abs(data.touchY - prevY)); 4921 } 4922 e.preventDefault(); 4923 } else { // touchend/pointerup 4924 if (data.touchY !== undefined) { 4925 // check if we need to scroll 4926 if (e.timeStamp - data.touchTimestamp < 120 && data.velocity > 0) { 4927 data.velocity *= 0.5; 4928 this.menuScrollStop($sub); 4929 this.menuScroll($sub); 4930 e.preventDefault(); 4931 } 4932 delete data.touchY; 4933 } 4934 } 4935 } 4936 } 4937 }, 4938 menuShow: function($sub) { 4939 if (!$sub.dataSM('beforefirstshowfired')) { 4940 $sub.dataSM('beforefirstshowfired', true); 4941 if (this.$root.triggerHandler('beforefirstshow.smapi', $sub[0]) === false) { 4942 return; 4943 } 4944 } 4945 if (this.$root.triggerHandler('beforeshow.smapi', $sub[0]) === false) { 4946 return; 4947 } 4948 $sub.dataSM('shown-before', true) 4949 .stop(true, true); 4950 if (!$sub.is(':visible')) { 4951 // highlight parent item 4952 var $a = $sub.dataSM('parent-a'); 4953 if (this.opts.keepHighlighted || this.isCollapsible()) { 4954 $a.addClass('highlighted'); 4955 } 4956 if (this.isCollapsible()) { 4957 $sub.removeClass('sm-nowrap').css({ zIndex: '', width: 'auto', minWidth: '', maxWidth: '', top: '', left: '', marginLeft: '', marginTop: '' }); 4958 } else { 4959 // set z-index 4960 $sub.css('z-index', this.zIndexInc = (this.zIndexInc || this.get
4960StartZIndex()) + 1); 4961 // min/max-width fix - no way to rely purely on CSS as all UL's are nested 4962 if (this.opts.subMenusMinWidth || this.opts.subMenusMaxWidth) { 4963 $sub.css({ width: 'auto', minWidth: '', maxWidth: '' }).addClass('sm-nowrap'); 4964 if (this.opts.subMenusMinWidth) { 4965 $sub.css('min-width', this.opts.subMenusMinWidth); 4966 } 4967 if (this.opts.subMenusMaxWidth) { 4968 var noMaxWidth = this.getWidth($sub); 4969 $sub.css('max-width', this.opts.subMenusMaxWidth); 4970 if (noMaxWidth > this.getWidth($sub)) { 4971 $sub.removeClass('sm-nowrap').css('width', this.opts.subMenusMaxWidth); 4972 } 4973 } 4974 } 4975 this.menuPosition($sub); 4976 // insert IE iframe shim 4977 if ($sub.dataSM('ie-shim')) { 4978 $sub.dataSM('ie-shim').insertBefore($sub); 4979 } 4980 } 4981 var complete = function() { 4982 // fix: "overflow: hidden;" is not reset on animation complete in jQuery < 1.9.0 in Chrome when global "box-sizing: border-box;" is used 4983 $sub.css('overflow', ''); 4984 }; 4985 // if sub is collapsible (mobile view) 4986 if (this.isCollapsible()) { 4987 if (this.opts.collapsibleShowFunction) { 4988 this.opts.collapsibleShowFunction.call(this, $sub, complete); 4989 } else { 4990 $sub.show(this.opts.collapsibleShowDuration, complete); 4991 } 4992 } else { 4993 if (this.opts.showFunction) { 4994 this.opts.showFunction.call(this, $sub, complete); 4995 } else { 4996 $sub.show(this.opts.showDuration, complete); 4997 } 4998 } 4999 // accessibility 5000 $a.attr('aria-expanded', 'true'); 5001 $sub.attr({ 5002 'aria-expanded': 'true', 5003 'aria-hidden': 'false' 5004 }); 5005 // store sub menu in visible array 5006 this.visibleSubMenus.push($sub); 5007 this.$root.triggerHandler('show.smapi', $sub[0]); 5008 } 5009 }, 5010 popupHide: function(noHideTimeout) { 5011 if (this.hideTimeout) { 5012 clearTimeout(this.hideTimeout); 5013 this.hideTimeout = 0; 5014 } 5015 var self = this; 5016 this.hideTimeout = setTimeout(function() { 5017 self.menuHideAll(); 5018 }, noHideTimeout ? 1 : this.opts.hideTimeout); 5019 }, 5020 popupShow: function(left, top) { 5021 if (!this.opts.isPopup) { 5022 alert('SmartMenus jQuery Error:\n\nIf you want to show this menu via the "popupShow" method, set the isPopup:true option.'); 5023 return; 5024 } 5025 if (this.hideTimeout) { 5026 clearTimeout(this.hideTimeout); 5027 this.hideTimeout = 0; 5028 } 5029 this.$root.dataSM('shown-before', true) 5030 .stop(true, true); 5031 if (!this.$root.is(':visible')) { 5032 this.$root.css({ left: left, top: top }); 5033 // IE iframe shim 5034 this.menuIframeShim(this.$root); 5035 if (this.$root.dataSM('ie-shim')) { 5036 this.$root.dataSM('ie-shim').css({ zIndex: this.$root.css('z-index'), width: this.getWidth(this.$root), height: this.getHeight(this.$root), left: left, top: top }).insertBefore(this.$root); 5037 } 5038 // show menu 5039 var self = this, 5040 complete = function() { 5041 self.$root.css('overflow', ''); 5042 }; 5043 if (this.opts.showFunction) { 5044 this.opts.showFunction.call(this, this.$root, complete); 5045 } else { 5046 this.$root.show(this.opts.showDuration, complete); 5047 } 5048 this.visibleSubMenus[0] = this.$root; 5049 } 5050 }, 5051 refresh: function() { 5052 this.destroy(true); 5053 this.init(true); 5054 }, 5055 rootKeyDown: function(e) { 5056 if (!this.handleEvents()) { 5057 return; 5058 } 5059 switch (e.keyCode) { 5060 case 27: // reset on Esc 5061 var $activeTopItem = this.activatedItems[0]; 5062 if ($activeTopItem) { 5063 this.menuHideAll(); 5064 $activeTopItem[0].focus(); 5065 var $sub = $activeTopItem.dataSM('sub'); 5066 if ($sub) { 5067 this.menuHide($sub); 5068 } 5069 } 5070 break; 5071 case 32: // activate item's sub on Space 5072 var $target = $(e.target); 5073 if ($target.is('a') && this.handleItemEvents($target)) { 5074 var $sub = $target.dataSM('sub'); 5075 if ($sub && !$sub.is(':visible')) { 5076 this.itemClick({ currentTarget: e.target }); 5077 e.preventDefault(); 5078 } 5079 } 5080 break; 5081 } 5082 }, 5083 rootOut: function(e) { 5084 if (!this.handleEvents() || this.isTouchMode() || e.target == this.$root[0]) { 5085 return; 5086 } 5087 if (this.hideTimeout) { 5088 clearTimeout(this.hideTimeout); 5089 this.hideTimeout = 0; 5090 } 5091 if (!this.opts.showOnClick || !this.opts.hideOnClick) { 5092 var self = this; 5093 this.hideTimeout = setTimeout(function() { self.menuHideAll(); }, this.opts.hideTimeout); 5094 } 5095 }, 5096 rootOver: function(e) { 5097 if (!this.handleEvents() || this.isTouchMode() || e.target == this.$root[0]) { 5098 return; 5099 } 5100 if (this.hideTimeout) { 5101 clearTimeout(this.hideTimeout); 5102 this.hideTimeout = 0; 5103 } 5104 }, 5105 winResize: function(e) { 5106 if (!this.handleEvents()) { 5107 // we still need to resize the disable overlay if it's visible 5108 if (this.$disableOverlay) { 5109 var pos = this.$root.offset(); 5110 this.$disableOverlay.css({ 5111 top: pos.top, 5112 left: pos.left, 5113 width: this.$root.outerWidth(), 5114 height: this.$root.outerHeight() 5115 });
5116 } 5117 return; 5118 } 5119 // hide sub menus on resize - on mobile do it only on orientation change 5120 if (!('onorientationchange' in window) || e.type == 'orientationchange') { 5121 var isCollapsible = this.isCollapsible(); 5122 // if it was collapsible before resize and still is, don't do it 5123 if (!(this.wasCollapsible && isCollapsible)) { 5124 if (this.activatedItems.length) { 5125 this.activatedItems[this.activatedItems.length - 1][0].blur(); 5126 } 5127 this.menuHideAll(); 5128 } 5129 this.wasCollapsible = isCollapsible; 5130 } 5131 } 5132 } 5133 }); 5134 5135 $.fn.dataSM = function(key, val) { 5136 if (val) { 5137 return this.data(key + '_smartmenus', val); 5138 } 5139 return this.data(key + '_smartmenus'); 5140 } 5141 5142 $.fn.removeDataSM = function(key) { 5143 return this.removeData(key + '_smartmenus'); 5144 } 5145 5146 $.fn.smartmenus = function(options) { 5147 if (typeof options == 'string') { 5148 var args = arguments, 5149 method = options; 5150 Array.prototype.shift.call(args); 5151 return this.each(function() { 5152 var smartmenus = $(this).data('smartmenus'); 5153 if (smartmenus && smartmenus[method]) { 5154 smartmenus[method].apply(smartmenus, args); 5155 } 5156 }); 5157 } 5158 var opts = $.extend({}, $.fn.smartmenus.defaults, options); 5159 return this.each(function() { 5160 new $.SmartMenus(this, opts); 5161 }); 5162 } 5163 5164 // default settings 5165 $.fn.smartmenus.defaults = { 5166 isPopup: false, // is this a popup menu (can be shown via the popupShow/popupHide methods) or a permanent menu bar 5167 mainMenuSubOffsetX: 0, // pixels offset from default position 5168 mainMenuSubOffsetY: 0, // pixels offset from default position 5169 subMenusSubOffsetX: 0, // pixels offset from default position 5170 subMenusSubOffsetY: 0, // pixels offset from default position 5171 subMenusMinWidth: '10em', // min-width for the sub menus (any CSS unit) - if set, the fixed width set in CSS will be ignored 5172 subMenusMaxWidth: '20em', // max-width for the sub menus (any CSS unit) - if set, the fixed width set in CSS will be ignored 5173 subIndicators: true, // create sub menu indicators - creates a SPAN and inserts it in the A 5174 subIndicatorsPos: 'prepend', // position of the SPAN relative to the menu item content ('prepend', 'append') 5175 subIndicatorsText: '+', // [optionally] add text in the SPAN (e.g. '+') (you may want to check the CSS for the sub indicators too) 5176 scrollStep: 30, // pixels step when scrolling long sub menus that do not fit in the viewport height 5177 scrollInterval: 30, // interval between each scrolling step 5178 scrollAccelerate: true, // accelerate scrolling or use a fixed step 5179 showTimeout: 250, // timeout before showing the sub menus 5180 hideTimeout: 500, // timeout before hiding the sub menus 5181 showDuration: 0, // duration for show animation - set to 0 for no animation - matters only if showFunction:null 5182 showFunction: null, // custom function to use when showing a sub menu (the default is the jQuery 'show') 5183 // don't forget to call complete() at the end of whatever you do 5184 // e.g.: function($ul, complete) { $ul.fadeIn(250, complete); } 5185 hideDuration: 0, // duration for hide animation - set to 0 for no animation - matters only if hideFunction:null 5186 hideFunction: function($ul, complete) { $ul.fadeOut(200, complete); }, // custom function to use when hiding a sub menu (the default is the jQuery 'hide') 5187 // don't forget to call complete() at the end of whatever you do 5188 // e.g.: function($ul, complete) { $ul.fadeOut(250, complete); } 5189 collapsibleShowDuration:0, // duration for show animation for collapsible sub menus - matters only if collapsibleShowFunction:null 5190 collapsibleShowFunction:function($ul, complete) { $ul.slideDown(200, complete); }, // custom function to use when showing a collapsible sub menu 5191 // (i.e. when mobile styles are used to make the sub menus collapsible) 5192 collapsibleHideDuration:0, // duration for hide animation for collapsible sub menus - matters only if collapsibleHideFunction:null 5193 collapsibleHideFunction:function($ul, complete) { $ul.slideUp(200, complete); }, // custom function to use when hiding a collapsible sub menu 5194 // (i.e. when mobile styles are used to make the sub menus collapsible) 5195 showOnClick: true, // show the first-level sub menus onclick instead of onmouseover (matters only for mouse input) 5196 hideOnClick: true, // hide the sub menus on click/tap anywhere on the page 5197 keepInViewport: true, // reposition the sub menus if needed to make sure they always appear inside the viewport 5198 keepHighlighted: true, // keep all ancestor items of the current sub menu highlighted (adds the 'highlighted' class to the A's) 5199 markCurrentItem: false, // automatically add the 'current' class to the A element of the item linking to the current URL 5200 markCurrentTree: true, // add the 'current' class also to the A elements of all ancestor items of the current item 5201 rightToLeftSubMenus: false, // right to left display of the sub menus (check the CSS for the sub indicators' position) 5202 bottomToTopSubMenus: false, // bottom to top display of the sub menus
5203 overlapControlsInIE: true // make sure sub menus appear on top of special OS controls in IE (i.e. SELECT, OBJECT, EMBED, etc.) 5204 }; 5205 5206})(jQuery); 5207/*! 5208 * SmartMenus jQuery Plugin Bootstrap Addon - v0.2.0 - June 1, 2015 5209 * http://www.smartmenus.org/ 5210 * 5211 * Copyright 2015 Vasil Dinkov, Vadikom Web Ltd. 5212 * http://vadikom.com 5213 * 5214 * Licensed MIT 5215 */ 5216 5217(function($) { 5218 5219 // init ondomready 5220 $(function() { 5221 5222 // init all navbars that don't have the "data-sm-skip" attribute set 5223 var $navbars = $('ul.smartmenus:not([data-sm-skip])'); 5224 $navbars.each(function() { 5225 var $this = $(this); 5226 $this.addClass('sm').smartmenus({ 5227 5228 // these are some good default options that should work for all 5229 // you can, of course, tweak these as you like 5230 subMenusSubOffsetX: 0, 5231 subMenusSubOffsetY: 0, 5232 mainMenuSubOffsetX: 0, 5233 subIndicators: false, 5234 showOnClick: false, 5235 showTimeout: 100, 5236 collapsibleShowFunction: null, 5237 collapsibleHideFunction: null, 5238 subMenusMinWidth: '12em', 5239 subMenusMaxWidth: null, 5240 keepInViewport: false, 5241 rightToLeftSubMenus: $this.hasClass('navbar-right'), 5242 bottomToTopSubMenus: $this.closest('.navbar').hasClass('navbar-fixed-bottom') 5243 }) 5244 .bind({ 5245 // set/unset proper Bootstrap classes for some menu elements 5246 'show.smapi': function(e, menu) { 5247 var $menu = $(menu), 5248 $scrollArrows = $menu.dataSM('scroll-arrows'); 5249 if ($scrollArrows) { 5250 // they inherit border-color from body, so we can use its background-color too 5251 $scrollArrows.css('background-color', $(document.body).css('background-color')); 5252 } 5253 $menu.parent().addClass('open'); 5254 }, 5255 'hide.smapi': function(e, menu) { 5256 $(menu).parent().removeClass('open'); 5257 } 5258 }) 5259 // set Bootstrap's "active" class to SmartMenus "current" items (should someone decide to enable markCurrentItem: true) 5260 .find('a.current').parent().addClass('active'); 5261 5262 // keep Bootstrap's default behavior for parent items when the "data-sm-skip-collapsible-behavior" attribute is set to the ul.navbar-nav 5263 // i.e. use the whole item area just as a sub menu toggle and don't customize the carets 5264 var obj = $this.data('smartmenus'); 5265 if ($this.is('[data-sm-skip-collapsible-behavior]')) { 5266 $this.bind({ 5267 // click the parent item to toggle the sub menus (and reset deeper levels and other branches on click) 5268 'click.smapi': function(e, item) { 5269 if (obj.isCollapsible()) { 5270 var $item = $(item), 5271 $sub = $item.parent().dataSM('sub'); 5272 if ($sub && $sub.dataSM('shown-before') && $sub.is(':visible')) { 5273 obj.itemActivate($item); 5274 obj.menuHide($sub); 5275 return false; 5276 } 5277 } 5278 } 5279 }); 5280 } 5281 5282 var $carets = $this.find('.caret'); 5283 5284 // onresize detect when the navbar becomes collapsible and add it the "sm-collapsible" class 5285 var winW; 5286 function winResize() { 5287 var newW = obj.getViewportWidth(); 5288 if (newW != winW) { 5289 if (obj.isCollapsible()) { 5290 $this.addClass('sm-collapsible'); 5291 // set "navbar-toggle" class to carets (so they look like a button) if the "data-sm-skip-collapsible-behavior" attribute is not set to the ul.navbar-nav 5292 if (!$this.is('[data-sm-skip-collapsible-behavior]')) { 5293 $carets.addClass('navbar-toggle sub-arrow'); 5294 } 5295 } else { 5296 $this.removeClass('sm-collapsible'); 5297 if (!$this.is('[data-sm-skip-collapsible-behavior]')) { 5298 $carets.removeClass('navbar-toggle sub-arrow'); 5299 } 5300 } 5301 winW = newW; 5302 } 5303 }; 5304 winResize(); 5305 $(window).bind('resize.smartmenus' + obj.rootId, winResize); 5306 }); 5307 5308 }); 5309 5310 // fix collapsible menu detection for Bootstrap 3 5311 $.SmartMenus.prototype.isCollapsible = function() { 5312 return this.$firstLink.parent().css('float') != 'left'; 5313 }; 5314 5315})(jQuery); 5316/*! 5317 * fancyBox - jQuery Plugin 5318 * version: 2.1.5 (Fri, 14 Jun 2013) 5319 * @requires jQuery v1.6 or later 5320 * 5321 * Examples at http://fancyapps.com/fancybox/ 5322 * License: www.fancyapps.com/fancybox/#license 5323 * 5324 * Copyright 2012 Janis Skarnelis - [email protected] 5325 * 5326 */ 5327 5328(function (window, document, $, undefined) { 5329 "use strict"; 5330 5331 var H = $("html"), 5332 W = $(window), 5333 D = $(document), 5334 F = $.fancybox = function () { 5335 F.open.apply( this, arguments ); 5336 }, 5337 IE = navigator.userAgent.match(/msie/i), 5338 didUpdate = null, 5339 isTouch = document.createTouch !== undefined, 5340 5341 isQuery = function(obj) { 5342 return obj && obj.hasOwnProperty && obj instanceof $; 5343 }, 5344 isString = function(str) { 5345 return str && $.type(str) === "string"; 5346 }, 5347 isPercentage = function(str) { 5348 return isString(str) && str.indexOf('%') > 0;
vendor: 41,558 bytes, lines 5349-7004
5349 }, 5350 isScrollable = function(el) { 5351 return (el && !(el.style.overflow && el.style.overflow === 'hidden') && ((el.clientWidth && el.scrollWidth > el.clientWidth) || (el.clientHeight && el.scrollHeight > el.clientHeight))); 5352 }, 5353 getScalar = function(orig, dim) { 5354 var value = parseInt(orig, 10) || 0; 5355 5356 if (dim && isPercentage(orig)) { 5357 value = F.getViewport()[ dim ] / 100 * value; 5358 } 5359 5360 return Math.ceil(value); 5361 }, 5362 getValue = function(value, dim) { 5363 return getScalar(value, dim) + 'px'; 5364 }; 5365 5366 $.extend(F, { 5367 // The current version of fancyBox 5368 version: '2.1.5', 5369 5370 defaults: { 5371 padding : 15, 5372 margin : 20, 5373 5374 width : 800, 5375 height : 600, 5376 minWidth : 100, 5377 minHeight : 100, 5378 maxWidth : 9999, 5379 maxHeight : 9999, 5380 pixelRatio: 1, // Set to 2 for retina display support 5381 5382 autoSize : true, 5383 autoHeight : false, 5384 autoWidth : false, 5385 5386 autoResize : true, 5387 autoCenter : !isTouch, 5388 fitToView : true, 5389 aspectRatio : false, 5390 topRatio : 0.5, 5391 leftRatio : 0.5, 5392 5393 scrolling : 'auto', // 'auto', 'yes' or 'no' 5394 wrapCSS : '', 5395 5396 arrows : true, 5397 closeBtn : true, 5398 closeClick : false, 5399 nextClick : false, 5400 mouseWheel : true, 5401 autoPlay : false, 5402 playSpeed : 3000, 5403 preload : 3, 5404 modal : false, 5405 loop : true, 5406 5407 ajax : { 5408 dataType : 'html', 5409 headers : { 'X-fancyBox': true } 5410 }, 5411 iframe : { 5412 scrolling : 'auto', 5413 preload : true 5414 }, 5415 swf : { 5416 wmode: 'transparent', 5417 allowfullscreen : 'true', 5418 allowscriptaccess : 'always' 5419 }, 5420 5421 keys : { 5422 next : { 5423 13 : 'left', // enter 5424 34 : 'up', // page down 5425 39 : 'left', // right arrow 5426 40 : 'up' // down arrow 5427 }, 5428 prev : { 5429 8 : 'right', // backspace 5430 33 : 'down', // page up 5431 37 : 'right', // left arrow 5432 38 : 'down' // up arrow 5433 }, 5434 close : [27], // escape key 5435 play : [32], // space - start/stop slideshow 5436 toggle : [70] // letter "f" - toggle fullscreen 5437 }, 5438 5439 direction : { 5440 next : 'left', 5441 prev : 'right' 5442 }, 5443 5444 scrollOutside : true, 5445 5446 // Override some properties 5447 index : 0, 5448 type : null, 5449 href : null, 5450 content : null, 5451 title : null, 5452 5453 // HTML templates 5454 tpl: { 5455 wrap : '<div class="fancybox-wrap" tabIndex="-1"><div class="fancybox-skin"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>', 5456 image : '<img class="fancybox-image" src="{href}" alt="" />', 5457 iframe : '<iframe id="fancybox-frame{rnd}" name="fancybox-frame{rnd}" class="fancybox-iframe" frameborder="0" vspace="0" hspace="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen' + (IE ? ' allowtransparency="true"' : '') + '></iframe>', 5458 error : '<p class="fancybox-error">The requested content cannot be loaded.<br/>Please try again later.</p>', 5459 closeBtn : '<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>', 5460 next : '<a title="Next" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>', 5461 prev : '<a title="Previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>' 5462 }, 5463 5464 // Properties for each animation type 5465 // Opening fancyBox 5466 openEffect : 'fade', // 'elastic', 'fade' or 'none' 5467 openSpeed : 250, 5468 openEasing : 'swing', 5469 openOpacity : true, 5470 openMethod : 'zoomIn', 5471 5472 // Closing fancyBox 5473 closeEffect : 'fade', // 'elastic', 'fade' or 'none' 5474 closeSpeed : 250, 5475 closeEasing : 'swing', 5476 closeOpacity : true, 5477 closeMethod : 'zoomOut', 5478 5479 // Changing next gallery item 5480 nextEffect : 'elastic', // 'elastic', 'fade' or 'none' 5481 nextSpeed : 250, 5482 nextEasing : 'swing', 5483 nextMethod : 'changeIn', 5484 5485 // Changing previous gallery item 5486 prevEffect : 'elastic', // 'elastic', 'fade' or 'none' 5487 prevSpeed : 250, 5488 prevEasing : 'swing', 5489 prevMethod : 'changeOut', 5490 5491 // Enable default helpers 5492 helpers : { 5493 overlay : true, 5494 title : true 5495 }, 5496 5497 // Callbacks 5498 onCancel : $.noop, // If canceling 5499 beforeLoad : $.noop, // Before loading 5500 afterLoad : $.noop, // After loading 5501 beforeShow : $.noop, // Before changing in current item 5502 afterShow : $.noop, // After opening 5503 beforeChange : $.noop, // Before changing gallery item 5504 beforeClose : $.noop, // Before closing 5505 afterClose : $.noop // After closing 5506 }, 5507 5508 //Current state 5509 group : {}, // Selected group 5510 opts : {}, // Group options 5511 previous : null, // Previous element 5512 coming : null, // Element being loaded 5513 current : null, // Currently loaded element 5514 isActive : false, // Is activated 5515 isOpen : false, // Is currently open 5516 isOpened : false, // Have been fully opened at least once 5517 5518 wrap : null, 5519 skin : null, 5520 outer : null, 5521 inner : null, 5522 5523 player : { 5524 timer : null, 5525 isActive : false 5526 }, 5527 5528 // Loaders 5529 ajaxLoad : null, 5530 imgPreload : null, 5531 5532 // Some collections 5533 transitions : {}, 5534 helpers : {}, 5535 5536 /* 5537 * Static methods 5538 */ 5539 5540 open: function (group, opts) { 5541 if (!group) { 5542 return; 5543 } 5544 5545 if (!$.isPlainObject(opts)) { 5546 opts = {}; 5547 } 5548 5549 // Close if already active 5550 if (false === F.close(true)) { 5551 return; 5552 } 5553 5554 // Normalize group 5555 if (!$.isArray(group)) { 5556 group = isQuery(group) ? $(group).get() : [group]; 5557 } 5558 5559 // Recheck if the type of each element is `object` and set content type (image, ajax, etc) 5560 $.each(group, function(i, element) { 5561 var obj = {}, 5562 href, 5563 title, 5564 content, 5565 type, 5566 rez, 5567 hrefParts, 5568 selector; 5569 5570 if ($.type(element) === "object") { 5571 // Check if is DOM element 5572 if (element.nodeType) { 5573 element = $(element); 5574 } 5575 5576 if (isQuery(element)) { 5577 obj = { 5578 href : element.data('fancybox-href') || element.attr('href'), 5579 title : element.data('fancybox-title') || element.attr('title'), 5580 isDom : true, 5581 element : element 5582 }; 5583 5584 if ($.metadata) { 5585 $.extend(true, obj, element.metadata()); 5586 } 5587 5588 } else { 5589 obj = element; 5590 } 5591 } 5592 5593 href = opts.href || obj.href || (isString(element) ? element : null); 5594 title = opts.title !== undefined ? opts.title : obj.title || ''; 5595 5596 content = opts.content || obj.content; 5597 type = content ? 'html' : (opts.type || obj.type); 5598 5599 if (!type && obj.isDom) { 5600 type = element.data('fancybox-type'); 5601 5602 if (!type) { 5603 rez = element.prop('class').match(/fancybox\.(\w+)/); 5604 type = rez ? rez[1] : null; 5605 } 5606 } 5607 5608 if (isString(href)) { 5609 // Try to guess the content type 5610 if (!type) { 5611 if (F.isImage(href)) { 5612 type = 'image'; 5613 5614 } else if (F.isSWF(href)) { 5615 type = 'swf'; 5616 5617 } else if (href.charAt(0) === '#') { 5618 type = 'inline'; 5619 5620 } else if (isString(element)) { 5621 type = 'html'; 5622 content = element; 5623 } 5624 } 5625 5626 // Split url into two pieces with source url and content selector, e.g, 5627 // "/mypage.html #my_id" will load "/mypage.html" and display element having id "my_id" 5628 if (type === 'ajax') { 5629 hrefParts = href.split(/\s+/, 2); 5630 href = hrefParts.shift(); 5631 selector = hrefParts.shift(); 5632 } 5633 } 5634 5635 if (!content) { 5636 if (type === 'inline') { 5637 if (href) { 5638 content = $( isString(href) ? href.replace(/.*(?=#[^\s]+$)/, '') : href ); //strip for ie7 5639 5640 } else if (obj.isDom) { 5641 content = element; 5642 } 5643 5644 } else if (type === 'html') { 5645 content = href; 5646 5647 } else if (!type && !href && obj.isDom) { 5648 type = 'inline'; 5649 content = element; 5650 } 5651 } 5652 5653 $.extend(obj, { 5654 href : href, 5655 type : type, 5656 content : content, 5657 title : title, 5658 selector : selector 5659 }); 5660 5661 group[ i ] = obj; 5662 }); 5663 5664 // Extend the defaults 5665 F.opts = $.extend(true, {}, F.defaults, opts); 5666 5667 // All options are merged recursive except keys 5668 if (opts.keys !== undefined) { 5669 F.opts.keys = opts.keys ? $.extend({}, F.defaults.keys, opts.keys) : false; 5670 } 5671 5672 F.group = group; 5673 5674 return F._start(F.opts.index); 5675 }, 5676 5677 // Cancel image loading or abort ajax request 5678 cancel: function () { 5679 var coming = F.coming; 5680 5681 if (!coming || false === F.trigger('onCancel')) { 5682 return; 5683 } 5684 5685 F.hideLoading(); 5686 5687 if (F.ajaxLoad) { 5688 F.ajaxLoad.abort(); 5689 } 5690 5691 F.ajaxLoad = null; 5692 5693 if (F.imgPreload) { 5694 F.imgPreload.onload = F.imgPreload.onerror = null; 5695 } 5696 5697 if (coming.wrap) { 5698 coming.wrap.stop(true, true).trigger('onReset').remove(); 5699 } 5700 5701 F.coming = null; 5702 5703 // If the first item has been canceled, then clear everything 5704 if (!F.current) { 5705 F._afterZoomOut( coming ); 5706 } 5707 }, 5708 5709 // Start closing animation if is open; remove immediately if opening/closing 5710 close: function (event) { 5711 F.cancel(); 5712 5713 if (false === F.trigger('beforeClose')) { 5714 return; 5715 } 5716 5717 F.unbindEvents(); 5718 5719 if (!F.isActive) { 5720 return; 5721 } 5722 5723 if (!F.isOpen || event === true) { 5724 $('.fancybox-wrap').stop(true).trigger('onReset').remove(); 5725 5726 F._afterZoomOut(); 5727 5728 } else { 5729 F.isOpen = F.isOpened = false; 5730 F.isClosing = true; 5731 5732 $('.fancybox-item, .fancybox-nav').remove(); 5733 5734 F.wrap.stop(true, true).removeClass('fancybox-opened'); 5735 5736 F.transitions[ F.current.closeMethod ](); 5737 } 5738 }, 5739 5740 // Manage slideshow: 5741 // $.fancybox.play(); - toggle slideshow 5742 // $.fancybox.play( true ); - start 5743 // $.fancybox.play( false ); - stop 5744 play: function ( action ) { 5745 var clear = function () { 5746 clearTimeout(F.player.timer); 5747 }, 5748 set = function () { 5749 clear(); 5750 5751 if (F.current && F.player.isActive) { 5752 F.player.timer = setTimeout(F.next, F.current.playSpeed); 5753 } 5754 }, 5755 stop = function () { 5756 clear(); 5757 5758 D.unbind('.player'); 5759 5760 F.player.isActive = false; 5761 5762 F.trigger('onPlayEnd'); 5763 }, 5764 start = function () { 5765 if (F.current && (F.current.loop || F.current.index < F.group.length - 1)) { 5766 F.player.isActive = true; 5767 5768 D.bind({ 5769 'onCancel.player beforeClose.player' : stop, 5770 'onUpdate.player' : set, 5771 'beforeLoad.player' : clear 5772 }); 5773 5774 set(); 5775 5776 F.trigger('onPlayStart'); 5777 } 5778 }; 5779 5780 if (action === true || (!F.player.isActive && action !== false)) { 5781 start(); 5782 } else { 5783 stop(); 5784 } 5785 }, 5786 5787 // Navigate to next gallery item 5788 next: function ( direction ) { 5789 var current = F.current; 5790 5791 if (current) { 5792 if (!isString(direction)) { 5793 direction = current.direction.next; 5794 } 5795 5796 F.jumpto(current.index + 1, direction, 'next'); 5797 } 5798 }, 5799 5800 // Navigate to previous gallery item 5801 prev: function ( direction ) { 5802 var current = F.current; 5803 5804 if (current) { 5805 if (!isString(direction)) { 5806 direction = current.direction.prev; 5807 } 5808 5809 F.jumpto(current.index - 1, direction, 'prev'); 5810 } 5811 }, 5812 5813 // Navigate to gallery item by index 5814 jumpto: function ( index, direction, router ) { 5815 var current = F.current; 5816 5817 if (!current) { 5818 return; 5819 } 5820 5821 index = getScalar(index); 5822 5823 F.direction = direction || current.direction[ (index >= current.index ? 'next' : 'prev') ]; 5824 F.router = router || 'jumpto'; 5825 5826 if (current.loop) { 5827 if (index < 0) { 5828 index = current.group.length + (index % current.group.length); 5829 } 5830 5831 index = index % current.group.length; 5832 } 5833 5834 if (current.group[ index ] !== undefined) { 5835 F.cancel(); 5836 5837 F._start(index); 5838 } 5839 }, 5840 5841 // Center inside viewport and toggle position type to fixed or absolute if needed 5842 reposition: function (e, onlyAbsolute) { 5843 var current = F.current, 5844 wrap = current ? current.wrap : null, 5845 pos; 5846 5847 if (wrap) { 5848 pos = F._getPosition(onlyAbsolute); 5849 5850 if (e && e.type === 'scroll') { 5851 delete pos.position; 5852 5853 wrap.stop(true, true).animate(pos, 200); 5854 5855 } else { 5856 wrap.css(pos); 5857 5858 current.pos = $.extend({}, current.dim, pos); 5859 } 5860 } 5861 }, 5862 5863 update: function (e) { 5864 var type = (e && e.type), 5865 anyway = !type || type === 'orientationchange'; 5866 5867 if (anyway) { 5868 clearTimeout(didUpdate); 5869 5870 didUpdate = null; 5871 } 5872 5873 if (!F.isOpen || didUpdate) { 5874 return; 5875 } 5876 5877 didUpdate = setTimeout(function() { 5878 var current = F.current; 5879 5880 if (!current || F.isClosing) { 5881 return; 5882 } 5883 5884 F.wrap.removeClass('fancybox-tmp'); 5885 5886 if (anyway || type === 'load' || (type === 'resize' && current.autoResize)) { 5887 F._setDimension(); 5888 } 5889 5890 if (!(type === 'scroll' && current.canShrink)) { 5891 F.reposition(e); 5892 } 5893 5894 F.trigger('onUpdate'); 5895 5896 didUpdate = null; 5897 5898 }, (anyway && !isTouch ? 0 : 300)); 5899 }, 5900 5901 // Shrink content to fit inside viewport or restore if resized 5902 toggle: function ( action ) { 5903 if (F.isOpen) { 5904 F.current.fitToView = $.type(action) === "boolean" ? action : !F.current.fitToView; 5905 5906 // Help browser to restore document dimensions 5907 if (isTouch) { 5908 F.wrap.removeAttr('style').addClass('fancybox-tmp'); 5909 5910 F.trigger('onUpdate'); 5911 } 5912 5913 F.update(); 5914 } 5915 }, 5916 5917 hideLoading: function () { 5918 D.unbind('.loading'); 5919 5920 $('#fancybox-loading').remove(); 5921 }, 5922 5923 showLoading: function () { 5924 var el, viewport; 5925 5926 F.hideLoading(); 5927 5928 el = $('<div id="fancybox-loading"><div></div></div>').click(F.cancel).appendTo('body'); 5929 5930 // If user will press the escape-button, the request will be canceled 5931 D.bind('keydown.loading', function(e) { 5932 if ((e.which || e.keyCode) === 27) { 5933 e.preventDefault(); 5934 5935 F.cancel(); 5936 } 5937 }); 5938 5939 if (!F.defaults.fixed) { 5940 viewport = F.getViewport(); 5941 5942 el.css({ 5943 position : 'absolute', 5944 top : (viewport.h * 0.5) + viewport.y, 5945 left : (viewport.w * 0.5) + viewport.x 5946 }); 5947 } 5948 }, 5949 5950 getViewport: function () { 5951 var locked = (F.current && F.current.locked) || false, 5952 rez = { 5953 x: W.scrollLeft(), 5954 y: W.scrollTop() 5955 }; 5956 5957 if (locked) { 5958 rez.w = locked[0].clientWidth; 5959 rez.h = locked[0].clientHeight; 5960 5961 } else { 5962 // See http://bugs.jquery.com/ticket/6724 5963 rez.w = isTouch && window.innerWidth ? window.innerWidth : W.width(); 5964 rez.h = isTouch && window.innerHeight ? window.innerHeight : W.height(); 5965 } 5966 5967 return rez; 5968 }, 5969 5970 // Unbind the keyboard / clicking actions 5971 unbindEvents: function () { 5972 if (F.wrap && isQuery(F.wrap)) { 5973 F.wrap.unbind('.fb'); 5974 } 5975 5976 D.unbind('.fb'); 5977 W.unbind('.fb'); 5978 }, 5979 5980 bindEvents: function () { 5981 var current = F.current, 5982 keys; 5983 5984 if (!current) { 5985 return; 5986 } 5987 5988 // Changing document height on iOS devices triggers a 'resize' event, 5989 // that can change document height... repeating infinitely 5990 W.bind('orientationchange.fb' + (isTouch ? '' : ' resize.fb') + (current.autoCenter && !current.locked ? ' scroll.fb' : ''), F.update); 5991 5992 keys = current.keys; 5993 5994 if (keys) { 5995 D.bind('keydown.fb', function (e) { 5996 var code = e.which || e.keyCode, 5997 target = e.target || e.srcElement; 5998 5999 // Skip esc key if loading, because showLoading will cancel preloading 6000 if (code === 27 && F.coming) { 6001 return false; 6002 } 6003 6004 // Ignore key combinations and key events within form elements 6005 if (!e.ctrlKey && !e.altKey && !e.shiftKey && !e.metaKey && !(target && (target.type || $(target).is('[contenteditable]')))) { 6006 $.each(keys, function(i, val) { 6007 if (current.group.length > 1 && val[ code ] !== undefined) { 6008 F[ i ]( val[ code ] ); 6009 6010 e.preventDefault(); 6011 return false; 6012 } 6013 6014 if ($.inArray(code, val) > -1) { 6015 F[ i ] (); 6016 6017 e.preventDefault(); 6018 return false; 6019 } 6020 }); 6021 } 6022 }); 6023 } 6024 6025 if ($.fn.mousewheel && current.mouseWheel) { 6026 F.wrap.bind('mousewheel.fb', function (e, delta, deltaX, deltaY) { 6027 var target = e.target || null, 6028 parent = $(target), 6029 canScroll = false; 6030 6031 while (parent.length) { 6032 if (canScroll || parent.is('.fancybox-skin') || parent.is('.fancybox-wrap')) { 6033 break; 6034 } 6035 6036 canScroll = isScrollable( parent[0] ); 6037 parent = $(parent).parent(); 6038 } 6039 6040 if (delta !== 0 && !canScroll) { 6041 if (F.group.length > 1 && !current.canShrink) { 6042 if (deltaY > 0 || deltaX > 0) { 6043 F.prev( deltaY > 0 ? 'down' : 'left' ); 6044 6045 } else if (deltaY < 0 || deltaX < 0) { 6046 F.next( deltaY < 0 ? 'up' : 'right' ); 6047 } 6048 6049 e.preventDefault(); 6050 } 6051 } 6052 }); 6053 } 6054 }, 6055 6056 trigger: function (event, o) { 6057 var ret, obj = o || F.coming || F.current; 6058 6059 if (!obj) { 6060 return; 6061 } 6062 6063 if ($.isFunction( obj[event] )) { 6064 ret = obj[event].apply(obj, Array.prototype.slice.call(arguments, 1)); 6065 } 6066 6067 if (ret === false) { 6068 return false; 6069 } 6070 6071 if (obj.helpers) { 6072 $.each(obj.helpers, function (helper, opts) { 6073 if (opts && F.helpers[helper] && $.isFunction(F.helpers[helper][event])) { 6074 F.helpers[helper][event]($.extend(true, {}, F.helpers[helper].defaults, opts), obj); 6075 } 6076 }); 6077 } 6078 6079 D.trigger(event); 6080 }, 6081 6082 isImage: function (str) { 6083 return isString(str) && str.match(/(^data:image\/.*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg)((\?|#).*)?$)/i); 6084 }, 6085 6086 isSWF: function (str) { 6087 return isString(str) && str.match(/\.(swf)((\?|#).*)?$/i); 6088 }, 6089 6090 _start: function (index) { 6091 var coming = {}, 6092 obj, 6093 href, 6094 type, 6095 margin, 6096 padding; 6097 6098 index = getScalar( index ); 6099 obj = F.group[ index ] || null; 6100 6101 if (!obj) { 6102 return false; 6103 } 6104 6105 coming = $.extend(true, {}, F.opts, obj); 6106 6107 // Convert margin and padding properties to array - top, right, bottom, left 6108 margin = coming.margin; 6109 padding = coming.padding; 6110 6111 if ($.type(margin) === 'number') { 6112 coming.margin = [margin, margin, margin, margin]; 6113 } 6114 6115 if ($.type(padding) === 'number') { 6116 coming.padding = [padding, padding, padding, padding]; 6117 } 6118 6119 // 'modal' propery is just a shortcut 6120 if (coming.modal) { 6121 $.extend(true, coming, { 6122 closeBtn : false, 6123 closeClick : false, 6124 nextClick : false, 6125 arrows : false, 6126 mouseWheel : false, 6127 keys : null, 6128 helpers: { 6129 overlay : { 6130 closeClick : false 6131 } 6132 } 6133 }); 6134 } 6135 6136 // 'autoSize' property is a shortcut, too 6137 if (coming.autoSize) { 6138 coming.autoWidth = coming.autoHeight = true; 6139 } 6140 6141 if (coming.width === 'auto') { 6142 coming.autoWidth = true; 6143 } 6144 6145 if (coming.height === 'auto') { 6146 coming.autoHeight = true; 6147 } 6148 6149 /* 6150 * Add reference to the group, so it`s possible to access from callbacks, example: 6151 * afterLoad : function() { 6152 * this.title = 'Image ' + (this.index + 1) + ' of ' + this.group.length + (this.title ? ' - ' + this.title : ''); 6153 * } 6154 */ 6155 6156 coming.group = F.group; 6157 coming.index = index; 6158 6159 // Give a chance for callback or helpers to update coming item (type, title, etc) 6160 F.coming = coming; 6161 6162 if (false === F.trigger('beforeLoad')) { 6163 F.coming = null; 6164 6165 return; 6166 } 6167 6168 type = coming.type; 6169 href = coming.href; 6170 6171 if (!type) { 6172 F.coming = null; 6173 6174 //If we can not determine content type then drop silently or display next/prev item if looping through gallery 6175 if (F.current && F.router && F.router !== 'jumpto') { 6176 F.current.index = index; 6177 6178 return F[ F.router ]( F.direction ); 6179 } 6180 6181 return false; 6182 } 6183 6184 F.isActive = true; 6185 6186 if (type === 'image' || type === 'swf') { 6187 coming.autoHeight = coming.autoWidth = false; 6188 coming.scrolling = 'visible'; 6189 } 6190 6191 if (type === 'image') { 6192 coming.aspectRatio = true; 6193 } 6194 6195 if (type === 'iframe' && isTouch) { 6196 coming.scrolling = 'scroll'; 6197 } 6198 6199 // Build the neccessary markup 6200 coming.wrap = $(coming.tpl.wrap).addClass('fancybox-' + (isTouch ? 'mobile' : 'desktop') + ' fancybox-type-' + type + ' fancybox-tmp ' + coming.wrapCSS).appendTo( coming.parent || 'body' ); 6201 6202 $.extend(coming, { 6203 skin : $('.fancybox-skin', coming.wrap), 6204 outer : $('.fancybox-outer', coming.wrap), 6205 inner : $('.fancybox-inner', coming.wrap) 6206 }); 6207 6208 $.each(["Top", "Right", "Bottom", "Left"], function(i, v) { 6209 coming.skin.css('padding' + v, getValue(coming.padding[ i ])); 6210 }); 6211 6212 F.trigger('onReady'); 6213 6214 // Check before try to load; 'inline' and 'html' types need content, others - href 6215 if (type === 'inline' || type === 'html') { 6216 if (!coming.content || !coming.content.length) { 6217 return F._error( 'content' ); 6218 } 6219 6220 } else if (!href) { 6221 return F._error( 'href' ); 6222 } 6223 6224 if (type === 'image') { 6225 F._loadImage(); 6226 6227 } else if (type === 'ajax') { 6228 F._loadAjax(); 6229 6230 } else if (type === 'iframe') { 6231 F._loadIframe(); 6232 6233 } else { 6234 F._afterLoad(); 6235 } 6236 }, 6237 6238 _error: function ( type ) { 6239 $.extend(F.coming, { 6240 type : 'html', 6241 autoWidth : true, 6242 autoHeight : true, 6243 minWidth : 0, 6244 minHeight : 0, 6245 scrolling : 'no', 6246 hasError : type, 6247 content : F.coming.tpl.error 6248 }); 6249 6250 F._afterLoad(); 6251 }, 6252 6253 _loadImage: function () { 6254 // Reset preload image so it is later possible to check "complete" property 6255 var img = F.imgPreload = new Image(); 6256 6257 img.onload = function () { 6258 this.onload = this.onerror = null; 6259 6260 F.coming.width = this.width / F.opts.pixelRatio; 6261 F.coming.height = this.height / F.opts.pixelRatio; 6262 6263 F._afterLoad(); 6264 }; 6265 6266 img.onerror = function () { 6267 this.onload = this.onerror = null; 6268 6269 F._error( 'image' ); 6270 }; 6271 6272 img.src = F.coming.href; 6273 6274 if (img.complete !== true) { 6275 F.showLoading(); 6276 } 6277 }, 6278 6279 _loadAjax: function () { 6280 var coming = F.coming; 6281 6282 F.showLoading(); 6283 6284 F.ajaxLoad = $.ajax($.extend({}, coming.ajax, { 6285 url: coming.href, 6286 error: function (jqXHR, textStatus) { 6287 if (F.coming && textStatus !== 'abort') { 6288 F._error( 'ajax', jqXHR ); 6289 6290 } else { 6291 F.hideLoading(); 6292 } 6293 }, 6294 success: function (data, textStatus) { 6295 if (textStatus === 'success') { 6296 coming.content = data; 6297 6298 F._afterLoad(); 6299 } 6300 } 6301 })); 6302 }, 6303 6304 _loadIframe: function() { 6305 var coming = F.coming, 6306 iframe = $(coming.tpl.iframe.replace(/\{rnd\}/g, new Date().getTime())) 6307 .attr('scrolling', isTouch ? 'auto' : coming.iframe.scrolling) 6308 .attr('src', coming.href); 6309 6310 // This helps IE 6311 $(coming.wrap).bind('onReset', function () { 6312 try { 6313 $(this).find('iframe').hide().attr('src', '//about:blank').end().empty(); 6314 } catch (e) {} 6315 }); 6316 6317 if (coming.iframe.preload) { 6318 F.showLoading(); 6319 6320 iframe.one('load', function() { 6321 $(this).data('ready', 1); 6322 6323 // iOS will lose scrolling if we resize 6324 if (!isTouch) { 6325 $(this).bind('load.fb', F.update); 6326 } 6327 6328 // Without this trick: 6329 // - iframe won't scroll on iOS devices 6330 // - IE7 sometimes displays empty iframe 6331 $(this).parents('.fancybox-wrap').width('100%').removeClass('fancybox-tmp').show(); 6332 6333 F._afterLoad(); 6334 }); 6335 } 6336 6337 coming.content = iframe.appendTo( coming.inner ); 6338 6339 if (!coming.iframe.preload) { 6340 F._afterLoad(); 6341 } 6342 }, 6343 6344 _preloadImages: function() { 6345 var group = F.group, 6346 current = F.current, 6347 len = group.length, 6348 cnt = current.preload ? Math.min(current.preload, len - 1) : 0, 6349 item, 6350 i; 6351 6352 for (i = 1; i <= cnt; i += 1) { 6353 item = group[ (current.index + i ) % len ]; 6354 6355 if (item.type === 'image' && item.href) { 6356 new Image().src = item.href; 6357 } 6358 } 6359 }, 6360 6361 _afterLoad: function () { 6362 var coming = F.coming, 6363 previous = F.current, 6364 placeholder = 'fancybox-placeholder', 6365 current, 6366 content, 6367 type, 6368 scrolling, 6369 href, 6370 embed; 6371 6372 F.hideLoading(); 6373 6374 if (!coming || F.isActive === false) { 6375 return; 6376 } 6377 6378 if (false === F.trigger('afterLoad', coming, previous)) { 6379 coming.wrap.stop(true).trigger('onReset').remove(); 6380 6381 F.coming = null; 6382 6383 return; 6384 } 6385 6386 if (previous) { 6387 F.trigger('beforeChange', previous); 6388 6389 previous.wrap.stop(true).removeClass('fancybox-opened') 6390 .find('.fancybox-item, .fancybox-nav') 6391 .remove(); 6392 } 6393 6394 F.unbindEvents(); 6395 6396 current = coming; 6397 content = coming.content; 6398 type = coming.type; 6399 scrolling = coming.scrolling; 6400 6401 $.extend(F, { 6402 wrap : current.wrap, 6403 skin : current.skin, 6404 outer : current.outer, 6405 inner : current.inner, 6406 current : current, 6407 previous : previous 6408 }); 6409 6410 href = current.href; 6411 6412 switch (type) { 6413 case 'inline': 6414 case 'ajax': 6415 case 'html': 6416 if (current.selector) { 6417 content = $('<div>').html(content).find(current.selector); 6418 6419 } else if (isQuery(content)) { 6420 if (!content.data(placeholder)) { 6421 content.data(placeholder, $('<div class="' + placeholder + '"></div>').insertAfter( content ).hide() ); 6422 } 6423 6424 content = content.show().detach(); 6425 6426 current.wrap.bind('onReset', function () { 6427 if ($(this).find(content).length) { 6428 content.hide().replaceAll( content.data(placeholder) ).data(placeholder, false); 6429 } 6430 }); 6431 } 6432 break; 6433 6434 case 'image': 6435 content = current.tpl.image.replace('{href}', href); 6436 break; 6437 6438 case 'swf': 6439 content = '<object id="fancybox-swf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%"><param name="movie" value="' + href + '"></param>'; 6440 embed = ''; 6441 6442 $.each(current.swf, function(name, val) { 6443 content += '<param name="' + name + '" value="' + val + '"></param>'; 6444 embed += ' ' + name + '="' + val + '"'; 6445 }); 6446 6447 content += '<embed src="' + href + '" type="application/x-shockwave-flash" width="100%" height="100%"' + embed + '></embed></object>'; 6448 break; 6449 } 6450 6451 if (!(isQuery(content) && content.parent().is(current.inner))) { 6452 current.inner.append( content ); 6453 } 6454 6455 // Give a chance for helpers or callbacks to update elements 6456 F.trigger('beforeShow'); 6457 6458 // Set scrolling before calculating dimensions 6459 current.inner.css('overflow', scrolling === 'yes' ? 'scroll' : (scrolling === 'no' ? 'hidden' : scrolling)); 6460 6461 // Set initial dimensions and start position 6462 F._setDimension(); 6463 6464 F.reposition(); 6465 6466 F.isOpen = false; 6467 F.coming = null; 6468 6469 F.bindEvents(); 6470 6471 if (!F.isOpened) { 6472 $('.fancybox-wrap').not( current.wrap ).stop(true).trigger('onReset').remove(); 6473 6474 } else if (previous.prevMethod) { 6475 F.transitions[ previous.prevMethod ](); 6476 } 6477 6478 F.transitions[ F.isOpened ? current.nextMethod : current.openMethod ](); 6479 6480 F._preloadImages(); 6481 }, 6482 6483 _setDimension: function () { 6484 var viewport = F.getViewport(), 6485 steps = 0, 6486 canShrink = false, 6487 canExpand = false, 6488 wrap = F.wrap, 6489 skin = F.skin, 6490 inner = F.inner, 6491 current = F.current, 6492 width = current.width, 6493 height = current.height, 6494 minWidth = current.minWidth, 6495 minHeight = current.minHeight, 6496 maxWidth = current.maxWidth, 6497 maxHeight = current.maxHeight, 6498 scrolling = current.scrolling, 6499 scrollOut = current.scrollOutside ? current.scrollbarWidth : 0, 6500 margin = current.margin, 6501 wMargin = getScalar(margin[1] + margin[3]), 6502 hMargin = getScalar(margin[0] + margin[2]), 6503 wPadding, 6504 hPadding, 6505 wSpace, 6506 hSpace, 6507 origWidth, 6508 origHeight, 6509 origMaxWidth, 6510 origMaxHeight, 6511 ratio, 6512 width_, 6513 height_, 6514 maxWidth_, 6515 maxHeight_, 6516 iframe, 6517 body; 6518 6519 // Reset dimensions so we could re-check actual size 6520 wrap.add(skin).add(inner).width('auto').height('auto').removeClass('fancybox-tmp'); 6521 6522 wPadding = getScalar(skin.outerWidth(true) - skin.width()); 6523 hPadding = getScalar(skin.outerHeight(true) - skin.height()); 6524 6525 // Any space between content and viewport (margin, padding, border, title) 6526 wSpace = wMargin + wPadding; 6527 hSpace = hMargin + hPadding; 6528 6529 origWidth = isPercentage(width) ? (viewport.w - wSpace) * getScalar(width) / 100 : width; 6530 origHeight = isPercentage(height) ? (viewport.h - hSpace) * getScalar(height) / 100 : height; 6531 6532 if (current.type === 'iframe') { 6533 iframe = current.content; 6534 6535 if (current.autoHeight && iframe.data('ready') === 1) { 6536 try { 6537 if (iframe[0].contentWindow.document.location) { 6538 inner.width( origWidth ).height(9999); 6539 6540 body = iframe.contents().find('body'); 6541 6542 if (scrollOut) { 6543 body.css('overflow-x', 'hidden'); 6544 } 6545 6546 origHeight = body.outerHeight(true); 6547 } 6548 6549 } catch (e) {} 6550 } 6551 6552 } else if (current.autoWidth || current.autoHeight) { 6553 inner.addClass( 'fancybox-tmp' ); 6554 6555 // Set width or height in case we need to calculate only one dimension 6556 if (!current.autoWidth) { 6557 inner.width( origWidth ); 6558 } 6559 6560 if (!current.autoHeight) { 6561 inner.height( origHeight ); 6562 } 6563 6564 if (current.autoWidth) { 6565 origWidth = inner.width(); 6566 } 6567 6568 if (current.autoHeight) { 6569 origHeight = inner.height(); 6570 } 6571 6572 inner.removeClass( 'fancybox-tmp' ); 6573 } 6574 6575 width = getScalar( origWidth ); 6576 height = getScalar( origHeight ); 6577 6578 ratio = origWidth / origHeight; 6579 6580 // Calculations for the content 6581 minWidth = getScalar(isPercentage(minWidth) ? getScalar(minWidth, 'w') - wSpace : minWidth); 6582 maxWidth = getScalar(isPercentage(maxWidth) ? getScalar(maxWidth, 'w') - wSpace : maxWidth); 6583 6584 minHeight = getScalar(isPercentage(minHeight) ? getScalar(minHeight, 'h') - hSpace : minHeight); 6585 maxHeight = getScalar(isPercentage(maxHeight) ? getScalar(maxHeight, 'h') - hSpace : maxHeight); 6586 6587 // These will be used to determine if wrap can fit in the viewport 6588 origMaxWidth = maxWidth; 6589 origMaxHeight = maxHeight; 6590 6591 if (current.fitToView) { 6592 maxWidth = Math.min(viewport.w - wSpace, maxWidth); 6593 maxHeight = Math.min(viewport.h - hSpace, maxHeight); 6594 } 6595 6596 maxWidth_ = viewport.w - wMargin; 6597 maxHeight_ = viewport.h - hMargin; 6598 6599 if (current.aspectRatio) { 6600 if (width > maxWidth) { 6601 width = maxWidth; 6602 height = getScalar(width / ratio); 6603 } 6604 6605 if (height > maxHeight) { 6606 height = maxHeight; 6607 width = getScalar(height * ratio); 6608 } 6609 6610 if (width < minWidth) { 6611 width = minWidth; 6612 height = getScalar(width / ratio); 6613 } 6614 6615 if (height < minHeight) { 6616 height = minHeight; 6617 width = getScalar(height * ratio); 6618 } 6619 6620 } else { 6621 width = Math.max(minWidth, Math.min(width, maxWidth)); 6622 6623 if (current.autoHeight && current.type !== 'iframe') { 6624 inner.width( width ); 6625 6626 height = inner.height(); 6627 } 6628 6629 height = Math.max(minHeight, Math.min(height, maxHeight)); 6630 } 6631 6632 // Try to fit inside viewport (including the title) 6633 if (current.fitToView) { 6634 inner.width( width ).height( height ); 6635 6636 wrap.width( width + wPadding ); 6637 6638 // Real wrap dimensions 6639 width_ = wrap.width(); 6640 height_ = wrap.height(); 6641 6642 if (current.aspectRatio) { 6643 while ((width_ > maxWidth_ || height_ > maxHeight_) && width > minWidth && height > minHeight) { 6644 if (steps++ > 19) { 6645 break; 6646 } 6647 6648 height = Math.max(minHeight, Math.min(maxHeight, height - 10)); 6649 width = getScalar(height * ratio); 6650 6651 if (width < minWidth) { 6652 width = minWidth; 6653 height = getScalar(width / ratio); 6654 } 6655 6656 if (width > maxWidth) { 6657 width = maxWidth; 6658 height = getScalar(width / ratio); 6659 } 6660 6661 inner.width( width ).height( height ); 6662 6663 wrap.width( width + wPadding ); 6664 6665 width_ = wrap.width(); 6666 height_ = wrap.height(); 6667 } 6668 6669 } else { 6670 width = Math.max(minWidth, Math.min(width, width - (width_ - maxWidth_))); 6671 height = Math.max(minHeight, Math.min(height, height - (height_ - maxHeight_))); 6672 } 6673 } 6674 6675 if (scrollOut && scrolling === 'auto' && height < origHeight && (width + wPadding + scrollOut) < maxWidth_) { 6676 width += scrollOut; 6677 } 6678 6679 inner.width( width ).height( height ); 6680 6681 wrap.width( width + wPadding ); 6682 6683 width_ = wrap.width(); 6684 height_ = wrap.height(); 6685 6686 canShrink = (width_ > maxWidth_ || height_ > maxHeight_) && width > minWidth && height > minHeight; 6687 canExpand = current.aspectRatio ? (width < origMaxWidth && height < origMaxHeight && width < origWidth && height < origHeight) : ((width < origMaxWidth || height < origMaxHeight) && (width < origWidth || height < origHeight)); 6688 6689 $.extend(current, { 6690 dim : { 6691 width : getValue( width_ ), 6692 height : getValue( height_ ) 6693 }, 6694 origWidth : origWidth, 6695 origHeight : origHeight, 6696 canShrink : canShrink, 6697 canExpand : canExpand, 6698 wPadding : wPadding, 6699 hPadding : hPadding, 6700 wrapSpace : height_ - skin.outerHeight(true), 6701 skinSpace : skin.height() - height 6702 }); 6703 6704 if (!iframe && current.autoHeight && height > minHeight && height < maxHeight && !canExpand) { 6705 inner.height('auto'); 6706 } 6707 }, 6708 6709 _getPosition: function (onlyAbsolute) { 6710 var current = F.current, 6711 viewport = F.getViewport(), 6712 margin = current.margin, 6713 width = F.wrap.width() + margin[1] + margin[3], 6714 height = F.wrap.height() + margin[0] + margin[2], 6715 rez = { 6716 position: 'absolute', 6717 top : margin[0], 6718 left : margin[3] 6719 }; 6720 6721 if (current.autoCenter && current.fixed && !onlyAbsolute && height <= viewport.h && width <= viewport.w) { 6722 rez.position = 'fixed'; 6723 6724 } else if (!current.locked) { 6725 rez.top += viewport.y; 6726 rez.left += viewport.x; 6727 } 6728 6729 rez.top = getValue(Math.max(rez.top, rez.top + ((viewport.h - height) * current.topRatio))); 6730 rez.left = getValue(Math.max(rez.left, rez.left + ((viewport.w - width) * current.leftRatio))); 6731 6732 return rez; 6733 }, 6734 6735 _afterZoomIn: function () { 6736 var current = F.current; 6737 6738 if (!current) { 6739 return; 6740 } 6741 6742 F.isOpen = F.isOpened = true; 6743 6744 F.wrap.css('overflow', 'visible').addClass('fancybox-opened'); 6745 6746 F.update(); 6747 6748 // Assign a click event 6749 if ( current.closeClick || (current.nextClick && F.group.length > 1) ) { 6750 F.inner.css('cursor', 'pointer').bind('click.fb', function(e) { 6751 if (!$(e.target).is('a') && !$(e.target).parent().is('a')) { 6752 e.preventDefault(); 6753 6754 F[ current.closeClick ? 'close' : 'next' ](); 6755 } 6756 }); 6757 } 6758 6759 // Create a close button 6760 if (current.closeBtn) { 6761 $(current.tpl.closeBtn).appendTo(F.skin).bind('click.fb', function(e) { 6762 e.preventDefault(); 6763 6764 F.close(); 6765 }); 6766 } 6767 6768 // Create navigation arrows 6769 if (current.arrows && F.group.length > 1) { 6770 if (current.loop || current.index > 0) { 6771 $(current.tpl.prev).appendTo(F.outer).bind('click.fb', F.prev); 6772 } 6773 6774 if (current.loop || current.index < F.group.length - 1) { 6775 $(current.tpl.next).appendTo(F.outer).bind('click.fb', F.next); 6776 } 6777 } 6778 6779 F.trigger('afterShow'); 6780 6781 // Stop the slideshow if this is the last item 6782 if (!current.loop && current.index === current.group.length - 1) { 6783 F.play( false ); 6784 6785 } else if (F.opts.autoPlay && !F.player.isActive) { 6786 F.opts.autoPlay = false; 6787 6788 F.play(); 6789 } 6790 }, 6791 6792 _afterZoomOut: function ( obj ) { 6793 obj = obj || F.current; 6794 6795 $('.fancybox-wrap').trigger('onReset').remove(); 6796 6797 $.extend(F, { 6798 group : {}, 6799 opts : {}, 6800 router : false, 6801 current : null, 6802 isActive : false, 6803 isOpened : false, 6804 isOpen : false, 6805 isClosing : false, 6806 wrap : null, 6807 skin : null, 6808 outer : null, 6809 inner : null 6810 }); 6811 6812 F.trigger('afterClose', obj); 6813 } 6814 }); 6815 6816 /* 6817 * Default transitions 6818 */ 6819 6820 F.transitions = { 6821 getOrigPosition: function () { 6822 var current = F.current, 6823 element = current.element, 6824 orig = current.orig, 6825 pos = {}, 6826 width = 50, 6827 height = 50, 6828 hPadding = current.hPadding, 6829 wPadding = current.wPadding, 6830 viewport = F.getViewport(); 6831 6832 if (!orig && current.isDom && element.is(':visible')) { 6833 orig = element.find('img:first'); 6834 6835 if (!orig.length) { 6836 orig = element; 6837 } 6838 } 6839 6840 if (isQuery(orig)) { 6841 pos = orig.offset(); 6842 6843 if (orig.is('img')) { 6844 width = orig.outerWidth(); 6845 height = orig.outerHeight(); 6846 } 6847 6848 } else { 6849 pos.top = viewport.y + (viewport.h - height) * current.topRatio; 6850 pos.left = viewport.x + (viewport.w - width) * current.leftRatio; 6851 } 6852 6853 if (F.wrap.css('position') === 'fixed' || current.locked) { 6854 pos.top -= viewport.y; 6855 pos.left -= viewport.x; 6856 } 6857 6858 pos = { 6859 top : getValue(pos.top - hPadding * current.topRatio), 6860 left : getValue(pos.left - wPadding * current.leftRatio), 6861 width : getValue(width + wPadding), 6862 height : getValue(height + hPadding) 6863 }; 6864 6865 return pos; 6866 }, 6867 6868 step: function (now, fx) { 6869 var ratio, 6870 padding, 6871 value, 6872 prop = fx.prop, 6873 current = F.current, 6874 wrapSpace = current.wrapSpace, 6875 skinSpace = current.skinSpace; 6876 6877 if (prop === 'width' || prop === 'height') { 6878 ratio = fx.end === fx.start ? 1 : (now - fx.start) / (fx.end - fx.start); 6879 6880 if (F.isClosing) { 6881 ratio = 1 - ratio; 6882 } 6883 6884 padding = prop === 'width' ? current.wPadding : current.hPadding; 6885 value = now - padding; 6886 6887 F.skin[ prop ]( getScalar( prop === 'width' ? value : value - (wrapSpace * ratio) ) ); 6888 F.inner[ prop ]( getScalar( prop === 'width' ? value : value - (wrapSpace * ratio) - (skinSpace * ratio) ) ); 6889 } 6890 }, 6891 6892 zoomIn: function () { 6893 var current = F.current, 6894 startPos = current.pos, 6895 effect = current.openEffect, 6896 elastic = effect === 'elastic', 6897 endPos = $.extend({opacity : 1}, startPos); 6898 6899 // Remove "position" property that breaks older IE 6900 delete endPos.position; 6901 6902 if (elastic) { 6903 startPos = this.getOrigPosition(); 6904 6905 if (current.openOpacity) { 6906 startPos.opacity = 0.1; 6907 } 6908 6909 } else if (effect === 'fade') { 6910 startPos.opacity = 0.1; 6911 } 6912 6913 F.wrap.css(startPos).animate(endPos, { 6914 duration : effect === 'none' ? 0 : current.openSpeed, 6915 easing : current.openEasing, 6916 step : elastic ? this.step : null, 6917 complete : F._afterZoomIn 6918 }); 6919 }, 6920 6921 zoomOut: function () { 6922 var current = F.current, 6923 effect = current.closeEffect, 6924 elastic = effect === 'elastic', 6925 endPos = {opacity : 0.1}; 6926 6927 if (elastic) { 6928 endPos = this.getOrigPosition(); 6929 6930 if (current.closeOpacity) { 6931 endPos.opacity = 0.1; 6932 } 6933 } 6934 6935 F.wrap.animate(endPos, { 6936 duration : effect === 'none' ? 0 : current.closeSpeed, 6937 easing : current.closeEasing, 6938 step : elastic ? this.step : null, 6939 complete : F._afterZoomOut 6940 }); 6941 }, 6942 6943 changeIn: function () { 6944 var current = F.current, 6945 effect = current.nextEffect, 6946 startPos = current.pos, 6947 endPos = { opacity : 1 }, 6948 direction = F.direction, 6949 distance = 200, 6950 field; 6951 6952 startPos.opacity = 0.1; 6953 6954 if (effect === 'elastic') { 6955 field = direction === 'down' || direction === 'up' ? 'top' : 'left'; 6956 6957 if (direction === 'down' || direction === 'right') { 6958 startPos[ field ] = getValue(getScalar(startPos[ field ]) - distance); 6959 endPos[ field ] = '+=' + distance + 'px'; 6960 6961 } else { 6962 startPos[ field ] = getValue(getScalar(startPos[ field ]) + distance); 6963 endPos[ field ] = '-=' + distance + 'px'; 6964 } 6965 } 6966 6967 // Workaround for http://bugs.jquery.com/ticket/12273 6968 if (effect === 'none') { 6969 F._afterZoomIn(); 6970 6971 } else { 6972 F.wrap.css(startPos).animate(endPos, { 6973 duration : current.nextSpeed, 6974 easing : current.nextEasing, 6975 complete : F._afterZoomIn 6976 }); 6977 } 6978 }, 6979 6980 changeOut: function () { 6981 var previous = F.previous, 6982 effect = previous.prevEffect, 6983 endPos = { opacity : 0.1 }, 6984 direction = F.direction, 6985 distance = 200; 6986 6987 if (effect === 'elastic') { 6988 endPos[ direction === 'down' || direction === 'up' ? 'top' : 'left' ] = ( direction === 'up' || direction === 'left' ? '-' : '+' ) + '=' + distance + 'px'; 6989 } 6990 6991 previous.wrap.animate(endPos, { 6992 duration : effect === 'none' ? 0 : previous.prevSpeed, 6993 easing : previous.prevEasing, 6994 complete : function () { 6995 $(this).trigger('onReset').remove(); 6996 } 6997 }); 6998 } 6999 }; 7000 7001 /* 7002 * Overlay helper 7003 */ 7004
7005 F.helpers.overlay = { 7006 defaults : { 7007 closeClick : true, // if true, fancyBox will be closed when user clicks on the overlay 7008 speedOut : 200, // duration of fadeOut animation 7009 showEarly : true, // indicates if should be opened immediately or wait until the content is ready 7010 css : {}, // custom CSS properties 7011 locked : !isTouch, // if true, the content will be locked into overlay 7012 fixed : true // if false, the overlay CSS position property will not be set to "fixed" 7013 }, 7014 7015 overlay : null, // current handle 7016 fixed : false, // indicates if the overlay has position "fixed" 7017 el : $('html'), // element that contains "the lock" 7018 7019 // Public methods 7020 create : function(opts) { 7021 opts = $.extend({}, this.defaults, opts); 7022 7023 if (this.overlay) { 7024 this.close(); 7025 } 7026 7027 this.overlay = $('<div class="fancybox-overlay"></div>').appendTo( F.coming ? F.coming.parent : opts.parent ); 7028 this.fixed = false; 7029 7030 if (opts.fixed && F.defaults.fixed) { 7031 this.overlay.addClass('fancybox-overlay-fixed'); 7032 7033 this.fixed = true; 7034 } 7035 }, 7036 7037 open : function(opts) { 7038 var that = this; 7039 7040 opts = $.extend({}, this.defaults, opts); 7041 7042 if (this.overlay) { 7043 this.overlay.unbind('.overlay').width('auto').height('auto'); 7044 7045 } else { 7046 this.create(opts); 7047 } 7048 7049 if (!this.fixed) { 7050 W.bind('resize.overlay', $.proxy( this.update, this) ); 7051 7052 this.update(); 7053 } 7054 7055 if (opts.closeClick) { 7056 this.overlay.bind('click.overlay', function(e) { 7057 if ($(e.target).hasClass('fancybox-overlay')) { 7058 if (F.isActive) { 7059 F.close(); 7060 } else { 7061 that.close(); 7062 } 7063 7064 return false; 7065 } 7066 }); 7067 } 7068 7069 this.overlay.css( opts.css ).show(); 7070 }, 7071 7072 close : function() { 7073 var scrollV, scrollH; 7074 7075 W.unbind('resize.overlay'); 7076 7077 if (this.el.hasClass('fancybox-lock')) { 7078 $('.fancybox-margin').removeClass('fancybox-margin'); 7079 7080 scrollV = W.scrollTop(); 7081 scrollH = W.scrollLeft(); 7082 7083 this.el.removeClass('fancybox-lock'); 7084 7085 W.scrollTop( scrollV ).scrollLeft( scrollH ); 7086 } 7087 7088 $('.fancybox-overlay').remove().hide(); 7089 7090 $.extend(this, { 7091 overlay : null, 7092 fixed : false 7093 }); 7094 }, 7095 7096 // Private, callbacks 7097 7098 update : function () { 7099 var width = '100%', offsetWidth; 7100 7101 // Reset width/height so it will not mess 7102 this.overlay.width(width).height('100%'); 7103 7104 // jQuery does not return reliable result for IE 7105 if (IE) { 7106 offsetWidth = Math.max(document.documentElement.offsetWidth, document.body.offsetWidth); 7107 7108 if (D.width() > offsetWidth) { 7109 width = D.width(); 7110 } 7111 7112 } else if (D.width() > W.width()) { 7113 width = D.width(); 7114 } 7115 7116 this.overlay.width(width).height(D.height()); 7117 }, 7118 7119 // This is where we can manipulate DOM, because later it would cause iframes to reload 7120 onReady : function (opts, obj) { 7121 var overlay = this.overlay; 7122 7123 $('.fancybox-overlay').stop(true, true); 7124 7125 if (!overlay) { 7126 this.create(opts); 7127 } 7128 7129 if (opts.locked && this.fixed && obj.fixed) { 7130 if (!overlay) { 7131 this.margin = D.height() > W.height() ? $('html').css('margin-right').replace("px", "") : false; 7132 } 7133 7134 obj.locked = this.overlay.append( obj.wrap ); 7135 obj.fixed = false; 7136 } 7137 7138 if (opts.showEarly === true) { 7139 this.beforeShow.apply(this, arguments); 7140 } 7141 }, 7142 7143 beforeShow : function(opts, obj) { 7144 var scrollV, scrollH; 7145 7146 if (obj.locked) { 7147 if (this.margin !== false) { 7148 $('*').filter(function(){ 7149 return ($(this).css('position') === 'fixed' && !$(this).hasClass("fancybox-overlay") && !$(this).hasClass("fancybox-wrap") ); 7150 }).addClass('fancybox-margin'); 7151 7152 this.el.addClass('fancybox-margin'); 7153 } 7154 7155 scrollV = W.scrollTop(); 7156 scrollH = W.scrollLeft(); 7157 7158 this.el.addClass('fancybox-lock'); 7159 7160 W.scrollTop( scrollV ).scrollLeft( scrollH ); 7161 } 7162 7163 this.open(opts); 7164 }, 7165 7166 onUpdate : function() { 7167 if (!this.fixed) { 7168 this.update(); 7169 } 7170 }, 7171 7172 afterClose: function (opts) { 7173 // Remove overlay if exists and fancyBox is not opening 7174 // (e.g., it is not being open using afterClose callback) 7175 //if (this.overlay && !F.isActive) { 7176 if (this.overlay && !F.coming) { 7177 this.overlay.fadeOut(opts.speedOut, $.proxy( this.close, this )); 7178 } 7179 } 7180 }; 7181 7182 /* 7183 * Title helper 7184 */ 7185 7186 F.helpers.title = { 7187 defaults : { 7188 type : 'float', // 'float', 'inside', 'outside' or 'over', 7189 position : 'bottom' // 'top' or 'bottom' 7190 }, 7191 7192 beforeShow: function (opts) { 7193 var current = F.current, 7194 text = current.title, 7195 type = opts.type, 7196 title, 7197 target; 7198 7199 if ($.isFunction(text)) { 7200 text = text.call(current.element, current); 7201 } 7202 7203 if (!isString(text) || $.trim(text) === '') { 7204 return; 7205 } 7206 7207 title = $('<div class="fancybox-title fancybox-title-' + type + '-wrap">
7207' + text + '</div>'); 7208 7209 switch (type) { 7210 case 'inside': 7211 target = F.skin; 7212 break; 7213 7214 case 'outside': 7215 target = F.wrap; 7216 break; 7217 7218 case 'over': 7219 target = F.inner; 7220 break; 7221 7222 default: // 'float' 7223 target = F.skin; 7224 7225 title.appendTo('body'); 7226 7227 if (IE) { 7228 title.width( title.width() ); 7229 } 7230 7231 title.wrapInner('<span class="child"></span>'); 7232 7233 //Increase bottom margin so this title will also fit into viewport 7234 F.current.margin[2] += Math.abs( getScalar(title.css('margin-bottom')) ); 7235 break; 7236 } 7237 7238 title[ (opts.position === 'top' ? 'prependTo' : 'appendTo') ](target); 7239 } 7240 }; 7241 7242 // jQuery plugin initialization 7243 $.fn.fancybox = function (options) { 7244 var index, 7245 that = $(this), 7246 selector = this.selector || '', 7247 run = function(e) { 7248 var what = $(this).blur(), idx = index, relType, relVal; 7249 7250 if (!(e.ctrlKey || e.altKey || e.shiftKey || e.metaKey) && !what.is('.fancybox-wrap')) { 7251 relType = options.groupAttr || 'data-fancybox-group'; 7252 relVal = what.attr(relType); 7253 7254 if (!relVal) { 7255 relType = 'rel'; 7256 relVal = what.get(0)[ relType ]; 7257 } 7258 7259 if (relVal && relVal !== '' && relVal !== 'nofollow') { 7260 what = selector.length ? $(selector) : that; 7261 what = what.filter('[' + relType + '="' + relVal + '"]'); 7262 idx = what.index(this); 7263 } 7264 7265 options.index = idx; 7266 7267 // Stop an event from bubbling if everything is fine 7268 if (F.open(what, options) !== false) { 7269 e.preventDefault(); 7270 } 7271 } 7272 }; 7273 7274 options = options || {}; 7275 index = options.index || 0; 7276 7277 if (!selector || options.live === false) { 7278 that.unbind('click.fb-start').bind('click.fb-start', run); 7279 7280 } else { 7281 D.undelegate(selector, 'click.fb-start').delegate(selector + ":not('.fancybox-item, .fancybox-nav')", 'click.fb-start', run); 7282 } 7283 7284 this.filter('[data-fancybox-start=1]').trigger('click'); 7285 7286 return this; 7287 }; 7288 7289 // Tests that need a body at doc ready 7290 D.ready(function() { 7291 var w1, w2; 7292 7293 if ( $.scrollbarWidth === undefined ) { 7294 // http://benalman.com/projects/jquery-misc-plugins/#scrollbarwidth 7295 $.scrollbarWidth = function() { 7296 var parent = $('<div style="width:50px;height:50px;overflow:auto"><div/></div>').appendTo('body'), 7297 child = parent.children(), 7298 width = child.innerWidth() - child.height( 99 ).innerWidth(); 7299 7300 parent.remove(); 7301 7302 return width; 7303 }; 7304 } 7305 7306 if ( $.support.fixedPosition === undefined ) { 7307 $.support.fixedPosition = (function() { 7308 var elem = $('<div style="position:fixed;top:20px;"></div>').appendTo('body'), 7309 fixed = ( elem[0].offsetTop === 20 || elem[0].offsetTop === 15 ); 7310 7311 elem.remove(); 7312 7313 return fixed; 7314 }()); 7315 } 7316 7317 $.extend(F.defaults, { 7318 scrollbarWidth : $.scrollbarWidth(), 7319 fixed : $.support.fixedPosition, 7320 parent : $('body') 7321 }); 7322 7323 //Get real width of page scroll-bar 7324 w1 = $(window).width(); 7325 7326 H.addClass('fancybox-lock-test'); 7327 7328 w2 = $(window).width(); 7329 7330 H.removeClass('fancybox-lock-test'); 7331 7332 $("<style type='text/css'>.fancybox-margin{margin-right:" + (w2 - w1) + "px;}</style>").appendTo("head"); 7333 }); 7334 7335}(window, document, jQuery)); 7336/*! Copyright (c) 2011 Brandon Aaron (http://brandonaaron.net) 7337 * Licensed under the MIT License (LICENSE.txt). 7338 * 7339 * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers. 7340 * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix. 7341 * Thanks to: Seamus Leahy for adding deltaX and deltaY 7342 * 7343 * Version: 3.0.6 7344 * 7345 * Requires: 1.2.2+ 7346 */ 7347(function(d){function e(a){var b=a||window.event,c=[].slice.call(arguments,1),f=0,e=0,g=0,a=d.event.fix(b);a.type="mousewheel";b.wheelDelta&&(f=b.wheelDelta/120);b.detail&&(f=-b.detail/3);g=f;b.axis!==void 0&&b.axis===b.HORIZONTAL_AXIS&&(g=0,e=-1*f);b.wheelDeltaY!==void 0&&(g=b.wheelDeltaY/120);b.wheelDeltaX!==void 0&&(e=-1*b.wheelDeltaX/120);c.unshift(a,f,e,g);return(d.event.dispatch||d.event.handle).apply(this,c)}var c=["DOMMouseScroll","mousewheel"];if(d.event.fixHooks)for(var h=c.length;h;)d.event.fixHooks[c[--h]]= 7348d.event.mouseHooks;d.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a=c.length;a;)this.addEventListener(c[--a],e,false);else this.onmousewheel=e},teardown:function(){if(this.removeEventListener)for(var a=c.length;a;)this.removeEventListener(c[--a],e,false);else this.onmousewheel=null}};d.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})})(jQuery); 7349/* 7350 * jQuery FlexSlider v2.2.2 7351 * Copyright 2012 WooThemes 7352 * Contributing Author: Tyler Smith 7353 */ 7354; 7355(function ($) { 7356 7357 //FlexSlider: Object Instance 7358 $.flexslider = function(el, options) { 7359 var slider = $(el); 7360 7361 // making variables public 7362 slider.vars = $.extend({}, $.flexslider.defaults, options); 7363 7364 var namespace = slider.vars.namespace, 7365 msGesture = window.navigator && window.navigator.msPointerEnabled && window.MSGesture, 7366 touch = (( "ontouchstart" in window ) || msGesture || window.DocumentTouch && document instanceof DocumentTouch) && slider.vars.touch, 7367 // depricating this idea, as devices are being released with both of these events 7368 //eventType = (touch) ? "touchend" : "click", 7369 eventType = "click touchend MSPointerUp keyup", 7370 watchedEvent = "", 7371 watchedEventClearTimer, 7372 vertical = slider.vars.direction === "vertical", 7373 reverse = slider.vars.reverse, 7374 carousel = (slider.vars.itemWidth > 0), 7375 fade = slider.vars.animation === "fade", 7376 asNav = slider.vars.asNavFor !== "", 7377 methods = {}, 7378 focused = true; 7379 7380 // Store a reference to the slider object 7381 $.data(el, "flexslider", slider); 7382 7383 // Private slider methods 7384 methods = { 7385 init: function() { 7386 slider.animating = false; 7387 // Get current slide and make sure it is a number 7388 slider.currentSlide = parseInt( ( slider.vars.startAt ? slider.vars.startAt : 0), 10 ); 7389 if ( isNaN( slider.currentSlide ) ) slider.currentSlide = 0; 7390 slider.animatingTo = slider.currentSlide; 7391 slider.atEnd = (slider.currentSlide === 0 || slider.currentSlide === slider.last); 7392 slider.containerSelector = slider.vars.selector.substr(0,slider.vars.selector.search(' '));
7393 slider.slides = $(slider.vars.selector, slider); 7394 slider.container = $(slider.containerSelector, slider); 7395 slider.count = slider.slides.length; 7396 // SYNC: 7397 slider.syncExists = $(slider.vars.sync).length > 0; 7398 // SLIDE: 7399 if (slider.vars.animation === "slide") slider.vars.animation = "swing"; 7400 slider.prop = (vertical) ? "top" : "marginLeft"; 7401 slider.args = {}; 7402 // SLIDESHOW: 7403 slider.manualPause = false; 7404 slider.stopped = false; 7405 //PAUSE WHEN INVISIBLE 7406 slider.started = false; 7407 slider.startTimeout = null; 7408 // TOUCH/USECSS: 7409 slider.transitions = !slider.vars.video && !fade && slider.vars.useCSS && (function() { 7410 var obj = document.createElement('div'), 7411 props = ['perspectiveProperty', 'WebkitPerspective', 'MozPerspective', 'OPerspective', 'msPerspective']; 7412 for (var i in props) { 7413 if ( obj.style[ props[i] ] !== undefined ) { 7414 slider.pfx = props[i].replace('Perspective','').toLowerCase(); 7415 slider.prop = "-" + slider.pfx + "-transform"; 7416 return true; 7417 } 7418 } 7419 return false; 7420 }()); 7421 slider.ensureAnimationEnd = ''; 7422 // CONTROLSCONTAINER: 7423 if (slider.vars.controlsContainer !== "") slider.controlsContainer = $(slider.vars.controlsContainer).length > 0 && $(slider.vars.controlsContainer); 7424 // MANUAL: 7425 if (slider.vars.manualControls !== "") slider.manualControls = $(slider.vars.manualControls).length > 0 && $(slider.vars.manualControls); 7426 7427 // RANDOMIZE: 7428 if (slider.vars.randomize) { 7429 slider.slides.sort(function() { return (Math.round(Math.random())-0.5); }); 7430 slider.container.empty().append(slider.slides); 7431 } 7432 7433 slider.doMath(); 7434 7435 // INIT 7436 slider.setup("init"); 7437 7438 // CONTROLNAV: 7439 if (slider.vars.controlNav) methods.controlNav.setup(); 7440 7441 // DIRECTIONNAV: 7442 if (slider.vars.directionNav) methods.directionNav.setup(); 7443 7444 // KEYBOARD: 7445 if (slider.vars.keyboard && ($(slider.containerSelector).length === 1 || slider.vars.multipleKeyboard)) { 7446 $(document).bind('keyup', function(event) { 7447 var keycode = event.keyCode; 7448 if (!slider.animating && (keycode === 39 || keycode === 37)) { 7449 var target = (keycode === 39) ? slider.getTarget('next') : 7450 (keycode === 37) ? slider.getTarget('prev') : false; 7451 slider.flexAnimate(target, slider.vars.pauseOnAction); 7452 } 7453 }); 7454 } 7455 // MOUSEWHEEL: 7456 if (slider.vars.mousewheel) { 7457 slider.bind('mousewheel', function(event, delta, deltaX, deltaY) { 7458 event.preventDefault(); 7459 var target = (delta < 0) ? slider.getTarget('next') : slider.getTarget('prev'); 7460 slider.flexAnimate(target, slider.vars.pauseOnAction); 7461 }); 7462 } 7463 7464 // PAUSEPLAY 7465 if (slider.vars.pausePlay) methods.pausePlay.setup(); 7466 7467 //PAUSE WHEN INVISIBLE 7468 if (slider.vars.slideshow && slider.vars.pauseInvisible) methods.pauseInvisible.init(); 7469 7470 // SLIDSESHOW 7471 if (slider.vars.slideshow) { 7472 if (slider.vars.pauseOnHover) { 7473 slider.hover(function() { 7474 if (!slider.manualPlay && !slider.manualPause) slider.pause(); 7475 }, function() { 7476 if (!slider.manualPause && !slider.manualPlay && !slider.stopped) slider.play(); 7477 }); 7478 } 7479 // initialize animation 7480 //If we're visible, or we don't use PageVisibility API 7481 if(!slider.vars.pauseInvisible || !methods.pauseInvisible.isHidden()) { 7482 (slider.vars.initDelay > 0) ? slider.startTimeout = setTimeout(slider.play, slider.vars.initDelay) : slider.play(); 7483 } 7484 } 7485 7486 // ASNAV: 7487 if (asNav) methods.asNav.setup(); 7488 7489 // TOUCH 7490 if (touch && slider.vars.touch) methods.touch(); 7491 7492 // FADE&&SMOOTHHEIGHT || SLIDE: 7493 if (!fade || (fade && slider.vars.smoothHeight)) $(window).bind("resize orientationchange focus", methods.resize); 7494 7495 slider.find("img").attr("draggable", "false"); 7496 7497 // API: start() Callback 7498 setTimeout(function(){ 7499 slider.vars.start(slider); 7500 }, 200); 7501 }, 7502 asNav: { 7503 setup: function() { 7504 slider.asNav = true; 7505 slider.animatingTo = Math.floor(slider.currentSlide/slider.move); 7506 slider.currentItem = slider.currentSlide; 7507 slider.slides.removeClass(namespace + "active-slide").eq(slider.currentItem).addClass(namespace + "active-slide"); 7508 if(!msGesture){ 7509 slider.slides.on(eventType, function(e){
vendor: 43,764 bytes, lines 7510-8445
7510 e.preventDefault(); 7511 var $slide = $(this), 7512 target = $slide.index(); 7513 var posFromLeft = $slide.offset().left - $(slider).scrollLeft(); // Find position of slide relative to left of slider container 7514 if( posFromLeft <= 0 && $slide.hasClass( namespace + 'active-slide' ) ) { 7515 slider.flexAnimate(slider.getTarget("prev"), true); 7516 } else if (!$(slider.vars.asNavFor).data('flexslider').animating && !$slide.hasClass(namespace + "active-slide")) { 7517 slider.direction = (slider.currentItem < target) ? "next" : "prev"; 7518 slider.flexAnimate(target, slider.vars.pauseOnAction, false, true, true); 7519 } 7520 }); 7521 }else{ 7522 el._slider = slider; 7523 slider.slides.each(function (){ 7524 var that = this; 7525 that._gesture = new MSGesture(); 7526 that._gesture.target = that; 7527 that.addEventListener("MSPointerDown", function (e){ 7528 e.preventDefault(); 7529 if(e.currentTarget._gesture) 7530 e.currentTarget._gesture.addPointer(e.pointerId); 7531 }, false); 7532 that.addEventListener("MSGestureTap", function (e){ 7533 e.preventDefault(); 7534 var $slide = $(this), 7535 target = $slide.index(); 7536 if (!$(slider.vars.asNavFor).data('flexslider').animating && !$slide.hasClass('active')) { 7537 slider.direction = (slider.currentItem < target) ? "next" : "prev"; 7538 slider.flexAnimate(target, slider.vars.pauseOnAction, false, true, true); 7539 } 7540 }); 7541 }); 7542 } 7543 } 7544 }, 7545 controlNav: { 7546 setup: function() { 7547 if (!slider.manualControls) { 7548 methods.controlNav.setupPaging(); 7549 } else { // MANUALCONTROLS: 7550 methods.controlNav.setupManual(); 7551 } 7552 }, 7553 setupPaging: function() { 7554 var type = (slider.vars.controlNav === "thumbnails") ? 'control-thumbs' : 'control-paging', 7555 j = 1, 7556 item, 7557 slide; 7558 7559 slider.controlNavScaffold = $('<ol class="'+ namespace + 'control-nav ' + namespace + type + '"></ol>'); 7560 7561 if (slider.pagingCount > 1) { 7562 for (var i = 0; i < slider.pagingCount; i++) { 7563 slide = slider.slides.eq(i); 7564 item = (slider.vars.controlNav === "thumbnails") ? '<img src="' + slide.attr( 'data-thumb' ) + '"/>' : '<a>' + j + '</a>'; 7565 if ( 'thumbnails' === slider.vars.controlNav && true === slider.vars.thumbCaptions ) { 7566 var captn = slide.attr( 'data-thumbcaption' ); 7567 if ( '' != captn && undefined != captn ) item += '<span class="' + namespace + 'caption">' + captn + '</span>'; 7568 } 7569 slider.controlNavScaffold.append('<li>' + item + '</li>'); 7570 j++; 7571 } 7572 } 7573 7574 // CONTROLSCONTAINER: 7575 (slider.controlsContainer) ? $(slider.controlsContainer).append(slider.controlNavScaffold) : slider.append(slider.controlNavScaffold); 7576 methods.controlNav.set(); 7577 7578 methods.controlNav.active(); 7579 7580 slider.controlNavScaffold.delegate('a, img', eventType, function(event) { 7581 event.preventDefault(); 7582 7583 if (watchedEvent === "" || watchedEvent === event.type) { 7584 var $this = $(this), 7585 target = slider.controlNav.index($this); 7586 7587 if (!$this.hasClass(namespace + 'active')) { 7588 slider.direction = (target > slider.currentSlide) ? "next" : "prev"; 7589 slider.flexAnimate(target, slider.vars.pauseOnAction); 7590 } 7591 } 7592 7593 // setup flags to prevent event duplication 7594 if (watchedEvent === "") { 7595 watchedEvent = event.type; 7596 } 7597 methods.setToClearWatchedEvent(); 7598 7599 }); 7600 }, 7601 setupManual: function() { 7602 slider.controlNav = slider.manualControls; 7603 methods.controlNav.active(); 7604 7605 slider.controlNav.bind(eventType, function(event) { 7606 event.preventDefault(); 7607 7608 if (watchedEvent === "" || watchedEvent === event.type) { 7609 var $this = $(this), 7610 target = slider.controlNav.index($this); 7611 7612 if (!$this.hasClass(namespace + 'active')) { 7613 (target > slider.currentSlide) ? slider.direction = "next" : slider.direction = "prev"; 7614 slider.flexAnimate(target, slider.vars.pauseOnAction); 7615 } 7616 } 7617 7618 // setup flags to prevent event duplication 7619 if (watchedEvent === "") { 7620 watchedEvent = event.type; 7621 } 7622 methods.setToClearWatchedEvent(); 7623 }); 7624 }, 7625 set: function() { 7626 var selector = (slider.vars.controlNav === "thumbnails") ? 'img' : 'a'; 7627 slider.controlNav = $('.' + namespace + 'control-nav li ' + selector, (slider.controlsContainer) ? slider.controlsContainer : slider); 7628 }, 7629 active: function() { 7630 slider.controlNav.removeClass(namespace + "active").eq(slider.animatingTo).addClass(namespace + "active"); 7631 }, 7632 update: function(action, pos) { 7633 if (slider.pagingCount > 1 && action === "add") { 7634 slider.controlNavScaffold.append($('<li><a>' + slider.count + '</a></li>')); 7635 } else if (slider.pagingCount === 1) { 7636 slider.controlNavScaffold.find('li').remove(); 7637 } else { 7638 slider.controlNav.eq(pos).closest('li').remove(); 7639 } 7640 methods.controlNav.set(); 7641 (slider.pagingCount > 1 && slider.pagingCount !== slider.controlNav.length) ? slider.update(pos, action) : methods.controlNav.active(); 7642 } 7643 }, 7644 directionNav: { 7645 setup: function() { 7646 var directionNavScaffold = $('<ul class="' + namespace + 'direction-nav"><li><a class="' + namespace + 'prev" href="#">' + slider.vars.prevText + '</a></li><li><a class="' + namespace + 'next" href="#">' + slider.vars.nextText + '</a></li></ul>'); 7647 7648 // CONTROLSCONTAINER: 7649 if (slider.controlsContainer) { 7650 $(slider.controlsContainer).append(directionNavScaffold); 7651 slider.directionNav = $('.' + namespace + 'direction-nav li a', slider.controlsContainer); 7652 } else { 7653 slider.append(directionNavScaffold); 7654 slider.directionNav = $('.' + namespace + 'direction-nav li a', slider); 7655 } 7656 7657 methods.directionNav.update(); 7658 7659 slider.directionNav.bind(eventType, function(event) { 7660 event.preventDefault(); 7661 var target; 7662 7663 if (watchedEvent === "" || watchedEvent === event.type) { 7664 target = ($(this).hasClass(namespace + 'next')) ? slider.getTarget('next') : slider.getTarget('prev'); 7665 slider.flexAnimate(target, slider.vars.pauseOnAction); 7666 } 7667 7668 // setup flags to prevent event duplication 7669 if (watchedEvent === "") { 7670 watchedEvent = event.type; 7671 } 7672 methods.setToClearWatchedEvent(); 7673 }); 7674 }, 7675 update: function() { 7676 var disabledClass = namespace + 'disabled'; 7677 if (slider.pagingCount === 1) { 7678 slider.directionNav.addClass(disabledClass).attr('tabindex', '-1'); 7679 } else if (!slider.vars.animationLoop) { 7680 if (slider.animatingTo === 0) { 7681 slider.directionNav.removeClass(disabledClass).filter('.' + namespace + "prev").addClass(disabledClass).attr('tabindex', '-1'); 7682 } else if (slider.animatingTo === slider.last) { 7683 slider.directionNav.removeClass(disabledClass).filter('.' + namespace + "next").addClass(disabledClass).attr('tabindex', '-1'); 7684 } else { 7685 slider.directionNav.removeClass(disabledClass).removeAttr('tabindex'); 7686 } 7687 } else { 7688 slider.directionNav.removeClass(disabledClass).removeAttr('tabindex'); 7689 } 7690 } 7691 }, 7692 pausePlay: { 7693 setup: function() { 7694 var pausePlayScaffold = $('<div class="' + namespace + 'pauseplay"><a></a></div>'); 7695 7696 // CONTROLSCONTAINER: 7697 if (slider.controlsContainer) { 7698 slider.controlsContainer.append(pausePlayScaffold); 7699 slider.pausePlay = $('.' + namespace + 'pauseplay a', slider.controlsContainer); 7700 } else { 7701 slider.append(pausePlayScaffold); 7702 slider.pausePlay = $('.' + namespace + 'pauseplay a', slider); 7703 } 7704 7705 methods.pausePlay.update((slider.vars.slideshow) ? namespace + 'pause' : namespace + 'play'); 7706 7707 slider.pausePlay.bind(eventType, function(event) { 7708 event.preventDefault(); 7709 7710 if (watchedEvent === "" || watchedEvent === event.type) { 7711 if ($(this).hasClass(namespace + 'pause')) { 7712 slider.manualPause = true; 7713 slider.manualPlay = false; 7714 slider.pause(); 7715 } else { 7716 slider.manualPause = false; 7717 slider.manualPlay = true; 7718 slider.play(); 7719 } 7720 } 7721 7722 // setup flags to prevent event duplication 7723 if (watchedEvent === "") { 7724 watchedEvent = event.type; 7725 } 7726 methods.setToClearWatchedEvent(); 7727 }); 7728 }, 7729 update: function(state) { 7730 (state === "play") ? slider.pausePlay.removeClass(namespace + 'pause').addClass(namespace + 'play').html(slider.vars.playText) : slider.pausePlay.removeClass(namespace + 'play').addClass(namespace + 'pause').html(slider.vars.pauseText); 7731 } 7732 }, 7733 touch: function() { 7734 var startX, 7735 startY, 7736 offset, 7737 cwidth, 7738 dx, 7739 startT, 7740 scrolling = false, 7741 localX = 0, 7742 localY = 0, 7743 accDx = 0; 7744 7745 if(!msGesture){ 7746 el.addEventListener('touchstart', onTouchStart, false); 7747 7748 function onTouchStart(e) { 7749 if (slider.animating) { 7750 e.preventDefault(); 7751 } else if ( ( window.navigator.msPointerEnabled ) || e.touches.length === 1 ) { 7752 slider.pause(); 7753 // CAROUSEL: 7754 cwidth = (vertical) ? slider.h : slider. w; 7755 startT = Number(new Date()); 7756 // CAROUSEL: 7757 7758 // Local vars for X and Y points. 7759 localX = e.touches[0].pageX; 7760 localY = e.touches[0].pageY; 7761 7762 offset = (carousel && reverse && slider.animatingTo === slider.last) ? 0 : 7763 (carousel && reverse) ? slider.limit - (((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.animatingTo) : 7764 (carousel && slider.currentSlide === slider.last) ? slider.limit : 7765 (carousel) ? ((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.currentSlide : 7766 (reverse) ? (slider.last - slider.currentSlide + slider.cloneOffset) * cwidth : (slider.currentSlide + slider.cloneOffset) * cwidth; 7767 startX = (vertical) ? localY : localX; 7768 startY = (vertical) ? localX : localY; 7769 7770 el.addEventListener('touchmove', onTouchMove, false); 7771 el.addEventListener('touchend', onTouchEnd, false); 7772 } 7773 } 7774 7775 function onTouchMove(e) { 7776 // Local vars for X and Y points. 7777 7778 localX = e.touches[0].pageX; 7779 localY = e.touches[0].pageY; 7780 7781 dx = (vertical) ? startX - localY : startX - localX; 7782 scrolling = (vertical) ? (Math.abs(dx) < Math.abs(localX - startY)) : (Math.abs(dx) < Math.abs(localY - startY)); 7783 7784 var fxms = 500; 7785 7786 if ( ! scrolling || Number( new Date() ) - startT > fxms ) { 7787 e.preventDefault(); 7788 if (!fade && slider.transitions) { 7789 if (!slider.vars.animationLoop) { 7790 dx = dx/((slider.currentSlide === 0 && dx < 0 || slider.currentSlide === slider.last && dx > 0) ? (Math.abs(dx)/cwidth+2) : 1); 7791 } 7792 slider.setProps(offset + dx, "setTouch"); 7793 } 7794 } 7795 } 7796 7797 function onTouchEnd(e) { 7798 // finish the touch by undoing the touch session 7799 el.removeEventListener('touchmove', onTouchMove, false); 7800 7801 if (slider.animatingTo === slider.currentSlide && !scrolling && !(dx === null)) { 7802 var updateDx = (reverse) ? -dx : dx, 7803 target = (updateDx > 0) ? slider.getTarget('next') : slider.getTarget('prev'); 7804 7805 if (slider.canAdvance(target) && (Number(new Date()) - startT < 550 && Math.abs(updateDx) > 50 || Math.abs(updateDx) > cwidth/2)) { 7806 slider.flexAnimate(target, slider.vars.pauseOnAction); 7807 } else { 7808 if (!fade) slider.flexAnimate(slider.currentSlide, slider.vars.pauseOnAction, true); 7809 } 7810 } 7811 el.removeEventListener('touchend', onTouchEnd, false); 7812 7813 startX = null; 7814 startY = null; 7815 dx = null; 7816 offset = null; 7817 } 7818 }else{ 7819 el.style.msTouchAction = "none"; 7820 el._gesture = new MSGesture(); 7821 el._gesture.target = el; 7822 el.addEventListener("MSPointerDown", onMSPointerDown, false); 7823 el._slider = slider; 7824 el.addEventListener("MSGestureChange", onMSGestureChange, false); 7825 el.addEventListener("MSGestureEnd", onMSGestureEnd, false); 7826 7827 function onMSPointerDown(e){ 7828 e.stopPropagation(); 7829 if (slider.animating) { 7830 e.preventDefault(); 7831 }else{ 7832 slider.pause(); 7833 el._gesture.addPointer(e.pointerId); 7834 accDx = 0; 7835 cwidth = (vertical) ? slider.h : slider. w; 7836 startT = Number(new Date()); 7837 // CAROUSEL: 7838 7839 offset = (carousel && reverse && slider.animatingTo === slider.last) ? 0 : 7840 (carousel && reverse) ? slider.limit - (((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.animatingTo) : 7841 (carousel && slider.currentSlide === slider.last) ? slider.limit : 7842 (carousel) ? ((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.currentSlide : 7843 (reverse) ? (slider.last - slider.currentSlide + slider.cloneOffset) * cwidth : (slider.currentSlide + slider.cloneOffset) * cwidth; 7844 } 7845 } 7846 7847 function onMSGestureChange(e) { 7848 e.stopPropagation(); 7849 var slider = e.target._slider; 7850 if(!slider){ 7851 return; 7852 } 7853 var transX = -e.translationX, 7854 transY = -e.translationY; 7855 7856 //Accumulate translations. 7857 accDx = accDx + ((vertical) ? transY : transX); 7858 dx = accDx; 7859 scrolling = (vertical) ? (Math.abs(accDx) < Math.abs(-transX)) : (Math.abs(accDx) < Math.abs(-transY)); 7860 7861 if(e.detail === e.MSGESTURE_FLAG_INERTIA){ 7862 setImmediate(function (){ 7863 el._gesture.stop(); 7864 }); 7865 7866 return; 7867 } 7868 7869 if (!scrolling || Number(new Date()) - startT > 500) { 7870 e.preventDefault(); 7871 if (!fade && slider.transitions) { 7872 if (!slider.vars.animationLoop) { 7873 dx = accDx / ((slider.currentSlide === 0 && accDx < 0 || slider.currentSlide === slider.last && accDx > 0) ? (Math.abs(accDx) / cwidth + 2) : 1); 7874 } 7875 slider.setProps(offset + dx, "setTouch"); 7876 } 7877 } 7878 } 7879 7880 function onMSGestureEnd(e) { 7881 e.stopPropagation(); 7882 var slider = e.target._slider; 7883 if(!slider){ 7884 return; 7885 } 7886 if (slider.animatingTo === slider.currentSlide && !scrolling && !(dx === null)) { 7887 var updateDx = (reverse) ? -dx : dx, 7888 target = (updateDx > 0) ? slider.getTarget('next') : slider.getTarget('prev'); 7889 7890 if (slider.canAdvance(target) && (Number(new Date()) - startT < 550 && Math.abs(updateDx) > 50 || Math.abs(updateDx) > cwidth/2)) { 7891 slider.flexAnimate(target, slider.vars.pauseOnAction); 7892 } else { 7893 if (!fade) slider.flexAnimate(slider.currentSlide, slider.vars.pauseOnAction, true); 7894 } 7895 } 7896 7897 startX = null; 7898 startY = null; 7899 dx = null; 7900 offset = null; 7901 accDx = 0; 7902 } 7903 } 7904 }, 7905 resize: function() { 7906 if (!slider.animating && slider.is(':visible')) { 7907 if (!carousel) slider.doMath(); 7908 7909 if (fade) { 7910 // SMOOTH HEIGHT: 7911 methods.smoothHeight(); 7912 } else if (carousel) { //CAROUSEL: 7913 slider.slides.width(slider.computedW); 7914 slider.update(slider.pagingCount); 7915 slider.setProps(); 7916 } 7917 else if (vertical) { //VERTICAL: 7918 slider.viewport.height(slider.h); 7919 slider.setProps(slider.h, "setTotal"); 7920 } else { 7921 // SMOOTH HEIGHT: 7922 if (slider.vars.smoothHeight) methods.smoothHeight(); 7923 slider.newSlides.width(slider.computedW); 7924 slider.setProps(slider.computedW, "setTotal"); 7925 } 7926 } 7927 }, 7928 smoothHeight: function(dur) { 7929 if (!vertical || fade) { 7930 var $obj = (fade) ? slider : slider.viewport; 7931 (dur) ? $obj.animate({"height": slider.slides.eq(slider.animatingTo).height()}, dur) : $obj.height(slider.slides.eq(slider.animatingTo).height()); 7932 } 7933 }, 7934 sync: function(action) { 7935 var $obj = $(slider.vars.sync).data("flexslider"), 7936 target = slider.animatingTo; 7937 7938 switch (action) { 7939 case "animate": $obj.flexAnimate(target, slider.vars.pauseOnAction, false, true); break; 7940 case "play": if (!$obj.playing && !$obj.asNav) { $obj.play(); } break; 7941 case "pause": $obj.pause(); break; 7942 } 7943 }, 7944 uniqueID: function($clone) { 7945 // Append _clone to current level and children elements with id attributes 7946 $clone.filter( '[id]' ).add($clone.find( '[id]' )).each(function() { 7947 var $this = $(this); 7948 $this.attr( 'id', $this.attr( 'id' ) + '_clone' ); 7949 }); 7950 return $clone; 7951 }, 7952 pauseInvisible: { 7953 visProp: null, 7954 init: function() { 7955 var prefixes = ['webkit','moz','ms','o']; 7956 7957 if ('hidden' in document) return 'hidden'; 7958 for (var i = 0; i < prefixes.length; i++) { 7959 if ((prefixes[i] + 'Hidden') in document) 7960 methods.pauseInvisible.visProp = prefixes[i] + 'Hidden'; 7961 } 7962 if (methods.pauseInvisible.visProp) { 7963 var evtname = methods.pauseInvisible.visProp.replace(/[H|h]idden/,'') + 'visibilitychange'; 7964 document.addEventListener(evtname, function() { 7965 if (methods.pauseInvisible.isHidden()) { 7966 if(slider.startTimeout) clearTimeout(slider.startTimeout); //If clock is ticking, stop timer and prevent from starting while invisible 7967 else slider.pause(); //Or just pause 7968 } 7969 else { 7970 if(slider.started) slider.play(); //Initiated before, just play 7971 else (slider.vars.initDelay > 0) ? setTimeout(slider.play, slider.vars.initDelay) : slider.play(); //Didn't init before: simply init or wait for it 7972 } 7973 }); 7974 } 7975 }, 7976 isHidden: function() { 7977 return document[methods.pauseInvisible.visProp] || false; 7978 } 7979 }, 7980 setToClearWatchedEvent: function() { 7981 clearTimeout(watchedEventClearTimer); 7982 watchedEventClearTimer = setTimeout(function() { 7983 watchedEvent = ""; 7984 }, 3000); 7985 } 7986 }; 7987 7988 // public methods 7989 slider.flexAnimate = function(target, pause, override, withSync, fromNav) { 7990 if (!slider.vars.animationLoop && target !== slider.currentSlide) { 7991 slider.direction = (target > slider.currentSlide) ? "next" : "prev"; 7992 } 7993 7994 if (asNav && slider.pagingCount === 1) slider.direction = (slider.currentItem < target) ? "next" : "prev"; 7995 7996 if (!slider.animating && (slider.canAdvance(target, fromNav) || override) && slider.is(":visible")) { 7997 if (asNav && withSync) { 7998 var master = $(slider.vars.asNavFor).data('flexslider'); 7999 slider.atEnd = target === 0 || target === slider.count - 1; 8000 master.flexAnimate(target, true, false, true, fromNav); 8001 slider.direction = (slider.currentItem < target) ? "next" : "prev"; 8002 master.direction = slider.direction; 8003 8004 if (Math.ceil((target + 1)/slider.visible) - 1 !== slider.currentSlide && target !== 0) { 8005 slider.currentItem = target; 8006 slider.slides.removeClass(namespace + "active-slide").eq(target).addClass(namespace + "active-slide"); 8007 target = Math.floor(target/slider.visible); 8008 } else { 8009 slider.currentItem = target; 8010 slider.slides.removeClass(namespace + "active-slide").eq(target).addClass(namespace + "active-slide"); 8011 return false; 8012 } 8013 } 8014 8015 slider.animating = true; 8016 slider.animatingTo = target; 8017 8018 // SLIDESHOW: 8019 if (pause) slider.pause(); 8020 8021 // API: before() animation Callback 8022 slider.vars.before(slider); 8023 8024 // SYNC: 8025 if (slider.syncExists && !fromNav) methods.sync("animate"); 8026 8027 // CONTROLNAV 8028 if (slider.vars.controlNav) methods.controlNav.active(); 8029 8030 // !CAROUSEL: 8031 // CANDIDATE: slide active class (for add/remove slide) 8032 if (!carousel) slider.slides.removeClass(namespace + 'active-slide').eq(target).addClass(namespace + 'active-slide'); 8033 8034 // INFINITE LOOP: 8035 // CANDIDATE: atEnd 8036 slider.atEnd = target === 0 || target === slider.last; 8037 8038 // DIRECTIONNAV: 8039 if (slider.vars.directionNav) methods.directionNav.update(); 8040 8041 if (target === slider.last) { 8042 // API: end() of cycle Callback 8043 slider.vars.end(slider); 8044 // SLIDESHOW && !INFINITE LOOP: 8045 if (!slider.vars.animationLoop) slider.pause(); 8046 } 8047 8048 // SLIDE: 8049 if (!fade) { 8050 var dimension = (vertical) ? slider.slides.filter(':first').height() : slider.computedW, 8051 margin, slideString, calcNext; 8052 8053 // INFINITE LOOP / REVERSE: 8054 if (carousel) { 8055 //margin = (slider.vars.itemWidth > slider.w) ? slider.vars.itemMargin * 2 : slider.vars.itemMargin; 8056 margin = slider.vars.itemMargin; 8057 calcNext = ((slider.itemW + margin) * slider.move) * slider.animatingTo; 8058 slideString = (calcNext > slider.limit && slider.visible !== 1) ? slider.limit : calcNext; 8059 } else if (slider.currentSlide === 0 && target === slider.count - 1 && slider.vars.animationLoop && slider.direction !== "next") { 8060 slideString = (reverse) ? (slider.count + slider.cloneOffset) * dimension : 0; 8061 } else if (slider.currentSlide === slider.last && target === 0 && slider.vars.animationLoop && slider.direction !== "prev") { 8062 slideString = (reverse) ? 0 : (slider.count + 1) * dimension; 8063 } else { 8064 slideString = (reverse) ? ((slider.count - 1) - target + slider.cloneOffset) * dimension : (target + slider.cloneOffset) * dimension; 8065 } 8066 slider.setProps(slideString, "", slider.vars.animationSpeed); 8067 if (slider.transitions) { 8068 if (!slider.vars.animationLoop || !slider.atEnd) { 8069 slider.animating = false; 8070 slider.currentSlide = slider.animatingTo; 8071 } 8072 8073 // Unbind previous transitionEnd events and re-bind new transitionEnd event 8074 slider.container.unbind("webkitTransitionEnd transitionend"); 8075 slider.container.bind("webkitTransitionEnd transitionend", function() { 8076 clearTimeout(slider.ensureAnimationEnd); 8077 slider.wrapup(dimension); 8078 }); 8079 8080 // Insurance for the ever-so-fickle transitionEnd event 8081 clearTimeout(slider.ensureAnimationEnd); 8082 slider.ensureAnimationEnd = setTimeout(function() { 8083 slider.wrapup(dimension); 8084 }, slider.vars.animationSpeed + 100); 8085 8086 } else { 8087 slider.container.animate(slider.args, slider.vars.animationSpeed, slider.vars.easing, function(){ 8088 slider.wrapup(dimension); 8089 }); 8090 } 8091 } else { // FADE: 8092 if (!touch) { 8093 //slider.slides.eq(slider.currentSlide).fadeOut(slider.vars.animationSpeed, slider.vars.easing); 8094 //slider.slides.eq(target).fadeIn(slider.vars.animationSpeed, slider.vars.easing, slider.wrapup); 8095 8096 slider.slides.eq(slider.currentSlide).css({"zIndex": 1}).animate({"opacity": 0}, slider.vars.animationSpeed, slider.vars.easing); 8097 slider.slides.eq(target).css({"zIndex": 2}).animate({"opacity": 1}, slider.vars.animationSpeed, slider.vars.easing, slider.wrapup); 8098 8099 } else { 8100 slider.slides.eq(slider.currentSlide).css({ "opacity": 0, "zIndex": 1 }); 8101 slider.slides.eq(target).css({ "opacity": 1, "zIndex": 2 }); 8102 slider.wrapup(dimension); 8103 } 8104 } 8105 // SMOOTH HEIGHT: 8106 if (slider.vars.smoothHeight) methods.smoothHeight(slider.vars.animationSpeed); 8107 } 8108 }; 8109 slider.wrapup = function(dimension) { 8110 // SLIDE: 8111 if (!fade && !carousel) { 8112 if (slider.currentSlide === 0 && slider.animatingTo === slider.last && slider.vars.animationLoop) { 8113 slider.setProps(dimension, "jumpEnd"); 8114 } else if (slider.currentSlide === slider.last && slider.animatingTo === 0 && slider.vars.animationLoop) { 8115 slider.setProps(dimension, "jumpStart"); 8116 } 8117 } 8118 slider.animating = false; 8119 slider.currentSlide = slider.animatingTo; 8120 // API: after() animation Callback 8121 slider.vars.after(slider); 8122 }; 8123 8124 // SLIDESHOW: 8125 slider.animateSlides = function() { 8126 if (!slider.animating && focused ) slider.flexAnimate(slider.getTarget("next")); 8127 }; 8128 // SLIDESHOW: 8129 slider.pause = function() { 8130 clearInterval(slider.animatedSlides); 8131 slider.animatedSlides = null; 8132 slider.playing = false; 8133 // PAUSEPLAY: 8134 if (slider.vars.pausePlay) methods.pausePlay.update("play"); 8135 // SYNC: 8136 if (slider.syncExists) methods.sync("pause"); 8137 }; 8138 // SLIDESHOW: 8139 slider.play = function() { 8140 if (slider.playing) clearInterval(slider.animatedSlides); 8141 slider.animatedSlides = slider.animatedSlides || setInterval(slider.animateSlides, slider.vars.slideshowSpeed); 8142 slider.started = slider.playing = true; 8143 // PAUSEPLAY: 8144 if (slider.vars.pausePlay) methods.pausePlay.update("pause"); 8145 // SYNC: 8146 if (slider.syncExists) methods.sync("play"); 8147 }; 8148 // STOP: 8149 slider.stop = function () { 8150 slider.pause(); 8151 slider.stopped = true; 8152 }; 8153 slider.canAdvance = function(target, fromNav) { 8154 // ASNAV: 8155 var last = (asNav) ? slider.pagingCount - 1 : slider.last; 8156 return (fromNav) ? true : 8157 (asNav && slider.currentItem === slider.count - 1 && target === 0 && slider.direction === "prev") ? true : 8158 (asNav && slider.currentItem === 0 && target === slider.pagingCount - 1 && slider.direction !== "next") ? false : 8159 (target === slider.currentSlide && !asNav) ? false : 8160 (slider.vars.animationLoop) ? true : 8161 (slider.atEnd && slider.currentSlide === 0 && target === last && slider.direction !== "next") ? false : 8162 (slider.atEnd && slider.currentSlide === last && target === 0 && slider.direction === "next") ? false : 8163 true; 8164 }; 8165 slider.getTarget = function(dir) { 8166 slider.direction = dir; 8167 if (dir === "next") { 8168 return (slider.currentSlide === slider.last) ? 0 : slider.currentSlide + 1; 8169 } else { 8170 return (slider.currentSlide === 0) ? slider.last : slider.currentSlide - 1; 8171 } 8172 }; 8173 8174 // SLIDE: 8175 slider.setProps = function(pos, special, dur) { 8176 var target = (function() { 8177 var posCheck = (pos) ? pos : ((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.animatingTo, 8178 posCalc = (function() { 8179 if (carousel) { 8180 return (special === "setTouch") ? pos : 8181 (reverse && slider.animatingTo === slider.last) ? 0 : 8182 (reverse) ? slider.limit - (((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.animatingTo) : 8183 (slider.animatingTo === slider.last) ? slider.limit : posCheck; 8184 } else { 8185 switch (special) { 8186 case "setTotal": return (reverse) ? ((slider.count - 1) - slider.currentSlide + slider.cloneOffset) * pos : (slider.currentSlide + slider.cloneOffset) * pos; 8187 case "setTouch": return (reverse) ? pos : pos; 8188 case "jumpEnd": return (reverse) ? pos : slider.count * pos; 8189 case "jumpStart": return (reverse) ? slider.count * pos : pos; 8190 default: return pos; 8191 } 8192 } 8193 }()); 8194 8195 return (posCalc * -1) + "px"; 8196 }()); 8197 8198 if (slider.transitions) { 8199 target = (vertical) ? "translate3d(0," + target + ",0)" : "translate3d(" + target + ",0,0)"; 8200 dur = (dur !== undefined) ? (dur/1000) + "s" : "0s"; 8201 slider.container.css("-" + slider.pfx + "-transition-duration", dur); 8202 slider.container.css("transition-duration", dur); 8203 } 8204 8205 slider.args[slider.prop] = target; 8206 if (slider.transitions || dur === undefined) slider.container.css(slider.args); 8207 8208 slider.container.css('transform',target); 8209 }; 8210 8211 slider.setup = function(type) { 8212 // SLIDE: 8213 if (!fade) { 8214 var sliderOffset, arr; 8215 8216 if (type === "init") { 8217 slider.viewport = $('<div class="' + namespace + 'viewport"></div>').css({"overflow": "hidden", "position": "relative"}).appendTo(slider).append(slider.container); 8218 // INFINITE LOOP: 8219 slider.cloneCount = 0; 8220 slider.cloneOffset = 0; 8221 // REVERSE: 8222 if (reverse) { 8223 arr = $.makeArray(slider.slides).reverse(); 8224 slider.slides = $(arr); 8225 slider.container.empty().append(slider.slides); 8226 } 8227 } 8228 // INFINITE LOOP && !CAROUSEL: 8229 if (slider.vars.animationLoop && !carousel) { 8230 slider.cloneCount = 2; 8231 slider.cloneOffset = 1; 8232 // clear out old clones 8233 if (type !== "init") slider.container.find('.clone').remove(); 8234 slider.container.append(methods.uniqueID(slider.slides.first().clone().addClass('clone')).attr('aria-hidden', 'true')) 8235 .prepend(methods.uniqueID(slider.slides.last().clone().addClass('clone')).attr('aria-hidden', 'true')); 8236 } 8237 slider.newSlides = $(slider.vars.selector, slider); 8238 8239 sliderOffset = (reverse) ? slider.count - 1 - slider.currentSlide + slider.cloneOffset : slider.currentSlide + slider.cloneOffset; 8240 // VERTICAL: 8241 if (vertical && !carousel) { 8242 slider.container.height((slider.count + slider.cloneCount) * 200 + "%").css("position", "absolute").width("100%"); 8243 setTimeout(function(){ 8244 slider.newSlides.css({"display": "block"}); 8245 slider.doMath(); 8246 slider.viewport.height(slider.h); 8247 slider.setProps(sliderOffset * slider.h, "init"); 8248 }, (type === "init") ? 100 : 0); 8249 } else { 8250 slider.container.width((slider.count + slider.cloneCount) * 200 + "%"); 8251 slider.setProps(sliderOffset * slider.computedW, "init"); 8252 setTimeout(function(){ 8253 slider.doMath(); 8254 slider.newSlides.css({"width": slider.computedW, "float": "left", "display": "block"}); 8255 // SMOOTH HEIGHT: 8256 if (slider.vars.smoothHeight) methods.smoothHeight(); 8257 }, (type === "init") ? 100 : 0); 8258 } 8259 } else { // FADE: 8260 slider.slides.css({"width": "100%", "float": "left", "marginRight": "-100%", "position": "relative"}); 8261 if (type === "init") { 8262 if (!touch) { 8263 //slider.slides.eq(slider.currentSlide).fadeIn(slider.vars.animationSpeed, slider.vars.easing); 8264 if (slider.vars.fadeFirstSlide == false) { 8265 slider.slides.css({ "opacity": 0, "display": "block", "zIndex": 1 }).eq(slider.currentSlide).css({"zIndex": 2}).css({"opacity": 1}); 8266 } else { 8267 slider.slides.css({ "opacity": 0, "display": "block", "zIndex": 1 }).eq(slider.currentSlide).css({"zIndex": 2}).animate({"opacity": 1},slider.vars.animationSpeed,slider.vars.easing); 8268 } 8269 } else { 8270 slider.slides.css({ "opacity": 0, "display": "block", "webkitTransition": "opacity " + slider.vars.animationSpeed / 1000 + "s ease", "zIndex": 1 }).eq(slider.currentSlide).css({ "opacity": 1, "zIndex": 2}); 8271 } 8272 } 8273 // SMOOTH HEIGHT: 8274 if (slider.vars.smoothHeight) methods.smoothHeight(); 8275 } 8276 // !CAROUSEL: 8277 // CANDIDATE: active slide 8278 if (!carousel) slider.slides.removeClass(namespace + "active-slide").eq(slider.currentSlide).addClass(namespace + "active-slide"); 8279 8280 //FlexSlider: init() Callback 8281 slider.vars.init(slider); 8282 }; 8283 8284 slider.doMath = function() { 8285 var slide = slider.slides.first(), 8286 slideMargin = slider.vars.itemMargin, 8287 minItems = slider.vars.minItems, 8288 maxItems = slider.vars.maxItems; 8289 8290 slider.w = (slider.viewport===undefined) ? slider.width() : slider.viewport.width(); 8291 slider.h = slide.height(); 8292 slider.boxPadding = slide.outerWidth() - slide.width(); 8293 8294 // CAROUSEL: 8295 if (carousel) { 8296 slider.itemT = slider.vars.itemWidth + slideMargin; 8297 slider.minW = (minItems) ? minItems * slider.itemT : slider.w; 8298 slider.maxW = (maxItems) ? (maxItems * slider.itemT) - slideMargin : slider.w; 8299 slider.itemW = (slider.minW > slider.w) ? (slider.w - (slideMargin * (minItems - 1)))/minItems : 8300 (slider.maxW < slider.w) ? (slider.w - (slideMargin * (maxItems - 1)))/maxItems : 8301 (slider.vars.itemWidth > slider.w) ? slider.w : slider.vars.itemWidth; 8302 8303 slider.visible = Math.floor(slider.w/(slider.itemW)); 8304 slider.move = (slider.vars.move > 0 && slider.vars.move < slider.visible ) ? slider.vars.move : slider.visible; 8305 slider.pagingCount = Math.ceil(((slider.count - slider.visible)/slider.move) + 1); 8306 slider.last = slider.pagingCount - 1; 8307 slider.limit = (slider.pagingCount === 1) ? 0 : 8308 (slider.vars.itemWidth > slider.w) ? (slider.itemW * (slider.count - 1)) + (slideMargin * (slider.count - 1)) : ((slider.itemW + slideMargin) * slider.count) - slider.w - slideMargin; 8309 } else { 8310 slider.itemW = slider.w; 8311 slider.pagingCount = slider.count; 8312 slider.last = slider.count - 1; 8313 } 8314 slider.computedW = slider.itemW - slider.boxPadding; 8315 }; 8316 8317 slider.update = function(pos, action) { 8318 slider.doMath(); 8319 8320 // update currentSlide and slider.animatingTo if necessary 8321 if (!carousel) { 8322 if (pos < slider.currentSlide) { 8323 slider.currentSlide += 1; 8324 } else if (pos <= slider.currentSlide && pos !== 0) { 8325 slider.currentSlide -= 1; 8326 } 8327 slider.animatingTo = slider.currentSlide; 8328 } 8329 8330 // update controlNav 8331 if (slider.vars.controlNav && !slider.manualControls) { 8332 if ((action === "add" && !carousel) || slider.pagingCount > slider.controlNav.length) { 8333 methods.controlNav.update("add"); 8334 } else if ((action === "remove" && !carousel) || slider.pagingCount < slider.controlNav.length) { 8335 if (carousel && slider.currentSlide > slider.last) { 8336 slider.currentSlide -= 1; 8337 slider.animatingTo -= 1; 8338 } 8339 methods.controlNav.update("remove", slider.last); 8340 } 8341 } 8342 // update directionNav 8343 if (slider.vars.directionNav) methods.directionNav.update(); 8344 8345 }; 8346 8347 slider.addSlide = function(obj, pos) { 8348 var $obj = $(obj); 8349 8350 slider.count += 1; 8351 slider.last = slider.count - 1; 8352 8353 // append new slide 8354 if (vertical && reverse) { 8355 (pos !== undefined) ? slider.slides.eq(slider.count - pos).after($obj) : slider.container.prepend($obj); 8356 } else { 8357 (pos !== undefined) ? slider.slides.eq(pos).before($obj) : slider.container.append($obj); 8358 } 8359 8360 // update currentSlide, animatingTo, controlNav, and directionNav 8361 slider.update(pos, "add"); 8362 8363 // update slider.slides 8364 slider.slides = $(slider.vars.selector + ':not(.clone)', slider); 8365 // re-setup the slider to accomdate new slide 8366 slider.setup(); 8367 8368 //FlexSlider: added() Callback 8369 slider.vars.added(slider); 8370 }; 8371 slider.removeSlide = function(obj) { 8372 var pos = (isNaN(obj)) ? slider.slides.index($(obj)) : obj; 8373 8374 // update count 8375 slider.count -= 1; 8376 slider.last = slider.count - 1; 8377 8378 // remove slide 8379 if (isNaN(obj)) { 8380 $(obj, slider.slides).remove(); 8381 } else { 8382 (vertical && reverse) ? slider.slides.eq(slider.last).remove() : slider.slides.eq(obj).remove(); 8383 } 8384 8385 // update currentSlide, animatingTo, controlNav, and directionNav 8386 slider.doMath(); 8387 slider.update(pos, "remove"); 8388 8389 // update slider.slides 8390 slider.slides = $(slider.vars.selector + ':not(.clone)', slider); 8391 // re-setup the slider to accomdate new slide 8392 slider.setup(); 8393 8394 // FlexSlider: removed() Callback 8395 slider.vars.removed(slider); 8396 }; 8397 8398 //FlexSlider: Initialize 8399 methods.init(); 8400 }; 8401 8402 // Ensure the slider isn't focussed if the window loses focus. 8403 $( window ).blur( function ( e ) { 8404 focused = false; 8405 }).focus( function ( e ) { 8406 focused = true; 8407 }); 8408 8409 //FlexSlider: Default Settings 8410 $.flexslider.defaults = { 8411 namespace: "flex-", //{NEW} String: Prefix string attached to the class of every element generated by the plugin 8412 selector: ".slides > li", //{NEW} Selector: Must match a simple pattern. '{container} > {slide}' -- Ignore pattern at your own peril 8413 animation: "fade", //String: Select your animation type, "fade" or "slide" 8414 easing: "swing", //{NEW} String: Determines the easing method used in jQuery transitions. jQuery easing plugin is supported! 8415 direction: "horizontal", //String: Select the sliding direction, "horizontal" or "vertical" 8416 reverse: false, //{NEW} Boolean: Reverse the animation direction 8417 animationLoop: true, //Boolean: Should the animation loop? If false, directionNav will received "disable" classes at either end 8418 smoothHeight: false, //{NEW} Boolean: Allow height of the slider to animate smoothly in horizontal mode 8419 startAt: 0, //Integer: The slide that the slider should start on. Array notation (0 = first slide) 8420 slideshow: true, //Boolean: Animate slider automatically 8421 slideshowSpeed: 7000, //Integer: Set the speed of the slideshow cycling, in milliseconds 8422 animationSpeed: 600, //Integer: Set the speed of animations, in milliseconds 8423 initDelay: 0, //{NEW} Integer: Set an initialization delay, in milliseconds 8424 randomize: false, //Boolean: Randomize slide order 8425 fadeFirstSlide: true, //Boolean: Fade in the first slide when animation type is "fade" 8426 thumbCaptions: false, //Boolean: Whether or not to put captions on thumbnails when using the "thumbnails" controlNav. 8427 8428 // Usability features 8429 pauseOnAction: true, //Boolean: Pause the slideshow when interacting with control elements, highly recommended. 8430 pauseOnHover: false, //Boolean: Pause the slideshow when hovering over slider, then resume when no longer hovering 8431 pauseInvisible: true, //{NEW} Boolean: Pause the slideshow when tab is invisible, resume when visible. Provides better UX, lower CPU usage. 8432 useCSS: true, //{NEW} Boolean: Slider will use CSS3 transitions if available 8433 touch: true, //{NEW} Boolean: Allow touch swipe navigation of the slider on touch-enabled devices 8434 video: false, //{NEW} Boolean: If using video in the slider, will prevent CSS3 3D Transforms to avoid graphical glitches 8435 8436 // Primary Controls 8437 controlNav: true, //Boolean: Create navigation for paging control of each slide? Note: Leave true for manualControls usage 8438 directionNav: true, //Boolean: Create navigation for previous/next navigation? (true/false) 8439 prevText: "Previous", //String: Set the text for the "previous" directionNav item 8440 nextText: "Next", //String: Set the text for the "next" directionNav item 8441 8442 // Secondary Navigation 8443 keyboard: true, //Boolean: Allow slider navigating via keyboard left/right keys 8444 multipleKeyboard: false, //{NEW} Boolean: Allow keyboard navigation to affect multiple sliders. Default behavior cuts out keyboard navigation with more than one slider present. 8445 mousewheel: false, //{UPDATED} Boolean: Requires jquery.mousewheel.js (https://github.com/brandonaaron/jquery-mousewheel) - Allows slider navigating via mousewheel
8446 pausePlay: false, //Boolean: Create pause/play dynamic element 8447 pauseText: "Pause", //String: Set the text for the "pause" pausePlay item 8448 playText: "Play", //String: Set the text for the "play" pausePlay item 8449 8450 // Special properties 8451 controlsContainer: "", //{UPDATED} jQuery Object/Selector: Declare which container the navigation elements should be appended too. Default container is the FlexSlider element. Example use would be $(".flexslider-container"). Property is ignored if given element is not found. 8452 manualControls: "", //{UPDATED} jQuery Object/Selector: Declare custom control navigation. Examples would be $(".flex-control-nav li") or "#tabs-nav li img", etc. The number of elements in your controlNav should match the number of slides/tabs. 8453 sync: "", //{NEW} Selector: Mirror the actions performed on this slider with another slider. Use with care. 8454 asNavFor: "", //{NEW} Selector: Internal property exposed for turning the slider into a thumbnail navigation for another slider 8455 8456 // Carousel Options 8457 itemWidth: 0, //{NEW} Integer: Box-model width of individual carousel items, including horizontal borders and padding. 8458 itemMargin: 0, //{NEW} Integer: Margin between carousel items. 8459 minItems: 1, //{NEW} Integer: Minimum number of carousel items that should be visible. Items will resize fluidly when below this. 8460 maxItems: 0, //{NEW} Integer: Maxmimum number of carousel items that should be visible. Items will resize fluidly when above this limit. 8461 move: 0, //{NEW} Integer: Number of carousel items that should move on animation. If 0, slider will move all visible items. 8462 allowOneSlide: true, //{NEW} Boolean: Whether or not to allow a slider comprised of a single slide 8463 8464 // Callback API 8465 start: function(){}, //Callback: function(slider) - Fires when the slider loads the first slide 8466 before: function(){}, //Callback: function(slider) - Fires asynchronously with each slider animation 8467 after: function(){}, //Callback: function(slider) - Fires after each slider animation completes 8468 end: function(){}, //Callback: function(slider) - Fires when the slider reaches the last slide (asynchronous) 8469 added: function(){}, //{NEW} Callback: function(slider) - Fires after a slide is added 8470 removed: function(){}, //{NEW} Callback: function(slider) - Fires after a slide is removed 8471 init: function() {} //{NEW} Callback: function(slider) - Fires after the slider is initially setup 8472 }; 8473 8474 //FlexSlider: Plugin Function 8475 $.fn.flexslider = function(options) { 8476 if (options === undefined) options = {}; 8477 8478 if (typeof options === "object") { 8479 return this.each(function() { 8480 var $this = $(this), 8481 selector = (options.selector) ? options.selector : ".slides > li", 8482 $slides = $this.find(selector); 8483 8484 if ( ( $slides.length === 1 && options.allowOneSlide === true ) || $slides.length === 0 ) { 8485 $slides.fadeIn(400); 8486 if (options.start) options.start($this); 8487 } else if ($this.data('flexslider') === undefined) { 8488 new $.flexslider(this, options); 8489 } 8490 }); 8491 } else { 8492 // Helper strings to quickly perform functions on the slider 8493 var $slider = $(this).data('flexslider'); 8494 switch (options) { 8495 case "play": $slider.play(); break; 8496 case "pause": $slider.pause(); break; 8497 case "stop": $slider.stop(); break; 8498 case "next": $slider.flexAnimate($slider.getTarget("next"), true); break; 8499 case "prev": 8500 case "previous": $slider.flexAnimate($slider.getTarget("prev"), true); break; 8501 default: if (typeof options === "number") $slider.flexAnimate(options, true); 8502 } 8503 } 8504 }; 8505})(jQuery); 8506 8507 8508/*! picturefill - v3.0.2 - 2016-02-12 8509 * https://scottjehl.github.io/picturefill/ 8510 * Copyright (c) 2016 https://github.com/scottjehl/picturefill/blob/master/Authors.txt; Licensed MIT 8511 */�
vendor: 11,621 bytes, lines 8511-8512
8511 8512!function(a){var b=navigator.userAgent;a.HTMLPictureElement&&/ecko/.test(b)&&b.match(/rv\:(\d+)/)&&RegExp.$1<45&&addEventListener("resize",function(){var b,c=document.createElement("source"),d=function(a){var b,d,e=a.parentNode;"PICTURE"===e.nodeName.toUpperCase()?(b=c.cloneNode(),e.insertBefore(b,e.firstElementChild),setTimeout(function(){e.removeChild(b)})):(!a._pfLastSize||a.offsetWidth>a._pfLastSize)&&(a._pfLastSize=a.offsetWidth,d=a.sizes,a.sizes+=",100vw",setTimeout(function(){a.sizes=d}))},e=function(){var a,b=document.querySelectorAll("picture > img, img[srcset][sizes]");for(a=0;a<b.length;a++)d(b[a])},f=function(){clearTimeout(b),b=setTimeout(e,99)},g=a.matchMedia&&matchMedia("(orientation: landscape)"),h=function(){f(),g&&g.addListener&&g.addListener(f)};return c.srcset="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",/^[c|i]|d$/.test(document.readyState||"")?h():document.addEventListener("DOMContentLoaded",h),f}())}(window),function(a,b,c){"use strict";function d(a){return" "===a||" "===a||"\n"===a||"\f"===a||"\r"===a}function e(b,c){var d=new a.Image;return d.onerror=function(){A[b]=!1,ba()},d.onload=function(){A[b]=1===d.width,ba()},d.src=c,"pending"}function f(){M=!1,P=a.devicePixelRatio,N={},O={},s.DPR=P||1,Q.width=Math.max(a.innerWidth||0,z.clientWidth),Q.height=Math.max(a.innerHeight||0,z.clientHeight),Q.vw=Q.width/100,Q.vh=Q.height/100,r=[Q.height,Q.width,P].join("-"),Q.em=s.getEmValue(),Q.rem=Q.em}function g(a,b,c,d){var e,f,g,h;return"saveData"===B.algorithm?a>2.7?h=c+1:(f=b-c,e=Math.pow(a-.6,1.5),g=f*e,d&&(g+=.1*e),h=a+g):h=c>1?Math.sqrt(a*b):a,h>c}function h(a){var b,c=s.getSet(a),d=!1;"pending"!==c&&(d=r,c&&(b=s.setRes(c),s.applySetCandidate(b,a))),a[s.ns].evaled=d}function i(a,b){return a.res-b.res}function j(a,b,c){var d;return!c&&b&&(c=a[s.ns].sets,c=c&&c[c.length-1]),d=k(b,c),d&&(b=s.makeUrl(b),a[s.ns].curSrc=b,a[s.ns].curCan=d,d.res||aa(d,d.set.sizes)),d}function k(a,b){var c,d,e;if(a&&b)for(e=s.parseSet(b),a=s.makeUrl(a),c=0;c<e.length;c++)if(a===s.makeUrl(e[c].url)){d=e[c];break}return d}function l(a,b){var c,d,e,f,g=a.getElementsByTagName("source");for(c=0,d=g.length;d>c;c++)e=g[c],e[s.ns]=!0,f=e.getAttribute("srcset"),f&&b.push({srcset:f,media:e.getAttribute("media"),type:e.getAttribute("type"),sizes:e.getAttribute("sizes")})}function m(a,b){function c(b){var c,d=b.exec(a.substring(m));return d?(c=d[0],m+=c.length,c):void 0}function e(){var a,c,d,e,f,i,j,k,l,m=!1,o={};for(e=0;e<h.length;e++)f=h[e],i=f[f.length-1],j=f.substring(0,f.length-1),k=parseInt(j,10),l=parseFloat(j),X.test(j)&&"w"===i?((a||c)&&(m=!0),0===k?m=!0:a=k):Y.test(j)&&"x"===i?((a||c||d)&&(m=!0),0>l?m=!0:c=l):X.test(j)&&"h"===i?((d||c)&&(m=!0),0===k?m=!0:d=k):m=!0;m||(o.url=g,a&&(o.w=a),c&&(o.d=c),d&&(o.h=d),d||c||a||(o.d=1),1===o.d&&(b.has1x=!0),o.set=b,n.push(o))}function f(){for(c(T),i="",j="in descriptor";;){if(k=a.charAt(m),"in descriptor"===j)if(d(k))i&&(h.push(i),i="",j="after descriptor");else{if(","===k)return m+=1,i&&h.push(i),void e();if("("===k)i+=k,j="in parens";else{if(""===k)return i&&h.push(i),void e();i+=k}}else if("in parens"===j)if(")"===k)i+=k,j="in descriptor";else{if(""===k)return h.push(i),void e();i+=k}else if("after descriptor"===j)if(d(k));else{if(""===k)return void e();j="in descriptor",m-=1}m+=1}}for(var g,h,i,j,k,l=a.length,m=0,n=[];;){if(c(U),m>=l)return n;g=c(V),h=[],","===g.slice(-1)?(g=g.replace(W,""),e()):f()}}function n(a){function b(a){function b(){f&&(g.push(f),f="")}function c(){g[0]&&(h.push(g),g=[])}for(var e,f="",g=[],h=[],i=0,j=0,k=!1;;){if(e=a.charAt(j),""===e)return b(),c(),h;if(k){if("*"===e&&"/"===a[j+1]){k=!1,j+=2,b();continue}j+=1}else{if(d(e)){if(a.charAt(j-1)&&d(a.charAt(j-1))||!f){j+=1;continue}if(0===i){b(),j+=1;continue}e=" "}else if("("===e)i+=1;else if(")"===e)i-=1;else{if(","===e){b(),c(),j+=1;continue}if("/"===e&&"*"===a.charAt(j+1)){k=!0,j+=2;continue}}f+=e,j+=1}}}function c(a){return k.test(a)&&parseFloat(a)>=0?!0:l.test(a)?!0:"0"===a||"-0"===a||"+0"===a?!0:!1}var e,f,g,h,i,j,k=/^(?:[+-]?[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?(?:ch|cm|em|ex|in|mm|pc|pt|px|rem|vh|vmin|vmax|vw)$/i,l=/^calc\((?:[0-9a-z \.\+\-\*\/\(\)]+)\)$/i;for(f=b(a),g=f.length,e=0;g>e;e++)if(h=f[e],i=h[h.length-1],c(i)){if(j=i,h.pop(),0===h.length)return j;if(h=h.join(" "),s.matchesMedia(h))return j}return"100vw"}b.createElement("picture");var o,p,q,r,s={},t=!1,u=function(){},v=b.createElement("img"),w=v.getAttribute,x=v.setAttribute,y=v.removeAttribute,z=b.documentElement,A={},B={algorithm:""},C="data-pfsrc",D=C+"set",E=navigator.userAgent,F=/rident/.test(E)||/ecko/.test(E)&&E.match(/rv\:(\d+)/)&&RegExp.$1>35,G="currentSrc",H=/\s+\+?\d+(e\d+)?w/,I=/(\([^)]+\))?\s*(.+)/,J=a.picturefillCFG,K="position:absolute;left:0;visibility:hidden;display:block;padding:0;border:none;font-size:1em;width:1em;overflow:hidden;clip:rect(0px, 0px, 0px, 0px)",L="font-size:100%!important;",M=!0,N={},O={},P=a.devicePixelRatio,Q={px:1,"in":96},R=b.createElement("a"),S=!1,T=/^[ \t\n\r\u000c]+/,U=/^[, \t\n\r\u000c]+/,V=/^[^ \t\n\r\u000c]+/,W=/[,]+$/,X=/^\d+$/,Y=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,Z=function(a,b,c,d){a.addEventListener?a.addEventListener(b,c,d||!1):a.attachEvent&&a.attachEvent("on"+b,c)},$=function(a){var b={};return function(c){return c in b||(b[c]=a(c)),b[c]}},_=function(){var a=/^([\d\.]+)(em|vw|px)$/,b=function(){for(var a=arguments,b=0,c=a[0];++b in a;)c=c.replace(a[b],a[++b]);return c},c=$(function(a){return"return "+b((a||"").toLowerCase(),/\band\b/g,"&&",/,/g,"||",/min-([a-z-\s]+):/g,"e.$1>=",/max-([a-z-\s]+):/g,"e.$1<=",/calc([^)]+)/g,"($1)",/(\d+[\.]*[\d]*)([a-z]+)/g,"($1 * e.$2)",/^(?!(e.[a-z]|[0-9\.&=|><\+\-\*\(\)\/])).*/gi,"")+";"});return function(b,d){var e;if(!(b in N))if(N[b]=!1,d&&(e=b.match(a)))N[b]=e[1]*Q[e[2]];else try{N[b]=new Function("e",c(b))(Q)}catch(f){}return N[b]}}(),aa=function(a,b){return a.w?(a.cWidth=s.calcListLength(b||"100vw"),a.res=a.w/a.cWidth):a.res=a.d,a},ba=function(a){if(t){var c,d,e,f=a||{};if(f.elements&&1===f.elements.nodeType&&("IMG"===f.elements.nodeName.toUpperCase()?f.elements=[f.elements]:(f.context=f.elements,f.elements=null)),c=f.elements||s.qsa(f.context||b,f.reevaluate||f.reselect?s.sel:s.selShort),e=c.length){for(s.setupRun(f),S=!0,d=0;e>d;d++)s.fillImg(c[d],f);s.teardownRun(f)}}};o=a.console&&console.warn?function(a){console.warn(a)}:u,G in v||(G="src"),A["image/jpeg"]=!0,A["image/gif"]=!0,A["image/png"]=!0,A["image/svg+xml"]=b.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image","1.1"),s.ns=("pf"+(new Date).getTime()).substr(0,9),s.supSrcset="srcset"in v,s.supSizes="sizes"in v,s.supPicture=!!a.HTMLPictureElement,s.supSrcset&&s.supPicture&&!s.supSizes&&!function(a){v.srcset="data:,a",a.src="data:,a",s.supSrcset=v.complete===a.complete,s.supPicture=s.supSrcset&&s.supPicture}(b.createElement("img")),s.supSrcset&&!s.supSizes?!function(){var a="data:image/gif;base64,R0lGODlhAgABAPAAAP///wAAACH5BAAAAAAALAAAAAACAAEAAAICBAoAOw==",c="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",d=b.createElement("img"),e=function(){var a=d.width;2===a&&(s.supSizes=!0),q=s.supSrcset&&!s.supSizes,t=!0,setTimeout(ba)};d.onload=e,d.onerror=e,d.setAttribute("sizes","9px"),d.srcset=c+" 1w,"+a+" 9w",d.src=c}():t=!0,s.selShort="picture>img,img[srcset]",s.sel=s.selShort,s.cfg=B,s.DPR=P||1,s.u=Q,s.types=A,s.setSize=u,s.makeUrl=$(function(a){return R.href=a,R.href}),s.qsa=function(a,b){return"querySelector"in a?a.querySelectorAll(b):[]},s.matchesMedia=function(){return a.matchMedia&&(matchMedia("(min-width: 0.1em)")||{}).matches?s.matchesMedia=function(a){return!a||matchMedia(a).matches}:s.matchesMedia=s.mMQ,s.matchesMedia.apply(this,arguments)},s.mMQ=function(a){return a?_(a):!0},s.calcLength=function(a){var b=_(a,!0)||!1;return 0>b&&(b=!1),b},s.supportsType=function(a){return a?A[a]:!0},s.parseSize=$(function(a){var b=(a||"").match(I);return{media:b&&b[1],length:b&&b[2]}}),s.parseSet=function(a){return a.cands||(a.cands=m(a.srcset,a)),a.cands},s.getEmValue=function(){var a;if(!p&&(a=b.body)){var c=b.createElement("div"),d=z.style.cssText,e=a.style.cssText;c.style.cssText=K,z.style.cssText=L,a.style.cssText=L,a.appendChild(c),p=c.offsetWidth,a.removeChild(c),p=parseFloat(p,10),z.style.cssText=d,a.style.cssText=e}return p||16},s.calcListLength=function(a){if(!(a in O)||B.uT){var b=s.calcLength(n(a));O[a]=b?b:Q.width}return O[a]},s.setRes=function(a){var b;if(a){b=s.parseSet(a);for(var c=0,d=b.length;d>c;c++)aa(b[c],a.sizes)}return b},s.setRes.res=aa,s.applySetCandidate=function(a,b){if(a.length){var c,d,e,f,h,k,l,m,n,o=b[s.ns],p=s.DPR;if(k=o.curSrc||b[G],l=o.curCan||j(b,k,a[0].set),l&&l.set===a[0].set&&(n=F&&!b.complete&&l.res-.1>p,n||(l.cached=!0,l.res>=p&&(h=l))),!h)for(a.sort(i),f=a.length,h=a[f-1],d=0;f>d;d++)if(c=a[d],c.res>=p){e=d-1,h=a[e]&&(n||k!==s.makeUrl(c.url))&&g(a[e].res,c.res,p,a[e].cached)?a[e]:c;break}h&&(m=s.makeUrl(h.url),o.curSrc=m,o.curCan=h,m!==k&&s.setSrc(b,h),s.setSize(b))}},s.setSrc=function(a,b){var c;a.src=b.url,"image/svg+xml"===b.set.type&&(c=a.style.width,a.style.width=a.offsetWidth+1+"px",a.offsetWidth+1&&(a.style.width=c))},s.getSet=function(a){var b,c,d,e=!1,f=a[s.ns].sets;for(b=0;b<f.length&&!e;b++)if(c=f[b],c.srcset&&s.matchesMedia(c.media)&&(d=s.supportsType(c.type))){"pending"===d&&(c=d),e=c;break}return e},s.parseSets=function(a,b,d){var e,f,g,h,i=b&&"PICTURE"===b.nodeName.toUpperCase(),j=a[s.ns];(j.src===c||d.src)&&(j.src=w.call(a,"src"),j.src?x.call(a,C,j.src):y.call(a,C)),(j.srcset===c||d.srcset||!s.supSrcset||a.srcset)&&(e=w.call(a,"srcset"),j.srcset=e,h=!0),j.sets=[],i&&(j.pic=!0,l(b,j.sets)),j.srcset?(f={srcset:j.srcset,sizes:w.call(a,"sizes")},j.sets.push(f),g=(q||j.src)&&H.test(j.srcset||""),g||!j.src||k(j.src,f)||f.has1x||(f.srcset+=", "+j.src,f.cands.push({url:j.src,d:1,set:f}))):j.src&&j.sets.push({srcset:j.src,sizes:null}),j.curCan=null,j.curSrc=c,j.supported=!(i||f&&!s.supSrcset||g&&!s.supSizes),h&&s.supSrcset&&!j.supported&&(e?(x.call(a,D,e),a.srcset=""):y.call(a,D)),j.supported&&!j.srcset&&(!j.src&&a.src||a.src!==s.makeUrl(j.src))&&(null===j.src?a.removeAttribute("src"):a.src=j.src),j.parsed=!0},s.fillImg=function(a,b){var c,d=b.reselect||b.reevaluate;a[s.ns]||(a[s.ns]={}),c=a[s.ns],(d||c.evaled!==r)&&((!c.parsed||b.reevaluate)&&s.parseSets(a,a.parentNode,b),c.supported?c.evaled=r:h(a))},s.setupRun=function(){(!S||M||P!==a.devicePixelRatio)&&f()},s.supPicture?(ba=u,s.fillImg=u):!function(){var c,d=a.attachEvent?/d$|^c/:/d$|^c|^i/,e=function(){var a=b.readyState||"";f=setTimeout(e,"loading"===a?200:999),b.body&&(s.fillImgs(),c=c||d.test(a),c&&clearTimeout(f))},f=setTimeout(e,b.body?9:99),g=function(a,b){var c,d,e=function(){var f=new Date-d;b>f?c=setTimeout(e,b-f):(c=null,a())};return function(){d=new Date,c||(c=setTimeout(e,b))}},h=z.clientHeight,i=function(){M=Math.max(a.innerWidth||0,z.clientWidth)!==Q.width||z.clientHeight!==h,h=z.clientHeight,M&&s.fillImgs()};Z(a,"resize",g(i,99)),Z(b,"readystatechange",e)}(),s.picturefill=ba,s.fillImgs=ba,s.teardownRun=u,ba._=s,a.picturefillCFG={pf:s,push:function(a){var b=a.shift();"function"==typeof s[b]?s[b].apply(s,a):(B[b]=a[0],S&&s.fillImgs({reselect:!0}))}};for(;J&&J.length;)a.picturefillCFG.push(J.shift());a.picturefill=ba,"object"==typeof module&&"object"==typeof module.exports?module.exports=ba:"function"==typeof define&&define.amd&&define("picturefill",function(){return ba}),s.supPicture||(A["image/webp"]=e("image/webp","data:image/webp;base64,UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAABBxAR/Q9ERP8DAABWUDggGAAAADABAJ0BKgEAAQADADQlpAADcAD++/1QAA=="))}(window,document);
8512 8513 8514 8515function obscureAddMid() { 8516 document.write('@'); 8517} 8518function obscureAddEnd() { 8519 document.write('.'); 8520} 8521 8522 8523function osScrollTo(top) { 8524 // Add little offset space 8525 // Navbar Toggle always shown, so substract it from scroll position 8526 var offset = 15, 8527 navbarToggleHeight = getFixedHeaderHeight(); 8528 8529 jQuery('html,body').animate({scrollTop:top-navbarToggleHeight-offset}, '500', 'swing'); 8530} 8531 8532function getInnerFullHeight($elements, selector) { 8533 var h = 0; 8534 for(var i in $elements) 8535 if($elements[i].find(selector).length) 8536 h += Math.floor($elements[i].find(selector).outerHeight()); 8537 return h; 8538} 8539 8540function getFixedHeaderHeight() { 8541 return getInnerFullHeight(getFixedHeaderElements(), '> div'); 8542} 8543 8544function getFixedHeaderElements() { 8545 return [ 8546 $('#header > .page-header'), 8547 $('#header > .page-menu') 8548 ]; 8549} 8550 8551function updateFix($pelement, $aBefore) { 8552 $pelementInner = $pelement.find('> div'); 8553 // Update outer height of parent placeholder element 8554 $pelement.height($pelementInner.outerHeight()); 8555 // Set top offset of fixed inner element 8556 var h = getInnerFullHeight($aBefore, '> div'); 8557 // If not first element, push one pixel below 8558 //if($aBefore.length > 0) h++; 8559 8560 $pelementInner.css('top',h); 8561} 8562 8563/** 8564 * Affix header element (BETA) 8565 * TODO: Add options to dynamically add elements / multiple elements / ... 8566 * @author: Kabaz (Kai Vier) 8567 **/ 8568function headerAffix() { 8569 const outerFrame = '#header'; 8570 const affixElements = getFixedHeaderElements(); 8571 8572 var $pheader = affixElements[0]; 8573 var $pmenu = affixElements[1]; 8574 8575 $pheader.addClass('fixed-header-element'); 8576 $pmenu.addClass('fixed-header-element'); 8577 8578 // If layout header, menu, ... 8579 updateFix($pheader, []); 8580 updateFix($pmenu, [$pheader]); 8581 $(window).on('resize', function() { 8582 updateFix($pheader, []); 8583 updateFix($pmenu, [$pheader]); 8584 }); 8585} 8586 8587/** 8588 * Offcanvas 8589 **/ 8590$(function() { 8591 $('#js-bootstrap-offcanvas').prepend('<i class="fa fa-bars offcanvas-toggle" aria-hidden="true" data-toggle="offcanvas" data-target="#js-bootstrap-offcanvas"></i>'); 8592 $('.offcanvas-toggle').on('click', function(e) { 8593 e.preventDefault(); 8594 toggleNav(); 8595 }); 8596 $('#js-bootstrap-offcanvas .nav-link').on('click', function() { 8597 // If nav-link has href, toggle (close) nav (could be anchor link on same page) 8598 if(typeof $(this).attr('href') !== 'undefined') 8599 toggleNav(); 8600 }); 8601}); 8602 8603function toggleNav() { 8604 $joc = $("#js-bootstrap-offcanvas"); 8605 $jtoggle = $('.offcanvas-toggle'); 8606 if($joc.hasClass('in')) { 8607 $joc.removeClass('in'); 8608 $jtoggle.removeClass('is-open'); 8609 } else { 8610 $joc.addClass('in'); 8611 $jtoggle.addClass('is-open'); 8612 } 8613} 8614 8615 8616/** 8617 * Nav Collapser 8618 **/ 8619$(function() { 8620 8621 $('.nav .collapser').click(function(e) { 8622 e.preventDefault(); 8623 toggleSubNav($(this).parent()); 8624 return false; 8625 }); 8626 8627 $('.nav .nav-link').click(function(e) { 8628 if(typeof $(this).attr('href') === 'undefined') { 8629 e.preventDefault(); 8630 toggleSubNav($(this).parent()); 8631console.log("toggle link"); 8632 return false; 8633 } 8634 }); 8635 8636}); 8637 8638function toggleSubNav($jNavItem) { 8639 if($jNavItem.hasClass('open')) { 8640 $jNavItem.attr('aria-expanded', 'false').removeClass('open'); 8641 $jNavItem.find('> ul').slideUp(); 8642 } else { 8643 $jNavItem.attr('aria-expanded', 'true').addClass('open'); 8644 $jNavItem.find('> ul').slideDown(); 8645 } 8646} 8647 8648/** 8649 * Initial scroll if marker 8650 */ 8651jQuery(window).load(function() { 8652 if(location.href.indexOf('#') > 0) { 8653 var hash = location.href.substring(location.href.indexOf('#')); 8654 8655 if(jQuery(hash).length) 8656 window.setTimeout(function() { 8657 osScrollTo(jQuery(hash).offset().top); 8658 }, 500); 8659 } 8660}); 8661 8662jQuery(document).ready(function() { 8663 8664 // Panel collapse scroll to if hidden 8665 jQuery(".collapse").on('shown.bs.collapse', function(){ 8666 var ot = jQuery(this).offset().top, 8667 wt = jQuery(window).scrollTop(); 8668 8669 if(ot < wt) 8670 osScrollTo(jQuery(this).parent().offset().top); 8671 }); 8672}); 8673 8674function isUtilityLink($element) { 8675 if($element.hasClass('popup')) 8676 return true; 8677 8678 if($element.hasClass('carousel-control')) 8679 return true; 8680
8681 // If is accordion / panel collapse / data-toggle 8682 if($element.hasClass('btn-accordion') || typeof $element.attr('data-toggle') != 'undefined') 8683 return true; 8684 8685 // If is slidedown 8686 if($element.hasClass('slidedown') || $element.closest('.slidedown').length > 0) 8687 return true; 8688 8689 return false; 8690} 8691 8692/** 8693 * Anchor link slider 8694 **/ 8695function anchorLinkListener(e) { 8696 // If link is utility link / has another functionality 8697 if(isUtilityLink($(this))) 8698 return; 8699 8700 // If no href anchor present, do nothing 8701 if(typeof $(this).attr('href') === 'undefined') 8702 return; 8703 8704 var href = jQuery(this).attr('href'), 8705 hash = href.substring(href.indexOf('#')); 8706 8707 // If external Url do nothing 8708 if(href.indexOf('http') >= 0 && href.indexOf(location.host) < 0) 8709 return; 8710 8711 // If anchor is empty, do nothing 8712 if(hash === '#') 8713 return; 8714 8715 // Slide to element 8716 var jE = jQuery(hash); 8717 if(jE.length) { 8718 e.preventDefault(); 8719 8720 var top = jE.offset().top; 8721 osScrollTo(top); 8722 } 8723 8724 // Open panel if necessary 8725 if(jE.hasClass('panel') && !jE.find('.panel-collapse').hasClass('in')) { 8726 jE.find('.panel-heading .btn').click(); //jE.collapse('show'); 8727 } 8728} 8729 8730/* Anchor link slider */ 8731jQuery('body').on('click', 'a[href*="#"]', anchorLinkListener); 8732 8733 8734/* 8735 * Up-Btn link 8736 */ 8737jQuery('body').on('click', 'a.up-btn', function(e){ 8738 e.preventDefault(); 8739 osScrollTo(0); 8740}); 8741 8742 8743/* 8744 * tel-Link action for Desktop 8745 */ 8746jQuery('body').on('click', 'a[href^=tel]', function(e){ 8747 if(jQuery(window).width() >= 768) { 8748 e.preventDefault(); 8749 var m = jQuery('#call-modal'); 8750 if(m.length) 8751 m.modal('show'); 8752 } 8753}); 8754 8755/** 8756 * Checkbox toggle style 8757 **/ 8758$(function() { 8759 jQuery('input[type=checkbox]').on('change', function(e) { 8760 if(jQuery(this)[0].checked) 8761 jQuery(this).closest('.checkbox').addClass('checked'); 8762 else 8763 jQuery(this).closest('.checkbox').removeClass('checked'); 8764 }); 8765}); 8766// Set default optout messages 8767var gaOptoutMessage = { 8768 de: 'Sie haben sich erfolgreich von der Google Analytics Messung ausgeschlossen', 8769 en: 'You have been excluded from Google Analytics recording successfully' 8770} 8771 8772// accept custom optout messages from constants defined before 8773if(typeof GAOPTOUT_MESSAGE_DE != 'undefined') gaOptoutMessage.de = GAOPTOUT_MESSAGE_DE; 8774if(typeof GAOPTOUT_MESSAGE_EN != 'undefined') gaOptoutMessage.en = GAOPTOUT_MESSAGE_EN; 8775 8776/** 8777 * Enable gaOptout links by class-Attribute: gaOptout 8778 */ 8779window.onload = function() { 8780 var matches = document.querySelectorAll('.gaOptout'); 8781 matches.forEach(function(item) { 8782 item.onclick = function() { 8783 gaOptout(); 8784 if(item.className.indexOf('en')>=0) alert(gaOptoutMessage.en); 8785 else alert(gaOptoutMessage.de); 8786 }; 8787 }); 8788}; 8789 8790/** 8791 * Enable gaOptout links by rel-Attribute: gaOptout 8792 */ 8793jQuery(window).load(function() { 8794 jQuery('body').on('click', 'a[rel=gaOptout]', function(e) { 8795 e.preventDefault(); 8796 gaOptout(); 8797 if($(this).hasClass('en')) alert(gaOptoutMessage.en); 8798 else alert(gaOptoutMessage.de); 8799 return false; 8800 }); 8801}); 8802 8803 8804/* DrFlex Popup Listener */ 8805jQuery('body').on('click', '.toggleDrFlexAppointments', function(e){ 8806 e.preventDefault(); 8807 toggleDrFlexAppointments(); 8808}); 8809 8810var modalTemplate = '<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"><div class="modal-dialog"><div class="modal-content">' 8811+ '<div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="SchlieÃen"><span aria-hidden="true">×</span></button><h3 class="modal-title">Modal Title</h3></div>' 8812+ '<div class="modal-body"></div>' 8813+ '<div class="modal-footer"><button type="button" class="btn btn-default" data-dismiss="modal">SchlieÃen</button></div>' 8814+ '</div></div></div>'; 8815 8816function initPopupContent(jpc) { 8817 var jM = jQuery(modalTemplate).clone(true,true); 8818 8819 if(jpc.attr('id') == "") 8820 return; 8821 8822 jM.attr('id', 'popup-'+jpc.attr('id')); 8823 8824 var jTitle = jpc.find('> h1, > h2, > h3, > p'); 8825 jM.find('.modal-title').html(jTitle.html()); 8826 var jBody = jpc.find('.ce-bodytext').html();
8827 jM.find('.modal-body').html(jBody); 8828 8829 jQuery('body').append(jM); 8830} 8831 8832/** 8833 * Initialize Auto Popup 8834 * 8835 * lib = fancybox | magnific | ... 8836 */ 8837function initPopupAuto(lib) { 8838 console.log("Cookie Popup: Init ("+lib+")"); 8839 8840 if(typeof lib == "undefined" || lib == "") { 8841 console.error("Cookie Popup: Popup library not defined!"); 8842 return; 8843 } 8844 8845 jQuery('.popup-content.popup-auto').each(function() { 8846 var id = jQuery(this).attr('id'); 8847 if(typeof id != "undefined" && id != "") { 8848 // return, if the cookie of this popup is already set (popup should not be displayed) 8849 var dataCookie = jQuery(this).attr('data-popup-cookie'); 8850 if(typeof dataCookie != "undefined" && dataCookie != "" && ipGetCookie(dataCookie)) 8851 return; 8852 8853 console.log("Cookie Popup: Open ("+jQuery(this).attr('id')+")"); 8854 8855 // Create popup 8856 if(lib == 'fancybox') 8857 createPopupFancybox(id, jQuery(this)); 8858 else if(lib == 'magnific') 8859 createPopupMagnific(id, jQuery(this)); 8860 else if(lib == 'simplemodal') 8861 createPopupSimpleModal(id, jQuery(this)); 8862 else if(lib == 'bootstrapmodal') 8863 createPopupBootstrapModal(id, jQuery(this)); 8864 8865 // Set cookie 8866 if(typeof dataCookie != "undefined" && dataCookie != "") 8867 ipSetCookie(dataCookie,1); 8868 } 8869 }); 8870} 8871function createPopupFancybox(id, jThis) { 8872 var dataStyle = jThis.attr('data-popup-style'); 8873 var baseClass = (typeof dataStyle != "undefined" && dataStyle != "") ? dataStyle : ''; 8874 8875 jQuery.fancybox.open({ 8876 src : '#'+id, 8877 type : 'inline', 8878 baseClass : baseClass 8879 }); 8880} 8881function createPopupMagnific(id, jThis) { 8882 $.magnificPopup.open({ 8883 items: { 8884 src: '#'+id 8885 }, 8886 type: 'inline' 8887 }, 0); 8888} 8889function createPopupSimpleModal(id, jThis) { 8890 $("#"+id).modal(); 8891} 8892function createPopupBootstrapModal(id, jThis) { 8893 var jMd = jQuery('#popup-'+id).length ? jQuery('#popup-'+id) : jQuery('#'+id); 8894 if(jMd.length) { 8895 jMd.modal('show'); 8896 } 8897} 8898function ipSetCookie(name,value,days) { 8899 var expires = ""; 8900 if (days) { 8901 var date = new Date(); 8902 date.setTime(date.getTime() + (days*24*60*60*1000)); 8903 expires = "; expires=" + date.toUTCString(); 8904 } 8905 document.cookie = name + "=" + (value || "") + expires + "; path=/"; 8906} 8907function ipGetCookie(name) { 8908 var nameEQ = name + "="; 8909 var ca = document.cookie.split(';'); 8910 for(var i=0;i < ca.length;i++) { 8911 var c = ca[i]; 8912 while (c.charAt(0)==' ') c = c.substring(1,c.length); 8913 if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); 8914 } 8915 return null; 8916} 8917function getFullYear() {return new Date().getFullYear()} 8918function getMonthFullYear() { 8919 const months = ["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]; 8920 return months[(new Date()).getMonth()] + " " + new Date().getFullYear(); 8921} 8922function printAutoDates() { 8923 var els = document.getElementsByClassName('print-current-year'); 8924 for(var i=0; i<els.length;i++) {els[i].innerHTML = getFullYear()};
8925 els = document.getElementsByClassName('print-current-month-year'); 8926 for(var i=0; i<els.length;i++) {els[i].innerHTML = getMonthFullYear()}; 8927} 8928window.addEventListener('load', printAutoDates); 8929 8930var modalContent = '<div class="modal fade" id="myModel" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"><div class="modal-dialog"><div class="modal-content">' 8931+ '<div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="SchlieÃen"><span aria-hidden="true">×</span></button><h3 class="modal-title">Modal Title</h3></div>' 8932+ '<div class="modal-body"></div>' 8933+ '<div class="modal-footer"><button type="button" class="btn btn-default" data-dismiss="modal">SchlieÃen</button></div>' 8934+ '</div></div></div>'; 8935 8936var jM = null; 8937 8938jQuery(document).ready(function() { 8939 8940 // Modal 8941 jM = jQuery(modalContent); 8942 jM.attr('id', 'callPopupModal'); 8943 var jTitle = jQuery('#call-popup > h1, #call-popup > h2, #call-popup > h3, #call-popup > p'); 8944 jM.find('.modal-title').html(jTitle.html()); 8945 var jBody = jQuery('#call-popup .ce-bodytext').html(); 8946 jM.find('.modal-body').html(jBody); 8947 8948 jQuery('body').append(jM); 8949 8950 8951 8952 // Panel collapse scroll to if hidden 8953 jQuery(".collapse").on('shown.bs.collapse', function(){ 8954 var ot = jQuery(this).offset().top, 8955 wt = jQuery(window).scrollTop(); 8956 8957 if(ot < wt) 8958 osScrollTo(jQuery(this).parent().offset().top); 8959 }); 8960}); 8961 8962 8963/* 8964 * Overwrite target for internal links (t3 rte bugfix) 8965 */ 8966jQuery('a.internal-link').attr('target', '_top'); 8967 8968/** 8969 * Init popups 8970 **/ 8971$(document).ready(function() { 8972 // Popups from classes 8973 jQuery('.popup-content').each(function() { 8974 var jpc = jQuery(this); 8975 initPopupContent(jpc); 8976 }); 8977 // Auto Popup 8978 initPopupAuto('bootstrapmodal'); 8979 // Set popup link listeners 8980 jQuery('body').on('click', 'a.popup', function(e) { 8981 e.preventDefault(); 8982 8983 var href = jQuery(this).attr('href'), 8984 hash = href.substring(href.indexOf('#')); 8985 8986 var jMd = jQuery(hash); 8987 if(jMd.length) 8988 jMd.modal('show'); 8989 }); 8990 jQuery(".popup-iframe").fancybox({type:'iframe',minHeight:320,afterShow: function() { 8991 window.setTimeout(() => { 8992 $.fancybox.update(); 8993 },2000); 8994 }}); 8995}); 8996 8997/** 8998 * Fixed Header initialization 8999 */ 9000$(window).on('load', function () { 9001 headerAffix(); 9002}); 9003 9004window.addEventListener("load", function() { 9005 if(document.querySelector('input.powermail_submit')) { 9006 document.querySelector('input.powermail_submit').addEventListener("click", function() { 9007 var submit = this; 9008 var form = this.form; 9009 window.setTimeout(function(){ 9010 if(form.querySelectorAll('.parsley-error').length>0) 9011 submit.removeAttribute('disabled'); 9012 else 9013 submit.setAttribute('disabled', true); 9014 },250); 9015 }); 9016 } 9017}); 9018/** 9019 * UserCentrics Overlays 9020 * @author Kai Vier 9021 */ 9022var UCOverlays = { 9023 9024 defaults: { 9025 selector: { 9026 container: '.uc-overlay', 9027 }, 9028 label: { 9029 title: 'Wir benötigen Ihre Zustimmung, um den Service zu laden!', 9030 no_service: 'Dieser Inhalt kann nicht freigegeben werden, da der Betreiber dieser Webseite die CMP-Konfiguration für diese Technologie nicht abgeschlossen hat.', 9031 btn_info: 'Mehr Informationen', 9032 btn_accept: 'Akzeptieren', 9033 powered_by: '<span>Powered by <a target="_blank" class="uc-embedding-powered-by" href="https://usercentrics.com/">Usercentrics Consent Management Platform</a></span>' 9034 }, 9035 // Services that are in use 9036 service: [], 9037 className: { 9038 blocked: 'uc-blocked' 9039 } 9040 }, 9041 opts: {}, 9042 9043 /** 9044 * Initialize with event listeners 9045 **/ 9046 init: function(opts) { 9047 this.opts = this.defaults; 9048 $.extend(true, this.opts, opts); // deep copy 9049 this.updateOverlays(); 9050 }, 9051 9052 updateOverlays: function() { 9053 var _this = this; 9054 jQuery(this.opts.selector.container).each(function() { 9055 var _this2 = this; 9056 var s = {}; 9057 s.id = jQuery(this).attr('data-uc-service-id'); 9058 9059 _this.getService(s.id).then(function(service) { 9060 if(service.consent.given == false) { 9061 _this.setTemplate(_this2, s.id, s, _this.opts.label); 9062 } else { 9063 _this.hide(s.id); 9064 } 9065 }, function(error) { 9066 _this.setTemplate(this2, s.id, s, _this.opts.label); 9067 }); 9068 9069 }); 9070 }, 9071 9072 // Get template 9073 setTemplate: function(el, id, service, labels) { 9074 jQuery(el).append(jQuery(this.getTemplate(id, service, labels))); 9075 }, 9076 9077 // Get template 9078 getTemplate: function(id, service, labels) { 9079 return ` 9080 <div class="uc-embedding-wrapper"> 9081 <h3>`+labels.title+`</h3> 9082 <div class="uc-embedding-buttons"> 9083 <button type="button" class="uc-embedding-more-info" onclick="UCOverlays.moreInfo('`+id+`')">`+labels.btn_info+`</button> 9084 <button type="button" class="uc-embedding-accept" onclick="UCOverlays.acceptService('`+id+`')">`+labels.btn_accept+`</button> 9085 </div>`+labels.powered_by+` 9086 </div>`; 9087 }, 9088 9089 getService: async function(id) { 9090 return (await __ucCmp.getConsentDetails(id)).services[id]; 9091 //__ucCmp.showServiceDetails(id); 9092 }, 9093 9094 acceptService: async function(id) { 9095 await __ucCmp.updateServicesConsents([{id:id,consent:true}]); 9096 await __ucCmp.saveConsents(); 9097 UCOverlays.hide(id); 9098 }, 9099 9100 moreInfo: function(id) { 9101 __ucCmp.showServiceDetails(id); 9102 }, 9103 9104 hide: function(id) { 9105 jQuery(this.opts.selector.container+'[data-uc-service-id="'+id+'"]').each(function() { 9106 jQuery(this).addClass('hidden'); 9107 }); 9108 } 9109}; 9110 9111window.addEventListener("load",() => {
9112 UCOverlays.init(); 9113}); 9114 9115window.addEventListener("load", function() { 9116 jQuery('a.zl-url').click(function(e) { 9117 if(jQuery(this).find('.uc-embedding-wrapper').length) e.preventDefault(); 9118 }); 9119}); 9120// Copy page-menu to page-banner. Hack for Layout "Head > Banner > Menu" with fixed menu 9121if(document.querySelector('.page-banner .page-menu') == null) { 9122 var html = document.querySelector('.page-menu').innerHTML; 9123 var el = document.createElement('div'); 9124 el.innerHTML = html; 9125 el.setAttribute( 'class', 'page-menu' ); 9126 document.querySelector('.page-banner').appendChild( el ); 9127} 9128 9129$(document).ready(function() { 9130 // Transition effect for navbar 9131 $(window).scroll(function() { 9132 // checks if window is scrolled more than 500px, adds/removes solid class 9133 if($(this).scrollTop() > 500) $('.page-header, .page-menu').addClass('solid'); 9134 else $('.page-header, .page-menu').removeClass('solid'); 9135 }); 9136});
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.