vendor: 4,537 bytes, lines 1-2
1/*! jQuery v1.11.2 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ 2!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=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.2",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.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(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.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||m.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&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)+1>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.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,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function r(a){var b=a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var s=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*ne
vendor: 3,071 bytes, line 2
2w Date,v=a.document,w=0,x=0,y=hb(),z=hb(),A=hb(),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=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+L+"*,"+L+"*"),T=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),U=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),V=new RegExp(P),W=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+P),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")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),db=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)},eb=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fb){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 gb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],k=b.nodeType,"string"!=typeof a||!a||1!==k&&9!==k&&11!==k)return d;if(!e&&p){if(11!==k&&(f=_.exec(a)))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return H.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName)return H.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=1!==k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+rb(o[l]);w=ab.test(a)&&pb(b.parentNode)||b,x=o.join(",")}if(x)try{return H.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function hb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ib(a){return a[u]=!0,a}
vendor: 9,785 bytes, line 2
2function jb(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function kb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function lb(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 mb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function nb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function ob(a){return ib(function(b){return b=+b,ib(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 pb(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=gb.support={},f=gb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=gb.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=g.documentElement,e=g.defaultView,e&&e!==e.top&&(e.addEventListener?e.addEventListener("unload",eb,!1):e.attachEvent&&e.attachEvent("onunload",eb)),p=!f(g),c.attributes=jb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=jb(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=jb(function(a){return o.appendChild(a).id=u,!g.getElementsByName||!g.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.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);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 p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(g.querySelectorAll))&&(jb(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\f]' 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(".#.+[+~]")}),jb(function(a){var b=g.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=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&jb(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",P)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.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===g||a.ownerDocument===v&&t(v,a)?-1:b===g||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,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return lb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?lb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},gb.matches=function(a,b){return gb(a,null,null,b)},gb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||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 gb(b,n,null,[a]).length>0},gb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},gb.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},gb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},gb.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=gb.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=gb.selectors={cacheLength:50,createPseudo:ib,match:X,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(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===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]||gb.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]&&gb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.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(cb,db).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=gb.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(Q," ")+" ").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;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||gb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ib(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:ib(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ib(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:ib(function(a){return function(b){return gb(a,b).length>0}}),contains:ib(function(a){return a=a.replace(cb,db),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ib(function(a){return W.test(a||"")||gb.error("unsupported lang: "+a),a=a.replace(cb,db).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 Z.test(a.nodeName)}
vendor: 7,673 bytes, line 2
2,input:function(a){return Y.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:ob(function(){return[0]}),last:ob(function(a,b){return[b-1]}),eq:ob(function(a,b,c){return[0>c?c+b:c]}),even:ob(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:ob(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:ob(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:ob(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]=mb(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=nb(b);function qb(){}qb.prototype=d.filters=d.pseudos,d.setFilters=new qb,g=gb.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=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[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?gb.error(a):z(a,i).slice(0)};function rb(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function sb(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=[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(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function tb(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 ub(a,b,c){for(var d=0,e=b.length;e>d;d++)gb(a,b[d],c);return c}function vb(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 wb(a,b,c,d,e,f){return d&&!d[u]&&(d=wb(d)),e&&!e[u]&&(e=wb(e,f)),ib(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ub(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:vb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=vb(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=vb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sb(function(a){return a===b},h,!0),l=sb(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=[sb(tb(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 wb(i>1&&tb(m),i>1&&rb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xb(a.slice(i,e)),f>e&&xb(a=a.slice(e)),f>e&&rb(a))}m.push(c)}return tb(m)}function yb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=F.call(i));s=vb(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&gb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ib(f):f}return h=gb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=xb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,yb(e,d)),f.selector=a}return f},i=gb.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(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.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(cb,db),ab.test(j[0].type)&&pb(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&rb(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&pb(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=jb(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),jb(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||kb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&jb(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||kb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),jb(function(a){return null==a.getAttribute("disabled")})||kb(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}),gb}(a);m.find=s,m.expr=s.selectors,m.expr[":"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/^.[^:#\[\.,]*$/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,"string"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?"undefined"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];
vendor: 4,825 bytes, line 2
2while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||"string"!=typeof a?m(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&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?"string"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,"parentNode")},parentsUntil:function(a,b,c){return m.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return m.dir(a,"nextSibling")},prevAll:function(a){return m.dir(a,"previousSibling")},nextUntil:function(a,b,c){return m.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return m.dir(a,"previousSibling",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[["resolve","done",m.Callbacks("once memory"),"resolved"],["reject","fail",m.Callbacks("once memory"),"rejected"],["notify","progress",m.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.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=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)}
vendor: 4,062 bytes, lines 2-3
2,ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler("ready"),m(y).off("ready")))}}});function I(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",J,!1),a.removeEventListener("load",J,!1)):(y.detachEvent("onreadystatechange",J),a.detachEvent("onload",J))}function J(){(y.addEventListener||"load"===event.type||"complete"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),"complete"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener("DOMContentLoaded",J,!1),a.addEventListener("load",J,!1);else{y.attachEvent("onreadystatechange",J),a.attachEvent("onload",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K="undefined",L;for(L in m(k))break;k.ownLast="0"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement("div");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(N,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if(("data"!==b||!m.isEmptyObject(a[b]))&&"toJSON"!==b)return!1; 3return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.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()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.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=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;
vendor: 18,810 bytes, line 3
3return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.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 m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?m.queue(this[0],a):void 0===b?this:this.each(function(){var c=m.queue(this,a,b);m._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&m.dequeue(this,a)})},dequeue:function(a){return this.each(function(){m.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=m.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=m._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var S=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=["Top","Right","Bottom","Left"],U=function(a,b){return a=b||a,"none"===m.css(a,"display")||!m.contains(a.ownerDocument,a)},V=m.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===m.type(c)){e=!0;for(h in c)m.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,m.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(m(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},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav></:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="<input type='radio' checked='checked' name='t'/>",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function ab(){return!0}function bb(){return!1}function cb(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.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?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!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&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[m.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=Z.test(e)?this.mouseHooks:Y.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new m.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||y),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,g.filter?g.filter(a,f):a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(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,d,e,f=b.button,g=b.fromElement;return null==a.pageX&&null!=b.clientX&&(d=a.target.ownerDocument||y,e=d.documentElement,c=d.body,a.pageX=b.clientX+(e&&e.scrollLeft||c&&c.scrollLeft||0)-(e&&e.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||c&&c.scrollTop||0)-(e&&e.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&g&&(a.relatedTarget=g===a.target?b.toElement:g),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==cb()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===cb()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return m.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return m.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=m.extend(new m.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?m.event.trigger(e,null,b):m.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},m.removeEvent=y.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]===K&&(a[d]=null),a.detachEvent(d,c))},m.Event=function(a,b){return this instanceof m.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?ab:bb):this.type=a,b&&m.extend(this,b),this.timeStamp=a&&a.timeStamp||m.now(),void(this[m.expando]=!0)):new m.Event(a,b)},m.Event.prototype={isDefaultPrevented:bb,isPropagationStopped:bb,isImmediatePropagationStopped:bb,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=ab,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=ab,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=ab,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},m.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){m.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!m.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.submitBubbles||(m.event.special.submit={setup:function(){return m.nodeName(this,"form")?!1:void m.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=m.nodeName(b,"input")||m.nodeName(b,"button")?b.form:void 0;c&&!m._data(c,"submitBubbles")&&(m.event.add(c,"submit._submit",function(a){a._submit_bubble=!0}),m._data(c,"submitBubbles",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&m.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return m.nodeName(this,"form")?!1:void m.event.remove(this,"._submit")}}),k.changeBubbles||(m.event.special.change={setup:function(){return X.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(m.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),m.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),m.event.simulate("change",this,a,!0)})),!1):void m.event.add(this,"beforeactivate._change",function(a){var b=a.target;X.test(b.nodeName)&&!m._data(b,"changeBubbles")&&(m.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||m.event.simulate("change",this.parentNode,a,!0)}),m._data(b,"changeBubbles",!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 m.event.remove(this,"._change"),!X.test(this.nodeName)}}),k.focusinBubbles||m.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){m.event.simulate(b,a.target,m.event.fix(a),!0)};m.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=m._data(d,b);e||d.addEventListener(a,c,!0),m._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=m._data(d,b)-1;e?m._data(d,b,e):(d.removeEventListener(a,c,!0),m._removeData(d,b))}}}),m.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(f in a)this.on(f,b,c,a[f],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=bb;else if(!d)return this;return 1===e&&(g=d,d=function(a){return m().off(a),g.apply(this,arguments)},d.guid=g.guid||(g.guid=m.guid++)),this.each(function(){m.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,m(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=bb),this.each(function(){m.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){m.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?m.event.trigger(a,b,c,!0):void 0}});function db(a){var b=eb.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}var eb="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",fb=/ jQuery\d+="(?:null|\d+)"/g,gb=new RegExp("<(?:"+eb+")[\\s/>]","i"),hb=/^\s+/,ib=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,jb=/<([\w:]+)/,kb=/<tbody/i,lb=/<|&#?\w+;/,mb=/<(?:script|style|link)/i,nb=/checked\s*(?:[^=]|=\s*.checked.)/i,ob=/^$|\/(?:java|ecma)script/i,pb=/^true\/(.*)/,qb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,rb={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:k.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},sb=db(y),tb=sb.appendChild(y.createElement("div"));rb.optgroup=rb.option,rb.tbody=rb.tfoot=rb.colgroup=rb.caption=rb.thead,rb.th=rb.td;function ub(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ub(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function vb(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wb(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xb(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function yb(a){var b=pb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function zb(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Ab(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._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++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Bb(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xb(b).text=a.text,yb(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.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)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!gb.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(tb.innerHTML=a.outerHTML,tb.removeChild(f=tb.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ub(f),h=ub(a),g=0;null!=(e=h[g]);++g)d[g]&&Bb(e,d[g]);if(b)if(c)for(h=h||ub(a),d=d||ub(f),g=0;null!=(e=h[g]);g++)Ab(e,d[g]);else Ab(a,f);return d=ub(f,"script"),d.length>0&&zb(d,!i&&ub(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=db(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(lb.test(f)){h=h||o.appendChild(b.createElement("div")),i=(jb.exec(f)||["",""])[1].toLowerCase(),l=rb[i]||rb._default,h.innerHTML=l[1]+f.replace(ib,"<$1></$2>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&hb.test(f)&&p.push(b.createTextNode(hb.exec(f)[0])),!k.tbody){f="table"!==i||kb.test(f)?"<table>"!==l[1]||kb.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ub(p,"input"),vb),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ub(o.appendChild(f),"script"),g&&zb(h),c)){e=0;while(f=h[e++])ob.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if
vendor: 4,788 bytes, line 3
3(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ub(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&zb(ub(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ub(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.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 m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fb,""):void 0;if(!("string"!=typeof a||mb.test(a)||!k.htmlSerialize&&gb.test(a)||!k.leadingWhitespace&&hb.test(a)||rb[(jb.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ib,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ub(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ub(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&nb.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ub(i,"script"),xb),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ub(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,yb),j=0;f>j;j++)d=g[j],ob.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qb,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Cb,Db={};function Eb(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fb(a){var b=y,c=Db[a];return c||(c=Eb(a,b),"none"!==c&&c||(Cb=(Cb||m("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Cb[0].contentWindow||Cb[0].contentDocument).document,b.write(),b.close(),c=Eb(a,b),Cb.detach()),Db[a]=c),c}!function(){var a;k.shrinkWrapBlocks=function(){if(null!=a)return a;a=!1;var b,c,d;return c=y.getElementsByTagName("body")[0],c&&c.style?(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(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(y.createElement("div")).style.width="5px",a=3!==b.offsetWidth),c.removeChild(d),a):void 0}}();var Gb=/^margin/,Hb=new RegExp("^("+S+")(?!px)[a-z%]+$","i"),Ib,Jb,Kb=/^(top|right|bottom|left)$/;a.getComputedStyle?(Ib=function(b){return b.ownerDocument.defaultView.opener?b.ownerDocument.defaultView.getComputedStyle(b,null):a.getComputedStyle(b,null)},Jb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ib(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||m.contains(a.ownerDocument,a)||(g=m.style(a,b)),Hb.test(g)&&Gb.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+""}):y.documentElement.currentStyle&&(Ib=function(a){return a.currentStyle},Jb=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ib(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Hb.test(g)&&!Kb.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
vendor: 9,248 bytes, lines 3-4
3=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function Lb(a,b){return{get:function(){var c=a();if(null!=c)return c?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d,e,f,g,h;if(b=y.createElement("div"),b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=d&&d.style){c.cssText="float:left;opacity:.5",k.opacity="0.5"===c.opacity,k.cssFloat=!!c.cssFloat,b.style.backgroundClip="content-box",b.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===b.style.backgroundClip,k.boxSizing=""===c.boxSizing||""===c.MozBoxSizing||""===c.WebkitBoxSizing,m.extend(k,{reliableHiddenOffsets:function(){return null==g&&i(),g},boxSizingReliable:function(){return null==f&&i(),f},pixelPosition:function(){return null==e&&i(),e},reliableMarginRight:function(){return null==h&&i(),h}});function i(){var b,c,d,i;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),b.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",e=f=!1,h=!0,a.getComputedStyle&&(e="1%"!==(a.getComputedStyle(b,null)||{}).top,f="4px"===(a.getComputedStyle(b,null)||{width:"4px"}).width,i=b.appendChild(y.createElement("div")),i.style.cssText=b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",i.style.marginRight=i.style.width="0",b.style.width="1px",h=!parseFloat((a.getComputedStyle(i,null)||{}).marginRight),b.removeChild(i)),b.innerHTML="<table><tr><td></td><td>t</td></tr></table>",i=b.getElementsByTagName("td"),i[0].style.cssText="margin:0;border:0;padding:0;display:none",g=0===i[0].offsetHeight,g&&(i[0].style.display="",i[1].style.display="none",g=0===i[0].offsetHeight),c.removeChild(d))}}}(),m.swap=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};var Mb=/alpha\([^)]*\)/i,Nb=/opacity\s*=\s*([^)]*)/,Ob=/^(none|table(?!-c[ea]).+)/,Pb=new RegExp("^("+S+")(.*)$","i"),Qb=new RegExp("^([+-])=("+S+")","i"),Rb={position:"absolute",visibility:"hidden",display:"block"},Sb={letterSpacing:"0",fontWeight:"400"},Tb=["Webkit","O","Moz","ms"];function Ub(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Tb.length;while(e--)if(b=Tb[e]+c,b in a)return b;return d}function Vb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=m._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&U(d)&&(f[g]=m._data(d,"olddisplay",Fb(d.nodeName)))):(e=U(d),(c&&"none"!==c||!e)&&m._data(d,"olddisplay",e?c:m.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 Wb(a,b,c){var d=Pb.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Xb(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+=m.css(a,c+T[f],!0,e)),d?("content"===c&&(g-=m.css(a,"padding"+T[f],!0,e)),"margin"!==c&&(g-=m.css(a,"border"+T[f]+"Width",!0,e))):(g+=m.css(a,"padding"+T[f],!0,e),"padding"!==c&&(g+=m.css(a,"border"+T[f]+"Width",!0,e)));return g}function Yb(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Ib(a),g=k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Jb(a,b,f),(0>e||null==e)&&(e=a.style[b]),Hb.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Xb(a,b,c||(g?"border":"content"),d,f)+"px"}m.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Jb(a,"opacity");return""===c?"1":c}}}},cssNumber:{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":k.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=m.camelCase(b),i=a.style;if(b=m.cssProps[h]||(m.cssProps[h]=Ub(i,h)),g=m.cssHooks[b]||m.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=Qb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(m.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||m.cssNumber[h]||(c+="px"),k.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=m.camelCase(b);return b=m.cssProps[h]||(m.cssProps[h]=Ub(a.style,h)),g=m.cssHooks[b]||m.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Jb(a,b,d)),"normal"===f&&b in Sb&&(f=Sb[b]),""===c||c?(e=parseFloat(f),c===!0||m.isNumeric(e)?e||0:f):f}}),m.each(["height","width"],function(a,b){m.cssHooks[b]={get:function(a,c,d){return c?Ob.test(m.css(a,"display"))&&0===a.offsetWidth?m.swap(a,Rb,function(){return Yb(a,b,d)}):Yb(a,b,d):void 0},set:function(a,c,d){var e=d&&Ib(a);return Wb(a,c,d?Xb(a,b,d,k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,e),e):0)}}}),k.opacity||(m.cssHooks.opacity={get:function(a,b){return Nb.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=m.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===m.trim(f.replace(Mb,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Mb.test(f)?f.replace(Mb,e):f+" "+e)}}),m.cssHooks.marginRight=Lb(k.reliableMarginRight,function(a,b){return b?m.swap(a,{display:"inline-block"},Jb,[a,"marginRight"]):void 0}),m.each({margin:"",padding:"",border:"Width"},function(a,b){m.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+T[d]+b]=f[d]||f[d-2]||f[0];return e}},Gb.test(a)||(m.cssHooks[a+b].set=Wb)}),m.fn.extend({css:function(a,b){return V(this,function(a,b,c){var d,e,f={},g=0;if(m.isArray(b)){for(d=Ib(a),e=b.length;e>g;g++)f[b[g]]=m.css(a,b[g],!1,d);return f}return void 0!==c?m.style(a,b,c):m.css(a,b)},a,b,arguments.length>1)},show:function(){return Vb(this,!0)},hide:function(){return Vb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){U(this)?m(this).show():m(this).hide()})}});function Zb(a,b,c,d,e){return new Zb.prototype.init(a,b,c,d,e) 4}m.Tween=Zb,Zb.prototype={constructor:Zb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(m.cssNumber[c]?"":"px")},cur:function(){var a=Zb.propHooks[this.prop];return a&&a.get?a.get(this):Zb.propHooks._default.get(this)},run:function(a){var b,c=Zb.propHooks[this.prop];return this.pos=b=this.options.duration?m.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):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):Zb.propHooks._default.set(this),this}},Zb.prototype.init.prototype=Zb.prototype,Zb.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=m.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){m.fx.step[a.prop]?m.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[m.cssProps[a.prop]]||m.cssHooks[a.prop])?m.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Zb.propHooks.scrollTop=Zb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},m.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},m.fx=Zb.prototype.init,m.fx.step={};var $b,_b,ac=/^(?:toggle|show|hide)$/,bc=new RegExp("^(?:([+-])=|)("+S+")([a-z%]*)$","i"),cc=/queueHooks$/,dc=[ic],ec={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=bc.exec(b),f=e&&e[3]||(m.cssNumber[a]?"":"px"),g=(m.cssNumber[a]||"px"!==f&&+d)&&bc.exec(m.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,m.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function fc(){return setTimeout(function(){$b=void 0}),$b=m.now()}function gc(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=T[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function hc(a,b,c){for(var d,e=(ec[b]||[]).concat(ec["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function ic(a,b,c){var d,e,f,g,h,i,j,l,n=this,o={},p=a.style,q=a.nodeType&&U(a),r=m._data(a,"fxshow");c.queue||(h=m._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,n.always(function(){n.always(function(){h.unqueued--,m.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=m.css(a,"display"),l="none"===j?m._data(a,"olddisplay")||Fb(a.nodeName):j,"inline"===l&&"n
vendor: 16,335 bytes, line 4
4one"===m.css(a,"float")&&(k.inlineBlockNeedsLayout&&"inline"!==Fb(a.nodeName)?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",k.shrinkWrapBlocks()||n.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],ac.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]||m.style(a,d)}else j=void 0;if(m.isEmptyObject(o))"inline"===("none"===j?Fb(a.nodeName):j)&&(p.display=j);else{r?"hidden"in r&&(q=r.hidden):r=m._data(a,"fxshow",{}),f&&(r.hidden=!q),q?m(a).show():n.done(function(){m(a).hide()}),n.done(function(){var b;m._removeData(a,"fxshow");for(b in o)m.style(a,b,o[b])});for(d in o)g=hc(q?r[d]:0,d,n),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function jc(a,b){var c,d,e,f,g;for(c in a)if(d=m.camelCase(c),e=b[d],f=a[c],m.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=m.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 kc(a,b,c){var d,e,f=0,g=dc.length,h=m.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=$b||fc(),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:m.extend({},b),opts:m.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:$b||fc(),duration:c.duration,tweens:[],createTween:function(b,c){var d=m.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.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(jc(k,j.opts.specialEasing);g>f;f++)if(d=dc[f].call(j,a,k,j.opts))return d;return m.map(k,hc,j),m.isFunction(j.opts.start)&&j.opts.start.call(a,j),m.fx.timer(m.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)}m.Animation=m.extend(kc,{tweener:function(a,b){m.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],ec[c]=ec[c]||[],ec[c].unshift(b)},prefilter:function(a,b){b?dc.unshift(a):dc.push(a)}}),m.speed=function(a,b,c){var d=a&&"object"==typeof a?m.extend({},a):{complete:c||!c&&b||m.isFunction(a)&&a,duration:a,easing:c&&b||b&&!m.isFunction(b)&&b};return d.duration=m.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in m.fx.speeds?m.fx.speeds[d.duration]:m.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){m.isFunction(d.old)&&d.old.call(this),d.queue&&m.dequeue(this,d.queue)},d},m.fn.extend({fadeTo:function(a,b,c,d){return this.filter(U).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=m.isEmptyObject(a),f=m.speed(b,c,d),g=function(){var b=kc(this,m.extend({},a),f);(e||m._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=m.timers,g=m._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&cc.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)&&m.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=m._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=m.timers,g=d?d.length:0;for(c.finish=!0,m.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})}}),m.each(["toggle","show","hide"],function(a,b){var c=m.fn[b];m.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(gc(b,!0),a,d,e)}}),m.each({slideDown:gc("show"),slideUp:gc("hide"),slideToggle:gc("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){m.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),m.timers=[],m.fx.tick=function(){var a,b=m.timers,c=0;for($b=m.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||m.fx.stop(),$b=void 0},m.fx.timer=function(a){m.timers.push(a),a()?m.fx.start():m.timers.pop()},m.fx.interval=13,m.fx.start=function(){_b||(_b=setInterval(m.fx.tick,m.fx.interval))},m.fx.stop=function(){clearInterval(_b),_b=null},m.fx.speeds={slow:600,fast:200,_default:400},m.fn.delay=function(a,b){return a=m.fx?m.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a,b,c,d,e;b=y.createElement("div"),b.setAttribute("className","t"),b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=y.createElement("select"),e=c.appendChild(y.createElement("option")),a=b.getElementsByTagName("input")[0],d.style.cssText="top:1px",k.getSetAttribute="t"!==b.className,k.style=/top/.test(d.getAttribute("style")),k.hrefNormalized="/a"===d.getAttribute("href"),k.checkOn=!!a.value,k.optSelected=e.selected,k.enctype=!!y.createElement("form").enctype,c.disabled=!0,k.optDisabled=!e.disabled,a=y.createElement("input"),a.setAttribute("value",""),k.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),k.radioValue="t"===a.value}();var lc=/\r/g;m.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=m.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,m(this).val()):a,null==e?e="":"number"==typeof e?e+="":m.isArray(e)&&(e=m.map(e,function(a){return null==a?"":a+""})),b=m.valHooks[this.type]||m.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=m.valHooks[e.type]||m.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(lc,""):null==c?"":c)}}}),m.extend({valHooks:{option:{get:function(a){var b=m.find.attr(a,"value");return null!=b?b:m.trim(m.text(a))}},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||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&m.nodeName(c.parentNode,"optgroup"))){if(b=m(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=m.makeArray(b),g=e.length;while(g--)if(d=e[g],m.inArray(m.valHooks.option.get(d),f)>=0)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),m.each(["radio","checkbox"],function(){m.valHooks[this]={set:function(a,b){return m.isArray(b)?a.checked=m.inArray(m(a).val(),b)>=0:void 0}},k.checkOn||(m.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var mc,nc,oc=m.expr.attrHandle,pc=/^(?:checked|selected)$/i,qc=k.getSetAttribute,rc=k.input;m.fn.extend({attr:function(a,b){return V(this,m.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){m.removeAttr(this,a)})}}),m.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===K?m.prop(a,b,c):(1===f&&m.isXMLDoc(a)||(b=b.toLowerCase(),d=m.attrHooks[b]||(m.expr.match.bool.test(b)?nc:mc)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=m.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void m.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=m.propFix[c]||c,m.expr.match.bool.test(c)?rc&&qc||!pc.test(c)?a[d]=!1:a[m.camelCase("default-"+c)]=a[d]=!1:m.attr(a,c,""),a.removeAttribute(qc?c:d)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&m.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),nc={set:function(a,b,c){return b===!1?m.removeAttr(a,c):rc&&qc||!pc.test(c)?a.setAttribute(!qc&&m.propFix[c]||c,c):a[m.camelCase("default-"+c)]=a[c]=!0,c}},m.each(m.expr.match.bool.source.match(/\w+/g),function(a,b){var c=oc[b]||m.find.attr;oc[b]=rc&&qc||!pc.test(b)?function(a,b,d){var e,f;return d||(f=oc[b],oc[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,oc[b]=f),e}:function(a,b,c){return c?void 0:a[m.camelCase("default-"+b)]?b.toLowerCase():null}}),rc&&qc||(m.attrHooks.value={set:function(a,b,c){return m.nodeName(a,"input")?void(a.defaultValue=b):mc&&mc.set(a,b,c)}}),qc||(mc={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}},oc.id=oc.name=oc.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},m.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:mc.set},m.attrHooks.contenteditable={set:function(a,b,c){mc.set(a,""===b?!1:b,c)}},m.each(["width","height"],function(a,b){m.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),k.style||(m.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var sc=/^(?:input|select|textarea|button|object)$/i,tc=/^(?:a|area)$/i;m.fn.extend({prop:function(a,b){return V(this,m.prop,a,b,arguments.length>1)},removeProp:function(a){return a=m.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),m.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!m.isXMLDoc(a),f&&(b=m.propFix[b]||b,e=m.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=m.find.attr(a,"tabindex");return b?parseInt(b,10):sc.test(a.nodeName)||tc.test(a.nodeName)&&a.href?0:-1}}}}),k.hrefNormalized||m.each(["href","src"],function(a,b){m.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),k.optSelected||(m.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),m.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){m.propFix[this.toLowerCase()]=this}),k.enctype||(m.propFix.enctype="encoding");var uc=/[\t\r\n\f]/g;m.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(uc," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=m.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=0===arguments.length||"string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(uc," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?m.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(m.isFunction(a)?function(c){m(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=m(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===K||"boolean"===c)&&(this.className&&m._data(this,"__className__",this.className),this.className=this.className||a===!1?"":m._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(uc," ").indexOf(b)>=0)return!0;return!1}}),m.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){m.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),m.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},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)}});var vc=m.now(),wc=/\?/,xc=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;m.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=m.trim(b+"");return e&&!m.trim(e.replace(xc,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():m.error("Invalid JSON: "+b)},m.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||m.error("Invalid XML: "+b),c};var yc,zc,Ac=/#.*$/,Bc=/([?&])_=[^&]*/,Cc=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Dc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Ec=/^(?:GET|HEAD)$/,Fc=/^\/\//,Gc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Hc={},Ic={},Jc="*/".concat("*");try{zc=location.href}catch(Kc){zc=y.createElement("a"),zc.href="",zc=zc.href}yc=Gc.exec(zc.toLowerCase())||[];function Lc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(m.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 Mc(a,b,c,d){var e={},f=a===Ic;function g(h){var i;return e[h]=!0,m.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 Nc(a,b){var c,d,e=m.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&m.extend(!0,a,c),a}function Oc(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 Pc(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}}m.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:zc,type:"GET",isLocal:Dc.test(yc[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Jc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":m.parseJSON,"text xml":m.parseXML}
vendor: 12,799 bytes, line 4
4,flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Nc(Nc(a,m.ajaxSettings),b):Nc(m.ajaxSettings,a)},ajaxPrefilter:Lc(Hc),ajaxTransport:Lc(Ic),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=m.ajaxSetup({},b),l=k.context||k,n=k.context&&(l.nodeType||l.jquery)?m(l):m.event,o=m.Deferred(),p=m.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!j){j={};while(b=Cc.exec(f))j[b[1].toLowerCase()]=b[2]}b=j[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return i&&i.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||zc)+"").replace(Ac,"").replace(Fc,yc[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=m.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(c=Gc.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===yc[1]&&c[2]===yc[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(yc[3]||("http:"===yc[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=m.param(k.data,k.traditional)),Mc(Hc,k,b,v),2===t)return v;h=m.event&&k.global,h&&0===m.active++&&m.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Ec.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(wc.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Bc.test(e)?e.replace(Bc,"$1_="+vc++):e+(wc.test(e)?"&":"?")+"_="+vc++)),k.ifModified&&(m.lastModified[e]&&v.setRequestHeader("If-Modified-Since",m.lastModified[e]),m.etag[e]&&v.setRequestHeader("If-None-Match",m.etag[e])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+Jc+"; q=0.01":""):k.accepts["*"]);for(d in k.headers)v.setRequestHeader(d,k.headers[d]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(d in{success:1,error:1,complete:1})v[d](k[d]);if(i=Mc(Ic,k,b,v)){v.readyState=1,h&&n.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,i.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,c,d){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),i=void 0,f=d||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,c&&(u=Oc(k,v,c)),u=Pc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(m.lastModified[e]=w),w=v.getResponseHeader("etag"),w&&(m.etag[e]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,h&&n.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(n.trigger("ajaxComplete",[v,k]),--m.active||m.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return m.get(a,b,c,"json")},getScript:function(a,b){return m.get(a,void 0,b,"script")}}),m.each(["get","post"],function(a,b){m[b]=function(a,c,d,e){return m.isFunction(c)&&(e=e||d,d=c,c=void 0),m.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),m._evalUrl=function(a){return m.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},m.fn.extend({wrapAll:function(a){if(m.isFunction(a))return this.each(function(b){m(this).wrapAll(a.call(this,b))});if(this[0]){var b=m(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 this.each(m.isFunction(a)?function(b){m(this).wrapInner(a.call(this,b))}:function(){var b=m(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=m.isFunction(a);return this.each(function(c){m(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){m.nodeName(this,"body")||m(this).replaceWith(this.childNodes)}).end()}}),m.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!k.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||m.css(a,"display"))},m.expr.filters.visible=function(a){return!m.expr.filters.hidden(a)};var Qc=/%20/g,Rc=/\[\]$/,Sc=/\r?\n/g,Tc=/^(?:submit|button|image|reset|file)$/i,Uc=/^(?:input|select|textarea|keygen)/i;function Vc(a,b,c,d){var e;if(m.isArray(b))m.each(b,function(b,e){c||Rc.test(a)?d(a,e):Vc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==m.type(b))d(a,b);else for(e in b)Vc(a+"["+e+"]",b[e],c,d)}m.param=function(a,b){var c,d=[],e=function(a,b){b=m.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=m.ajaxSettings&&m.ajaxSettings.traditional),m.isArray(a)||a.jquery&&!m.isPlainObject(a))m.each(a,function(){e(this.name,this.value)});else for(c in a)Vc(c,a[c],b,e);return d.join("&").replace(Qc,"+")},m.fn.extend({serialize:function(){return m.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=m.prop(this,"elements");return a?m.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!m(this).is(":disabled")&&Uc.test(this.nodeName)&&!Tc.test(a)&&(this.checked||!W.test(a))}).map(function(a,b){var c=m(this).val();return null==c?null:m.isArray(c)?m.map(c,function(a){return{name:b.name,value:a.replace(Sc,"\r\n")}}):{name:b.name,value:c.replace(Sc,"\r\n")}}).get()}}),m.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&Zc()||$c()}:Zc;var Wc=0,Xc={},Yc=m.ajaxSettings.xhr();a.attachEvent&&a.attachEvent("onunload",function(){for(var a in Xc)Xc[a](void 0,!0)}),k.cors=!!Yc&&"withCredentials"in Yc,Yc=k.ajax=!!Yc,Yc&&m.ajaxTransport(function(a){if(!a.crossDomain||k.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Wc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)void 0!==c[e]&&f.setRequestHeader(e,c[e]+"");f.send(a.hasContent&&a.data||null),b=function(c,e){var h,i,j;if(b&&(e||4===f.readyState))if(delete Xc[g],b=void 0,f.onreadystatechange=m.noop,e)4!==f.readyState&&f.abort();else{j={},h=f.status,"string"==typeof f.responseText&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=""}h||!a.isLocal||a.crossDomain?1223===h&&(h=204):h=j.text?200:404}j&&d(h,i,j,f.getAllResponseHeaders())},a.async?4===f.readyState?setTimeout(b):f.onreadystatechange=Xc[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function Zc(){try{return new a.XMLHttpRequest}catch(b){}}function $c(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}m.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return m.globalEval(a),a}}}),m.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),m.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=y.head||m("head")[0]||y.documentElement;return{send:function(d,e){b=y.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||e(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var _c=[],ad=/(=)\?(?=&|$)|\?\?/;m.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=_c.pop()||m.expando+"_"+vc++;return this[a]=!0,a}}),m.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(ad.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&ad.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=m.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(ad,"$1"+e):b.jsonp!==!1&&(b.url+=(wc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||m.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,_c.push(e)),g&&m.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),m.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||y;var d=u.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=m.buildFragment([a],b,e),e&&e.length&&m(e).remove(),m.merge([],d.childNodes))};var bd=m.fn.load;m.fn.load=function(a,b,c){if("string"!=typeof a&&bd)return bd.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=m.trim(a.slice(h,a.length)),a=a.slice(0,h)),m.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&m.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?m("<div>").append(m.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},m.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){m.fn[b]=function(a){return this.on(b,a)}}),m.expr.filters.animated=function(a){return m.grep(m.timers,function(b){return a===b.elem}).length};var cd=a.document.documentElement;function dd(a){return m.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}m.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=m.css(a,"position"),l=m(a),n={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=m.css(a,"top"),i=m.css(a,"left"),j=("absolute"===k||"fixed"===k)&&m.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),m.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(n.top=b.top-h.top+g),null!=b.left&&(n.left=b.left-h.left+e),"using"in b?b.using.call(a,n):l.css(n)}},m.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){m.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,m.contains(b,e)?(typeof e.getBoundingClientRect!==K&&(d=e.getBoundingClientRect()),c=dd(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"===m.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),m.nodeName(a[0],"html")||(c=a.offset()),c.top+=m.css(a[0],"borderTopWidth",!0),c.left+=m.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-m.css(d,"marginTop",!0),left:b.left-c.left-m.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||cd;while(a&&!m.nodeName(a,"html")&&"static"===m.css(a,"position"))a=a.offsetParent;return a||cd})}}),m.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);m.fn[a]=function(d){return V(this,function(a,d,e){var f=dd(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?m(f).scrollLeft():e,c?e:m(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),m.each(["top","left"],function(a,b){m.cssHooks[b]=Lb(k.pixelPosition,function(a,c){return c?(c=Jb(a,b),Hb.test(c)?m(a).position()[b]+"px":c):void 0})}),m.each({Height:"height",Width:"width"},function(a,b){m.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){m.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return V(this,function(b,c,d){var e;return m.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?m.css(b,c,g):m.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),m.fn.size=function(){return this.length},m.fn.andSelf=m.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return m});var ed=a.jQuery,fd=a.$;return m.noConflict=function(b){return a.$===m&&(a.$=fd),b&&a.jQuery===m&&(a.jQuery=ed),m},typeof b===K&&(a.jQuery=a.$=m),m});
4 5
vendor: 37,045 bytes, lines 6-12
6/*! 7 * Bootstrap v3.3.7 (http://getbootstrap.com) 8 * Copyright 2011-2016 Twitter, Inc. 9 * Licensed under the MIT license 10 */ 11if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1||b[0]>3)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){if(a(b.target).is(this))return b.handleObj.handler.apply(this,arguments)}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.7",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a("#"===f?[]:f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.7",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c).prop(c,!0)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c).prop(c,!1))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target).closest(".btn");b.call(d,"toggle"),a(c.target).is('input[type="radio"], input[type="checkbox"]')||(c.preventDefault(),d.is("input,button")?d.trigger("focus"):d.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.7",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(a>this.$items.length-1||a<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){if(!this.sliding)return this.slide("next")},c.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.7",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger(a.Event("hidden.bs.dropdown",f)))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.7",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger(a.Event("shown.bs.dropdown",h))}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&j<i.length-1&&j++,~j||(j=0),i.eq(j).trigger("focus")}}}};var h=a.fn.dropdown;a.fn.dropdown=d,a.fn.dropdown.Constructor=g,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=h,this},a(document).on("click.bs.dropdown.data-api",c).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",f,g.prototype.toggle).on("keydown.bs.dropdown.data-api",f,g.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",g.prototype.keydown)}(jQuery),+function(a){"use strict";function b(b,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},c.DEFAULTS,e.data(),"object"==typeof b&&b);f||e.data("bs.modal",f=new c(this,g)),"string"==typeof b?f[b](d):g.show&&f.show(d)})}var c=function(b,c){this.options=c,this.$body=a(document.body),this.$element=a(b),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};c.VERSION="3.3.7",c.TRANSITION_DURATION=300,c.BACKDROP_TRANSITION_DURATION=150,c.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},c.prototype.toggle=function(a){return this.isShown?this.hide():this.show(a)},c.prototype.show=function(b){var d=this,e=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(e),this.isShown||e.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){d.$element.one("mouseup.dismiss.bs.modal",function(b){a(b.target).is(d.$element)&&(d.ignoreBackdropClick=!0)})}),this.backdrop(function(){var e=a.support.transition&&d.$element.hasClass("fade");d.$element.parent().length||d.$element.appendTo(d.$body),d.$element.show().scrollTop(0),d.adjustDialog(),e&&d.$element[0].offsetWidth,d.$element.addClass("in"),d.enforceFocus();var f=a.Event("shown.bs.modal",{relatedTarget:b});e?d.$dialog.one("bsTransitionEnd",function(){d.$element.trigger("focus").trigger(f)}).emulateTransitionEnd(c.TRANSITION_DURATION):d.$element.trigger("focus").trigger(f)}))},c.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",a.proxy(this.hideModal,this)).emulateTransitionEnd(c.TRANSITION_DURATION):this.hideModal())},c.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){document===a.target||this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.trigger("focus")},this))},c.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},c.prototype.resize=function(){this.isShown?a(window).on("resize.bs.modal",a.proxy(this.handleUpdate,this)):a(window).off("resize.bs.modal")},c.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.$body.removeClass("modal-open"),a.resetAdjustments(),a.resetScrollbar(),a.$element.trigger("hidden.bs.modal")})},c.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},c.prototype.backdrop=function(b){var d=this,e=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var f=a.support.transition&&e;if(this.$backdrop=a(document.createElement("div")).addClass("modal-backdrop "+e).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),f&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;f?this.$backdrop.one("bsTransitionEnd",b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):b()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var g=function(){d.removeBackdrop(),b&&b()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):g()}else b&&b()},c.prototype.handleUpdate=function(){this.adjustDialog()},c.prototype.adjustDialog=function(){var a=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth<a,this.scrollbarWidth=this.measureScrollbar()},c.prototype.setScrollbar=function(){var a=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",a+this.scrollbarWidth)},c.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},c.prototype.measureScrollbar=function(){var a=document.createElement("div");a.className="modal-scrollbar-measure",this.$body.append(a);var b=a.offsetWidth-a.clientWidth;return this.$body[0].removeChild(a),b};var d=a.fn.modal;a.fn.modal=b,a.fn.modal.Constructor=c,a.fn.modal.noConflict=function(){return a.fn.modal=d,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(c){var d=a(this),e=d.attr("href"),f=a(d.attr("data-target")||e&&e.replace(/.*(?=#[^\s]+$)/,"")),g=f.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(e)&&e},f.data(),d.data());d.is("a")&&c.preventDefault(),f.one("show.bs.modal",function(a){a.isDefaultPrevented()||f.one("hidden.bs.modal",function(){d.is(":visible")&&d.trigger("focus")})}),b.call(f,g,this)})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof b&&b;!e&&/destroy|hide/.test(b)||(e||d.data("bs.tooltip",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",a,b)};c.VERSION="3.3.7",c.TRANSITION_DURATION=150,c.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);if(c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),!c.isInStateTrue())return clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-m<o.top?"bottom":"right"==h&&k.right+l>o.width?"left":"left"==h&&k.left-l<o.left?"right":h,f.removeClass(n).addClass(h)}var p=this.getCalculatedOffset(h,k,l,m);this.applyPlacement(p,h);var q=function(){var a=e.hoverState;e.$element.trigger("shown.bs."+e.type),e.hoverState=null,"out"==a&&e.leave(e)};a.support.transition&&this.$tip.hasClass("fade")?f.one("bsTransitionEnd",q).emulateTransitionEnd(c.TRANSITION_DURATION):q()}},c.prototype.applyPlacement=function(b,c){var d=this.tip(),e=d[0].offsetWidth,f=d[0].offsetHeight,g=parseInt(d.css("margin-top"),10),h=parseInt(d.css("margin-left"),10);isNaN(g)&&(g=0),isNaN(h)&&(h=0),b.top+=g,b.left+=h,a.offset.setOffset(d[0],a.extend({using:function(a){d.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),d.addClass("in");var i=d[0].offsetWidth,j=d[0].offsetHeight;"top"==c&&j!=f&&(b.top=b.top+f-j);var k=this.getViewportAdjustedDelta(c,b,i,j);k.left?b.left+=k.left:b.top+=k.top;var l=/top|bottom/.test(c),m=l?2*k.left-e+i:2*k.top-f+j,n=l?"offsetWidth":"offsetHeight";d.offset(b),this.replaceArrow(m,d[0][n],l)},c.prototype.replaceArrow=function(a,b,c){this.arrow().css(c?"left":"top",50*(1-a/b)+"%").css(c?"top":"left","")},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},c.prototype.hide=function(b){function d(){"in"!=e.hoverState&&f.detach(),e.$element&&e.$element.removeAttr("aria-describedby").trigger("hidden.bs."+e.type),b&&b()}var e=this,f=a(this.$tip),g=a.Event("hide.bs."+this.type);if(this.$element.trigger(g),!g.isDefaultPrevented())return f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one("bsTransitionEnd",d).emulateTransitionEnd(c.TRANSITION_DURATION):d(),this.hoverState=null,this},c.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},c.prototype.hasContent=function(){return this.getTitle()},c.prototype.getPosition=function(b){b=b||this.$element;var c=b[0],d="BODY"==c.tagName,e=c.getBoundingClientRect();null==e.width&&(e=a.extend({},e,{width:e.right-e.left,height:e.bottom-e.top}));var f=window.SVGElement&&c instanceof window.SVGElement,g=d?{top:0,left:0}:f?null:b.offset(),h={scroll:d?document.documentElement.scrollTop||document.body.scrollTop:b.scrollTop()},i=d?{width:a(window).width(),height:a(window).height()}:null;return a.extend({},e,h,i,g)},c.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},c.prototype.getViewportAdjustedDelta=function(a,b,c,d){var e={top:0,left:0};if(!this.$viewport)return e;var f=this.options.viewport&&this.options.viewport.padding||0,g=this.getPosition(this.$viewport);if(/right|left/.test(a)){var h=b.top-f-g.scroll,i=b.top+f-g.scroll+d;h<g.top?e.top=g.top-h:i>g.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;j<g.left?e.left=g.left-j:k>g.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null,a.$element=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;!e&&/destroy|hide/.test(b)||(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.7",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.7",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b<e[0])return this.activeTarget=null,this.clear();for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(void 0===e[a+1]||b<e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){ 12this.activeTarget=b,this.clear();var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")},b.prototype.clear=function(){a(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var d=a.fn.scrollspy;a.fn.scrollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=d,this},a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);c.call(b,b.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new c(this)),"string"==typeof b&&e[b]()})}var c=function(b){this.element=a(b)};c.VERSION="3.3.7",c.TRANSITION_DURATION=150,c.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a"),f=a.Event("hide.bs.tab",{relatedTarget:b[0]}),g=a.Event("show.bs.tab",{relatedTarget:e[0]});if(e.trigger(f),b.trigger(g),!g.isDefaultPrevented()&&!f.isDefaultPrevented()){var h=a(d);this.activate(b.closest("li"),c),this.activate(h,h.parent(),function(){e.trigger({type:"hidden.bs.tab",relatedTarget:b[0]}),b.trigger({type:"shown.bs.tab",relatedTarget:e[0]})})}}},c.prototype.activate=function(b,d,e){function f(){g.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.7",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return e<c&&"top";if("bottom"==this.affixed)return null!=c?!(e+this.unpin<=f.top)&&"bottom":!(e+g<=a-d)&&"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&e<=c?"top":null!=d&&i+j>=a-d&&"bottom"},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery);
12 13// jQuery Mask Plugin v1.14.15 14// github.com/igorescobar/jQuery-Mask-Plugin 15var $jscomp={scope:{},findInternal:function(a,l,d){a instanceof String&&(a=String(a));for(var p=a.length,h=0;h<p;h++){var b=a[h];if(l.call(d,b,h,a))return{i:h,v:b}}return{i:-1,v:void 0}}};$jscomp.defineProperty="function"==typeof Object.defineProperties?Object.defineProperty:function(a,l,d){if(d.get||d.set)throw new TypeError("ES3 does not support getters and setters.");a!=Array.prototype&&a!=Object.prototype&&(a[l]=d.value)}; 16$jscomp.getGlobal=function(a){return"undefined"!=typeof window&&window===a?a:"undefined"!=typeof global&&null!=global?global:a};$jscomp.global=$jscomp.getGlobal(this);$jscomp.polyfill=function(a,l,d,p){if(l){d=$jscomp.global;a=a.split(".");for(p=0;p<a.length-1;p++){var h=a[p];h in d||(d[h]={});d=d[h]}a=a[a.length-1];p=d[a];l=l(p);l!=p&&null!=l&&$jscomp.defineProperty(d,a,{configurable:!0,writable:!0,value:l})}}; 17$jscomp.polyfill("Array.prototype.find",function(a){return a?a:function(a,d){return $jscomp.findInternal(this,a,d).v}},"es6-impl","es3"); 18(function(a,l,d){"function"===typeof define&&define.amd?define(["jquery"],a):"object"===typeof exports?module.exports=a(require("jquery")):a(l||d)})(function(a){var l=function(b,e,f){var c={invalid:[],getCaret:function(){try{var a,r=0,g=b.get(0),e=document.selection,f=g.selectionStart;if(e&&-1===navigator.appVersion.indexOf("MSIE 10"))a=e.createRange(),a.moveStart("character",-c.val().length),r=a.text.length;else if(f||"0"===f)r=f;return r}catch(C){}},setCaret:function(a){try{if(b.is(":focus")){var c, 19g=b.get(0);g.setSelectionRange?g.setSelectionRange(a,a):(c=g.createTextRange(),c.collapse(!0),c.moveEnd("character",a),c.moveStart("character",a),c.select())}}catch(B){}}
vendor: 14,237 bytes, lines 19-168
19,events:function(){b.on("keydown.mask",function(a){b.data("mask-keycode",a.keyCode||a.which);b.data("mask-previus-value",b.val());b.data("mask-previus-caret-pos",c.getCaret());c.maskDigitPosMapOld=c.maskDigitPosMap}).on(a.jMaskGlobals.useInput?"input.mask":"keyup.mask",c.behaviour).on("paste.mask drop.mask",function(){setTimeout(function(){b.keydown().keyup()}, 20100)}).on("change.mask",function(){b.data("changed",!0)}).on("blur.mask",function(){d===c.val()||b.data("changed")||b.trigger("change");b.data("changed",!1)}).on("blur.mask",function(){d=c.val()}).on("focus.mask",function(b){!0===f.selectOnFocus&&a(b.target).select()}).on("focusout.mask",function(){f.clearIfNotMatch&&!h.test(c.val())&&c.val("")})},getRegexMask:function(){for(var a=[],b,c,f,n,d=0;d<e.length;d++)(b=m.translation[e.charAt(d)])?(c=b.pattern.toString().replace(/.{1}$|^.{1}/g,""),f=b.optional, 21(b=b.recursive)?(a.push(e.charAt(d)),n={digit:e.charAt(d),pattern:c}):a.push(f||b?c+"?":c)):a.push(e.charAt(d).replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"));a=a.join("");n&&(a=a.replace(new RegExp("("+n.digit+"(.*"+n.digit+")?)"),"($1)?").replace(new RegExp(n.digit,"g"),n.pattern));return new RegExp(a)},destroyEvents:function(){b.off("input keydown keyup paste drop blur focusout ".split(" ").join(".mask "))},val:function(a){var c=b.is("input")?"val":"text";if(0<arguments.length){if(b[c]()!==a)b[c](a); 22c=b}else c=b[c]();return c},calculateCaretPosition:function(){var a=b.data("mask-previus-value")||"",e=c.getMasked(),g=c.getCaret();if(a!==e){var f=b.data("mask-previus-caret-pos")||0,e=e.length,d=a.length,m=a=0,h=0,l=0,k;for(k=g;k<e&&c.maskDigitPosMap[k];k++)m++;for(k=g-1;0<=k&&c.maskDigitPosMap[k];k--)a++;for(k=g-1;0<=k;k--)c.maskDigitPosMap[k]&&h++;for(k=f-1;0<=k;k--)c.maskDigitPosMapOld[k]&&l++;g>d?g=10*e:f>=g&&f!==d?c.maskDigitPosMapOld[g]||(f=g,g=g-(l-h)-a,c.maskDigitPosMap[g]&&(g=f)):g>f&& 23(g=g+(h-l)+m)}return g},behaviour:function(f){f=f||window.event;c.invalid=[];var e=b.data("mask-keycode");if(-1===a.inArray(e,m.byPassKeys)){var e=c.getMasked(),g=c.getCaret();setTimeout(function(){c.setCaret(c.calculateCaretPosition())},a.jMaskGlobals.keyStrokeCompensation);c.val(e);c.setCaret(g);return c.callbacks(f)}},getMasked:function(a,b){var g=[],d=void 0===b?c.val():b+"",n=0,h=e.length,q=0,l=d.length,k=1,r="push",p=-1,t=0,y=[],v,z;f.reverse?(r="unshift",k=-1,v=0,n=h-1,q=l-1,z=function(){return-1< 24n&&-1<q}):(v=h-1,z=function(){return n<h&&q<l});for(var A;z();){var x=e.charAt(n),w=d.charAt(q),u=m.translation[x];if(u)w.match(u.pattern)?(g[r](w),u.recursive&&(-1===p?p=n:n===v&&n!==p&&(n=p-k),v===p&&(n-=k)),n+=k):w===A?(t--,A=void 0):u.optional?(n+=k,q-=k):u.fallback?(g[r](u.fallback),n+=k,q-=k):c.invalid.push({p:q,v:w,e:u.pattern}),q+=k;else{if(!a)g[r](x);w===x?(y.push(q),q+=k):(A=x,y.push(q+t),t++);n+=k}}d=e.charAt(v);h!==l+1||m.translation[d]||g.push(d);g=g.join("");c.mapMaskdigitPositions(g, 25y,l);return g},mapMaskdigitPositions:function(a,b,e){a=f.reverse?a.length-e:0;c.maskDigitPosMap={};for(e=0;e<b.length;e++)c.maskDigitPosMap[b[e]+a]=1},callbacks:function(a){var h=c.val(),g=h!==d,m=[h,a,b,f],q=function(a,b,c){"function"===typeof f[a]&&b&&f[a].apply(this,c)};q("onChange",!0===g,m);q("onKeyPress",!0===g,m);q("onComplete",h.length===e.length,m);q("onInvalid",0<c.invalid.length,[h,a,b,c.invalid,f])}};b=a(b);var m=this,d=c.val(),h;e="function"===typeof e?e(c.val(),void 0,b,f):e;m.mask= 26e;m.options=f;m.remove=function(){var a=c.getCaret();m.options.placeholder&&b.removeAttr("placeholder");b.data("mask-maxlength")&&b.removeAttr("maxlength");c.destroyEvents();c.val(m.getCleanVal());c.setCaret(a);return b};m.getCleanVal=function(){return c.getMasked(!0)};m.getMaskedVal=function(a){return c.getMasked(!1,a)};m.init=function(d){d=d||!1;f=f||{};m.clearIfNotMatch=a.jMaskGlobals.clearIfNotMatch;m.byPassKeys=a.jMaskGlobals.byPassKeys;m.translation=a.extend({},a.jMaskGlobals.translation,f.translation); 27m=a.extend(!0,{},m,f);h=c.getRegexMask();if(d)c.events(),c.val(c.getMasked());else{f.placeholder&&b.attr("placeholder",f.placeholder);b.data("mask")&&b.attr("autocomplete","off");d=0;for(var l=!0;d<e.length;d++){var g=m.translation[e.charAt(d)];if(g&&g.recursive){l=!1;break}}l&&b.attr("maxlength",e.length).data("mask-maxlength",!0);c.destroyEvents();c.events();d=c.getCaret();c.val(c.getMasked());c.setCaret(d)}};m.init(!b.is("input"))};a.maskWatchers={};var d=function(){var b=a(this),e={},f=b.attr("data-mask"); 28b.attr("data-mask-reverse")&&(e.reverse=!0);b.attr("data-mask-clearifnotmatch")&&(e.clearIfNotMatch=!0);"true"===b.attr("data-mask-selectonfocus")&&(e.selectOnFocus=!0);if(p(b,f,e))return b.data("mask",new l(this,f,e))},p=function(b,e,f){f=f||{};var c=a(b).data("mask"),d=JSON.stringify;b=a(b).val()||a(b).text();try{return"function"===typeof e&&(e=e(b)),"object"!==typeof c||d(c.options)!==d(f)||c.mask!==e}catch(t){}},h=function(a){var b=document.createElement("div"),d;a="on"+a;d=a in b;d||(b.setAttribute(a, 29"return;"),d="function"===typeof b[a]);return d};a.fn.mask=function(b,d){d=d||{};var e=this.selector,c=a.jMaskGlobals,h=c.watchInterval,c=d.watchInputs||c.watchInputs,t=function(){if(p(this,b,d))return a(this).data("mask",new l(this,b,d))};a(this).each(t);e&&""!==e&&c&&(clearInterval(a.maskWatchers[e]),a.maskWatchers[e]=setInterval(function(){a(document).find(e).each(t)},h));return this};a.fn.masked=function(a){return this.data("mask").getMaskedVal(a)};a.fn.unmask=function(){clearInterval(a.maskWatchers[this.selector]); 30delete a.maskWatchers[this.selector];return this.each(function(){var b=a(this).data("mask");b&&b.remove().removeData("mask")})};a.fn.cleanVal=function(){return this.data("mask").getCleanVal()};a.applyDataMask=function(b){b=b||a.jMaskGlobals.maskElements;(b instanceof a?b:a(b)).filter(a.jMaskGlobals.dataMaskAttr).each(d)};h={maskElements:"input,td,span,div",dataMaskAttr:"*[data-mask]",dataMask:!0,watchInterval:300,watchInputs:!0,keyStrokeCompensation:10,useInput:!/Chrome\/[2-4][0-9]|SamsungBrowser/.test(window.navigator.userAgent)&& 31h("input"),watchDataMask:!1,byPassKeys:[9,16,17,18,36,37,38,39,40,91],translation:{0:{pattern:/\d/},9:{pattern:/\d/,optional:!0},"#":{pattern:/\d/,recursive:!0},A:{pattern:/[a-zA-Z0-9]/},S:{pattern:/[a-zA-Z]/}}};a.jMaskGlobals=a.jMaskGlobals||{};h=a.jMaskGlobals=a.extend(!0,{},h,a.jMaskGlobals);h.dataMask&&a.applyDataMask();setInterval(function(){a.jMaskGlobals.watchDataMask&&a.applyDataMask()},h.watchInterval)},window.jQuery,window.Zepto); 32 33/** 34 * Zebra_DatePicker 35 * 36 * Zebra_DatePicker is a small, compact and highly configurable date picker plugin for jQuery 37 * 38 * Read more {@link https://github.com/stefangabos/Zebra_Datepicker/ here} 39 * 40 * @author Stefan Gabos <[email protected]> 41 * @version 1.9.8 (last revision: April 08, 2018) 42 * @copyright (c) 2011 - 2018 Stefan Gabos 43 * @license http://www.gnu.org/licenses/lgpl-3.0.txt GNU LESSER GENERAL PUBLIC LICENSE 44 * @package Zebra_DatePicker 45 */ 46(function(factory) { 47 48 'use strict'; 49 50 // AMD 51 if (typeof define === 'function' && define.amd) define(['jquery'], factory); 52 53 // CommonJS 54 else if (typeof exports === 'object') factory(require('jquery')); 55 56 // browser globals 57 else factory(jQuery); 58 59}(function($) { 60 61 'use strict'; 62 63 $.Zebra_DatePicker = function(element, options) { 64 65 var defaults = { 66 67 // setting this property to a jQuery element, will result in the date picker being always visible, the indicated 68 // element being the date picker's container; 69 // 70 // setting this to boolean TRUE will keep will result in the date picker not closing when selecting a 71 // date but only when the user clicks outside the date picker. 72 // 73 // note that when a date format is used that also involves time, this property will be automatically 74 // set to TRUE! 75 // 76 // default is FALSE 77 always_visible: false, 78 79 // by default, the date picker is injected into the <body>; use this property to tell the library to inject 80 // the date picker into a custom element - useful when you want the date picker to open at a specific position 81 // 82 // must be a jQuery element 83 // 84 // default is $('body') 85 container: $('body'), 86 87 // dates that should have custom classes applied to them 88 // an object in the form of 89 // { 90 // 'myclass1': [dates_to_apply_the_custom_class_to], 91 // 'myclass2': [dates_to_apply_the_custom_class_to] 92 // } 93 // where "dates_to_apply_the_custom_class_to" is an array of dates in the same format as required for 94 // "disabled_dates" property. 95 // 96 // custom classes will be applied *only* in the day picker view and not on month/year views! 97 // also note that the class name will have the "_disabled" suffix added if the day the class is applied to 98 // is disabled 99 // 100 // in order for the styles in your custom classes to be applied, make sure you are using the following syntax: 101 // 102 // .Zebra_DatePicker .dp_daypicker td.myclass1 { .. } 103 // .Zebra_DatePicker .dp_daypicker td.myclass1_disabled { .. } 104 // 105 // default is FALSE, no custom classes 106 custom_classes: false, 107 108 // days of the week; Sunday to Saturday 109 days: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], 110 111 // by default, the abbreviated name of a day consists of the first 2 letters from the day's full name; 112 // while this is common for most languages, there are also exceptions for languages like Thai, Loa, Myanmar, 113 // etc. where this is not correct; for these cases, specify an array with the abbreviations to be used for 114 // the 7 days of the week; leave it FALSE to use the first 2 letters of a day's name as the abbreviation. 115 // 116 // default is FALSE 117 days_abbr: false, 118 119 // the position of the date picker relative to the element it is attached to. note that, regardless of this 120 // setting, the date picker's position will be automatically adjusted to fit in the viewport, if needed. 121 // 122 // possible values are "above" and "below" 123 // 124 // default is "above" 125 default_position: 'above', 126 127 // direction of the calendar 128 // 129 // a positive or negative integer: n (a positive integer) creates a future-only calendar beginning at n days 130 // after today; -n (a negative integer); if n is 0, the calendar has no restrictions. use boolean true for 131 // a future-only calendar starting with today and use boolean false for a past-only calendar ending today. 132 // 133 // you may also set this property to an array with two elements in the following combinations: 134 // 135 // - first item is boolean TRUE (calendar starts today), an integer > 0 (calendar starts n days after 136 // today), or a valid date given in the format defined by the "format" attribute, using English for 137 // month names (calendar starts at the specified date), and the second item is boolean FALSE (the calendar 138 // has no ending date), an integer > 0 (calendar ends n days after the starting date), or a valid date 139 // given in the format defined by the "format" attribute, using English for month names, and which occurs 140 // after the starting date (calendar ends at the specified date) 141 // 142 // - first item is boolean FALSE (calendar ends today), an integer < 0 (calendar ends n days before today), 143 // or a valid date given in the format defined by the "format" attribute, using English for month names 144 // (calendar ends at the specified date), and the second item is an integer > 0 (calendar ends n days 145 // before the ending date), or a valid date given in the format defined by the "format" attribute, using 146 // English for month names and which occurs before the starting date (calendar starts at the specified 147 // date) 148 // 149 // [1, 7] - calendar starts tomorrow and ends seven days after that 150 // [true, 7] - calendar starts today and ends seven days after that 151 // ['2013-01-01', false] - calendar starts on January 1st 2013 and has no ending date ("format" is YYYY-MM-DD) 152 // [false, '2012-01-01'] - calendar ends today and starts on January 1st 2012 ("format" is YYYY-MM-DD) 153 // 154 // note that "disabled_dates" property will still apply! 155 // 156 // default is 0 (no restrictions) 157 direction: 0, 158 159 // an array of disabled dates in the following format: 'day month year weekday' where "weekday" is optional 160 // and can be 0-6 (Saturday to Sunday); the syntax is similar to cron's syntax: the values are separated by 161 // spaces and may contain * (asterisk) - (dash) and , (comma) delimiters: 162 // 163 // ['1 1 2012'] would disable January 1, 2012; 164 // ['* 1 2012'] would disable all days in January 2012; 165 // ['1-10 1 2012'] would disable January 1 through 10 in 2012; 166 // ['1,10 1 2012'] would disable January 1 and 10 in 2012; 167 // ['1-10,20,22,24 1-3 *'] would disable 1 through 10, plus the 22nd and 24th of January through March for every year; 168 // ['* * * 0,6'] would disable all Saturdays and
168Sundays; 169 // ['01 07 2012', '02 07 2012', '* 08 2012'] would disable 1st and 2nd of July 2012, and all of August of 2012 170 // 171 // default is FALSE, no disabled dates 172 // 173 // DISABLING ALL DATES AND NOT SPECIFYING AT LEAST ONE ENABLED DATE WILL SEND THE SCRIPT INTO AN INFINITE 174 // LOOP SEARCHING FOR AN ENABLED DATE TO DISPLAY! 175 disabled_dates: false, 176 177 // an array of enabled dates in the same format as required for "disabled_dates" property. 178 // to be used together with the "disabled_dates" property by first setting the "disabled_dates" property to 179 // something like "[* * * *]" (which will disable everything) and the setting the "enabled_dates" property to, 180 // say, "[* * * 0,6]" to enable just weekends. 181 enabled_dates: false, 182 183 // an array of selectable hours. 184 // default is FALSE, all hours are selectable. 185 enabled_hours: false, 186 187 // an array of selectable minutes. 188 // default is FALSE, all minutes are selectable. 189 enabled_minutes: false, 190 191 // an array of selectable seconds. 192 // default is FALSE, all seconds are selectable. 193 enabled_seconds: false, 194 195 // week's starting day 196 // 197 // valid values are 0 to 6, Sunday to Saturday 198 // 199 // default is 1, Monday 200 first_day_of_week: 1, 201 202 // format of the returned date 203 // 204 // accepts the following characters for date formatting: d, D, j, l, N, w, S, F, m, M, n, Y, y, h, H, 205 // g, G, i, s, a, A borrowing the syntax from PHP's "date" function. 206 // 207 // note that when setting a date format without days ('d', 'j'), the users will be able to select only years 208 // and months, and when setting a format without months and days ('F', 'm', 'M', 'n', 'd', 'j'), the 209 // users will be able to select only years; likewise, when setting a date format with just months ('F', 'm', 210 // 'M', 'n') or just years ('Y', 'y'), users will be able to select only months and years, respectively. 211 // 212 // setting a format that also involves time (h, H, g, G, i, s, a, A) will automatically enable the time 213 // picker. 214 // 215 // also note that the value of the "view" property (see below) may be overridden if it is the case: a value of 216 // "days" for the "view" property makes no sense if the date format doesn't allow the selection of days. 217 // 218 // default is Y-m-d 219 format: 'Y-m-d', 220 221 // captions in the datepicker's header, for the 3 possible views: days, months, years 222 // 223 // for each of the 3 views the following special characters may be used borrowing from PHP's "date" function's 224 // syntax: m, n, F, M, y and Y; any of these will be replaced at runtime with the appropriate date fragment, 225 // depending on the currently viewed date. two more special characters are also available Y1 and Y2 (upper 226 // case representing years with 4 digits, lowercase representing years with 2 digits) which represent 227 // "currently selected year - 7" and "currently selected year + 4" and which only make sense used in the 228 // "years" view. 229 // 230 // even though any of these special characters may be used in any of the 3 views, you should use m, n, F, M 231 // for the "days" view and y, Y, Y1, Y2, y1, y2 for the "months" and "years" view or you may get unexpected 232 // results! 233 // 234 // Text and HTML can also be used, and will be rendered as it is, as in the example below (the library is 235 // smart enough to not replace special characters when used in words or HTML tags): 236 // 237 // header_captions: { 238 // 'days': 'Departure:<br>F, Y', 239 // 'months': 'Departure:<br>Y', 240 // 'years': 'Departure:<br>Y1 - Y2' 241 // } 242 // 243 // Default is 244 // 245 // header_captions: { 246 // 'days': 'F, Y', 247 // 'months': 'Y', 248 // 'years': 'Y1 - Y2' 249 // } 250 header_captions: { 251 days: 'F, Y', 252 months: 'Y', 253 years: 'Y1 - Y2' 254 }, 255 256 // the left and right white-space around the icon 257 // if the "inside" property is set to TRUE then the target element's padding will be altered so that 258 // the element's left or right padding (depending on the value of "icon_position") will be 2 x icon_margin 259 // plus the icon's width 260 // if the "inside" property is set to FALSE, then this will be the distance between the element and the icon. 261 // leave it to FALSE to use the element's existing padding 262 // 263 // default is FALSE 264 icon_margin: false, 265 266 // icon's position 267 // accepted values are "left" and "right" 268 // if the "inside" property is set to TRUE, this will always be "right" 269 // 270 // default is "right" 271 icon_position: 'right', 272 273 // should the icon for opening the datepicker be inside the element?
274 // if set to FALSE, the icon will be placed to the right of the parent element, while if set to TRUE it will 275 // be placed to the right of the parent element, but *inside* the element itself 276 // 277 // default is TRUE 278 inside: true, 279 280 // the caption for the "Clear" button 281 lang_clear_date: 'Clear date', 282 283 // months names 284 months: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], 285 286 // by default, the abbreviated name of a month consists of the first 3 letters from the month's full name; 287 // while this is common for most languages, there are also exceptions for languages like Thai, Loa, Myanmar, 288 // etc. where this is not correct; for these cases, specify an array with the abbreviations to be used for 289 // the months of the year; leave it FALSE to use the first 3 letters of a month's name as the abbreviation. 290 // 291 // default is FALSE 292 months_abbr: false, 293 294 // HTML to be used for previous/next and up/down buttons, in that order 295 // 296 // default is ['◀', '▶', '▲', '▼'] 297 navigation: ['◀', '▶', '▲', '▼'], 298 299 // the offset, in pixels (x, y), to shift the date picker's position relative to the top-right of the icon 300 // that toggles the date picker or, if the icon is disabled, relative to the top-right corner of the element 301 // the plugin is attached to. 302 // 303 // note that this only applies if the position of element relative to the browser's viewport doesn't require 304 // the date picker to be placed automatically so that it is visible! 305 // 306 // default is [5, -5] 307 offset: [5, -5], 308 309 // set whether the date picker should be shown *only* when interacting with the icon 310 // note that if you also set the "show_icon" property to FALSE, you will not be able to show the date picker anymore! 311 // 312 // default is FALSE 313 open_icon_only: false, 314 315 // set this property to TRUE if you want the date picker to be shown when the parent element (if 316 // "open_icon_only" is not set to FALSE) or the associated calendar icon (if "show_icon" is set to TRUE) 317 // receive focus. 318 // 319 // default is FALSE 320 open_on_focus: false, 321 322 // if set as a jQuery element with a Zebra_DatePicker attached, that particular date picker will use the 323 // current date picker's value as starting date 324 // note that the rules set in the "direction" property will still apply, only that the reference date will 325 // not be the current system date but the value selected in the current date picker 326 // default is FALSE (not paired with another date picker) 327 pair: false, 328 329 // should the element the calendar is attached to, be read-only? 330 // if set to TRUE, a date can be set only through the date picker and cannot be entered manually 331 // 332 // default is TRUE 333 readonly_element: true, 334 335 // should days from previous and/or next month be selectable when visible? 336 // note that if the value of this property is set to TRUE, the value of "show_other_months" will be considered 337 // TRUE regardless of the actual value! 338 // 339 // default is FALSE 340 select_other_months: false, 341 342 // should the "Clear date" button be visible? 343 // 344 // accepted values are: 345 // 346 // - 0 (zero) - the button for clearing a previously selected date is shown only if a previously selected date 347 // already exists; this means that if the input the date picker is attached to is empty, and the user selects 348 // a date for the first time, this button will not be visible; once the user picked a date and opens the date 349 // picker again, this time the button will be visible. 350 // 351 // - TRUE will make the button visible all the time 352 // 353 // - FALSE will disable the button 354 // 355 // default is "0" (without quotes) 356 show_clear_date: 0, 357 358 // should a calendar icon be added to the elements the plugin is attached to? 359 // 360 // default is TRUE 361 show_icon: true, 362 363 // should days from previous and/or next month be visible? 364 // 365 // default is TRUE 366 show_other_months: true, 367 368 // should the "Today" button be visible? 369 // setting it to anything but boolean FALSE will enable the button and will use the property's value as 370 // caption for the button; setting it to FALSE will disable the button 371 // 372 // default is "Today" 373 show_select_today: 'Today', 374 375 // should an extra column be shown, showing the number of each week? 376 // anything other than FALSE will enable this feature, and use the given value as column title 377 // i.e. show_week_number: 'Wk' would enable this feature and have "Wk" as the column's title 378 // 379 // default is FALSE 380 show_week_number: false, 381 382 // a default date to start the date picker with 383 // must be specified in the format defined by the "format" property, or it will be ignored! 384 // note that this value is used only if there is no value in the field the date picker is attached to! 385 // 386 // default is FALSE 387 start_date: false, 388 389 // should default values, in the input field the date picker is attached to, be deleted if they are not valid 390 // according to "direction" and/or "disabled_dates"? 391 // 392 // default is FALSE
393 strict: false, 394 395 // how should the date picker start; valid values are "days", "months" and "years" 396 // note that the date picker is always cycling days-months-years when clicking in the date picker's header, 397 // and years-months-days when selecting dates (unless one or more of the views are missing due to the date's 398 // format) 399 // 400 // also note that the value of the "view" property may be overridden if the date's format requires so! (i.e. 401 // "days" for the "view" property makes no sense if the date format doesn't allow the selection of days) 402 // 403 // default is "days" 404 view: 'days', 405 406 // days of the week that are considered "weekend days" 407 // valid values are 0 to 6, Sunday to Saturday 408 // 409 // default values are 0 and 6 (Saturday and Sunday) 410 weekend_days: [0, 6], 411 412 // when set to TRUE, day numbers < 10 will be prefixed with 0; set to FALSE if you don't want that 413 // 414 // default is TRUE 415 zero_pad: false, 416 417 // callback function to be executed whenever the user changes the view (days/months/years), as well as when 418 // the user navigates by clicking on the "next"/"previous" icons in any of the views 419 // 420 // the callback function called by this event takes 2 arguments - the first argument represents the current 421 // view (can be "days", "months" or "years"), the second argument represents an array containing the "active" 422 // elements (not disabled) from the view, as jQuery elements, allowing for easy customization and interaction 423 // with particular cells in the date picker's view 424 // 425 // the "this" keyword inside the callback function refers to the element the date picker is attached to, 426 // as a jQuery object 427 // 428 // for simplifying searching for particular dates, each element in the second argument will also have a 429 // "date" data attribute whose format depends on the value of the "view" argument: 430 // - YYYY-MM-DD for elements in the "days" view 431 // - YYYY-MM for elements in the "months" view 432 // - YYYY for elements in the "years" view 433 // 434 // the "this" keyword inside the callback function refers to the element the date picker is attached to! 435 onChange: null, 436 437 // callback function to be executed when the user clicks the "Clear" button 438 // 439 // the callback function takes no arguments; the "this" keyword inside the callback function refers to 440 // the element the date picker is attached to, as a jQuery object 441 onClear: null, 442 443 // callback function to be executed when the date picker is shown 444 // 445 // the callback function takes no arguments; the "this" keyword inside the callback function refers to 446 // the element the date picker is attached to, as a jQuery object 447 onOpen: null, 448 449 // callback function to be executed when the date picker is closed, but only when the "always_visible" 450 // property is set to FALSE 451 // 452 // the callback function takes no arguments; the "this" keyword inside the callback function refers to 453 // the element the date picker is attached to, as a jQuery object 454 onClose: null, 455 456 // callback function to be executed when a date is selected 457 // the callback function takes 3 arguments: 458 // - the date in the format specified by the "format" attribute; 459 // - the date in YYYY-MM-DD format 460 // - the date as a JavaScript Date object 461 // 462 // the "this" keyword inside the callback function refers to the element the date picker is attached to, 463 // as a jQuery object 464 onSelect: null 465 466 }, 467 468 // private properties 469 cleardate, clickables, confirm_selection, current_system_day, current_system_month, current_system_year, 470 custom_class_names, custom_classes = {}, datepicker, daypicker, daypicker_cells, default_day, 471 default_month, default_year, disabled_dates = [], enabled_dates = [], end_date, first_selectable_day, 472 first_selectable_month, first_selectable_year, footer, header, icon, last_selectable_day, last_selectable_month, 473 last_selectable_year, monthpicker, monthpicker_cells, original_attributes = {}, selected_hour, selected_minute, 474 selected_second, selected_ampm, view_toggler, selected_month, selected_year, selecttoday, shim, 475 show_select_today, start_date, timepicker, timepicker_config, touchmove = false, uniqueid = '', yearpicker, 476 yearpicker_cells, view, views, is_touch = false, 477 478 // are we running on an iOS powered device? 479 is_iOS = !!navigator.platform && /iPad|iPhone|iPod/.test(navigator.platform); 480 481 var plugin = this; 482 483 plugin.settings = {}; 484 485 // the jQuery version of the element 486 // "element" (without the $) will point to the DOM element 487 var $element = $(element); 488 489 /**
vendor: 22,494 bytes, lines 490-962
490 * Constructor method. Initializes the date picker. 491 * 492 * @return void 493 */ 494 var init = function(update) { 495 496 var 497 498 // the characters that may be present in the date format and that represent days, months, years, hours, 499 // minutes and seconds 500 date_chars = { 501 days: ['d', 'j', 'D'], 502 months: ['F', 'm', 'M', 'n', 't'], 503 years: ['o', 'Y', 'y'], 504 hours: ['G', 'g', 'H', 'h'], 505 minutes: ['i'], 506 seconds: ['s'], 507 ampm: ['A', 'a'] 508 }, 509 510 // some defaults 511 type = null, data, dates, k, l; 512 513 // generate a random ID for each date picker (we'll use this if later a certain date picker is destroyed to 514 // remove related events) 515 // the code is taken from http://stackoverflow.com/a/105074 516 for (k = 0; k < 3; k++) uniqueid += Math.floor((1 + Math.random()) * 0x10000).toString(16); 517 518 // unless we're not just updating settings 519 if (!update) { 520 521 // merge default settings with user-settings ( 522 plugin.settings = $.extend({}, defaults, options); 523 524 // preserve some of element's original attributes 525 original_attributes['readonly'] = $element.attr('readonly'); 526 original_attributes['style'] = $element.attr('style'); 527 original_attributes['padding_left'] = parseInt($element.css('paddingLeft'), 10) || 0; 528 original_attributes['padding_right'] = parseInt($element.css('paddingRight'), 10) || 0; 529 530 // iterate through the element's data attributes (if any) 531 for (data in $element.data()) 532 533 // if data attribute's name starts with "zdp_" 534 if (data.indexOf('zdp_') === 0) { 535 536 // remove the "zdp_" prefix 537 data = data.replace(/^zdp\_/, ''); 538 539 // if such a property exists 540 if (undefined !== defaults[data]) 541 542 // update the property's value 543 // (note that for the "pair" property we need to convert the property to an element) 544 plugin.settings[data] = (data === 'pair' ? $($element.data('zdp_' + data)) : $element.data('zdp_' + data)); 545 546 } 547 548 } 549 550 // if the element should be read-only, set the "readonly" attribute 551 if (plugin.settings.readonly_element) $element.attr('readonly', 'readonly'); 552 553 // assume there's no timepicker 554 timepicker_config = false; 555 556 // the views the user can cycle through 557 views = []; 558 559 // determine the views the user can cycle through, depending on the format 560 // that is, if the format doesn't contain the day, the user will be able to cycle only through years and months, 561 // whereas if the format doesn't contain months nor days, the user will only be able to select years 562 563 // iterate through all the character blocks 564 for (type in date_chars) 565 566 // iterate through the characters of each block 567 $.each(date_chars[type], function(index, character) { 568 569 var i, max; 570 571 // if current character exists in the "format" property 572 if (plugin.settings.format.indexOf(character) > -1) 573 574 // if user can cycle through the "days" view 575 if (type === 'days') views.push('days'); 576 577 // if user can cycle through the "months" view 578 else if (type === 'months') views.push('months'); 579 580 // if user can cycle through the "years" view 581 else if (type === 'years') views.push('years'); 582 583 // if time is available in the date's format 584 else if (type === 'hours' || type === 'minutes' || type === 'seconds' || type === 'ampm') { 585 586 // if variable is not yet initialized 587 if (!timepicker_config) { 588 589 // initialize the variable now 590 timepicker_config = {is12hour: false}; 591 592 // users may access the "time" view 593 views.push('time'); 594 595 } 596 597 // if hours are available in the date's format 598 if (type === 'hours') { 599 600 // selectable hours (12 or 24) depending on the format 601 if (character === 'g' || character == 'h') { 602 603 max = 12; 604 605 // set a flag telling that the hour is 12 hour format 606 timepicker_config.is12hour = true; 607 608 } else max = 24; 609 610 timepicker_config.hours = []; 611 612 // iterate through valid hours 613 for (i = (max === 12 ? 1 : 0); i < (max === 12 ? 13 : max); i++) 614 615 // and add them to the lookup array if a user-defined list of values doesn't exist, or if the value is in that list 616 if (!$.isArray(plugin.settings.enabled_hours) || $.inArray(i, plugin.settings.enabled_hours) > -1) timepicker_config.hours.push(i); 617 618 // if minutes are available in the date's format 619 } else if (type === 'minutes') { 620 621 timepicker_config.minutes = []; 622 623 // iterate through valid minutes 624 for (i = 0; i < 60; i++) 625 626 // and add them to the lookup array if a user-defined list of values doesn't exist, or if the value is in that list 627 if (!$.isArray(plugin.settings.enabled_minutes) || $.inArray(i, plugin.settings.enabled_minutes) > -1) timepicker_config.minutes.push(i); 628 629 // if seconds are available in the date's format 630 } else if (type === 'seconds') { 631 632 timepicker_config.seconds = []; 633 634 // iterate through valid minutes 635 for (i = 0; i < 60; i++) 636 637 // and add them to the lookup array if a user-defined list of values doesn't exist, or if the value is in that list 638 if (!$.isArray(plugin.settings.enabled_seconds) || $.inArray(i, plugin.settings.enabled_seconds) > -1) timepicker_config.seconds.push(i); 639 640 // if am/pm is available in the date's format 641 } else 642 643 // pre-fill the array of selectable seconds 644 timepicker_config.ampm = ['am', 'pm']; 645 646 } 647 648 }); 649 650 // if invalid format (no days, no months, no years) use the default where the user is able to cycle through 651 // all the views, except time 652 if (views.length === 0) views = ['years', 'months', 'days']; 653 654 // if the starting view is not amongst the views the user can cycle through, set the correct starting view 655 if ($.inArray(plugin.settings.view, views) === -1) plugin.settings.view = views[views.length - 1]; 656 657 // parse the rules for disabling dates and turn them into arrays of arrays 658 659 custom_class_names = []; 660 for (k in plugin.settings.custom_classes) if (plugin.settings.custom_classes.hasOwnProperty(k) && custom_class_names.indexOf(k) === -1) custom_class_names.push(k); 661 662 // it's the same logic for preparing the enabled/disable dates, as well as dates that have custom classes 663 for (l = 0; l < 2 + custom_class_names.length; l++) { 664 665 // first time we're doing disabled dates, 666 if (l === 0) dates = plugin.settings.disabled_dates; 667 668 // second time we're doing enabled_dates 669 else if (l === 1) dates = plugin.settings.enabled_dates; 670 671 // otherwise, we're doing dates that will have custom classes 672 else dates = plugin.settings.custom_classes[custom_class_names[l - 2]]; 673 674 // if we have a non-empty array 675 if ($.isArray(dates) && dates.length > 0) 676 677 // iterate through the rules 678 $.each(dates, function() { 679 680 // split the values in rule by white space 681 var rules = this.split(' '), i, j, k, limits; 682 683 // there can be a maximum of 4 rules (days, months, years and, optionally, day of the week) 684 for (i = 0; i < 4; i++) { 685 686 // if one of the values is not available 687 // replace it with a * (wildcard) 688 if (!rules[i]) rules[i] = '*'; 689 690 // if rule contains a comma, create a new array by splitting the rule by commas 691 // if there are no commas create an array containing the rule's string 692 rules[i] = (rules[i].indexOf(',') > -1 ? rules[i].split(',') : new Array(rules[i])); 693 694 // iterate through the items in the rule 695 for (j = 0; j < rules[i].length; j++) 696 697 // if item contains a dash (defining a range) 698 if (rules[i][j].indexOf('-') > -1) { 699 700 // get the lower and upper limits of the range 701 limits = rules[i][j].match(/^([0-9]+)\-([0-9]+)/); 702 703 // if range is valid 704 if (null !== limits) { 705 706 // iterate through the range 707 for (k = to_int(limits[1]); k <= to_int(limits[2]); k++) 708 709 // if value is not already among the values of the rule 710 // add it to the rule 711 if ($.inArray(k, rules[i]) === -1) rules[i].push(k + ''); 712 713 // remove the range indicator 714 rules[i].splice(j, 1); 715 716 } 717 718 } 719 720 // iterate through the items in the rule 721 // and make sure that numbers are numbers 722 for (j = 0; j < rules[i].length; j++) rules[i][j] = (isNaN(to_int(rules[i][j])) ? rules[i][j] : to_int(rules[i][j])); 723 724 } 725 726 // add to the correct list of processed rules 727 // first time we're doing disabled dates, 728 if (l === 0) disabled_dates.push(rules); 729 730 // second time we're doing enabled_dates 731 else if (l === 1) enabled_dates.push(rules); 732 733 // otherwise, we're doing the dates to which custom classes need to be applied 734 else { 735 736 if (undefined === custom_classes[custom_class_names[l - 2]]) custom_classes[custom_class_names[l - 2]] = []; 737 custom_classes[custom_class_names[l - 2]].push(rules); 738 739 } 740 741 }); 742 743 } 744 745 var 746 747 // cache the current system date 748 date = new Date(), 749 750 // when the date picker's starting date depends on the value of another date picker, this value will be 751 // set by the other date picker 752 // this value will be used as base for all calculations (if not set, will be the same as the current 753 // system date) 754 reference_date = (!plugin.settings.reference_date ? ($element.data('zdp_reference_date') && undefined !== $element.data('zdp_reference_date') ? $element.data('zdp_reference_date') : date) : plugin.settings.reference_date), 755 756 tmp_start_date, tmp_end_date; 757 758 // reset these values here as this method might be called more than once during a date picker's lifetime 759 // (when the selectable dates depend on the values from another date picker) 760 start_date = undefined; end_date = undefined; 761 762 // extract the date parts 763 // also, save the current system month/day/year - we'll use them to highlight the current system date 764 first_selectable_month = reference_date.getMonth(); 765 current_system_month = date.getMonth(); 766 first_selectable_year = reference_date.getFullYear(); 767 current_system_year = date.getFullYear(); 768 first_selectable_day = reference_date.getDate(); 769 current_system_day = date.getDate(); 770 771 // check if the calendar has any restrictions 772 773 // calendar is future-only, starting today 774 // it means we have a starting date (the current system date), but no ending date 775 if (plugin.settings.direction === true) start_date = reference_date; 776 777 // calendar is past only, ending today 778 else if (plugin.settings.direction === false) { 779 780 // it means we have an ending date (the reference date), but no starting date 781 end_date = reference_date; 782 783 // extract the date parts 784 last_selectable_month = end_date.getMonth(); 785 last_selectable_year = end_date.getFullYear(); 786 last_selectable_day = end_date.getDate(); 787 788 } else if ( 789 790 // if direction is not given as an array and the value is an integer > 0 791 (!$.isArray(plugin.settings.direction) && is_integer(plugin.settings.direction) && to_int(plugin.settings.direction) > 0) || 792 793 // or direction is given as an array 794 ($.isArray(plugin.settings.direction) && ( 795 796 // and first entry is a valid date 797 (tmp_start_date = check_date(plugin.settings.direction[0])) || 798 // or a boolean TRUE 799 plugin.settings.direction[0] === true || 800 // or an integer > 0 801 (is_integer(plugin.settings.direction[0]) && plugin.settings.direction[0] > 0) 802 803 ) && ( 804 805 // and second entry is a valid date 806 (tmp_end_date = check_date(plugin.settings.direction[1])) || 807 // or a boolean FALSE 808 plugin.settings.direction[1] === false || 809 // or integer >= 0 810 (is_integer(plugin.settings.direction[1]) && plugin.settings.direction[1] >= 0) 811 812 )) 813 814 ) { 815 816 // if an exact starting date was given, use that as a starting date 817 if (tmp_start_date) start_date = tmp_start_date; 818 819 // otherwise 820 else 821 822 // figure out the starting date 823 // use the Date object to normalize the date 824 // for example, 2011 05 33 will be transformed to 2011 06 02 825 start_date = new Date( 826 first_selectable_year, 827 first_selectable_month, 828 first_selectable_day + (!$.isArray(plugin.settings.direction) ? to_int(plugin.settings.direction) : to_int(plugin.settings.direction[0] === true ? 0 : plugin.settings.direction[0])) 829 ); 830 831 // re-extract the date parts 832 first_selectable_month = start_date.getMonth(); 833 first_selectable_year = start_date.getFullYear(); 834 first_selectable_day = start_date.getDate(); 835 836 // if an exact ending date was given and the date is after the starting date, use that as a ending date 837 if (tmp_end_date && +tmp_end_date >= +start_date) end_date = tmp_end_date; 838 839 // if have information about the ending date 840 else if (!tmp_end_date && plugin.settings.direction[1] !== false && $.isArray(plugin.settings.direction)) 841 842 // figure out the ending date 843 // use the Date object to normalize the date 844 // for example, 2011 05 33 will be transformed to 2011 06 02 845 end_date = new Date( 846 first_selectable_year, 847 first_selectable_month, 848 first_selectable_day + to_int(plugin.settings.direction[1]) 849 ); 850 851 // if a valid ending date exists 852 if (end_date) { 853 854 // extract the date parts 855 last_selectable_month = end_date.getMonth(); 856 last_selectable_year = end_date.getFullYear(); 857 last_selectable_day = end_date.getDate(); 858 859 } 860 861 } else if ( 862 863 // if direction is not given as an array and the value is an integer < 0 864 (!$.isArray(plugin.settings.direction) && is_integer(plugin.settings.direction) && to_int(plugin.settings.direction) < 0) || 865 866 // or direction is given as an array 867 ($.isArray(plugin.settings.direction) && ( 868 869 // and first entry is boolean FALSE 870 plugin.settings.direction[0] === false || 871 // or an integer < 0 872 (is_integer(plugin.settings.direction[0]) && plugin.settings.direction[0] < 0) 873 874 ) && ( 875 876 // and second entry is a valid date 877 (tmp_start_date = check_date(plugin.settings.direction[1])) || 878 // or an integer >= 0 879 (is_integer(plugin.settings.direction[1]) && plugin.settings.direction[1] >= 0) 880 881 )) 882 883 ) { 884 885 // figure out the ending date 886 // use the Date object to normalize the date 887 // for example, 2011 05 33 will be transformed to 2011 06 02 888 end_date = new Date( 889 first_selectable_year, 890 first_selectable_month, 891 first_selectable_day + (!$.isArray(plugin.settings.direction) ? to_int(plugin.settings.direction) : to_int(plugin.settings.direction[0] === false ? 0 : plugin.settings.direction[0])) 892 ); 893 894 // re-extract the date parts 895 last_selectable_month = end_date.getMonth(); 896 last_selectable_year = end_date.getFullYear(); 897 last_selectable_day = end_date.getDate(); 898 899 // if an exact starting date was given, and the date is before the ending date, use that as a starting date 900 if (tmp_start_date && +tmp_start_date < +end_date) start_date = tmp_start_date; 901 902 // if have information about the starting date 903 else if (!tmp_start_date && $.isArray(plugin.settings.direction)) 904 905 // figure out the staring date 906 // use the Date object to normalize the date 907 // for example, 2011 05 33 will be transformed to 2011 06 02 908 start_date = new Date( 909 last_selectable_year, 910 last_selectable_month, 911 last_selectable_day - to_int(plugin.settings.direction[1]) 912 ); 913 914 // if a valid starting date exists 915 if (start_date) { 916 917 // extract the date parts 918 first_selectable_month = start_date.getMonth(); 919 first_selectable_year = start_date.getFullYear(); 920 first_selectable_day = start_date.getDate(); 921 922 } 923 924 // if there are disabled dates 925 } else if ($.isArray(plugin.settings.disabled_dates) && plugin.settings.disabled_dates.length > 0) 926 927 // iterate through the rules for disabling dates 928 for (var interval in disabled_dates) 929 930 // only if there is a rule that disables *everything* 931 if (disabled_dates[interval][0] === '*' && disabled_dates[interval][1] === '*' && disabled_dates[interval][2] === '*' && disabled_dates[interval][3] === '*') { 932 933 var tmpDates = []; 934 935 // iterate through the rules for enabling dates 936 // looking for the minimum/maximum selectable date (if it's the case) 937 $.each(enabled_dates, function() { 938 939 var rule = this; 940 941 // if the rule doesn't apply to all years 942 if (rule[2][0] !== '*') 943 944 // format date and store it in our stack 945 tmpDates.push(parseInt( 946 rule[2][0] + 947 (rule[1][0] === '*' ? '12' : str_pad(rule[1][0], 2)) + 948 (rule[0][0] === '*' ? (rule[1][0] === '*' ? '31' : new Date(rule[2][0], rule[1][0], 0).getDate()) : str_pad(rule[0][0], 2)), 10)); 949 950 }); 951 952 // sort dates ascending 953 tmpDates.sort(); 954 955 // if we have any rules 956 if (tmpDates.length > 0) { 957 958 // get date parts 959 var matches = (tmpDates[0] + '').match(/([0-9]{4})([0-9]{2})([0-9]{2})/); 960 961 // assign the date parts to the appropriate variables 962 first_selectable_year = parseInt(matches[1], 10);
963 first_selectable_month = parseInt(matches[2], 10) - 1; 964 first_selectable_day = parseInt(matches[3], 10); 965 966 } 967 968 // don't look further 969 break; 970 971 } 972 973 // if first selectable date exists but is disabled, find the actual first selectable date 974 if (is_disabled(first_selectable_year, first_selectable_month, first_selectable_day)) { 975 976 // loop until we find the first selectable year 977 while (is_disabled(first_selectable_year)) 978 979 // if calendar is past-only, 980 if (!start_date) { 981 982 // decrement the year 983 first_selectable_year--; 984 985 // because we've changed years, reset the month to December 986 first_selectable_month = 11; 987 988 // otherwise 989 } else { 990 991 // increment the year 992 first_selectable_year++; 993 994 // because we've changed years, reset the month to January 995 first_selectable_month = 0; 996 997 } 998 999 // loop until we find the first selectable month 1000 while (is_disabled(first_selectable_year, first_selectable_month)) { 1001 1002 // if calendar is past-only 1003 if (!start_date) { 1004 1005 // decrement the month 1006 first_selectable_month--; 1007 1008 // because we've changed months, reset the day to the last day of the month 1009 first_selectable_day = new Date(first_selectable_year, first_selectable_month + 1, 0).getDate(); 1010 1011 // otherwise 1012 } else { 1013 1014 // increment the month 1015 first_selectable_month++; 1016 1017 // because we've changed months, reset the day to the first day of the month 1018 first_selectable_day = 1; 1019 1020 } 1021 1022 // if we moved to a following year 1023 if (first_selectable_month > 11) { 1024 1025 // increment the year 1026 first_selectable_year++; 1027 1028 // reset the month to January 1029 first_selectable_month = 0; 1030 1031 // because we've changed months, reset the day to the first day of the month 1032 first_selectable_day = 1; 1033 1034 // if we moved to a previous year 1035 } else if (first_selectable_month < 0) { 1036 1037 // decrement the year 1038 first_selectable_year--; 1039 1040 // reset the month to December 1041 first_selectable_month = 11; 1042 1043 // because we've changed months, reset the day to the last day of the month 1044 first_selectable_day = new Date(first_selectable_year, first_selectable_month + 1, 0).getDate(); 1045 1046 } 1047 1048 } 1049 1050 // loop until we find the first selectable day 1051 while (is_disabled(first_selectable_year, first_selectable_month, first_selectable_day)) { 1052 1053 // if calendar is past-only, decrement the day 1054 if (!start_date) first_selectable_day--; 1055 1056 // otherwise, increment the day 1057 else first_selectable_day++; 1058 1059 // use the Date object to normalize the date 1060 // for example, 2011 05 33 will be transformed to 2011 06 02 1061 date = new Date(first_selectable_year, first_selectable_month, first_selectable_day); 1062 1063 // re-extract date parts from the normalized date 1064 // as we use them in the current loop 1065 first_selectable_year = date.getFullYear(); 1066 first_selectable_month = date.getMonth(); 1067 first_selectable_day = date.getDate(); 1068 1069 } 1070 1071 // use the Date object to normalize the date 1072 // for example, 2011 05 33 will be transformed to 2011 06 02 1073 date = new Date(first_selectable_year, first_selectable_month, first_selectable_day); 1074 1075 // re-extract date parts from the normalized date 1076 // as we use them in the current loop 1077 first_selectable_year = date.getFullYear();
vendor: 38,265 bytes, lines 1078-1909
1078 first_selectable_month = date.getMonth(); 1079 first_selectable_day = date.getDate(); 1080 1081 } 1082 1083 // get the default date, from the element, and check if it represents a valid date, according to the required format 1084 var default_date = check_date($element.val() || (plugin.settings.start_date ? plugin.settings.start_date : '')); 1085 1086 // if there is a default date, date picker is in "strict" mode, and the default date is disabled 1087 if (default_date && plugin.settings.strict && is_disabled(default_date.getFullYear(), default_date.getMonth(), default_date.getDate())) 1088 1089 // clear the value of the parent element 1090 $element.val(''); 1091 1092 // updates value for the date picker whose starting date depends on the selected date (if any) 1093 if (!update && (undefined !== start_date || undefined !== default_date)) 1094 update_dependent(undefined !== default_date ? default_date : start_date); 1095 1096 // if date picker is not always visible in a container 1097 if (!(plugin.settings.always_visible instanceof jQuery)) { 1098 1099 // if we're just creating the date picker 1100 if (!update) { 1101 1102 // if a calendar icon should be added to the element the plugin is attached to, create the icon now 1103 if (plugin.settings.show_icon) { 1104 1105 // strangely, in Firefox 21+ (or maybe even earlier) input elements have their "display" property 1106 // set to "inline" instead of "inline-block" as do all the other browsers. 1107 // because this behavior brakes the positioning of the icon, we'll set the "display" property to 1108 // "inline-block" before anything else; 1109 if (browser.name === 'firefox' && $element.is('input[type="text"]') && $element.css('display') === 'inline') $element.css('display', 'inline-block'); 1110 1111 // we create a wrapper for the parent element so that we can later position the icon 1112 // also, make sure the wrapper inherits positioning properties of the target element 1113 var marginTop = parseInt($element.css('marginTop'), 10) || 0, 1114 marginRight = parseInt($element.css('marginRight'), 10) || 0, 1115 marginBottom = parseInt($element.css('marginBottom'), 10) || 0, 1116 marginLeft = parseInt($element.css('marginLeft'), 10) || 0, 1117 icon_wrapper = $('<span class="Zebra_DatePicker_Icon_Wrapper"></span>').css({ 1118 display: $element.css('display'), 1119 position: $element.css('position') === 'static' ? 'relative' : $element.css('position'), 1120 float: $element.css('float'), 1121 top: $element.css('top'), 1122 right: $element.css('right'), 1123 bottom: $element.css('bottom'), 1124 left: $element.css('left'), 1125 marginTop: marginTop < 0 ? marginTop : 0, 1126 marginRight: marginRight < 0 ? marginRight : 0, 1127 marginBottom: marginBottom < 0 ? marginBottom : 0, 1128 marginLeft: marginLeft < 0 ? marginLeft : 0, 1129 paddingTop: marginTop, 1130 paddingRight: marginRight, 1131 paddingBottom: marginBottom, 1132 paddingLeft: marginLeft 1133 }); 1134 1135 // if parent element has its "display" property set to "block" 1136 // the wrapper has to have its "width" set 1137 if ($element.css('display') === 'block') icon_wrapper.css('width', $element.outerWidth(true)); 1138 1139 // put wrapper around the element 1140 // also, reset the target element's positioning properties 1141 $element.wrap(icon_wrapper).css({ 1142 position: 'relative', 1143 float: 'none', 1144 top: 'auto', 1145 right: 'auto', 1146 bottom: 'auto', 1147 left: 'auto', 1148 marginTop: 0, 1149 marginRight: 0, 1150 marginBottom: 0, 1151 marginLeft: 0 1152 }); 1153 1154 // create the actual calendar icon (show a disabled icon if the element is disabled) 1155 icon = $('<button type="button" class="Zebra_DatePicker_Icon' + ($element.attr('disabled') === 'disabled' ? ' Zebra_DatePicker_Icon_Disabled' : '') + '">Pick a date</button>'); 1156 1157 // a reference to the icon, as a global property 1158 plugin.icon = icon; 1159 1160 // the date picker will open when clicking both the icon and the element the plugin is attached to 1161 // (or the icon only, if set so) 1162 clickables = plugin.settings.open_icon_only ? icon : icon.add($element); 1163 1164 // if calendar icon is not visible, the date picker will open when clicking the element 1165 } else clickables = $element; 1166 1167 // attach the "click" and, if required, the "focus" event to the clickable elements (icon and/or element) 1168 clickables.on('click.Zebra_DatePicker_' + uniqueid + (plugin.settings.open_on_focus ? ' focus.Zebra_DatePicker_' + uniqueid : ''), function() { 1169 1170 // if date picker is not visible and element is not disabled 1171 if (datepicker.hasClass('dp_hidden') && !$element.attr('disabled')) 1172 1173 // show the date picker 1174 setTimeout(function() { 1175 plugin.show(); 1176 }, ( 1177 // for touch-enabled devices when element is not readonly, wait for 600 miliseconds for 1178 // the virtual keyboard to appear and show the date picker afterwards 1179 is_touch && !plugin.settings.readonly_element ? 600 : 0 1180 )); 1181 1182 }); 1183 1184 // attach a keydown event to the clickable elements (icon and/or element) 1185 clickables.on('keydown.Zebra_DatePicker_' + uniqueid, function(e) { 1186 1187 // if "Tab" key was pressed and the date picker is visible 1188 if (e.keyCode === 9 && !datepicker.hasClass('dp_hidden')) 1189 1190 // hide the date picker 1191 plugin.hide(); 1192 1193 }); 1194 1195 // if users can manually enter dates and a pair date element exists 1196 if (!plugin.settings.readonly_element && plugin.settings.pair) 1197 1198 // whenever the element looses focus 1199 $element.on('blur.Zebra_DatePicker_' + uniqueid, function() { 1200 1201 var date; 1202 1203 // if a valid date was entered, update the paired date picker 1204 if ((date = check_date($(this).val())) && !is_disabled(date.getFullYear(), date.getMonth(), date.getDate())) update_dependent(date); 1205 1206 }); 1207 1208 // if icon exists, inject it into the DOM, right after the parent element (and inside the wrapper) 1209 if (undefined !== icon) icon.insertAfter($element); 1210 1211 } 1212 1213 // if calendar icon exists 1214 if (undefined !== icon) { 1215 1216 // needed when updating: remove any inline style set previously by library, 1217 // so we get the right values below 1218 icon.attr('style', ''); 1219 1220 var 1221 1222 // get element's width and height (including margins) 1223 element_width = $element.outerWidth(), 1224 element_height = $element.outerHeight(), 1225 1226 // get icon's width, height and margins 1227 icon_width = icon.outerWidth(), 1228 icon_height = icon.outerHeight(); 1229 1230 // set icon's vertical position 1231 icon.css('top', (element_height - icon_height) / 2); 1232 1233 // if icon is to be placed *inside* the element 1234 // position the icon accordingly 1235 if (plugin.settings.inside) 1236 1237 // if icon is to be placed on the right 1238 if (plugin.settings.icon_position === 'right') { 1239 1240 // place the icon to the right, respecting the element's right padding 1241 icon.css('right', plugin.settings.icon_margin !== false ? plugin.settings.icon_margin : original_attributes['padding_right']); 1242 1243 // also, adjust the element's right padding 1244 $element.css('paddingRight', ((plugin.settings.icon_margin !== false ? plugin.settings.icon_margin : original_attributes['padding_right']) * 2) + icon_width); 1245 1246 // if icon is to be placed on the left 1247 } else { 1248 1249 // place the icon to the left, respecting the element's left padding 1250 icon.css('left', plugin.settings.icon_margin !== false ? plugin.settings.icon_margin : original_attributes['padding_left']); 1251 1252 // also, adjust the element's left padding 1253 $element.css('paddingLeft', ((plugin.settings.icon_margin !== false ? plugin.settings.icon_margin : original_attributes['padding_left']) * 2) + icon_width); 1254 1255 } 1256 1257 // if icon is to be placed to the right of the element 1258 // position the icon accordingly 1259 else icon.css('left', element_width + (plugin.settings.icon_margin !== false ? plugin.settings.icon_margin : original_attributes['padding_left'])); 1260 1261 // assume the datepicker is not disabled 1262 icon.removeClass('Zebra_DatePicker_Icon_Disabled'); 1263 1264 // if element the datepicker is attached to became disabled, disable the calendar icon, too 1265 if ($element.attr('disabled') === 'disabled') icon.addClass('Zebra_DatePicker_Icon_Disabled'); 1266 1267 } 1268 1269 } 1270 1271 // if the "Today" button is to be shown and it makes sense to be shown 1272 // (the "days" view is available and "today" is not a disabled date) 1273 show_select_today = (plugin.settings.show_select_today !== false && $.inArray('days', views) > -1 && !is_disabled(current_system_year, current_system_month, current_system_day) ? plugin.settings.show_select_today : false); 1274 1275 // if we just needed to recompute the things above 1276 if (update) { 1277 1278 // make sure we update these strings, in case they've changed 1279 $('.dp_previous', datepicker).html(plugin.settings.navigation[0]); 1280 $('.dp_next', datepicker).html(plugin.settings.navigation[1]); 1281 $('.dp_time_controls_increase .dp_time_control', datepicker).html(plugin.settings.navigation[2]); 1282 $('.dp_time_controls_decrease .dp_time_control', datepicker).html(plugin.settings.navigation[3]); 1283 $('.dp_clear', datepicker).html(plugin.settings.lang_clear_date); 1284 $('.dp_today', datepicker).html(plugin.settings.show_select_today); 1285 1286 // don't go further 1287 return; 1288 1289 } 1290 1291 // update icon/date picker position on resize and/or changing orientation 1292 $(window).on('resize.Zebra_DatePicker_' + uniqueid + ', orientationchange.Zebra_DatePicker_' + uniqueid, function() { 1293 1294 // hide the date picker 1295 plugin.hide(); 1296 1297 }); 1298 1299 // generate the container that will hold everything 1300 var html = '' + 1301 '<div class="Zebra_DatePicker">' + 1302 '<table class="dp_header dp_actions">' + 1303 '<tr>' + 1304 '<td class="dp_previous">' + plugin.settings.navigation[0] + (is_iOS ? '︎' : '') + '</td>' + 1305 '<td class="dp_caption"></td>' + 1306 '<td class="dp_next">' + plugin.settings.navigation[1] + (is_iOS ? '︎' : '') + '</td>' + 1307 '</tr>' + 1308 '</table>' + 1309 '<table class="dp_daypicker' + (plugin.settings.show_week_number ? ' dp_week_numbers' : '') + ' dp_body"></table>' + 1310 '<table class="dp_monthpicker dp_body"></table>' + 1311 '<table class="dp_yearpicker dp_body"></table>' + 1312 '<table class="dp_timepicker dp_body"></table>' + 1313 '<table class="dp_footer dp_actions"><tr>' + 1314 '<td class="dp_today">' + show_select_today + '</td>' + 1315 '<td class="dp_clear">' + plugin.settings.lang_clear_date + '</td>' + 1316 '<td class="dp_view_toggler dp_icon"> </td>' + 1317 '<td class="dp_confirm dp_icon"></td>' + 1318 '</tr></table>' + 1319 '</div>'; 1320 1321 // create a jQuery object out of the HTML above and create a reference to it 1322 datepicker = $(html); 1323 1324 // create references to the different parts of the date picker 1325 header = $('table.dp_header', datepicker); 1326 daypicker = $('table.dp_daypicker', datepicker); 1327 monthpicker = $('table.dp_monthpicker', datepicker); 1328 yearpicker = $('table.dp_yearpicker', datepicker); 1329 timepicker = $('table.dp_timepicker', datepicker); 1330 footer = $('table.dp_footer', datepicker); 1331 selecttoday = $('td.dp_today', footer); 1332 cleardate = $('td.dp_clear', footer); 1333 view_toggler = $('td.dp_view_toggler', footer); 1334 confirm_selection = $('td.dp_confirm', footer); 1335 1336 // if date picker is not always visible in a container 1337 if (!(plugin.settings.always_visible instanceof jQuery)) 1338 1339 // inject the container into the DOM 1340 plugin.settings.container.append(datepicker); 1341 1342 // otherwise, if element is not disabled 1343 else if (!$element.attr('disabled')) { 1344 1345 // inject the date picker into the designated container element 1346 plugin.settings.always_visible.append(datepicker); 1347 1348 // and make it visible right away 1349 plugin.show(); 1350 1351 } 1352 1353 // add the mouseover/mousevents to all to the date picker's cells 1354 // except those that are not selectable 1355 datepicker 1356 .on('mouseover', 'td:not(.dp_disabled)', function() { 1357 $(this).addClass('dp_hover'); 1358 }) 1359 .on('mouseout', 'td:not(.dp_disabled)', function() { 1360 $(this).removeClass('dp_hover'); 1361 }); 1362 1363 // prevent text selection (prevent accidental select when user clicks too fast) 1364 disable_text_select(datepicker); 1365 1366 // event for when clicking the "previous" button 1367 $('.dp_previous', header).on('click', function() { 1368 1369 // if view is "months" 1370 // decrement year by one 1371 if (view === 'months') selected_year--; 1372 1373 // if view is "years" 1374 // decrement years by 12 1375 else if (view === 'years') selected_year -= 12; 1376 1377 // if view is "days" 1378 // decrement the month and 1379 // if month is out of range 1380 else if (--selected_month < 0) { 1381 1382 // go to the last month of the previous year 1383 selected_month = 11; 1384 selected_year--; 1385 1386 } 1387 1388 // generate the appropriate view 1389 manage_views(); 1390 1391 }); 1392 1393 // attach a click event to the caption in header 1394 $('.dp_caption', header).on('click', function() { 1395 1396 // if current view is "days", take the user to the next view, depending on the format 1397 if (view === 'days') view = ($.inArray('months', views) > -1 ? 'months' : ($.inArray('years', views) > -1 ? 'years' : 'days')); 1398 1399 // if current view is "months", take the user to the next view, depending on the format 1400 else if (view === 'months') view = ($.inArray('years', views) > -1 ? 'years' : ($.inArray('days', views) > -1 ? 'days' : 'months')); 1401 1402 // if current view is "years", take the user to the next view, depending on the format 1403 else view = ($.inArray('days', views) > -1 ? 'days' : ($.inArray('months', views) > -1 ? 'months' : 'years')); 1404 1405 // generate the appropriate view 1406 manage_views(); 1407 1408 }); 1409 1410 // event for when clicking the "next" button 1411 $('.dp_next', header).on('click', function() { 1412 1413 // if view is "months" 1414 // increment year by 1 1415 if (view === 'months') selected_year++; 1416 1417 // if view is "years" 1418 // increment years by 12 1419 else if (view === 'years') selected_year += 12; 1420 1421 // if view is "days" 1422 // increment the month and 1423 // if month is out of range 1424 else if (++selected_month === 12) { 1425 1426 // go to the first month of the next year 1427 selected_month = 0; 1428 selected_year++; 1429 1430 } 1431 1432 // generate the appropriate view 1433 manage_views(); 1434 1435 }); 1436 1437 // attach a click event for the cells in the day picker 1438 daypicker.on('click', 'td:not(.dp_disabled)', function() { 1439 1440 var matches; 1441 1442 // if other months are selectable and currently clicked cell contains a class with the cell's date 1443 if (plugin.settings.select_other_months && $(this).attr('class') && null !== (matches = $(this).attr('class').match(/date\_([0-9]{4})(0[1-9]|1[012])(0[1-9]|[12][0-9]|3[01])/))) 1444 1445 // use the stored date 1446 select_date(matches[1], matches[2] - 1, matches[3], 'days', $(this)); 1447 1448 // put selected date in the element the plugin is attached to, and hide the date picker 1449 else select_date(selected_year, selected_month, to_int($(this).html()), 'days', $(this)); 1450 1451 }); 1452 1453 // attach a click event for the cells in the month picker 1454 monthpicker.on('click', 'td:not(.dp_disabled)', function() { 1455 1456 // get the month we've clicked on 1457 var matches = $(this).attr('class').match(/dp\_month\_([0-9]+)/); 1458 1459 // set the selected month 1460 selected_month = to_int(matches[1]); 1461 1462 // if user can select only years and months 1463 if ($.inArray('days', views) === -1) 1464 1465 // put selected date in the element the plugin is attached to, and hide the date picker 1466 select_date(selected_year, selected_month, 1, 'months', $(this)); 1467 1468 else { 1469 1470 // direct the user to the "days" view 1471 view = 'days'; 1472 1473 // if date picker is always visible 1474 // empty the value in the text box the date picker is attached to 1475 if (plugin.settings.always_visible) $element.val(''); 1476 1477 // generate the appropriate view 1478 manage_views(); 1479 1480 } 1481 1482 }); 1483 1484 // attach a click event for the cells in the year picker 1485 yearpicker.on('click', 'td:not(.dp_disabled)', function() { 1486 1487 // set the selected year 1488 selected_year = to_int($(this).html()); 1489 1490 // if user can select only years 1491 if ($.inArray('months', views) === -1) 1492 1493 // put selected date in the element the plugin is attached to, and hide the date picker 1494 select_date(selected_year, 1, 1, 'years', $(this)); 1495 1496 else { 1497 1498 // direct the user to the "months" view 1499 view = 'months'; 1500 1501 // if date picker is always visible 1502 // empty the value in the text box the date picker is attached to 1503 if (plugin.settings.always_visible) $element.val(''); 1504 1505 // generate the appropriate view 1506 manage_views(); 1507 1508 } 1509 1510 }); 1511 1512 // function to execute when the "Today" button is clicked 1513 selecttoday.on('click', function(e) { 1514 1515 // date might have changed since we opened the date picker, so always use the current date 1516 var date = new Date; 1517 1518 e.preventDefault(); 1519 1520 // select the current date 1521 select_date(date.getFullYear(), date.getMonth(), date.getDate(), 'days', $('.dp_current', daypicker)); 1522 1523 }); 1524 1525 // function to execute when the "Clear" button is clicked 1526 cleardate.on('click', function(e) { 1527 1528 e.preventDefault(); 1529 1530 // clear the element's value 1531 $element.val(''); 1532 1533 // reset these values 1534 default_day = null; default_month = null; default_year = null; 1535 1536 // if date picker is not always visible 1537 if (!plugin.settings.always_visible) { 1538 1539 // reset these values 1540 selected_month = null; selected_year = null; 1541 1542 // if date picker is always visible 1543 } else 1544 1545 // remove the "selected" class from all cells that have it 1546 $('td.dp_selected', datepicker).removeClass('dp_selected'); 1547 1548 // give the focus back to the parent element 1549 $element.focus(); 1550 1551 // hide the date picker 1552 plugin.hide(); 1553 1554 // if a callback function exists for when clearing a date 1555 if (plugin.settings.onClear && typeof plugin.settings.onClear === 'function') 1556 1557 // execute the callback function and pass as argument the element the plugin is attached to 1558 plugin.settings.onClear.call($element); 1559 1560 }); 1561 1562 // function to execute when the clock/calendar button is clicked in the footer 1563 view_toggler.on('click', function() { 1564 1565 // if we're not in the time picker mode 1566 if (view !== 'time') { 1567 1568 // switch to time picker mode 1569 view = 'time'; 1570 manage_views(); 1571 1572 // if we are already in the time picker mode, 1573 // switch back to the standard view 1574 // (let the click on the header's caption handle things) 1575 } else $('.dp_caption', header).trigger('click'); 1576 1577 }); 1578 1579 // when the "confirm selection" button is clicked, hide the date picker 1580 // (visible only when in the "time" view) 1581 confirm_selection.on('click', function() { 1582 1583 // as users may click this before making any adjustments to time, simulate time adjustment so that 1584 // a value is selected 1585 $('.dp_time_controls_increase td').trigger('click'); 1586 $('.dp_time_controls_decrease td').trigger('click'); 1587 1588 // if a callback function exists for when selecting a date 1589 if (plugin.settings.onSelect && typeof plugin.settings.onSelect === 'function') { 1590 1591 var js_date = new Date(selected_year, selected_month, default_day, 1592 (timepicker_config && timepicker_config.hours ? selected_hour + (timepicker_config.ampm && ((selected_ampm === 'pm' && selected_hour < 12) || (selected_ampm === 'am' && selected_hour === 12)) ? 12 : 0) : 0), 1593 (timepicker_config && timepicker_config.minutes ? selected_minute : 0), 1594 (timepicker_config && timepicker_config.seconds ? selected_second : 0) 1595 ); 1596 1597 // execute the callback function 1598 // make "this" inside the callback function refer to the element the date picker is attached to, as a jQuery object 1599 plugin.settings.onSelect.call($element, format(js_date), selected_year + '-' + str_pad(selected_month + 1, 2) + '-' + str_pad(default_day, 2) + (timepicker_config ? ' ' + str_pad(js_date.getHours(), 2) + ':' + str_pad(js_date.getMinutes(), 2) + ':' + str_pad(js_date.getSeconds(), 2) : ''), js_date); 1600 1601 } 1602 1603 plugin.hide(); 1604 1605 }); 1606 1607 // handle value increases on the time picker 1608 datepicker.on('click', '.dp_time_controls_increase td, .dp_time_controls_decrease td', function() { 1609 1610 var 1611 1612 // are we increasing or decreasing values? 1613 increase = $(this).parent('.dp_time_controls_increase').length > 0, 1614 1615 // figure out what we're increasing (hour, minutes, seconds, ampm) 1616 matches = $(this).attr('class').match(/dp\_time\_([^\s]+)/i), 1617 value_container = $('.dp_time_segments .dp_time_' + matches[1] + (matches[1] !== 'ampm' ? 's' : ''), timepicker), 1618 1619 // the current value (strip the zeros in front) 1620 value = value_container.text().toLowerCase(), 1621 1622 // the array with allowed values 1623 lookup = timepicker_config[matches[1] + (matches[1] !== 'ampm' ? 's' : '')], 1624 1625 // the current value's position in the array of allowed values 1626 current_value_position = $.inArray(matches[1] !== 'ampm' ? parseInt(value, 10) : value, lookup), 1627 1628 // the next value's position in the lookup array 1629 next_value_position = current_value_position === -1 ? 0 : (increase ? (current_value_position + 1 >= lookup.length ? 0 : current_value_position + 1) : (current_value_position - 1 < 0 ? lookup.length - 1 : current_value_position - 1)), 1630 1631 default_date; 1632 1633 // increase/decrease the required value according to the values in the lookup array 1634 if (matches[1] === 'hour') selected_hour = lookup[next_value_position]; 1635 else if (matches[1] === 'minute') selected_minute = lookup[next_value_position]; 1636 else if (matches[1] === 'second') selected_second = lookup[next_value_position]; 1637 else selected_ampm = lookup[next_value_position]; 1638 1639 // if a default day is not available and the "start_date" property is set 1640 if (!default_day && plugin.settings.start_date) { 1641 1642 // check if "start_date" is valid according to the format 1643 default_date = check_date(plugin.settings.start_date); 1644 1645 // ...and if it is, extract the day from there 1646 if (default_date) default_day = default_date.getDate(); 1647 1648 } 1649 1650 // if still no value, use the first selectable day 1651 if (!default_day) default_day = first_selectable_day; 1652 1653 // set the new value 1654 value_container.text(str_pad(lookup[next_value_position], 2).toUpperCase()); 1655 1656 // update the value in the element 1657 select_date(selected_year, selected_month, default_day); 1658 1659 }); 1660 1661 // if date picker is not always visible in a container 1662 if (!(plugin.settings.always_visible instanceof jQuery)) { 1663 1664 // if we dragged the screen 1665 $(document).on('touchmove.Zebra_DatePicker_' + uniqueid, function() { 1666 1667 // set this flag to TRUE 1668 touchmove = true; 1669 1670 }); 1671 1672 // whenever anything is clicked on the page 1673 $(document).on('mousedown.Zebra_DatePicker_' + uniqueid + ' touchend.Zebra_DatePicker_' + uniqueid, function(e) { 1674 1675 // if this happened on a touch-enabled device and it represents the end of finger movement instead of a tap 1676 // set the "touchmove" flag to FALSE and don't go further 1677 if (e.type === 'touchend' && touchmove) { 1678 1679 // we now know that this is a touch enabled device 1680 is_touch = true; 1681 1682 return (touchmove = false); 1683 1684 } 1685 1686 // always set this to FALSE here 1687 touchmove = false; 1688 1689 // if 1690 if ( 1691 1692 // date picker is visible 1693 !datepicker.hasClass('dp_hidden') && 1694 1695 ( 1696 // date picker opens only on interacting with the icon, icon exists, but it is not the clicked element 1697 (plugin.settings.open_icon_only && plugin.icon && $(e.target).get(0) !== plugin.icon.get(0)) || 1698 1699 // date picker doesn't open only on interacting with the icon but the clicked element it's not the icon nor the parent element 1700 (!plugin.settings.open_icon_only && $(e.target).get(0) !== $element.get(0) && (!plugin.icon || $(e.target).get(0) !== plugin.icon.get(0))) 1701 1702 ) && 1703 1704 // and the click is not inside the calendar 1705 $(e.target).parents().filter('.Zebra_DatePicker').length === 0 1706 1707 // hide the date picker 1708 ) plugin.hide(true); 1709 1710 }); 1711 1712 // whenever a key is pressed on the page 1713 $(document).on('keyup.Zebra_DatePicker_' + uniqueid, function(e) { 1714 1715 // if the date picker is visible 1716 // and the pressed key is ESC 1717 // hide the date picker 1718 if (!datepicker.hasClass('dp_hidden') && e.which === 27) plugin.hide(); 1719 1720 }); 1721 1722 } 1723 1724 // last thing is to pre-render some of the date picker right away 1725 manage_views(); 1726 1727 }; 1728 1729 /** 1730 * Clears the selected date. 1731 * 1732 * @return void 1733 */ 1734 plugin.clear_date = function() { 1735 1736 $(cleardate).trigger('click'); 1737 1738 }; 1739 1740 /** 1741 * Destroys the date picker. 1742 * 1743 * @return void 1744 */ 1745 plugin.destroy = function() { 1746 1747 // if the calendar icon exists 1748 if (undefined !== plugin.icon) { 1749 1750 // remove associated event handlers 1751 plugin.icon.off('click.Zebra_DatePicker_' + uniqueid); 1752 plugin.icon.off('focus.Zebra_DatePicker_' + uniqueid); 1753 plugin.icon.off('keydown.Zebra_DatePicker_' + uniqueid); 1754 1755 // remove the icon itself 1756 plugin.icon.remove(); 1757 1758 } 1759 1760 // remove all events attached to the datepicker 1761 // (these are the ones for increasing/decreasing values in the time picker) 1762 datepicker.off(); 1763 1764 // remove the calendar 1765 datepicker.remove(); 1766 1767 // if calendar icon was shown and the date picker was not always visible in a container, 1768 // also remove the wrapper used for positioning it 1769 if (plugin.settings.show_icon && !(plugin.settings.always_visible instanceof jQuery)) $element.unwrap(); 1770 1771 // remove associated event handlers from the element 1772 $element.off('blur.Zebra_DatePicker_' + uniqueid); 1773 $element.off('click.Zebra_DatePicker_' + uniqueid); 1774 $element.off('focus.Zebra_DatePicker_' + uniqueid); 1775 $element.off('keydown.Zebra_DatePicker_' + uniqueid); 1776 $element.off('mousedown.Zebra_DatePicker_' + uniqueid); 1777 1778 // remove associated event handlers from the document 1779 $(document).off('keyup.Zebra_DatePicker_' + uniqueid); 1780 $(document).off('mousedown.Zebra_DatePicker_' + uniqueid); 1781 $(document).off('touchend.Zebra_DatePicker_' + uniqueid); 1782 $(window).off('resize.Zebra_DatePicker_' + uniqueid); 1783 $(window).off('orientationchange.Zebra_DatePicker_' + uniqueid); 1784 1785 // remove association with the element 1786 $element.removeData('Zebra_DatePicker'); 1787 1788 // restore element's modified attributes 1789 $element.attr('readonly', original_attributes['readonly']); 1790 $element.attr('style', original_attributes['style'] ? original_attributes['style'] : ''); 1791 $element.css('paddingLeft', original_attributes['padding_left']); 1792 $element.css('paddingRight', original_attributes['padding_right']); 1793 1794 }; 1795 1796 /** 1797 * Hides the date picker. 1798 * 1799 * @return void 1800 */ 1801 plugin.hide = function(outside) { 1802 1803 // if date picker is not always visible or we clicked outside the date picker 1804 // (the "outside" argument is TRUE when clicking outside the date picker and the "always_visible" is set to boolean TRUE) 1805 if (!plugin.settings.always_visible || outside) { 1806 1807 // hide the iFrameShim in Internet Explorer 6 1808 iframeShim('hide'); 1809 1810 // hide the date picker 1811 datepicker.addClass('dp_hidden'); 1812 1813 // if a callback function exists for when hiding the date picker 1814 if (plugin.settings.onClose && typeof plugin.settings.onClose === 'function') 1815 1816 // execute the callback function and pass as argument the element the plugin is attached to 1817 plugin.settings.onClose.call($element); 1818 1819 } 1820 1821 }; 1822 1823 /** 1824 * Set the date picker's value 1825 * 1826 * Must be in the format set by the "format" property! 1827 * 1828 * @return void 1829 */ 1830 plugin.set_date = function(date) { 1831 1832 var dateObj; 1833 1834 // if a valid date was entered, and date is not disabled 1835 if ((dateObj = check_date(date)) && !is_disabled(dateObj.getFullYear(), dateObj.getMonth(), dateObj.getDate())) { 1836 1837 // set the element's value 1838 $element.val(date); 1839 1840 // update the paired date picker (if any) 1841 update_dependent(dateObj); 1842 1843 } 1844 1845 }; 1846 1847 /** 1848 * Shows the date picker. 1849 * 1850 * @return void 1851 */ 1852 plugin.show = function() { 1853 1854 // always show the view defined in settings 1855 view = plugin.settings.view; 1856 1857 // get the default date, from the element, and check if it represents a valid date, according to the required format 1858 var default_date = check_date($element.val() || (plugin.settings.start_date ? plugin.settings.start_date : '')), 1859 current_date; 1860 1861 // if the value represents a valid date 1862 if (default_date) { 1863 1864 // extract the date parts 1865 // we'll use these to highlight the default date in the date picker and as starting point to 1866 // what year and month to start the date picker with 1867 // why separate values? because selected_* will change as user navigates within the date picker 1868 default_month = default_date.getMonth(); 1869 selected_month = default_date.getMonth(); 1870 default_year = default_date.getFullYear(); 1871 selected_year = default_date.getFullYear(); 1872 default_day = default_date.getDate(); 1873 1874 // if the default date represents a disabled date 1875 if (is_disabled(default_year, default_month, default_day)) { 1876 1877 // if date picker is in "strict" mode, clear the value of the parent element 1878 if (plugin.settings.strict) $element.val(''); 1879 1880 // the calendar will start with the first selectable year/month 1881 selected_month = first_selectable_month; 1882 selected_year = first_selectable_year; 1883 1884 } 1885 1886 // if a default value is not available, or value does not represent a valid date 1887 } else { 1888 1889 // the calendar will start with the first selectable year/month 1890 selected_month = first_selectable_month; 1891 selected_year = first_selectable_year; 1892 1893 } 1894 1895 // whatever the case, if time picker is enabled 1896 if (timepicker_config) { 1897 1898 // if a default date is available, use the time from there 1899 if (default_date) current_date = default_date; 1900 1901 // use current system time otherwise 1902 else current_date = new Date(); 1903 1904 // extract time parts from it 1905 selected_hour = current_date.getHours(); 1906 selected_minute = current_date.getMinutes(); 1907 selected_second = current_date.getSeconds(); 1908 selected_ampm = (selected_hour >= 12 ? 'pm' : 'am'); 1909
1910 // if hour is in 12 hour format 1911 if (timepicker_config.is12hour) 1912 1913 // convert it to the correct value 1914 selected_hour = (selected_hour % 12 === 0 ? 12 : selected_hour % 12); 1915 1916 // make sure that the default values are withing the allowed range, if a range is defined 1917 if ($.isArray(plugin.settings.enabled_hours) && $.inArray(selected_hour, plugin.settings.enabled_hours) === -1) selected_hour = plugin.settings.enabled_hours[0]; 1918 if ($.isArray(plugin.settings.enabled_minutes) && $.inArray(selected_minute, plugin.settings.enabled_minutes) === -1) selected_minute = plugin.settings.enabled_minutes[0]; 1919 if ($.isArray(plugin.settings.enabled_seconds) && $.inArray(selected_second, plugin.settings.enabled_seconds) === -1) selected_second = plugin.settings.enabled_seconds[0]; 1920 1921 } 1922 1923 // generate the appropriate view 1924 manage_views(); 1925 1926 // if date picker is not always visible in a container, and the calendar icon is visible 1927 if (!(plugin.settings.always_visible instanceof jQuery)) { 1928 1929 // if date picker is to be injected into the <body> 1930 if (plugin.settings.container.is('body')) { 1931 1932 var 1933 1934 // get the date picker width and height 1935 datepicker_width = datepicker.outerWidth(), 1936 datepicker_height = datepicker.outerHeight(), 1937 1938 // compute the date picker's default left and top 1939 // this will be computed relative to the icon's top-right corner (if the calendar icon exists), or 1940 // relative to the element's top-right corner otherwise, to which the offsets given at initialization 1941 // are added/subtracted 1942 left = (undefined !== icon ? icon.offset().left + icon.outerWidth(true) : $element.offset().left + $element.outerWidth(true)) + plugin.settings.offset[0], 1943 top = (undefined !== icon ? icon.offset().top : $element.offset().top) - datepicker_height + plugin.settings.offset[1], 1944 1945 // get browser window's width and height 1946 window_width = $(window).width(), 1947 window_height = $(window).height(), 1948 1949 // get browser window's horizontal and vertical scroll offsets 1950 window_scroll_top = $(window).scrollTop(), 1951 window_scroll_left = $(window).scrollLeft(); 1952 1953 if (plugin.settings.default_position === 'below') 1954 top = (undefined !== icon ? icon.offset().top : $element.offset().top) + plugin.settings.offset[1]; 1955 1956 // if date picker is outside the viewport, adjust its position so that it is visible 1957 if (left + datepicker_width > window_scroll_left + window_width) left = window_scroll_left + window_width - datepicker_width; 1958 if (left < window_scroll_left) left = window_scroll_left; 1959 1960 if (top + datepicker_height > window_scroll_top + window_height) top = window_scroll_top + window_height - datepicker_height; 1961 if (top < window_scroll_top) top = window_scroll_top; 1962 1963 // make the date picker visible 1964 datepicker.css({ 1965 left: left, 1966 top: top 1967 }); 1968 1969 // if date picker is to be injected into a custom container element 1970 } else 1971 1972 datepicker.css({ 1973 left: 0, 1974 top: 0 1975 }); 1976 1977 // fade-in the date picker 1978 // for Internet Explorer < 9 show the date picker instantly or fading alters the font's weight 1979 datepicker.removeClass('dp_hidden'); 1980 1981 // show the iFrameShim in Internet Explorer 6 1982 iframeShim(); 1983 1984 // if date picker is always visible, show it 1985 } else datepicker.removeClass('dp_hidden'); 1986 1987 // if a callback function exists for when showing the date picker 1988 if (plugin.settings.onOpen && typeof plugin.settings.onOpen === 'function') 1989 1990 // execute the callback function and pass as argument the element the plugin is attached to 1991 plugin.settings.onOpen.call($element); 1992 1993 }; 1994 1995 /** 1996 * Updates the configuration options given as argument 1997 *
vendor: 7,017 bytes, lines 1998-2144
1998 * @param object values An object containing any number of configuration options to be updated 1999 * 2000 * @return void 2001 */ 2002 plugin.update = function(values) { 2003 2004 // if original direction not saved, save it now 2005 if (plugin.original_direction) plugin.original_direction = plugin.direction; 2006 2007 // update configuration options 2008 plugin.settings = $.extend(plugin.settings, values); 2009 2010 // reinitialize the object with the new options 2011 init(true); 2012 2013 }; 2014 2015 /** 2016 * Checks if a string represents a valid date according to the format defined by the "format" property. 2017 * 2018 * @param string str_date A string representing a date, formatted accordingly to the "format" property. 2019 * For example, if "format" is "Y-m-d" the string should look like "2011-06-01" 2020 * 2021 * @return mixed Returns a JavaScript Date object if string represents a valid date according 2022 * formatted according to the "format" property, or FALSE otherwise. 2023 * 2024 * @access private 2025 */ 2026 var check_date = function(str_date) { 2027 2028 // treat argument as a string 2029 str_date += ''; 2030 2031 // if value is given 2032 if ($.trim(str_date) !== '') { 2033 2034 var 2035 2036 // prepare the format by removing white space from it 2037 // and also escape characters that could have special meaning in a regular expression 2038 format = escape_regexp(plugin.settings.format), 2039 2040 // allowed characters in date's format 2041 format_chars = ['d', 'D', 'j', 'l', 'N', 'S', 'w', 'F', 'm', 'M', 'n', 'Y', 'y', 'G', 'g', 'H', 'h', 'i', 's', 'a', 'A'], 2042 2043 // "matches" will contain the characters defining the date's format 2044 matches = [], 2045 2046 // "regexp" will contain the regular expression built for each of the characters used in the date's format 2047 regexp = [], 2048 2049 // "position" will contain the position of the character found in the date's format 2050 position = null, 2051 2052 // "segments" will contain the matches of the regular expression 2053 segments = null; 2054 2055 // iterate through the allowed characters in date's format 2056 for (var i = 0; i < format_chars.length; i++) 2057 2058 // if character is found in the date's format 2059 if ((position = format.indexOf(format_chars[i])) > -1) 2060 2061 // save it, alongside the character's position 2062 matches.push({ 2063 character: format_chars[i], 2064 position: position 2065 }); 2066 2067 // sort characters defining the date's format based on their position, ascending 2068 matches.sort(function(a, b) { return a.position - b.position; }); 2069 2070 // iterate through the characters defining the date's format 2071 $.each(matches, function(index, match) { 2072 2073 // add to the array of regular expressions, based on the character 2074 switch (match.character) { 2075 2076 case 'd': regexp.push('0[1-9]|[12][0-9]|3[01]'); break; 2077 case 'D': regexp.push('[a-z]{3}'); break; 2078 case 'j': regexp.push('[1-9]|[12][0-9]|3[01]'); break; 2079 case 'l': regexp.push('[a-z]+'); break; 2080 case 'N': regexp.push('[1-7]'); break; 2081 case 'S': regexp.push('st|nd|rd|th'); break; 2082 case 'w': regexp.push('[0-6]'); break; 2083 case 'F': regexp.push('[a-z]+'); break; 2084 case 'm': regexp.push('0[1-9]|1[012]'); break; 2085 case 'M': regexp.push('[a-z]{3}'); break; 2086 case 'n': regexp.push('[1-9]|1[012]'); break; 2087 case 'Y': regexp.push('[0-9]{4}'); break; 2088 case 'y': regexp.push('[0-9]{2}'); break; 2089 case 'G': regexp.push('[1-9]|1[0-9]|2[0123]'); break; 2090 case 'g': regexp.push('[0-9]|1[012]'); break; 2091 case 'H': regexp.push('0[0-9]|1[0-9]|2[0123]'); break; 2092 case 'h': regexp.push('0[0-9]|1[012]'); break; 2093 case 'i': regexp.push('0[0-9]|[12345][0-9]'); break; 2094 case 's': regexp.push('0[0-9]|[12345][0-9]'); break; 2095 case 'a': regexp.push('am|pm'); break; 2096 case 'A': regexp.push('AM|PM'); break; 2097 2098 } 2099 2100 }); 2101 2102 // if we have an array of regular expressions 2103 if (regexp.length) { 2104 2105 // we will replace characters in the date's format in reversed order 2106 matches.reverse(); 2107 2108 // iterate through the characters in date's format 2109 $.each(matches, function(index, match) { 2110 2111 // replace each character with the appropriate regular expression 2112 format = format.replace(match.character, '(' + regexp[regexp.length - index - 1] + ')'); 2113 2114 }); 2115 2116 // the final regular expression 2117 regexp = new RegExp('^' + format + '$', 'ig'); 2118 2119 // if regular expression was matched 2120 if ((segments = regexp.exec(str_date))) { 2121 2122 // check if date is a valid date (i.e. there's no February 31) 2123 2124 var tmpdate = new Date(), 2125 original_day = 1, 2126 original_month = tmpdate.getMonth() + 1, 2127 original_year = tmpdate.getFullYear(), 2128 original_hours = tmpdate.getHours(), 2129 original_minutes = tmpdate.getMinutes(), 2130 original_seconds = tmpdate.getSeconds(), 2131 original_ampm, 2132 english_days = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], 2133 english_months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], 2134 iterable, 2135 2136 // by default, we assume the date is valid 2137 valid = true; 2138 2139 // reverse back the characters in the date's format 2140 matches.reverse(); 2141 2142 // iterate through the characters in the date's format 2143 $.each(matches, function(index, match) { 2144
2145 // if the date is not valid, don't look further 2146 if (!valid) return true; 2147 2148 // based on the character 2149 switch (match.character) { 2150 2151 case 'm': 2152 case 'n': 2153 2154 // extract the month from the value entered by the user 2155 original_month = to_int(segments[index + 1]); 2156 2157 break; 2158 2159 case 'd': 2160 case 'j': 2161 2162 // extract the day from the value entered by the user 2163 original_day = to_int(segments[index + 1]); 2164 2165 break; 2166 2167 case 'D': 2168 case 'l': 2169 case 'F': 2170 case 'M': 2171 2172 // if day is given as day name, we'll check against the names in the used language 2173 if (match.character === 'D' || match.character === 'l') iterable = plugin.settings.days; 2174 2175 // if month is given as month name, we'll check against the names in the used language 2176 else iterable = plugin.settings.months; 2177 2178 // by default, we assume the day or month was not entered correctly 2179 valid = false; 2180 2181 // iterate through the month/days in the used language 2182 $.each(iterable, function(key, value) { 2183 2184 // if month/day was entered correctly, don't look further 2185 if (valid) return true; 2186 2187 // if month/day was entered correctly 2188 if (segments[index + 1].toLowerCase() === value.substring(0, (match.character === 'D' || match.character === 'M' ? 3 : value.length)).toLowerCase()) { 2189 2190 // extract the day/month from the value entered by the user 2191 switch (match.character) { 2192 2193 case 'D': segments[index + 1] = english_days[key].substring(0, 3); break; 2194 case 'l': segments[index + 1] = english_days[key]; break; 2195 case 'F': segments[index + 1] = english_months[key]; original_month = key + 1; break; 2196 case 'M': segments[index + 1] = english_months[key].substring(0, 3); original_month = key + 1; break; 2197 2198 } 2199 2200 // day/month value is valid 2201 valid = true; 2202 2203 } 2204 2205 }); 2206 2207 break; 2208 2209 case 'Y': 2210 2211 // extract the year from the value entered by the user 2212 original_year = to_int(segments[index + 1]); 2213 2214 break; 2215 2216 case 'y': 2217 2218 // extract the year from the value entered by the user 2219 original_year = '19' + to_int(segments[index + 1]); 2220 2221 break; 2222 2223 case 'G': 2224 case 'H': 2225 case 'g': 2226 case 'h': 2227 2228 // extract the hours from the value entered by the user 2229 original_hours = to_int(segments[index + 1]); 2230 break; 2231 2232 case 'i': 2233 2234 // extract the minutes from the value entered by the user 2235 original_minutes = to_int(segments[index + 1]); 2236 break; 2237 2238 case 's': 2239 2240 // extract the seconds from the value entered by the user 2241 original_seconds = to_int(segments[index + 1]); 2242 break; 2243 2244 case 'a': 2245 case 'A': 2246 2247 // extract the seconds from the value entered by the user 2248 original_ampm = segments[index + 1].toLowerCase(); 2249 break; 2250 2251 } 2252 2253 }); 2254 2255 // if everything is ok so far 2256 if (valid) { 2257 2258 // generate a Date object using the values entered by the user 2259 // (handle also the case when original_month and/or original_day are undefined - i.e date format is "Y-m" or "Y") 2260 var date = new Date(original_year, (original_month || 1) - 1, original_day || 1, original_hours + (((original_ampm === 'pm' && original_hours < 12) || (original_ampm === 'am' && original_hours === 12)) ? 12 : 0), original_minutes, original_seconds); 2261 2262 // if, after that, the date is the same as the date entered by the user 2263 if (date.getFullYear() === original_year && date.getDate() === (original_day || 1) && date.getMonth() === ((original_month || 1) - 1)) 2264 2265 // return the date as JavaScript date object 2266 return date; 2267 2268 } 2269 2270 } 2271 2272 } 2273 2274 // if script gets this far, return false as something must've went wrong 2275 return false;
vendor: 6,378 bytes, lines 2276-2457
2276 2277 } 2278 2279 }; 2280 2281 /** 2282 * Prevents the possibility of selecting text on a given element. Used on the "previous" and "next" buttons 2283 * where text might get accidentally selected when user quickly clicks on the buttons. 2284 * 2285 * Code by http://chris-barr.com/index.php/entry/disable_text_selection_with_jquery/ 2286 * 2287 * @param jQuery Element el A jQuery element on which to prevents text selection. 2288 * 2289 * @return void 2290 * 2291 * @access private 2292 */ 2293 var disable_text_select = function(el) { 2294 2295 // if browser is Firefox 2296 if (browser.name === 'firefox') el.css('MozUserSelect', 'none'); 2297 2298 // if browser is Internet Explorer 2299 else if (browser.name === 'explorer') $(document).on('selectstart', el, function() { return false; }); 2300 2301 // for the other browsers 2302 else el.mousedown(function() { return false; }); 2303 2304 }; 2305 2306 /** 2307 * Escapes special characters in a string, preparing it for use in a regular expression. 2308 * 2309 * @param string str The string in which special characters should be escaped. 2310 * 2311 * @return string Returns the string with escaped special characters. 2312 * 2313 * @access private 2314 */ 2315 var escape_regexp = function(str) { 2316 2317 // return string with special characters escaped 2318 return str.replace(/([-.,*+?^${}()|[\]\/\\])/g, '\\$1'); 2319 2320 }; 2321 2322 /** 2323 * Formats a JavaScript date object to the format specified by the "format" property. 2324 * Code taken from http://electricprism.com/aeron/calendar/ 2325 * 2326 * @param date date A valid JavaScript date object 2327 * 2328 * @return string Returns a string containing the formatted date 2329 * 2330 * @access private 2331 */ 2332 var format = function(date) { 2333 2334 var result = '', 2335 2336 // extract parts of the date: 2337 // day number, 1 - 31 2338 j = date.getDate(), 2339 2340 // day of the week, 0 - 6, Sunday - Saturday 2341 w = date.getDay(), 2342 2343 // the name of the day of the week Sunday - Saturday 2344 l = plugin.settings.days[w], 2345 2346 // the month number, 1 - 12 2347 n = date.getMonth() + 1, 2348 2349 // the month name, January - December 2350 f = plugin.settings.months[n - 1], 2351 2352 // the year (as a string) 2353 y = date.getFullYear() + '', 2354 2355 // the hour, 0-23 2356 h = date.getHours(), 2357 2358 // the hour in 12 hours format 2359 h12 = h % 12 === 0 ? 12 : h % 12, 2360 2361 // the minute, 0-59 2362 m = date.getMinutes(), 2363 2364 // the second, 0-59 2365 s = date.getSeconds(), 2366 2367 // am/pm 2368 a = (h >= 12 ? 'pm' : 'am'), 2369 2370 i, chr; 2371 2372 // iterate through the characters in the format 2373 for (i = 0; i < plugin.settings.format.length; i++) { 2374 2375 // extract the current character 2376 chr = plugin.settings.format.charAt(i); 2377 2378 // see what character it is 2379 switch (chr) { 2380 2381 // year as two digits 2382 case 'y': y = y.substr(2); 2383 2384 // year as four digits 2385 // falls through 2386 case 'Y': result += y; break; 2387 2388 // month number, prefixed with 0 2389 case 'm': n = str_pad(n, 2); 2390 2391 // month number, not prefixed with 0 2392 // falls through 2393 case 'n': result += n; break; 2394 2395 // month name, three letters 2396 case 'M': f = ($.isArray(plugin.settings.months_abbr) && undefined !== plugin.settings.months_abbr[n - 1] ? plugin.settings.months_abbr[n - 1] : plugin.settings.months[n - 1].substr(0, 3)); 2397 2398 // full month name 2399 // falls through 2400 case 'F': result += f; break; 2401 2402 // day number, prefixed with 0 2403 case 'd': j = str_pad(j, 2); 2404 2405 // day number not prefixed with 0 2406 // falls through 2407 case 'j': result += j; break; 2408 2409 // day name, three letters 2410 case 'D': l = ($.isArray(plugin.settings.days_abbr) && undefined !== plugin.settings.days_abbr[w] ? plugin.settings.days_abbr[w] : plugin.settings.days[w].substr(0, 3)); 2411 2412 // full day name 2413 // falls through 2414 case 'l': result += l; break; 2415 2416 // ISO-8601 numeric representation of the day of the week, 1 - 7 2417 case 'N': w++; 2418 2419 // day of the week, 0 - 6 2420 // falls through 2421 case 'w': result += w; break; 2422 2423 // English ordinal suffix for the day of the month, 2 characters 2424 // (st, nd, rd or th (works well with j)) 2425 case 'S': 2426 2427 if (j % 10 === 1 && j !== '11') result += 'st'; 2428 2429 else if (j % 10 === 2 && j !== '12') result += 'nd'; 2430 2431 else if (j % 10 === 3 && j !== '13') result += 'rd'; 2432 2433 else result += 'th'; 2434 2435 break; 2436 2437 // hour in 12 hours format, without leading zeros 2438 case 'g': result += h12; break; 2439 2440 // hour in 12 hours format, with leading zeros 2441 case 'h': result += str_pad(h12, 2); break; 2442 2443 // hour in 24 hours format, without leading zeros 2444 case 'G': result += h; break; 2445 2446 // hour in 24 hours format, with leading zeros 2447 case 'H': result += str_pad(h, 2); break; 2448 2449 // minutes, with leading zeros 2450 case 'i': result += str_pad(m, 2); break; 2451 2452 // seconds, with leading zeros 2453 case 's': result += str_pad(s, 2); break; 2454 2455 // am/pm, lowercase 2456 case 'a': result += a; break; 2457
2458 // am/pm, uppercase 2459 case 'A': result += a.toUpperCase(); break; 2460 2461 // this is probably the separator 2462 default: result += chr; 2463 2464 } 2465 2466 } 2467 2468 // return formated date 2469 return result; 2470 2471 }; 2472 2473 /** 2474 * Generates the day picker view, and displays it 2475 * 2476 * @return void 2477 * 2478 * @access private 2479 */ 2480 var generate_daypicker = function() { 2481 2482 var 2483 2484 // get the number of days in the selected month 2485 days_in_month = new Date(selected_year, selected_month + 1, 0).getDate(), 2486 2487 // get the selected month's starting day (from 0 to 6) 2488 first_day = new Date(selected_year, selected_month, 1).getDay(), 2489 2490 // how many days are there in the previous month 2491 days_in_previous_month = new Date(selected_year, selected_month, 0).getDate(), 2492 2493 // how many days are there to be shown from the previous month 2494 days_from_previous_month = first_day - plugin.settings.first_day_of_week, 2495 2496 i, html, day, real_date, real_year, real_month, real_day, weekday, class_name, custom_class_name, is_weekend; 2497 2498 // the final value of how many days are there to be shown from the previous month 2499 days_from_previous_month = days_from_previous_month < 0 ? 7 + days_from_previous_month : days_from_previous_month; 2500 2501 // manage header caption and enable/disable navigation buttons if necessary 2502 manage_header(plugin.settings.header_captions['days']); 2503 2504 // start generating the HTML 2505 html = '<tr>'; 2506 2507 // if a column featuring the number of the week is to be shown 2508 if (plugin.settings.show_week_number) 2509 2510 // column title 2511 html += '<th>' + plugin.settings.show_week_number + '</th>'; 2512 2513 // name of week days 2514 // show the abbreviated day names (or only the first two letters of the full name if no abbreviations are specified) 2515 // and also, take in account the value of the "first_day_of_week" property 2516 for (i = 0; i < 7; i++) 2517 2518 html += '<th>' + ($.isArray(plugin.settings.days_abbr) && undefined !== plugin.settings.days_abbr[(plugin.settings.first_day_of_week + i) % 7] ? plugin.settings.days_abbr[(plugin.settings.first_day_of_week + i) % 7] : plugin.settings.days[(plugin.settings.first_day_of_week + i) % 7].substr(0, 2)) + '</th>'; 2519 2520 html += '</tr><tr>'; 2521 2522 // the calendar shows a total of 42 days 2523 for (i = 0; i < 42; i++) { 2524 2525 // seven days per row 2526 if (i > 0 && i % 7 === 0) html += '</tr><tr>'; 2527 2528 // if week number is to be shown 2529 if (i % 7 === 0 && plugin.settings.show_week_number) 2530 2531 // show ISO 8601 week number 2532 html += '<th>' + getWeekNumber(new Date(selected_year, selected_month, (i - days_from_previous_month + 1))) + '</th>'; 2533 2534 // the number of the day in month 2535 day = (i - days_from_previous_month + 1); 2536 2537 // if dates in previous/next month can be selected, and this is one of those days 2538 if (plugin.settings.select_other_months && (i < days_from_previous_month || day > days_in_month)) { 2539 2540 // use the Date object to normalize the date 2541 // for example, 2011 05 33 will be transformed to 2011 06 02 2542 real_date = new Date(selected_year, selected_month, day); 2543 real_year = real_date.getFullYear(); 2544 real_month = real_date.getMonth(); 2545 real_day = real_date.getDate(); 2546 2547 // extract normalized date parts and merge them 2548 real_date = real_year + str_pad(real_month + 1, 2) + str_pad(real_day, 2); 2549 2550 } 2551 2552 // get the week day (0 to 6, Sunday to Saturday) 2553 weekday = (plugin.settings.first_day_of_week + i) % 7; 2554 2555 // is day on a weekend? 2556 is_weekend = ($.inArray(weekday, plugin.settings.weekend_days) > -1); 2557 2558 // if this is a day from the previous month 2559 if (i < days_from_previous_month) 2560 2561 html += '<td class="dp_not_in_month ' + (is_weekend ? 'dp_weekend ' : '') + (plugin.settings.select_other_months && !is_disabled(real_year, real_month, real_day) ? 'date_' + real_date : 'dp_disabled') + '">' + (plugin.settings.select_other_months || plugin.settings.show_other_months ? str_pad(days_in_previous_month - days_from_previous_month + i + 1, plugin.settings.zero_pad ? 2 : 0) : ' ') + '</td>'; 2562 2563 // if this is a day from the next month 2564 else if (day > days_in_month) 2565 2566 html += '<td class="dp_not_in_month ' + (is_weekend ? 'dp_weekend ' : '') + (plugin.settings.select_other_months && !is_disabled(real_year, real_month, real_day) ? 'date_' + real_date : 'dp_disabled') + '">' + (plugin.settings.select_other_months || plugin.settings.show_other_months ? str_pad(day - days_in_month, plugin.settings.zero_pad ? 2 : 0) : ' ') + '</td>'; 2567 2568 // if this is a day from the current month 2569 else { 2570 2571 class_name = ''; 2572 2573 // custom class, if any 2574 custom_class_name = get_custom_class(selected_year, selected_month, day); 2575 2576 // if day is in weekend 2577 if (is_weekend) class_name = ' dp_weekend'; 2578 2579 // highlight the current system date 2580 if (selected_month === current_system_month && selected_year === current_system_year && current_system_day === day) class_name += ' dp_current'; 2581 2582 // apply custom class, if a custom class exists 2583 if (custom_class_name !== '') class_name += ' ' + custom_class_name; 2584 2585 // highlight the currently selected date 2586 if (selected_month === default_month && selected_year === default_year && default_day === day) class_name += ' dp_selected'; 2587 2588 // if date needs to be disabled 2589 if (is_disabled(selected_year, selected_month, day)) class_name += ' dp_disabled'; 2590 2591 // print the day of the month (if "day" is NaN, use an empty string instead) 2592 html += '<td' + (class_name !== '' ? ' class="' + $.trim(class_name) + '"' : '') + '>
2592' + ((plugin.settings.zero_pad ? str_pad(day, 2) : day) || ' ') + '</td>'; 2593 2594 } 2595 2596 } 2597 2598 // wrap up generating the day picker 2599 html += '</tr>'; 2600 2601 // inject the day picker into the DOM 2602 daypicker.html($(html)); 2603 2604 // if date picker is always visible 2605 if (plugin.settings.always_visible) 2606 2607 // cache all the cells 2608 // (we need them so that we can easily remove the "dp_selected" class from all of them when user selects a date) 2609 daypicker_cells = $('td:not(.dp_disabled)', daypicker); 2610 2611 // make the day picker visible 2612 daypicker.show(); 2613 2614 }; 2615 2616 /** 2617 * Generates the month picker view, and displays it 2618 * 2619 * @return void 2620 * 2621 * @access private 2622 */ 2623 var generate_monthpicker = function() { 2624 2625 // manage header caption and enable/disable navigation buttons if necessary 2626 manage_header(plugin.settings.header_captions['months']); 2627 2628 // start generating the HTML 2629 var html = '<tr>', i, class_name; 2630 2631 // iterate through all the months 2632 for (i = 0; i < 12; i++) { 2633 2634 // three month per row 2635 if (i > 0 && i % 3 === 0) html += '</tr><tr>'; 2636 2637 class_name = 'dp_month_' + i; 2638 2639 // if month needs to be disabled 2640 if (is_disabled(selected_year, i)) class_name += ' dp_disabled'; 2641 2642 // else, if a date is already selected and this is that particular month, highlight it 2643 else if (default_month !== false && default_month === i && selected_year === default_year) class_name += ' dp_selected'; 2644 2645 // else, if this the current system month, highlight it 2646 else if (current_system_month === i && current_system_year === selected_year) class_name += ' dp_current'; 2647 2648 // first three letters of the month's name 2649 html += '<td class="' + $.trim(class_name) + '">' + ($.isArray(plugin.settings.months_abbr) && undefined !== plugin.settings.months_abbr[i] ? plugin.settings.months_abbr[i] : plugin.settings.months[i].substr(0, 3)) + '</td>'; 2650 2651 } 2652 2653 // wrap up 2654 html += '</tr>'; 2655 2656 // inject into the DOM 2657 monthpicker.html($(html)); 2658 2659 // if date picker is always visible 2660 if (plugin.settings.always_visible) 2661 2662 // cache all the cells 2663 // (we need them so that we can easily remove the "dp_selected" class from all of them when user selects a month) 2664 monthpicker_cells = $('td:not(.dp_disabled)', monthpicker); 2665 2666 // make the month picker visible 2667 monthpicker.show(); 2668 2669 }; 2670 2671 /** 2672 * Generates the time picker view, and displays it 2673 * 2674 * @return void 2675 * 2676 * @access private 2677 */ 2678 var generate_timepicker = function() { 2679 2680 var html; 2681 2682 // the HTML 2683 html = '<tr class="dp_time_controls_increase">' + 2684 (timepicker_config.hours ? '<td class="dp_time_hour dp_time_control">' + plugin.settings.navigation[2] + '</td>' : '') + 2685 (timepicker_config.minutes ? '<td class="dp_time_minute dp_time_control">' + plugin.settings.navigation[2] + '</td>' : '') + 2686 (timepicker_config.seconds ? '<td class="dp_time_second dp_time_control">' + plugin.settings.navigation[2] + '</td>' : '') + 2687 (timepicker_config.ampm ? '<td class="dp_time_ampm dp_time_control">' + plugin.settings.navigation[2] + '</td>' : '') + 2688 '</tr>'; 2689 2690 html += '<tr class="dp_time_segments">'; 2691 2692 if (timepicker_config.hours) html += '<td class="dp_time_hours dp_disabled' + (timepicker_config.minutes || timepicker_config.seconds || timepicker_config.ampm ? ' dp_time_separator' : '') + '"><div>' + str_pad(selected_hour, 2) + '</div></td>'; 2693 if (timepicker_config.minutes) html += '<td class="dp_time_minutes dp_disabled' + (timepicker_config.seconds || timepicker_config.ampm ? ' dp_time_separator' : '') + '"><div>' + str_pad(selected_minute, 2) + '</div></td>'; 2694 if (timepicker_config.seconds) html += '<td class="dp_time_seconds dp_disabled' + (timepicker_config.ampm ? ' dp_time_separator' : '') + '"><div>' + str_pad(selected_second, 2) + '</div></td>'; 2695 if (timepicker_config.ampm) html += '<td class="dp_time_ampm dp_disabled">' + selected_ampm.toUpperCase() + '</td>'; 2696 2697 html += '</tr>'; 2698 2699 html += '<tr class="dp_time_controls_decrease">' + 2700 (timepicker_config.hours ? '<td class="dp_time_hour dp_time_control">' + plugin.settings.navigation[3] + '</td>' : '') + 2701 (timepicker_config.minutes ? '<td class="dp_time_minute dp_time_control">' + plugin.settings.navigation[3] + '</td>' : '') + 2702 (timepicker_config.seconds ? '<td class="dp_time_second dp_time_control">' + plugin.settings.navigation[3] + '</td>' : '') + 2703 (timepicker_config.ampm ? '<td class="dp_time_ampm dp_time_control">' + plugin.settings.navigation[3] + '</td>' : '') + 2704 '</tr>'; 2705 2706 // inject into the DOM 2707 timepicker.html($(html)); 2708 2709 // make the time picker visible 2710 timepicker.show(); 2711 2712 } 2713 2714 /** 2715 * Generates the year picker view, and displays it
2716 * 2717 * @return void 2718 * 2719 * @access private 2720 */ 2721 var generate_yearpicker = function() { 2722 2723 // manage header caption and enable/disable navigation buttons if necessary 2724 manage_header(plugin.settings.header_captions['years']); 2725 2726 // start generating the HTML 2727 var html = '<tr>', i, class_name; 2728 2729 // we're showing 9 years at a time, current year in the middle 2730 for (i = 0; i < 12; i++) { 2731 2732 // three years per row 2733 if (i > 0 && i % 3 === 0) html += '</tr><tr>'; 2734 2735 class_name = ''; 2736 2737 // if year needs to be disabled 2738 if (is_disabled(selected_year - 7 + i)) class_name += ' dp_disabled'; 2739 2740 // else, if a date is already selected and this is that particular year, highlight it 2741 else if (default_year && default_year === selected_year - 7 + i) class_name += ' dp_selected'; 2742 2743 // else, if this is the current system year, highlight it 2744 else if (current_system_year === (selected_year - 7 + i)) class_name += ' dp_current'; 2745 2746 // first three letters of the month's name 2747 html += '<td' + ($.trim(class_name) !== '' ? ' class="' + $.trim(class_name) + '"' : '') + '>' + (selected_year - 7 + i) + '</td>'; 2748 2749 } 2750 2751 // wrap up 2752 html += '</tr>'; 2753 2754 // inject into the DOM 2755 yearpicker.html($(html)); 2756 2757 // if date picker is always visible 2758 if (plugin.settings.always_visible) 2759 2760 // cache all the cells 2761 // (we need them so that we can easily remove the "dp_selected" class from all of them when user selects a year) 2762 yearpicker_cells = $('td:not(.dp_disabled)', yearpicker); 2763 2764 // make the year picker visible 2765 yearpicker.show(); 2766 2767 }; 2768 2769 /** 2770 * Return the name of a custom class to be applied to the given date. 2771 * 2772 * @return string The name of a custom class to be applied to the given date, or an empty string if no custom 2773 * class needs to be applied. 2774 * 2775 * @param integer year The year to check 2776 * @param integer month The month to check 2777 * @param integer day The day to check 2778 * 2779 * @access private 2780 */ 2781 var get_custom_class = function(year, month, day) { 2782 2783 var class_name, i, found; 2784 2785 // if month is given as argument, increment it (as JavaScript uses 0 for January, 1 for February...) 2786 if (typeof month !== 'undefined') month = month + 1; 2787 2788 // iterate through the custom classes 2789 for (i in custom_class_names) { 2790 2791 // the class name we're currently checking 2792 class_name = custom_class_names[i]; found = false; 2793 2794 // if there are any custom classes defined 2795 if ($.isArray(custom_classes[class_name])) 2796 2797 // iterate through the rules for which the custom class to be applied 2798 $.each(custom_classes[class_name], function() { 2799 2800 // if a custom class needs to be applied to the date we're checking, don't look further 2801 if (found) return; 2802 2803 var rule = this, weekday; 2804 2805 // if the rules apply for the current year 2806 if ($.inArray(year, rule[2]) > -1 || $.inArray('*', rule[2]) > -1) 2807 2808 // if the rules apply for the current month 2809 if ((typeof month !== 'undefined' && $.inArray(month, rule[1]) > -1) || $.inArray('*', rule[1]) > -1) 2810 2811 // if the rules apply for the current day 2812 if ((typeof day !== 'undefined' && $.inArray(day, rule[0]) > -1) || $.inArray('*', rule[0]) > -1) { 2813 2814 // if custom class is to be applied whatever the day 2815 // don't look any further 2816 if ($.inArray('*', rule[3]) > -1) return (found = class_name); 2817 2818 // get the weekday 2819 weekday = new Date(year, month - 1, day).getDay(); 2820 2821 // if custom class is to be applied to weekday 2822 // don't look any further 2823 if ($.inArray(weekday, rule[3]) > -1) return (found = class_name); 2824 2825 } 2826 2827 }); 2828 2829 // if a custom class needs to be applied to the date we're checking, don't look further 2830 if (found) return found; 2831 2832 } 2833 2834 // return what we've found 2835 return found || ''; 2836 2837 }; 2838 2839 /** 2840 * Generates an iFrame shim in Internet Explorer 6 so that the date picker appears above select boxes. 2841 * 2842 * @return void 2843 * 2844 * @access private 2845 */ 2846 var iframeShim = function(action) { 2847 2848 var zIndex, offset; 2849 2850 // this is necessary only if browser is Internet Explorer 6 2851 if (browser.name === 'explorer' && browser.version === 6) { 2852 2853 // if the iFrame was not yet created 2854 // "undefined" evaluates as FALSE 2855 if (!shim) { 2856 2857 // the iFrame has to have the element's zIndex minus 1 2858 zIndex = to_int(datepicker.css('zIndex')) - 1; 2859 2860 // create the iFrame 2861 shim = $('<iframe>', { 2862 src: 'javascript:document.write("")', 2863 scrolling: 'no', 2864 frameborder: 0, 2865 css: { 2866 zIndex: zIndex, 2867 position: 'absolute', 2868 top: -1000, 2869 left: -1000, 2870 width: datepicker.outerWidth(), 2871 height: datepicker.outerHeight(), 2872 filter: 'progid:DXImageTransform.Microsoft.Alpha(opacity=0)', 2873 display: 'none' 2874 } 2875 }); 2876 2877 // inject iFrame into DOM 2878 $('body').append(shim); 2879 2880 } 2881 2882 // what do we need to do 2883 switch (action) { 2884 2885 // hide the iFrame? 2886 case 'hide': 2887 2888 // set the iFrame's display property to "none" 2889 shim.hide(); 2890 2891 break; 2892 2893 // show the iFrame? 2894 default: 2895 2896 // get date picker top and left position 2897 offset = datepicker.offset(); 2898 2899 // position the iFrame shim right underneath the date picker 2900 // and set its display to "block" 2901 shim.css({ 2902 top: offset.top, 2903 left: offset.left, 2904 display: 'block' 2905 }); 2906 2907 } 2908 2909 } 2910 2911 }; 2912 2913 /** 2914 * Checks if, according to the restrictions of the calendar and/or the values defined by the "disabled_dates" 2915 * property, a day, a month or a year needs to be disabled. 2916 * 2917 * @param integer year The year to check 2918 * @param integer month The month to check 2919 * @param integer day The day to check 2920 * 2921 * @return boolean Returns TRUE if the given value is not disabled or FALSE otherwise 2922 * 2923 * @access private 2924 */ 2925 var is_disabled = function(year, month, day) { 2926 2927 var now, len, disabled, enabled; 2928 2929 // don't check bogus values 2930 if ((undefined === year || isNaN(year)) && (undefined === month || isNaN(month)) && (undefined === day || isNaN(day))) return false;
vendor: 36,581 bytes, lines 2931-3791
2931 2932 // this date picker cannot handle years before 1000, so we return false in this case 2933 else if (year < 1000) return true; 2934 2935 // if calendar has direction restrictions 2936 if (!(!$.isArray(plugin.settings.direction) && to_int(plugin.settings.direction) === 0)) { 2937 2938 // normalize and merge arguments then transform the result to an integer 2939 now = to_int(str_concat(year, (typeof month !== 'undefined' ? str_pad(month, 2) : ''), (typeof day !== 'undefined' ? str_pad(day, 2) : ''))); 2940 2941 // get the length of the argument 2942 len = (now + '').length; 2943 2944 // if we're checking days 2945 if (len === 8 && ( 2946 2947 // day is before the first selectable date 2948 (typeof start_date !== 'undefined' && now < to_int(str_concat(first_selectable_year, str_pad(first_selectable_month, 2), str_pad(first_selectable_day, 2)))) || 2949 2950 // or day is after the last selectable date 2951 (typeof end_date !== 'undefined' && now > to_int(str_concat(last_selectable_year, str_pad(last_selectable_month, 2), str_pad(last_selectable_day, 2)))) 2952 2953 // day needs to be disabled 2954 )) return true; 2955 2956 // if we're checking months 2957 else if (len === 6 && ( 2958 2959 // month is before the first selectable month 2960 (typeof start_date !== 'undefined' && now < to_int(str_concat(first_selectable_year, str_pad(first_selectable_month, 2)))) || 2961 2962 // or day is after the last selectable date 2963 (typeof end_date !== 'undefined' && now > to_int(str_concat(last_selectable_year, str_pad(last_selectable_month, 2)))) 2964 2965 // month needs to be disabled 2966 )) return true; 2967 2968 // if we're checking years 2969 else if (len === 4 && ( 2970 2971 // year is before the first selectable year 2972 (typeof start_date !== 'undefined' && now < first_selectable_year) || 2973 2974 // or day is after the last selectable date 2975 (typeof end_date !== 'undefined' && now > last_selectable_year) 2976 2977 // year needs to be disabled 2978 )) return true; 2979 2980 } 2981 2982 // if month is given as argument, increment it (as JavaScript uses 0 for January, 1 for February...) 2983 if (typeof month !== 'undefined') month = month + 1; 2984 2985 // by default, we assume the day/month/year is not enabled nor disabled 2986 disabled = false, enabled = false; 2987 2988 // if there are rules for disabling dates 2989 if ($.isArray(disabled_dates) && disabled_dates.length) 2990 2991 // iterate through the rules for disabling dates 2992 $.each(disabled_dates, function() { 2993 2994 // if the date is to be disabled, don't look any further 2995 if (disabled) return; 2996 2997 var rule = this, weekday; 2998 2999 // if the rules apply for the current year 3000 if ($.inArray(year, rule[2]) > -1 || $.inArray('*', rule[2]) > -1) 3001 3002 // if the rules apply for the current month 3003 if ((typeof month !== 'undefined' && $.inArray(month, rule[1]) > -1) || $.inArray('*', rule[1]) > -1) 3004 3005 // if the rules apply for the current day 3006 if ((typeof day !== 'undefined' && $.inArray(day, rule[0]) > -1) || $.inArray('*', rule[0]) > -1) { 3007 3008 // if day is to be disabled whatever the day 3009 // don't look any further 3010 if ($.inArray('*', rule[3]) > -1) return (disabled = true); 3011 3012 // get the weekday 3013 weekday = new Date(year, month - 1, day).getDay(); 3014 3015 // if weekday is to be disabled 3016 // don't look any further 3017 if ($.inArray(weekday, rule[3]) > -1) return (disabled = true); 3018 3019 } 3020 3021 }); 3022 3023 // if there are rules that explicitly enable dates 3024 if (enabled_dates) 3025 3026 // iterate through the rules for enabling dates 3027 $.each(enabled_dates, function() { 3028 3029 // if the date is to be enabled, don't look any further 3030 if (enabled) return; 3031 3032 var rule = this, weekday; 3033 3034 // if the rules apply for the current year 3035 if ($.inArray(year, rule[2]) > -1 || $.inArray('*', rule[2]) > -1) { 3036 3037 // the year is enabled 3038 enabled = true; 3039 3040 // if we're also checking months 3041 if (typeof month !== 'undefined') { 3042 3043 // we assume the month is enabled 3044 enabled = true; 3045 3046 // if the rules apply for the current month 3047 if ($.inArray(month, rule[1]) > -1 || $.inArray('*', rule[1]) > -1) { 3048 3049 // if we're also checking days 3050 if (typeof day !== 'undefined') { 3051 3052 // we assume the day is enabled 3053 enabled = true; 3054 3055 // if the rules apply for the current day 3056 if ($.inArray(day, rule[0]) > -1 || $.inArray('*', rule[0]) > -1) { 3057 3058 // if day is to be enabled whatever the day 3059 // don't look any further 3060 if ($.inArray('*', rule[3]) > -1) return (enabled = true); 3061 3062 // get the weekday 3063 weekday = new Date(year, month - 1, day).getDay(); 3064 3065 // if weekday is to be enabled 3066 // don't look any further 3067 if ($.inArray(weekday, rule[3]) > -1) return (enabled = true); 3068 3069 // if we get this far, it means the day is not enabled 3070 enabled = false; 3071 3072 // if day is not enabled 3073 } else enabled = false; 3074 3075 } 3076 3077 // if month is not enabled 3078 } else enabled = false; 3079 3080 } 3081 3082 } 3083 3084 }); 3085 3086 // if checked date is enabled, return false 3087 if (enabled_dates && enabled) return false; 3088 3089 // if checked date is disabled return false 3090 else if (disabled_dates && disabled) return true; 3091 3092 // if script gets this far it means that the day/month/year doesn't need to be disabled 3093 return false; 3094 3095 }; 3096 3097 /** 3098 * Checks whether a value is an integer number. 3099 * 3100 * @param mixed value Value to check 3101 * 3102 * @return Returns TRUE if the value represents an integer number, or FALSE otherwise 3103 * 3104 * @access private 3105 */ 3106 var is_integer = function(value) { 3107 3108 // return TRUE if value represents an integer number, or FALSE otherwise 3109 return (value + '').match(/^\-?[0-9]+$/); 3110 3111 }; 3112 3113 /** 3114 * Sets the caption in the header of the date picker and enables or disables navigation buttons when necessary. 3115 * 3116 * @param string caption String that needs to be displayed in the header 3117 * 3118 * @return void 3119 * 3120 * @access private 3121 */ 3122 var manage_header = function(caption) { 3123 3124 // if "selected_month" has a value 3125 // $.isNumeric is available only from jQuery 1.7 - thanks to birla for the fix! 3126 if (!isNaN(parseFloat(selected_month)) && isFinite(selected_month)) 3127 3128 caption = caption.replace(/\bm\b|\bn\b|\bF\b|\bM\b/, function(match) { 3129 3130 switch (match) { 3131 3132 // month number, prefixed with 0 3133 case 'm': 3134 return str_pad(selected_month + 1, 2); 3135 3136 // month number, not prefixed with 0 3137 case 'n': 3138 return selected_month + 1; 3139 3140 // full month name 3141 case 'F': 3142 return plugin.settings.months[selected_month]; 3143 3144 // month name, three letters 3145 case 'M': 3146 return ($.isArray(plugin.settings.months_abbr) && undefined !== plugin.settings.months_abbr[selected_month] ? plugin.settings.months_abbr[selected_month] : plugin.settings.months[selected_month].substr(0, 3)); 3147 3148 // unknown replace 3149 default: 3150 return match; 3151 3152 } 3153 3154 }); 3155 3156 // if "selected_year" has a value 3157 // $.isNumeric is available only from jQuery 1.7 - thanks to birla for the fix! 3158 if (!isNaN(parseFloat(selected_year)) && isFinite(selected_year)) 3159 3160 // replace year-related patterns 3161 caption = 3162 3163 caption 3164 3165 // year as four digits 3166 .replace(/\bY\b/, selected_year) 3167 3168 // year as two digits 3169 .replace(/\by\b/, (selected_year + '').substr(2)) 3170 3171 // lower limit of year as two or four digits 3172 .replace(/\bY1\b/i, selected_year - 7) 3173 3174 // upper limit of year as two or four digits 3175 .replace(/\bY2\b/i, selected_year + 4); 3176 3177 // update the caption in the header 3178 $('.dp_caption', header).html(caption); 3179 3180 }; 3181 3182 /** 3183 * Shows the appropriate view (days, months or years) according to the current value of the "view" property. 3184 * 3185 * @return void 3186 * 3187 * @access private 3188 */ 3189 var manage_views = function() { 3190 3191 var height, elements; 3192 3193 // if the day picker was not yet generated 3194 if (daypicker.text() === '' || view === 'days') { 3195 3196 // if the day picker was not yet generated 3197 if (daypicker.text() === '') { 3198 3199 // if date picker is not always visible in a container 3200 if (!(plugin.settings.always_visible instanceof jQuery)) 3201 3202 // temporarily set the date picker's left outside of view 3203 // so that we can later grab its width and height 3204 datepicker.css('left', -1000); 3205 3206 // temporarily make the date picker visible 3207 // so that we can later grab its width and height 3208 datepicker.removeClass('hidden'); 3209 3210 // generate the day picker 3211 generate_daypicker(); 3212 3213 // jQuery rounds values returned by outerWidth and outerHeight 3214 // therefore, if we can get the un-rounded values, get those 3215 // get the day picker's width and height 3216 // (we need the second check for old Internet Explorers...) 3217 if (typeof daypicker[0].getBoundingClientRect !== 'undefined' && typeof daypicker[0].getBoundingClientRect().height !== 'undefined') height = daypicker[0].getBoundingClientRect().height; 3218 3219 // if "getBoundingClientRect" is not available 3220 // get the day picker's height 3221 else height = daypicker.outerHeight(true); 3222 3223 // make the month picker have the same size as the day picker 3224 monthpicker.css('height', height); 3225 3226 // make the year picker have the same size as the day picker 3227 yearpicker.css('height', height); 3228 3229 // make the time picker have the same size as the day picker 3230 timepicker.css('height', height + header.outerHeight(true)); 3231 3232 // set the container's width so all the views have 100% width 3233 datepicker.css('width', datepicker.outerWidth()); 3234 3235 // // we have to set this now or Chrome will make the datepicker extend to the full width of the screen... 3236 // $('.dp_caption', header).css('width', '100%'); 3237 3238 // hide the date picker again 3239 datepicker.addClass('dp_hidden'); 3240 3241 // if the day picker was previously generated at least once 3242 // generate the day picker 3243 } else generate_daypicker(); 3244 3245 // show header 3246 header.show(); 3247 3248 // hide the year and the month pickers 3249 monthpicker.hide(); 3250 yearpicker.hide(); 3251 3252 // hide time-picker related elements 3253 timepicker.hide(); 3254 view_toggler.hide(); 3255 confirm_selection.hide(); 3256 3257 // if the time picker is enabled, show the clock icon 3258 if (timepicker_config) view_toggler.show().removeClass('dp_calendar'); 3259 3260 // if the view is "months" 3261 } else if (view === 'months') { 3262 3263 // generate the month picker 3264 generate_monthpicker(); 3265 3266 // hide the day and the year pickers 3267 daypicker.hide(); 3268 yearpicker.hide(); 3269 3270 // hide time-picker related elements 3271 timepicker.hide(); 3272 view_toggler.hide(); 3273 confirm_selection.hide(); 3274 3275 // if the view is "years" 3276 } else if (view === 'years') { 3277 3278 // generate the year picker 3279 generate_yearpicker(); 3280 3281 // hide the day and the month pickers 3282 daypicker.hide(); 3283 monthpicker.hide(); 3284 3285 // hide time-picker related elements 3286 timepicker.hide(); 3287 view_toggler.hide(); 3288 confirm_selection.hide(); 3289 3290 // if the view is "time" 3291 } else if (view === 'time') { 3292 3293 // generate the time picker 3294 generate_timepicker(); 3295 3296 // if the "time" view is the only available view 3297 if (views.length === 1) { 3298 3299 // hide the time picker toggler button 3300 view_toggler.hide(); 3301 3302 // show the confirmation button 3303 confirm_selection.show(); 3304 3305 // if the "time" view is not the only available view 3306 } else { 3307 3308 // time picker toggler button, but change the icon 3309 view_toggler.show().addClass('dp_calendar'); 3310 3311 // if no date is selected 3312 // hide the confirmation button 3313 if ($element.val() === '') confirm_selection.hide(); 3314 3315 // show the confirmation button 3316 else confirm_selection.show(); 3317 3318 } 3319 3320 // hide the header, day, month and year pickers 3321 header.hide(); 3322 daypicker.hide(); 3323 monthpicker.hide(); 3324 yearpicker.hide(); 3325 3326 } 3327 3328 // if a callback function exists for when navigating through months/years 3329 if (view !== 'time' && plugin.settings.onChange && typeof plugin.settings.onChange === 'function' && undefined !== view) { 3330 3331 // get the "active" elements in the view (ignoring the disabled ones) 3332 elements = (view === 'days' ? 3333 daypicker.find('td:not(.dp_disabled)') : 3334 (view === 'months' ? 3335 monthpicker.find('td:not(.dp_disabled)') : 3336 yearpicker.find('td:not(.dp_disabled)'))); 3337 3338 // iterate through the active elements 3339 // and attach a "date" data attribute to each element in the form of 3340 // YYYY-MM-DD if the view is "days" 3341 // YYYY-MM if the view is "months" 3342 // YYYY if the view is "years" 3343 // so it's easy to identify elements in the list 3344 elements.each(function() { 3345 3346 var matches; 3347 3348 // if view is "days" 3349 if (view === 'days') 3350 3351 // if date is from a next/previous month and is selectable 3352 if ($(this).hasClass('dp_not_in_month') && !$(this).hasClass('dp_disabled')) { 3353 3354 // extract date from the attached class 3355 matches = $(this).attr('class').match(/date\_([0-9]{4})(0[1-9]|1[012])(0[1-9]|[12][0-9]|3[01])/); 3356 3357 // attach a "date" data attribute to each element in the form of of YYYY-MM-DD for easily identifying sought elements 3358 $(this).data('date', matches[1] + '-' + matches[2] + '-' + matches[3]); 3359 3360 // if date is from the currently selected month 3361 } else 3362 3363 // attach a "date" data attribute to each element in the form of of YYYY-MM-DD for easily identifying sought elements 3364 $(this).data('date', selected_year + '-' + str_pad(selected_month + 1, 2) + '-' + str_pad(to_int($(this).text()), 2)); 3365 3366 // if view is "months" 3367 else if (view === 'months') { 3368 3369 // get the month's number for the element's class 3370 matches = $(this).attr('class').match(/dp\_month\_([0-9]+)/); 3371 3372 // attach a "date" data attribute to each element in the form of of YYYY-MM for easily identifying sought elements 3373 $(this).data('date', selected_year + '-' + str_pad(to_int(matches[1]) + 1, 2)); 3374 3375 // if view is "years" 3376 } else 3377 3378 // attach a "date" data attribute to each element in the form of of YYYY for easily identifying sought elements 3379 $(this).data('date', to_int($(this).text())); 3380 3381 }); 3382 3383 // execute the callback function and send as arguments the current view, the elements in the view, and 3384 // the element the plugin is attached to 3385 plugin.settings.onChange.call($element, view, elements); 3386 3387 } 3388 3389 // assume the footer is visible 3390 footer.show(); 3391 3392 // if we are in the "time" view and there are more views available 3393 if (view === 'time' && views.length > 1) { 3394 3395 // hide the "Today" and the "Clear" buttons 3396 selecttoday.hide(); 3397 cleardate.hide(); 3398 3399 // set the view toggler width 3400 view_toggler.css('width', $element.val() === '' ? '100%' : '50%'); 3401 3402 // for the other cases 3403 } else { 3404 3405 // assume both the "Today" and "Clear" buttons are visible 3406 selecttoday.show(); 3407 cleardate.show(); 3408 3409 // if the button for clearing a previously selected date needs to be visible all the time, 3410 // or the "Clear" button needs to be shown only when a date was previously selected, and now it's the case, 3411 // or the date picker is always visible and the "Clear" button was not explicitly disabled 3412 if ( 3413 plugin.settings.show_clear_date === true || 3414 (plugin.settings.show_clear_date === 0 && $element.val() !== '') || 3415 (plugin.settings.always_visible && plugin.settings.show_clear_date !== false) 3416 ) 3417 3418 // if the "Today" button is visible 3419 if (show_select_today) { 3420 3421 // show it, and set it's width to 50% of the available space 3422 selecttoday.css('width', '50%'); 3423 3424 // the "Clear date" button only takes up 50% of the available space 3425 cleardate.css('width', '50%'); 3426 3427 // if the "Today" button is not visible 3428 } else { 3429 3430 // hide the "Today" button 3431 selecttoday.hide(); 3432 3433 // the "Clear date" button takes up 100% of the available space 3434 // unless the time picker is available, in which case take up 50% of the available space 3435 cleardate.css('width', $.inArray(views, 'time') > -1 ? '50%' : '100%'); 3436 3437 } 3438 3439 // otherwise 3440 else { 3441 3442 // hide the "Clear" button 3443 cleardate.hide(); 3444 3445 // if the "Today" button is visible, it will now take up all the available space 3446 if (show_select_today) selecttoday.css('width', '100%'); 3447 3448 // if the "Today" button should not be visible 3449 else { 3450 3451 // hide the "Today" button 3452 selecttoday.hide(); 3453 3454 // if there's also no timepicker view, hide the footer entirely 3455 if (!timepicker_config || (view !== 'time' && view !== 'days')) footer.hide(); 3456 3457 } 3458 3459 } 3460 3461 } 3462 3463 }; 3464 3465 /** 3466 * Puts the specified date in the element the plugin is attached to, and hides the date picker. 3467 * 3468 * @param integer year The year 3469 * 3470 * @param integer month The month 3471 * 3472 * @param integer day The day 3473 * 3474 * @param string rview The view from where the method was called (the referrer view) 3475 * 3476 * @param object cell The element that was clicked 3477 * 3478 * @return void 3479 * 3480 * @access private 3481 */ 3482 var select_date = function(year, month, day, rview, cell) { 3483 3484 var 3485 3486 // construct a new date object from the arguments 3487 default_date = new Date(year, month, day, 3488 (timepicker_config && timepicker_config.hours ? selected_hour + (timepicker_config.ampm && ((selected_ampm === 'pm' && selected_hour < 12) || (selected_ampm === 'am' && selected_hour === 12)) ? 12 : 0) : 0), 3489 (timepicker_config && timepicker_config.minutes ? selected_minute : 0), 3490 (timepicker_config && timepicker_config.seconds ? selected_second : 0) 3491 ), 3492 3493 // pointer to the cells in the current view 3494 view_cells = (rview === 'days' ? daypicker_cells : (rview === 'months' ? monthpicker_cells : yearpicker_cells)), 3495 3496 // the selected date, formatted correctly 3497 selected_value = format(default_date); 3498 3499 // set the currently selected and formated date as the value of the element the plugin is attached to 3500 $element.val(selected_value); 3501 3502 // if date picker is always visible or time picker is available 3503 if (plugin.settings.always_visible || timepicker_config) { 3504 3505 // extract the date parts and reassign values to these variables 3506 // so that everything will be correctly highlighted 3507 default_month = default_date.getMonth(); 3508 selected_month = default_date.getMonth(); 3509 default_year = default_date.getFullYear(); 3510 selected_year = default_date.getFullYear(); 3511 default_day = default_date.getDate(); 3512 3513 // if "cell" is available (it isn't when called from increasing/decreasing values the time picker) 3514 if (cell && view_cells) { 3515 3516 // remove the "selected" class from all cells in the current view 3517 view_cells.removeClass('dp_selected'); 3518 3519 // add the "selected" class to the currently selected cell 3520 cell.addClass('dp_selected'); 3521 3522 // if we're on the "days" view and days from other months are selectable and one of those days was 3523 // selected, repaint the datepicker so it will take us to the selected month 3524 if (rview === 'days' && cell.hasClass('dp_not_in_month') && !cell.hasClass('dp_disabled')) plugin.show(); 3525 3526 } 3527 3528 } 3529 3530 // if format contains time, switch to the time picker view 3531 if (timepicker_config) { 3532 3533 view = 'time'; 3534 manage_views(); 3535 3536 // if format doesn't contain time 3537 } else { 3538 3539 // move focus to the element the plugin is attached to 3540 $element.focus(); 3541 3542 // hide the date picker 3543 plugin.hide(); 3544 3545 } 3546 3547 // updates value for the date picker whose starting date depends on the selected date (if any) 3548 update_dependent(default_date); 3549 3550 // if a callback function exists for when selecting a date 3551 // (if time picker is enabled, we'll run the callback when the user clicks on the confirmation button) 3552 if (!timepicker_config && plugin.settings.onSelect && typeof plugin.settings.onSelect === 'function') 3553 3554 // execute the callback function 3555 // make "this" inside the callback function refer to the element the date picker is attached to 3556 plugin.settings.onSelect.call($element, selected_value, year + '-' + str_pad(month + 1, 2) + '-' + str_pad(day, 2), default_date); 3557 3558 }; 3559 3560 /** 3561 * Concatenates any number of arguments and returns them as string. 3562 * 3563 * @return string Returns the concatenated values. 3564 * 3565 * @access private 3566 */ 3567 var str_concat = function() { 3568 3569 var str = '', i; 3570 3571 // concatenate as string 3572 for (i = 0; i < arguments.length; i++) str += (arguments[i] + ''); 3573 3574 // return the concatenated values 3575 return str; 3576 3577 }; 3578 3579 /** 3580 * Left-pad a string to a certain length with zeroes. 3581 * 3582 * @param string str The string to be padded. 3583 * 3584 * @param integer len The length to which the string must be padded 3585 * 3586 * @return string Returns the string left-padded with leading zeroes 3587 * 3588 * @access private 3589 */ 3590 var str_pad = function(str, len) { 3591 3592 // make sure argument is a string 3593 str += ''; 3594 3595 // pad with leading zeroes until we get to the desired length 3596 while (str.length < len) str = '0' + str; 3597 3598 // return padded string 3599 return str; 3600 3601 }; 3602 3603 /** 3604 * Returns the integer representation of a string 3605 * 3606 * @return int Returns the integer representation of the string given as argument 3607 * 3608 * @access private 3609 */ 3610 var to_int = function(str) { 3611 3612 // return the integer representation of the string given as argument 3613 return parseInt(str, 10); 3614 3615 }; 3616 3617 /** 3618 * Updates the paired date picker (whose starting date depends on the value of the current date picker) 3619 * 3620 * @param date date A JavaScript date object representing the currently selected date 3621 * 3622 * @return void 3623 * 3624 * @access private 3625 */ 3626 var update_dependent = function(date) { 3627 3628 // if the pair element exists 3629 if (plugin.settings.pair) 3630 3631 // iterate through the pair elements (as there may be more than just one) 3632 $.each(plugin.settings.pair, function() { 3633 3634 var $pair = $(this), dp; 3635 3636 // chances are that in the beginning the pair element doesn't have the Zebra_DatePicker attached to it yet 3637 // (as the "start" element is usually created before the "end" element) 3638 // so we'll have to rely on "data" to send the starting date to the pair element 3639 3640 // therefore, if Zebra_DatePicker is not yet attached 3641 if (!($pair.data && $pair.data('Zebra_DatePicker'))) 3642 3643 // set the starting date like this 3644 $pair.data('zdp_reference_date', date); 3645 3646 // if Zebra_DatePicker is attached to the pair element 3647 else { 3648 3649 // reference the date picker object attached to the other element 3650 dp = $pair.data('Zebra_DatePicker'); 3651 3652 // update the other date picker's starting date 3653 // the value depends on the original value of the "direction" attribute 3654 // (also, if the pair date picker does not have a direction, set it to 1) 3655 dp.update({ 3656 reference_date: date, 3657 direction: dp.settings.direction === 0 ? 1 : dp.settings.direction 3658 }); 3659 3660 // if the other date picker is always visible, update the visuals now 3661 if (dp.settings.always_visible) dp.show(); 3662 3663 } 3664 3665 }); 3666 3667 }; 3668 3669 /** 3670 * Calculate the ISO 8601 week number for a given date. 3671 * 3672 * Code is based on the algorithm at http://www.tondering.dk/claus/cal/week.php#calcweekno 3673 */ 3674 var getWeekNumber = function(date) { 3675 3676 var y = date.getFullYear(), 3677 m = date.getMonth() + 1, 3678 d = date.getDate(), 3679 a, b, c, s, e, f, g, n, w; 3680 3681 // If month jan. or feb. 3682 if (m < 3) { 3683 3684 a = y - 1; 3685 b = (a / 4 | 0) - (a / 100 | 0) + (a / 400 | 0); 3686 c = ((a - 1) / 4 | 0) - ((a - 1) / 100 | 0) + ((a - 1) / 400 | 0); 3687 s = b - c; 3688 e = 0; 3689 f = d - 1 + 31 * (m - 1); 3690 3691 // If month mar. through dec. 3692 } else { 3693 3694 a = y; 3695 b = (a / 4 | 0) - (a / 100 | 0) + (a / 400 | 0); 3696 c = ((a - 1) / 4 | 0) - ((a - 1) / 100 | 0) + ((a - 1) / 400 | 0); 3697 s = b - c; 3698 e = s + 1; 3699 f = d + ((153 * (m - 3) + 2) / 5 | 0) + 58 + s; 3700 3701 } 3702 3703 g = (a + b) % 7; 3704 // ISO Weekday (0 is monday, 1 is tuesday etc.) 3705 d = (f + g - e) % 7; 3706 n = f + 3 - d; 3707 3708 if (n < 0) w = 53 - ((g - s) / 5 | 0); 3709 3710 else if (n > 364 + s) w = 1; 3711 3712 else w = (n / 7 | 0) + 1; 3713 3714 return w; 3715 3716 }; 3717 3718 // since with jQuery 1.9.0 the $.browser object was removed, we rely on this piece of code from 3719 // http://www.quirksmode.org/js/detect.html to detect the browser 3720 var browser = { 3721 init: function() { 3722 this.name = this.searchString(this.dataBrowser) || ''; 3723 this.version = this.searchVersion(navigator.userAgent) || this.searchVersion(navigator.appVersion) || ''; 3724 }, 3725 searchString: function(data) { 3726 var i, dataString, dataProp; 3727 3728 for (i = 0; i < data.length; i++) { 3729 dataString = data[i].string; 3730 dataProp = data[i].prop; 3731 this.versionSearchString = data[i].versionSearch || data[i].identity; 3732 if (dataString) { 3733 if (dataString.indexOf(data[i].subString) !== -1) 3734 return data[i].identity; 3735 } else if (dataProp) 3736 return data[i].identity; 3737 } 3738 }, 3739 searchVersion: function(dataString) { 3740 var index = dataString.indexOf(this.versionSearchString); 3741 3742 if (index === -1) return; 3743 3744 return parseFloat(dataString.substring(index + this.versionSearchString.length + 1)); 3745 }, 3746 dataBrowser: [ 3747 { 3748 string: navigator.userAgent, 3749 subString: 'Firefox', 3750 identity: 'firefox' 3751 }, 3752 { 3753 string: navigator.userAgent, 3754 subString: 'MSIE', 3755 identity: 'explorer', 3756 versionSearch: 'MSIE' 3757 } 3758 ] 3759 }; 3760 3761 browser.init(); 3762 3763 // initialize the plugin 3764 init(); 3765 3766 }; 3767 3768 $.fn.Zebra_DatePicker = function(options) { 3769 3770 // iterate through all the elements to which we need to attach the date picker to 3771 return this.each(function() { 3772 3773 // if element has a date picker already attached 3774 if (undefined !== $(this).data('Zebra_DatePicker')) 3775 3776 // remove the attached date picker 3777 $(this).data('Zebra_DatePicker').destroy(); 3778 3779 // create an instance of the plugin 3780 var plugin = new $.Zebra_DatePicker(this, options); 3781 3782 // save a reference to the newly created object 3783 $(this).data('Zebra_DatePicker', plugin); 3784 3785 }); 3786 3787 }; 3788 3789})); 3790 3791!function(t){function e(e){return e.classList?e.classList:t(e).attr("class").match(/\S+/gi)}t.fn.ShareLink=function(l){function r(t){var e=u[t];return e=e.replace(/{url}/g,encodeURIComponent(l.url)),e=e.replace(/{title}/g,encodeURIComponent(l.title)),e=e.replace(/{text}/g,encodeURIComponent(l.text)),e=e.replace(/{image}/g,encodeURIComponent(l.image))}var i={title:"",text:"",image:"",url:window.location.href,class_prefix:"s_"},l=t.extend({},i,l),o=l.class_prefix.length,u={twitter:"https://twitter.com/intent/tweet?url={url}&text={text}",pinterest:"https://www.pinterest.com/pin/create/button/?media={image}&url={url}&description={text}",facebook:"https://www.facebook.com/sharer.php?s=100&p[title]={title}&u={url}&t={title}&p[summary]={text}&p[url]={url}",vk:"https://vkontakte.ru/share.php?url={url}&title={title}&description={text}&image={image}&noparse=true",linkedin:"https://www.linkedin.com/shareArticle?mini=true&url={url}&title={title}&summary={text}&source={url}",myworld:"https://connect.mail.ru/share?url={url}&title={title}&description={text}&imageurl={image}",odnoklassniki:"http://odnoklassniki.ru/dk?st.cmd=addShare&st.s=1&st._surl={url}&st.comments={text}",tumblr:"https://tumblr.com/share?s=&v=3&t={title}&u={url}",blogger:"https://blogger.com/blog-this.g?t={text}&n={title}&u={url}",delicious:"https://delicious.com/save?url={url}&title={title}",plus:"https://plus.google.com/share?url={url}",digg:"https://digg.com/submit?url={url}&title={title}",reddit:"http://reddit.com/submit?url={url}&title={title}",stumbleupon:"https://www.stumbleupon.com/submit?url={url}&title={title}",pocket:"https://getpocket.com/edit?url={url}&title={title}",chiq:"http://www.chiq.com/create/bookmarklet?u={url}&i={image}&d={title}&c={url}",qrifier:"http://qrifier.com/q?inc=qr&type=url&size=350&string={url}",qrsrc:"http://www.qrsrc.com/default.aspx?shareurl={url}",qzone:"http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url={url}",tulinq:"http://www.tulinq.com/enviar?url={url}&title={title}",misterwong:"http://www.mister-wong.com/index.php?action=addurl&bm_url={url}&bm_description={title}&bm_notice=",sto_zakladok:"http://www.100zakladok.ru/save/?bmurl={url}&bmtitle={title}",two_linkme:"http://www.2linkme.com/?collegamento={url}&id=2lbar",adifni:"http://www.adifni.com/account/bookmark/?bookmark_url={url}",amazonwishlist:"http://www.amazon.com/gp/wishlist/static-add?u={url}&t={title}",amenme:"http://www.amenme.com/AmenMe/Amens/AmenToThis.aspx?url={url}&title={title}",aim:"http://lifestream.aol.com/share/?url={url}&title={title}&description={text}
3791 ",aolmail:"http://webmail.aol.com/25045/aol/en-us/Mail/compose-message.aspx?to=&subject={title}&body={{content}}",arto:"http://www.arto.com/section/linkshare/?lu={url}&ln={title}",baidu:"http://cang.baidu.com/do/add?it={title}&iu={url}&fr=ien&dc={text}",bitly:"https://bitly.com/a/bitmarklet?u={url}",bizsugar:"http://www.bizsugar.com/bizsugarthis.php?url={url}",blinklist:"http://www.blinklist.com/blink?u={url}&t={title}&d={text}",blip:"http://blip.pl/dashboard?body={title}%3A%20{url}",blogmarks:"http://blogmarks.net/my/new.php?mini=1&simple=1&url={url}&title={title}&content={text}",blurpalicious:"http://www.blurpalicious.com/submit/?url={url}&title={title}&desc={text}",bobrdobr:"http://bobrdobr.ru/addext.html?url={url}&title={title}&desc={text}",bonzobox:"http://bonzobox.com/toolbar/add?u={url}&t={title}&desc={text}",bookmerkende:"http://www.bookmerken.de/?url={url}&title={title}",box:"https://www.box.net/api/1.0/import?import_as=link&url={url}&name={title}&description={text}",bryderi:"http://bryderi.se/add.html?u={url}",buddymarks:"http://buddymarks.com/add_bookmark.php?bookmark_title={title}&bookmark_url={url}&bookmark_desc={text}",camyoo:"http://www.camyoo.com/note.html?url={url}",care2:"http://www.care2.com/news/compose?sharehint=news&share[share_type]news&bookmarklet=Y&share[title]={title}&share[link_url]={url}&share[content]={text}",citeulike:"http://www.citeulike.org/posturl?url={url}&title={title}",classicalplace:"http://www.classicalplace.com/?u={url}&t={title}&c={text}",cosmiq:"http://www.cosmiq.de/lili/my/add?url={url}",diggita:"http://www.diggita.it/submit.php?url={url}&title={title}",diigo:"http://www.diigo.com/post?url={url}&title={title}&desc={text}",domelhor:"http://domelhor.net/submit.php?url={url}&title={title}",dotnetshoutout:"http://dotnetshoutout.com/Submit?url={url}&title={title}",douban:"http://www.douban.com/recommend/?url={url}&title={title}",dropjack:"http://www.dropjack.com/submit.php?url={url}",edelight:"http://www.edelight.de/geschenk/neu?purl={url}",ekudos:"http://www.ekudos.nl/artikel/nieuw?url={url}&title={title}&desc={text}",elefantapl:"http://elefanta.pl/member/bookmarkNewPage.action?url={url}&title={title}&bookmarkVO.notes=",embarkons:"http://www.embarkons.com/sharer.php?u={url}&t={title}",evernote:"http://www.evernote.com/clip.action?url={url}&title={title}",extraplay:"http://www.extraplay.com/members/share.php?url={url}&title={title}&desc={text}",ezyspot:"http://www.ezyspot.com/submit?url={url}&title={title}",fabulously40:"http://fabulously40.com/writeblog?subject={title}&body={url}",informazione:"http://fai.informazione.it/submit.aspx?url={url}&title={title}&desc={text}",fark:"http://www.fark.com/cgi/farkit.pl?u={url}&h={title}",farkinda:"http://www.farkinda.com/submit?url={url}",favable:"http://www.favable.com/oexchange?url={url}&title={title}&desc={text}",favlogde:"http://www.favlog.de/submit.php?url={url}",flaker:"http://flaker.pl/add2flaker.php?title={title}&url={url}",folkd:"http://www.folkd.com/submit/{url}",fresqui:"http://fresqui.com/enviar?url={url}",friendfeed:"http://friendfeed.com/share?url={url}&title={title}",funp:"http://funp.com/push/submit/?url={url}",fwisp:"http://fwisp.com/submit.php?url={url}",givealink:"http://givealink.org/bookmark/add?url={url}&title={title}",gmail:"http://mail.google.com/mail/?view=cm&fs=1&to=&su={title}&body={text}&ui=1",goodnoows:"http://goodnoows.com/add/?url={url}",google:"http://www.google.com/bookmarks/mark?op=add&bkmk={url}&title={title}&annotation={text}",googletranslate:"http://translate.google.com/translate?hl=en&u={url}&tl=en&sl=auto",greaterdebater:"http://greaterdebater.com/submit/?url={url}&title={title}",hackernews:"http://news.ycombinator.com/submitlink?u={url}&t={title}",hatena:"http://b.hatena.ne.jp/bookmarklet?url={url}&btitle={title}",hedgehogs:"http://www.hedgehogs.net/mod/bookmarks/add.php?address={url}&title={title}",hotmail:"http://www.hotmail.msn.com/secure/start?action=compose&to=&subject={title}&body={{content}}",w3validator:"http://validator.w3.org/check?uri={url}&charset=%28detect+automatically%29&doctype=Inline&group=0",ihavegot:"http://www.ihavegot.com/share/?url={url}&title={title}&desc={text}",instapaper:"http://www.instapaper.com/edit?url={url}&title={title}&summary={text}",isociety:"http://isociety.be/share/?url={url}&title={title}&desc={text}",iwiw:"http://iwiw.hu/pages/share/share.jsp?v=1&u={url}&t={title}",jamespot:"http://www.jamespot.com/?action=spotit&u={url}&t={title}",jumptags:"http://www.jumptags.com/add/?url={url}&title={title}",kaboodle:"http://www.kaboodle.com/grab/addItemWithUrl?url={url}&pidOrRid=pid=&redirectToKPage=true",kaevur:"http://kaevur.com/submit.php?url={url}",kledy:"http://www.kledy.de/submit.php?url={url}&title={title}",librerio:"http://www.librerio.com/inbox?u={url}&t={title}",linkuj:"http://linkuj.cz?id=linkuj&url={url}&title={title}&description={text}&imgsrc=",livejournal:"http://www.livejournal.com/update.bml?subject={title}&event={url}",logger24:"http://logger24.com/?url={url}",mashbord:"http://mashbord.com/plugin-add-bookmark?url={url}",meinvz:"http://www.meinvz.net/Suggest/Selection/?u={url}&desc={title}&prov=addthis.com",mekusharim:"http://mekusharim.walla.co.il/share/share.aspx?url={url}&title={title}",memori:"http://memori.ru/link/?sm=1&u_data[url]={url}",meneame:"http://www.meneame.net/submit.php?url={url}",mixi:"http://mixi.jp/share.pl?u={url}",moemesto:"http://moemesto.ru/post.php?url={url}&title={title}",myspace:"http://www.myspace.com/Modules/PostTo/Pages/?u={url}&t={title}&c=",n4g:"http://www.n4g.com/tips.aspx?url={url}&title={title}",netlog:"http://www.netlog.com/go/manage/links/?view=save&origin=external&url={url}&title={title}&description={text}",netvouz:"http://netvouz.com/action/submitBookmark?url={url}&title={title}&popup=no&description={text}",newstrust:"http://newstrust.net/submit?url={url}&title={title}&ref=addthis",newsvine:"http://www.newsvine.com/_tools/seed&save?u={url}&h={title}&s={text}",nujij:"http://nujij.nl/jij.lynkx?u={url}&t={title}&b={text}",oknotizie:"http://oknotizie.virgilio.it/post?title={title}&url={url}",oyyla:"http://www.oyyla.com/gonder?phase=2&url={url}",pdfonline:"http://savepageaspdf.pdfonline.com/pdfonline/pdfonline.asp?cURL={url}",pdfmyurl:"http://pdfmyurl.com?url={url}",phonefavs:"http://phonefavs.com/bookmarks?action=add&address={url}&title={title}",plaxo:"http://www.plaxo.com/events?share_link={url}&desc={text}",plurk:"http://www.plurk.com/m?content={url}+({title})&qualifier=shares ",posteezy:"http://posteezy.com/node/add/story?title={title}&body={url}",pusha:"http://www.pusha.se/posta?url={url}&title={title}&description={text}",rediff:"http://share.rediff.com/bookmark/addbookmark?title={title}&bookmarkurl={url}",redkum:"http://www.redkum.com/add?url={url}&step=1&title={title}",scoopat:"http://scoop.at/submit?url={url}&title={title}&body={text}",sekoman:"http://sekoman.lv/home?status={title}&url={url}",shaveh:"http://shaveh.co.il/submit.php?url={url}&title={title}",shetoldme:"http://shetoldme.com/publish?url={url}&title={title}&body={text}",sinaweibo:"http://v.t.sina.com.cn/share/share.php?url={url}&title={title}
3791",sodahead:"http://www.sodahead.com/news/submit/?url={url}&title={title}",sonico:"http://www.sonico.com/share.php?url={url}&title={title}",springpad:"http://springpadit.com/s?type=lifemanagr.Bookmark&url={url}&name={title}",startaid:"http://www.startaid.com/index.php?st=AddBrowserLink&type=Detail&v=3&urlname={url}&urltitle={title}&urldesc={text}",startlap:"http://www.startlap.hu/sajat_linkek/addlink.php?url={url}&title={title}",studivz:"http://www.studivz.net/Suggest/Selection/?u={url}&desc={title}&prov=addthis.com",stuffpit:"http://www.stuffpit.com/add.php?produrl={url}",stumpedia:"http://www.stumpedia.com/submit?url={url}",svejo:"http://svejo.net/story/submit_by_url?url={url}&title={title}&summary={text}",symbaloo:"http://www.symbaloo.com/en/add/?url={url}&title={title}",thewebblend:"http://thewebblend.com/submit?url={url}&title={title}",thinkfinity:"http://www.thinkfinity.org/favorite-bookmarklet.jspa?url={url}&subject={title}",thisnext:"http://www.thisnext.com/pick/new/submit/url/?description={text}&name={title}&url={url}",tuenti:"http://www.tuenti.com/share?url={url}",typepad:"http://www.typepad.com/services/quickpost/post?v=2&qp_show=ac&qp_title={title}&qp_href={url}&qp_text={text}",viadeo:"http://www.viadeo.com/shareit/share/?url={url}&title={title}&urlaffiliate=32005&encoding=UTF-8",virb:"http://virb.com/share?external&v=2&url={url}&title={title}",visitezmonsite:"http://www.visitezmonsite.com/publier?url={url}&title={title}&body={text}",vybralisme:"http://vybrali.sme.sk/sub.php?url={url}",webnews:"http://www.webnews.de/einstellen?url={url}&title={title}",wirefan:"http://www.wirefan.com/grpost.php?d=&u={url}&h={title}&d={text}",wordpress:"http://wordpress.com/wp-admin/press-this.php?u={url}&t={title}&s={text}&v=2",wowbored:"http://www.wowbored.com/submit.php?url={url}",wykop:"http://www.wykop.pl/dodaj?url={url}&title={title}&desc={text}",yahoobkm:"http://bookmarks.yahoo.com/toolbar/savebm?opener=tb&u={url}&t={title}&d={text}",yahoomail:"http://compose.mail.yahoo.com/?To=&Subject={title}&body={{content}}",yammer:"https://www.yammer.com/home/bookmarklet?bookmarklet_pop=1&u={url}&t={title}",yardbarker:"http://www.yardbarker.com/author/new/?pUrl={url}&pHead={title}",yigg:"http://www.yigg.de/neu?exturl={url}&exttitle={title}&extdesc={text}",yoolink:"http://go.yoolink.to/addorshare?url_value={url}&title={title}",yorumcuyum:"http://www.yorumcuyum.com/?baslik={title}&link={url}",youmob:"http://youmob.com/mobit.aspx?title={title}&mob={url}",zakladoknet:"http://zakladok.net/link/?u={url}&t={title}",ziczac:"http://ziczac.it/a/segnala/?gurl={url}>it={title}",whatsapp:"whatsapp://send?text={url} {title}",telegram:"https://telegram.me/share/url?url={url} {title}",telegram_mob:"tg://msg?text={url} {title}"};return this.each(function(i,a){for(var s=e(a),i=0;i<s.length;i++){var p=s[i];if(p.substr(0,o)==l.class_prefix&&u[p.substr(o)]){var n=r(p.substr(o));t(a).attr("href",n).click(function(){if(-1===t(this).attr("href").indexOf("http://")&&-1===t(this).attr("href").indexOf("https://"))return window.open(t(this).attr("href"))&&!1;var e=screen.width,r=screen.height,i=l.width?l.width:e-.2*e,o=l.height?l.height:r-.2*r,u=e/2-i/2,a=r/2-o/2,s="toolbar=0,status=0,width="+i+",height="+o+",top="+a+",left="+u;return window.open(t(this).attr("href"),"",s)&&!1})}}})},t.fn.ShareCounter=function(l){function r(e,l){t.ajax({type:"GET",dataType:"jsonp",url:"https://api.facebook.com/restserver.php",data:{method:"links.getStats",urls:[e],format:"json"}}).done(function(t){l(0!==t.length?t[0].share_count:0)}).fail(function(){l(0)})}function i(e,l){void 0===window.VK&&(VK={}),VK.Share={count:function(t,e){l(e)}},t.ajax({type:"GET",dataType:"jsonp",url:"https://vk.com/share.php",data:{act:"count",index:0,url:e}}).fail(function(t,e){"parsererror"!=e&&l(0)})}function o(e,l){t.ajax({type:"GET",dataType:"jsonp",url:"https://connect.mail.ru/share_count",jsonp:"func",data:{url_list:e,callback:"1"}}).done(function(t){l(t[e].shares)}).fail(function(t){l(0)})}function u(e,l){t.ajax({type:"GET",dataType:"jsonp",url:"https://www.linkedin.com/countserv/count/share",data:{url:e,format:"jsonp"}}).done(function(t){l(t.count)}).fail(function(){l(0)})}function a(e,l){ODKL={updateCount:function(t,e){l(e)}},t.ajax({type:"GET",dataType:"jsonp",url:"https://ok.ru/dk",data:{"st.cmd":"extLike",ref:e}}).fail(function(t,e){"parsererror"!=e&&l(0)})}function s(e,l){t.ajax({type:"GET",dataType:"jsonp",url:"https://api.pinterest.com/v1/urls/count.json",data:{url:e}}).done(function(t){l(t.count)}).fail(function(){l(0)})}function p(e,l){t.ajax({type:"POST",url:"https://clients6.google.com/rpc",processData:!0,contentType:"application/json",data:JSON.stringify({method:"pos.plusones.get",id:location.href,params:{nolog:!0,id:e,source:"widget",userId:"@viewer",groupId:"@self"},jsonrpc:"2.0",key:"p",apiVersion:"v1"})}).done(function(t){l(t.result.metadata.globalCounts.count)}
3791).fail(function(){l(0)})}var n={url:window.location.href,class_prefix:"c_",display_counter_from:0},l=t.extend({},n,l),m=l.class_prefix.length,h={facebook:r,vk:i,myworld:o,linkedin:u,odnoklassniki:a,pinterest:s,plus:p};return this.each(function(r,i){for(var o=e(i),r=0;r<o.length;r++){var u=o[r];u.substr(0,m)==l.class_prefix&&h[u.substr(m)]&&h[u.substr(m)](l.url,function(e){e>=l.display_counter_from&&t(i).text(e)})}})}}(jQuery);
vendor: 11,526 bytes, lines 3792-3798
3792/*! 3793 * typeahead.js 0.11.1 3794 * https://github.com/twitter/typeahead.js 3795 * Copyright 2013-2015 Twitter, Inc. and other contributors; Licensed MIT 3796 */ 3797 3798!function(a,b){"function"==typeof define&&define.amd?define("bloodhound",["jquery"],function(c){return a.Bloodhound=b(c)}):"object"==typeof exports?module.exports=b(require("jquery")):a.Bloodhound=b(jQuery)}(this,function(a){var b=function(){"use strict";return{isMsie:function(){return/(msie|trident)/i.test(navigator.userAgent)?navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2]:!1},isBlankString:function(a){return!a||/^\s*$/.test(a)},escapeRegExChars:function(a){return a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},isString:function(a){return"string"==typeof a},isNumber:function(a){return"number"==typeof a},isArray:a.isArray,isFunction:a.isFunction,isObject:a.isPlainObject,isUndefined:function(a){return"undefined"==typeof a},isElement:function(a){return!(!a||1!==a.nodeType)},isJQuery:function(b){return b instanceof a},toStr:function(a){return b.isUndefined(a)||null===a?"":a+""},bind:a.proxy,each:function(b,c){function d(a,b){return c(b,a)}a.each(b,d)},map:a.map,filter:a.grep,every:function(b,c){var d=!0;return b?(a.each(b,function(a,e){return(d=c.call(null,e,a,b))?void 0:!1}),!!d):d},some:function(b,c){var d=!1;return b?(a.each(b,function(a,e){return(d=c.call(null,e,a,b))?!1:void 0}),!!d):d},mixin:a.extend,identity:function(a){return a},clone:function(b){return a.extend(!0,{},b)},getIdGenerator:function(){var a=0;return function(){return a++}},templatify:function(b){function c(){return String(b)}return a.isFunction(b)?b:c},defer:function(a){setTimeout(a,0)},debounce:function(a,b,c){var d,e;return function(){var f,g,h=this,i=arguments;return f=function(){d=null,c||(e=a.apply(h,i))},g=c&&!d,clearTimeout(d),d=setTimeout(f,b),g&&(e=a.apply(h,i)),e}},throttle:function(a,b){var c,d,e,f,g,h;return g=0,h=function(){g=new Date,e=null,f=a.apply(c,d)},function(){var i=new Date,j=b-(i-g);return c=this,d=arguments,0>=j?(clearTimeout(e),e=null,g=i,f=a.apply(c,d)):e||(e=setTimeout(h,j)),f}},stringify:function(a){return b.isString(a)?a:JSON.stringify(a)},noop:function(){}}}(),c="0.11.1",d=function(){"use strict";function a(a){return a=b.toStr(a),a?a.split(/\s+/):[]}function c(a){return a=b.toStr(a),a?a.split(/\W+/):[]}function d(a){return function(c){return c=b.isArray(c)?c:[].slice.call(arguments,0),function(d){var e=[];return b.each(c,function(c){e=e.concat(a(b.toStr(d[c])))}),e}}}return{nonword:c,whitespace:a,obj:{nonword:d(c),whitespace:d(a)}}}(),e=function(){"use strict";function c(c){this.maxSize=b.isNumber(c)?c:100,this.reset(),this.maxSize<=0&&(this.set=this.get=a.noop)}function d(){this.head=this.tail=null}function e(a,b){this.key=a,this.val=b,this.prev=this.next=null}return b.mixin(c.prototype,{set:function(a,b){var c,d=this.list.tail;this.size>=this.maxSize&&(this.list.remove(d),delete this.hash[d.key],this.size--),(c=this.hash[a])?(c.val=b,this.list.moveToFront(c)):(c=new e(a,b),this.list.add(c),this.hash[a]=c,this.size++)},get:function(a){var b=this.hash[a];return b?(this.list.moveToFront(b),b.val):void 0},reset:function(){this.size=0,this.hash={},this.list=new d}}),b.mixin(d.prototype,{add:function(a){this.head&&(a.next=this.head,this.head.prev=a),this.head=a,this.tail=this.tail||a},remove:function(a){a.prev?a.prev.next=a.next:this.head=a.next,a.next?a.next.prev=a.prev:this.tail=a.prev},moveToFront:function(a){this.remove(a),this.add(a)}}),c}(),f=function(){"use strict";function c(a,c){this.prefix=["__",a,"__"].join(""),this.ttlKey="__ttl__",this.keyMatcher=new RegExp("^"+b.escapeRegExChars(this.prefix)),this.ls=c||h,!this.ls&&this._noop()}function d(){return(new Date).getTime()}function e(a){return JSON.stringify(b.isUndefined(a)?null:a)}function f(b){return a.parseJSON(b)}function g(a){var b,c,d=[],e=h.length;for(b=0;e>b;b++)(c=h.key(b)).match(a)&&d.push(c.replace(a,""));return d}var h;try{h=window.localStorage,h.setItem("~~~","!"),h.removeItem("~~~")}catch(i){h=null}return b.mixin(c.prototype,{_prefix:function(a){return this.prefix+a},_ttlKey:function(a){return this._prefix(a)+this.ttlKey},_noop:function(){this.get=this.set=this.remove=this.clear=this.isExpired=b.noop},_safeSet:function(a,b){try{this.ls.setItem(a,b)}catch(c){"QuotaExceededError"===c.name&&(this.clear(),this._noop())}},get:function(a){return this.isExpired(a)&&this.remove(a),f(this.ls.getItem(this._prefix(a)))},set:function(a,c,f){return b.isNumber(f)?this._safeSet(this._ttlKey(a),e(d()+f)):this.ls.removeItem(this._ttlKey(a)),this._safeSet(this._prefix(a),e(c))},remove:function(a){return this.ls.removeItem(this._ttlKey(a)),this.ls.removeItem(this._prefix(a)),this},clear:function(){var a,b=g(this.keyMatcher);for(a=b.length;a--;)this.remove(b[a]);return this},isExpired:function(a){var c=f(this.ls.getItem(this._ttlKey(a)));return b.isNumber(c)&&d()>c?!0:!1}}),c}(),g=function(){"use strict";function c(a){a=a||{},this.cancelled=!1,this.lastReq=null,this._send=a.transport,this._get=a.limiter?a.limiter(this._get):this._get,this._cache=a.cache===!1?new e(0):h}var d=0,f={},g=6,h=new e(10);return c.setMaxPendingRequests=function(a){g=a},c.resetCache=function(){h.reset()},b.mixin(c.prototype,{_fingerprint:function(b){return b=b||{},b.url+b.type+a.param(b.data||{})},_get:function(a,b){function c(a){b(null,a),k._cache.set(i,a)}function e(){b(!0)}function h(){d--,delete f[i],k.onDeckRequestArgs&&(k._get.apply(k,k.onDeckRequestArgs),k.onDeckRequestArgs=null)}var i,j,k=this;i=this._fingerprint(a),this.cancelled||i!==this.lastReq||((j=f[i])?j.done(c).fail(e):g>d?(d++,f[i]=this._send(a).done(c).fail(e).always(h)):this.onDeckRequestArgs=[].slice.call(arguments,0))},get:function(c,d){var e,f;d=d||a.noop,c=b.isString(c)?{url:c}:c||{},f=this._fingerprint(c),this.cancelled=!1,this.lastReq=f,(e=this._cache.get(f))?d(null,e):this._get(c,d)},cancel:function(){this.cancelled=!0}}),c}(),h=window.SearchIndex=function(){"use strict";function c(c){c=c||{},c.datumTokenizer&&c.queryTokenizer||a.error("datumTokenizer and queryTokenizer are both required"),this.identify=c.identify||b.stringify,this.datumTokenizer=c.datumTokenizer,this.queryTokenizer=c.queryTokenizer,this.reset()}function d(a){return a=b.filter(a,function(a){return!!a}),a=b.map(a,function(a){return a.toLowerCase()})}function e(){var a={};return a[i]=[],a[h]={},a}function f(a){for(var b={},c=[],d=0,e=a.length;e>d;d++)b[a[d]]||(b[a[d]]=!0,c.push(a[d]));return c}function g(a,b){var c=0,d=0,e=[];a=a.sort(),b=b.sort();for(var f=a.length,g=b.length;f>c&&g>d;)a[c]<b[d]?c++:a[c]>b[d]?d++:(e.push(a[c]),c++,d++);return e}var h="c",i="i";return b.mixin(c.prototype,{bootstrap:function(a){this.datums=a.datums,this.trie=a.trie},add:function(a){var c=this;a=b.isArray(a)?a:[a],b.each(a,function(a){var f,g;c.datums[f=c.identify(a)]=a,g=d(c.datumTokenizer(a)),b.each(g,function(a){var b,d,g;for(b=c.trie,d=a.split("");g=d.shift();)b=b[h][g]||(b[h][g]=e()),b[i].push(f)})})},get:function(a){var c=this;return b.map(a,function(a){return c.datums[a]})},search:function(a){var c,e,j=this;return c=d(this.queryTokenizer(a)),b.each(c,function(a){var b,c,d,f;if(e&&0===e.length)return!1;for(b=j.trie,c=a.split("");b&&(d=c.shift());)b=b[h][d];return b&&0===c.length?(f=b[i].slice(0),void(e=e?g(e,f):f)):(e=[],!1)}),e?b.map(f(e),function(a){return j.datums[a]}):[]},all:function(){var a=[];for(var b in this.datums)a.push(this.datums[b]);return a},reset:function(){this.datums={},this.trie=e()},serialize:function(){return{datums:this.datums,trie:this.trie}}}),c}(),i=function(){"use strict";function a(a){this.url=a.url,this.ttl=a.ttl,this.cache=a.cache,this.prepare=a.prepare,this.transform=a.transform,this.transport=a.transport,this.thumbprint=a.thumbprint,this.storage=new f(a.cacheKey)}var c;return c={data:"data",protocol:"protocol",thumbprint:"thumbprint"},b.mixin(a.prototype,{_settings:function(){return{url:this.url,type:"GET",dataType:"json"}},store:function(a){this.cache&&(this.storage.set(c.data,a,this.ttl),this.storage.set(c.protocol,location.protocol,this.ttl),this.storage.set(c.thumbprint,this.thumbprint,this.ttl))},fromCache:function(){var a,b={};return this.cache?(b.data=this.storage.get(c.data),b.protocol=this.storage.get(c.protocol),b.thumbprint=this.storage.get(c.thumbprint),a=b.thumbprint!==this.thumbprint||b.protocol!==location.protocol,b.data&&!a?b.data:null):null},fromNetwork:function(a){function b(){a(!0)}function c(b){a(null,e.transform(b))}var d,e=this;a&&(d=this.prepare(this._settings()),this.transport(d).fail(b).done(c))},clear:function(){return this.storage.clear(),this}}),a}(),j=function(){"use strict";function a(a){this.url=a.url,this.prepare=a.prepare,this.transform=a.transform,this.transport=new g({cache:a.cache,limiter:a.limiter,transport:a.transport})}return b.mixin(a.prototype,{_settings:function(){return{url:this.url,type:"GET",dataType:"json"}},get:function(a,b){function c(a,c){b(a?[]:e.transform(c))}var d,e=this;if(b)return a=a||"",d=this.prepare(a,this._settings()),this.transport.get(d,c)},cancelLastRequest:function(){this.transport.cancel()}}),a}(),k=function(){"use strict";function d(d){var e;return d?(e={url:null,ttl:864e5,cache:!0,cacheKey:null,thumbprint:"",prepare:b.identity,transform:b.identity,transport:null},d=b.isString(d)?{url:d}:d,d=b.mixin(e,d),!d.url&&a.error("prefetch requires url to be set"),d.transform=d.filter||d.transform,d.cacheKey=d.cacheKey||d.url,d.thumbprint=c+d.thumbprint,d.transport=d.transport?h(d.transport):a.ajax,d):null}function e(c){var d;if(c)return d={url:null,cache:!0,prepare:null,replace:null,wildcard:null,limiter:null,rateLimitBy:"debounce",rateLimitWait:300,transform:b.identity,transport:null},c=b.isString(c)?{url:c}:c,c=b.mixin(d,c),!c.url&&a.error("remote requires url to be set"),c.transform=c.filter||c.transform,c.prepare=f(c),c.limiter=g(c),c.transport=c.transport?h(c.transport):a.ajax,delete c.replace,delete c.wildcard,delete c.rateLimitBy,delete c.rateLimitWait,c}function f(a){function b(a,b){return b.url=f(b.url,a),b}function c(a,b){return b.url=b.url.replace(g,encodeURIComponent(a)),b}function d(a,b){return b}var e,f,g;return e=a.prepare,f=a.replace,g=a.wildcard,e?e:e=f?b:a.wildcard?c:d}function g(a){function c(a){return function(c){return b.debounce(c,a)}}function d(a){return function(c){return b.throttle(c,a)}}var e,f,g;return e=a.limiter,f=a.rateLimitBy,g=a.rateLimitWait,e||(e=/^throttle$/i.test(f)?d(g):c(g)),e}function h(c){return function(d){function e(a){b.defer(function(){g.resolve(a)})}function f(a){b.defer(function(){g.reject(a)})}var g=a.Deferred();return c(d,e,f),g}}return function(c){var f,g;return f={initialize:!0,identify:b.stringify,datumTokenizer:null,queryTokenizer:null,sufficient:5,sorter:null,local:[],prefetch:null,remote:null},c=b.mixin(f,c||{}),!c.datumTokenizer&&a.error("datumTokenizer is required"),!c.queryTokenizer&&a.error("queryTokenizer is required"),g=c.sorter,c.sorter=g?function(a){return a.sort(g)}:b.identity,c.local=b.isFunction(c.local)?c.local():c.local,c.prefetch=d(c.prefetch),c.remote=e(c.remote),c}}(),l=function(){"use strict";function c(a){a=k(a),this.sorter=a.sorter,this.identify=a.identify,this.sufficient=a.sufficient,this.local=a.local,this.remote=a.remote?new j(a.remote):null,this.prefetch=a.prefetch?new i(a.prefetch):null,this.index=new h({identify:this.identify,datumTokenizer:a.datumTokenizer,queryTokenizer:a.queryTokenizer}),a.initialize!==!1&&this.initialize()}var e;return e=window&&window.Bloodhound,c.noConflict=function(){return window&&(window.Bloodhound=e),c}
vendor: 28,223 bytes, lines 3798-3799
3798,c.tokenizers=d,b.mixin(c.prototype,{__ttAdapter:function(){function a(a,b,d){return c.search(a,b,d)}function b(a,b){return c.search(a,b)}var c=this;return this.remote?a:b},_loadPrefetch:function(){function b(a,b){return a?c.reject():(e.add(b),e.prefetch.store(e.index.serialize()),void c.resolve())}var c,d,e=this;return c=a.Deferred(),this.prefetch?(d=this.prefetch.fromCache())?(this.index.bootstrap(d),c.resolve()):this.prefetch.fromNetwork(b):c.resolve(),c.promise()},_initialize:function(){function a(){b.add(b.local)}var b=this;return this.clear(),(this.initPromise=this._loadPrefetch()).done(a),this.initPromise},initialize:function(a){return!this.initPromise||a?this._initialize():this.initPromise},add:function(a){return this.index.add(a),this},get:function(a){return a=b.isArray(a)?a:[].slice.call(arguments),this.index.get(a)},search:function(a,c,d){function e(a){var c=[];b.each(a,function(a){!b.some(f,function(b){return g.identify(a)===g.identify(b)})&&c.push(a)}),d&&d(c)}var f,g=this;return f=this.sorter(this.index.search(a)),c(this.remote?f.slice():f),this.remote&&f.length<this.sufficient?this.remote.get(a,e):this.remote&&this.remote.cancelLastRequest(),this},all:function(){return this.index.all()},clear:function(){return this.index.reset(),this},clearPrefetchCache:function(){return this.prefetch&&this.prefetch.clear(),this},clearRemoteCache:function(){return g.resetCache(),this},ttAdapter:function(){return this.__ttAdapter()}}),c}();return l}),function(a,b){"function"==typeof define&&define.amd?define("typeahead.js",["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){var b=function(){"use strict";return{isMsie:function(){return/(msie|trident)/i.test(navigator.userAgent)?navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2]:!1},isBlankString:function(a){return!a||/^\s*$/.test(a)},escapeRegExChars:function(a){return a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},isString:function(a){return"string"==typeof a},isNumber:function(a){return"number"==typeof a},isArray:a.isArray,isFunction:a.isFunction,isObject:a.isPlainObject,isUndefined:function(a){return"undefined"==typeof a},isElement:function(a){return!(!a||1!==a.nodeType)},isJQuery:function(b){return b instanceof a},toStr:function(a){return b.isUndefined(a)||null===a?"":a+""},bind:a.proxy,each:function(b,c){function d(a,b){return c(b,a)}a.each(b,d)},map:a.map,filter:a.grep,every:function(b,c){var d=!0;return b?(a.each(b,function(a,e){return(d=c.call(null,e,a,b))?void 0:!1}),!!d):d},some:function(b,c){var d=!1;return b?(a.each(b,function(a,e){return(d=c.call(null,e,a,b))?!1:void 0}),!!d):d},mixin:a.extend,identity:function(a){return a},clone:function(b){return a.extend(!0,{},b)},getIdGenerator:function(){var a=0;return function(){return a++}},templatify:function(b){function c(){return String(b)}return a.isFunction(b)?b:c},defer:function(a){setTimeout(a,0)},debounce:function(a,b,c){var d,e;return function(){var f,g,h=this,i=arguments;return f=function(){d=null,c||(e=a.apply(h,i))},g=c&&!d,clearTimeout(d),d=setTimeout(f,b),g&&(e=a.apply(h,i)),e}},throttle:function(a,b){var c,d,e,f,g,h;return g=0,h=function(){g=new Date,e=null,f=a.apply(c,d)},function(){var i=new Date,j=b-(i-g);return c=this,d=arguments,0>=j?(clearTimeout(e),e=null,g=i,f=a.apply(c,d)):e||(e=setTimeout(h,j)),f}},stringify:function(a){return b.isString(a)?a:JSON.stringify(a)},noop:function(){}}}(),c=function(){"use strict";function a(a){var g,h;return h=b.mixin({},f,a),g={css:e(),classes:h,html:c(h),selectors:d(h)},{css:g.css,html:g.html,classes:g.classes,selectors:g.selectors,mixin:function(a){b.mixin(a,g)}}}function c(a){return{wrapper:'<span class="'+a.wrapper+'"></span>',menu:'<div class="'+a.menu+'"></div>'}}function d(a){var c={};return b.each(a,function(a,b){c[b]="."+a}),c}function e(){var a={wrapper:{position:"relative",display:"inline-block"},hint:{position:"absolute",top:"0",left:"0",borderColor:"transparent",boxShadow:"none",opacity:"1"},input:{position:"relative",verticalAlign:"top",backgroundColor:"transparent"},inputWithNoHint:{position:"relative",verticalAlign:"top"},menu:{position:"absolute",top:"100%",left:"0",zIndex:"100",display:"none"},ltr:{left:"0",right:"auto"},rtl:{left:"auto",right:" 0"}};return b.isMsie()&&b.mixin(a.input,{backgroundImage:"url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)"}),a}var f={wrapper:"twitter-typeahead",input:"tt-input",hint:"tt-hint",menu:"tt-menu",dataset:"tt-dataset",suggestion:"tt-suggestion",selectable:"tt-selectable",empty:"tt-empty",open:"tt-open",cursor:"tt-cursor",highlight:"tt-highlight"};return a}(),d=function(){"use strict";function c(b){b&&b.el||a.error("EventBus initialized without el"),this.$el=a(b.el)}var d,e;return d="typeahead:",e={render:"rendered",cursorchange:"cursorchanged",select:"selected",autocomplete:"autocompleted"},b.mixin(c.prototype,{_trigger:function(b,c){var e;return e=a.Event(d+b),(c=c||[]).unshift(e),this.$el.trigger.apply(this.$el,c),e},before:function(a){var b,c;return b=[].slice.call(arguments,1),c=this._trigger("before"+a,b),c.isDefaultPrevented()},trigger:function(a){var b;this._trigger(a,[].slice.call(arguments,1)),(b=e[a])&&this._trigger(b,[].slice.call(arguments,1))}}),c}(),e=function(){"use strict";function a(a,b,c,d){var e;if(!c)return this;for(b=b.split(i),c=d?h(c,d):c,this._callbacks=this._callbacks||{};e=b.shift();)this._callbacks[e]=this._callbacks[e]||{sync:[],async:[]},this._callbacks[e][a].push(c);return this}function b(b,c,d){return a.call(this,"async",b,c,d)}function c(b,c,d){return a.call(this,"sync",b,c,d)}function d(a){var b;if(!this._callbacks)return this;for(a=a.split(i);b=a.shift();)delete this._callbacks[b];return this}function e(a){var b,c,d,e,g;if(!this._callbacks)return this;for(a=a.split(i),d=[].slice.call(arguments,1);(b=a.shift())&&(c=this._callbacks[b]);)e=f(c.sync,this,[b].concat(d)),g=f(c.async,this,[b].concat(d)),e()&&j(g);return this}function f(a,b,c){function d(){for(var d,e=0,f=a.length;!d&&f>e;e+=1)d=a[e].apply(b,c)===!1;return!d}return d}function g(){var a;return a=window.setImmediate?function(a){setImmediate(function(){a()})}:function(a){setTimeout(function(){a()},0)}}function h(a,b){return a.bind?a.bind(b):function(){a.apply(b,[].slice.call(arguments,0))}}var i=/\s+/,j=g();return{onSync:c,onAsync:b,off:d,trigger:e}}(),f=function(a){"use strict";function c(a,c,d){for(var e,f=[],g=0,h=a.length;h>g;g++)f.push(b.escapeRegExChars(a[g]));return e=d?"\\b("+f.join("|")+")\\b":"("+f.join("|")+")",c?new RegExp(e):new RegExp(e,"i")}var d={node:null,pattern:null,tagName:"strong",className:null,wordsOnly:!1,caseSensitive:!1};return function(e){function f(b){var c,d,f;return(c=h.exec(b.data))&&(f=a.createElement(e.tagName),e.className&&(f.className=e.className),d=b.splitText(c.index),d.splitText(c[0].length),f.appendChild(d.cloneNode(!0)),b.parentNode.replaceChild(f,d)),!!c}function g(a,b){for(var c,d=3,e=0;e<a.childNodes.length;e++)c=a.childNodes[e],c.nodeType===d?e+=b(c)?1:0:g(c,b)}var h;e=b.mixin({},d,e),e.node&&e.pattern&&(e.pattern=b.isArray(e.pattern)?e.pattern:[e.pattern],h=c(e.pattern,e.caseSensitive,e.wordsOnly),g(e.node,f))}}(window.document),g=function(){"use strict";function c(c,e){c=c||{},c.input||a.error("input is missing"),e.mixin(this),this.$hint=a(c.hint),this.$input=a(c.input),this.query=this.$input.val(),this.queryWhenFocused=this.hasFocus()?this.query:null,this.$overflowHelper=d(this.$input),this._checkLanguageDirection(),0===this.$hint.length&&(this.setHint=this.getHint=this.clearHint=this.clearHintIfInvalid=b.noop)}function d(b){return a('<pre aria-hidden="true"></pre>').css({position:"absolute",visibility:"hidden",whiteSpace:"pre",fontFamily:b.css("font-family"),fontSize:b.css("font-size"),fontStyle:b.css("font-style"),fontVariant:b.css("font-variant"),fontWeight:b.css("font-weight"),wordSpacing:b.css("word-spacing"),letterSpacing:b.css("letter-spacing"),textIndent:b.css("text-indent"),textRendering:b.css("text-rendering"),textTransform:b.css("text-transform")}).insertAfter(b)}function f(a,b){return c.normalizeQuery(a)===c.normalizeQuery(b)}function g(a){return a.altKey||a.ctrlKey||a.metaKey||a.shiftKey}var h;return h={9:"tab",27:"esc",37:"left",39:"right",13:"enter",38:"up",40:"down"},c.normalizeQuery=function(a){return b.toStr(a).replace(/^\s*/g,"").replace(/\s{2,}/g," ")},b.mixin(c.prototype,e,{_onBlur:function(){this.resetInputValue(),this.trigger("blurred")},_onFocus:function(){this.queryWhenFocused=this.query,this.trigger("focused")},_onKeydown:function(a){var b=h[a.which||a.keyCode];this._managePreventDefault(b,a),b&&this._shouldTrigger(b,a)&&this.trigger(b+"Keyed",a)},_onInput:function(){this._setQuery(this.getInputValue()),this.clearHintIfInvalid(),this._checkLanguageDirection()},_managePreventDefault:function(a,b){var c;switch(a){case"up":case"down":c=!g(b);break;default:c=!1}c&&b.preventDefault()},_shouldTrigger:function(a,b){var c;switch(a){case"tab":c=!g(b);break;default:c=!0}return c},_checkLanguageDirection:function(){var a=(this.$input.css("direction")||"ltr").toLowerCase();this.dir!==a&&(this.dir=a,this.$hint.attr("dir",a),this.trigger("langDirChanged",a))},_setQuery:function(a,b){var c,d;c=f(a,this.query),d=c?this.query.length!==a.length:!1,this.query=a,b||c?!b&&d&&this.trigger("whitespaceChanged",this.query):this.trigger("queryChanged",this.query)},bind:function(){var a,c,d,e,f=this;return a=b.bind(this._onBlur,this),c=b.bind(this._onFocus,this),d=b.bind(this._onKeydown,this),e=b.bind(this._onInput,this),this.$input.on("blur.tt",a).on("focus.tt",c).on("keydown.tt",d),!b.isMsie()||b.isMsie()>9?this.$input.on("input.tt",e):this.$input.on("keydown.tt keypress.tt cut.tt paste.tt",function(a){h[a.which||a.keyCode]||b.defer(b.bind(f._onInput,f,a))}),this},focus:function(){this.$input.focus()},blur:function(){this.$input.blur()},getLangDir:function(){return this.dir},getQuery:function(){return this.query||""},setQuery:function(a,b){this.setInputValue(a),this._setQuery(a,b)},hasQueryChangedSinceLastFocus:function(){return this.query!==this.queryWhenFocused},getInputValue:function(){return this.$input.val()},setInputValue:function(a){this.$input.val(a),this.clearHintIfInvalid(),this._checkLanguageDirection()},resetInputValue:function(){this.setInputValue(this.query)},getHint:function(){return this.$hint.val()},setHint:function(a){this.$hint.val(a)},clearHint:function(){this.setHint("")},clearHintIfInvalid:function(){var a,b,c,d;a=this.getInputValue(),b=this.getHint(),c=a!==b&&0===b.indexOf(a),d=""!==a&&c&&!this.hasOverflow(),!d&&this.clearHint()},hasFocus:function(){return this.$input.is(":focus")},hasOverflow:function(){var a=this.$input.width()-2;return this.$overflowHelper.text(this.getInputValue()),this.$overflowHelper.width()>=a},isCursorAtEnd:function(){var a,c,d;return a=this.$input.val().length,c=this.$input[0].selectionStart,b.isNumber(c)?c===a:document.selection?(d=document.selection.createRange(),d.moveStart("character",-a),a===d.text.length):!0},destroy:function(){this.$hint.off(".tt"),this.$input.off(".tt"),this.$overflowHelper.remove(),this.$hint=this.$input=this.$overflowHelper=a("<div>")}}),c}(),h=function(){"use strict";function c(c,e){c=c||{},c.templates=c.templates||{},c.templates.notFound=c.templates.notFound||c.templates.empty,c.source||a.error("missing source"),c.node||a.error("missing node"),c.name&&!h(c.name)&&a.error("invalid dataset name: "+c.name),e.mixin(this),this.highlight=!!c.highlight,this.name=c.name||j(),this.limit=c.limit||5,this.displayFn=d(c.display||c.displayKey),this.templates=g(c.templates,this.displayFn),this.source=c.source.__ttAdapter?c.source.__ttAdapter():c.source,this.async=b.isUndefined(c.async)?this.source.length>2:!!c.async,this._resetLastSuggestion(),this.$el=a(c.node).addClass(this.classes.dataset).addClass(this.classes.dataset+"-"+this.name)}function d(a){function c(b){return b[a]}return a=a||b.stringify,b.isFunction(a)?a:c}function g(c,d){function e(b){return a("<div>").text(d(b))}return{notFound:c.notFound&&b.templatify(c.notFound),pending:c.pending&&b.templatify(c.pending),header:c.header&&b.templatify(c.header),footer:c.footer&&b.templatify(c.footer),suggestion:c.suggestion||e}}function h(a){return/^[_a-zA-Z0-9-]+$/.test(a)}var i,j;return i={val:"tt-selectable-display",obj:"tt-selectable-object"},j=b.getIdGenerator(),c.extractData=function(b){var c=a(b);return c.data(i.obj)?{val:c.data(i.val)||"",obj:c.data(i.obj)||null}:null},b.mixin(c.prototype,e,{_overwrite:function(a,b){b=b||[],b.length?this._renderSuggestions(a,b):this.async&&this.templates.pending?this._renderPending(a):!this.async&&this.templates.notFound?this._renderNotFound(a):this._empty(),this.trigger("rendered",this.name,b,!1)},_append:function(a,b){b=b||[],b.length&&this.$lastSuggestion.length?this._appendSuggestions(a,b):b.length?this._renderSuggestions(a,b):!this.$lastSuggestion.length&&this.templates.notFound&&this._renderNotFound(a),this.trigger("rendered",this.name,b,!0)},_renderSuggestions:function(a,b){var c;c=this._getSuggestionsFragment(a,b),this.$lastSuggestion=c.children().last(),this.$el.html(c).prepend(this._getHeader(a,b)).append(this._getFooter(a,b))},_appendSuggestions:function(a,b){var c,d;c=this._getSuggestionsFragment(a,b),d=c.children().last(),this.$lastSuggestion.after(c),this.$lastSuggestion=d},_renderPending:function(a){var b=this.templates.pending;this._resetLastSuggestion(),b&&this.$el.html(b({query:a,dataset:this.name}))},_renderNotFound:function(a){var b=this.templates.notFound;this._resetLastSuggestion(),b&&this.$el.html(b({query:a,dataset:this.name}))},_empty:function(){this.$el.empty(),this._resetLastSuggestion()},_getSuggestionsFragment:function(c,d){var e,g=this;return e=document.createDocumentFragment(),b.each(d,function(b){var d,f;f=g._injectQuery(c,b),d=a(g.templates.suggestion(f)).data(i.obj,b).data(i.val,g.displayFn(b)).addClass(g.classes.suggestion+" "+g.classes.selectable),e.appendChild(d[0])}),this.highlight&&f({className:this.classes.highlight,node:e,pattern:c}),a(e)},_getFooter:function(a,b){return this.templates.footer?this.templates.footer({query:a,suggestions:b,dataset:this.name}):null},_getHeader:function(a,b){return this.templates.header?this.templates.header({query:a,suggestions:b,dataset:this.name}):null},_resetLastSuggestion:function(){this.$lastSuggestion=a()},_injectQuery:function(a,c){return b.isObject(c)?b.mixin({_query:a},c):c},update:function(b){function c(a){g||(g=!0,a=(a||[]).slice(0,e.limit),h=a.length,e._overwrite(b,a),h<e.limit&&e.async&&e.trigger("asyncRequested",b))}function d(c){c=c||[],!f&&h<e.limit&&(e.cancel=a.noop,h+=c.length,e._append(b,c.slice(0,e.limit-h)),e.async&&e.trigger("asyncReceived",b))}var e=this,f=!1,g=!1,h=0;this.cancel(),this.cancel=function(){f=!0,e.cancel=a.noop,e.async&&e.trigger("asyncCanceled",b)},this.source(b,c,d),!g&&c([])},cancel:a.noop,clear:function(){this._empty(),this.cancel(),this.trigger("cleared")},isEmpty:function(){return this.$el.is(":empty")},destroy:function(){this.$el=a("<div>")}}),c}(),i=function(){"use strict";function c(c,d){function e(b){var c=f.$node.find(b.node).first();return b.node=c.length?c:a("<div>").appendTo(f.$node),new h(b,d)}var f=this;c=c||{},c.node||a.error("node is required"),d.mixin(this),this.$node=a(c.node),this.query=null,this.datasets=b.map(c.datasets,e)}return b.mixin(c.prototype,e,{_onSelectableClick:function(b){this.trigger("selectableClicked",a(b.currentTarget))},_onRendered:function(a,b,c,d){this.$node.toggleClass(this.classes.empty,this._allDatasetsEmpty()),this.trigger("datasetRendered",b,c,d)},_onCleared:function(){this.$node.toggleClass(this.classes.empty,this._allDatasetsEmpty()),this.trigger("datasetCleared")},_propagate:function(){this.trigger.apply(this,arguments)},_allDatasetsEmpty:function(){function a(a){return a.isEmpty()}return b.every(this.datasets,a)},_getSelectables:function(){return this.$node.find(this.selectors.selectable)},_removeCursor:function(){var a=this.getActiveSelectable();a&&a.removeClass(this.classes.cursor)},_ensureVisible:function(a){var b,c,d,e;b=a.position().top,c=b+a.outerHeight(!0),d=this.$node.scrollTop(),e=this.$node.height()+parseInt(this.$node.css("paddingTop"),10)+parseInt(this.$node.css("paddingBottom"),10),0>b?this.$node.scrollTop(d+b):c>e&&this.$node.scrollTop(d+(c-e))},bind:function(){var a,c=this;return a=b.bind(this._onSelectableClick,this),this.$node.on("click.tt",this.selectors.selectable,a),b.each(this.datasets,function(a){a.onSync("asyncRequested",c._propagate,c).onSync("asyncCanceled",c._propagate,c).onSync("asyncReceived",c._propagate,c).onSync("rendered",c._onRendered,c).onSync("cleared",c._onCleared,c)}),this},isOpen:function(){return this.$node.hasClass(this.classes.open)},open:function(){this.$node.addClass(this.classes.open)},close:function(){this.$node.removeClass(this.classes.open),this._removeCursor()},setLanguageDirection:function(a){this.$node.attr("dir",a)},selectableRelativeToCursor:function(a){var b,c,d,e;return c=this.getActiveSelectable(),b=this._getSelectables(),d=c?b.index(c):-1,e=d+a,e=(e+1)%(b.length+1)-1,e=-1>e?b.length-1:e,-1===e?null:b.eq(e)},setCursor:function(a){this._removeCursor(),(a=a&&a.first())&&(a.addClass(this.classes.cursor),this._ensureVisible(a))},getSelectableData:function(a){return a&&a.length?h.extractData(a):null},getActiveSelectable:function(){var a=this._getSelectables().filter(this.selectors.cursor).first();return a.length?a:null},getTopSelectable:function(){var a=this._getSelectables().first();return a.length?a:null},update:function(a){function c(b){b.update(a)}var d=a!==this.query;return d&&(this.query=a,b.each(this.datasets,c)),d},empty:function(){function a(a){a.clear()}b.each(this.datasets,a),this.query=null,this.$node.addClass(this.classes.empty)},destroy:function(){function c(a){a.destroy()}this.$node.off(".tt"),this.$node=a("<div>"),b.each(this.datasets,c)}}),c}(),j=function(){"use strict";function a(){i.apply(this,[].slice.call(arguments,0))}var c=i.prototype;return b.mixin(a.prototype,i.prototype,{open:function(){return!this._allDatasetsEmpty()&&this._show(),c.open.apply(this,[].slice.call(arguments,0))},close:function(){return this._hide(),c.close.apply(this,[].slice.call(arguments,0))},_onRendered:function(){return this._allDatasetsEmpty()?this._hide():this.isOpen()&&this._show(),c._onRendered.apply(this,[].slice.call(arguments,0))},_onCleared:function(){return this._allDatasetsEmpty()?this._hide():this.isOpen()&&this._show(),c._onCleared.apply(this,[].slice.call(arguments,0))},setLanguageDirection:function(a){return this.$node.css("ltr"===a?this.css.ltr:this.css.rtl),c.setLanguageDirection.apply(this,[].slice.call(arguments,0))},_hide:function(){this.$node.hide()},_show:function(){this.$node.css("display","block")}}),a}(),k=function(){"use strict";function c(c,e){var f,g,h,i,j,k,l,m,n,o,p;c=c||{},c.input||a.error("missing input"),c.menu||a.error("missing menu"),c.eventBus||a.error("missing event bus"),e.mixin(this),this.eventBus=c.eventBus,this.minLength=b.isNumber(c.minLength)?c.minLength:1,this.input=c.input,this.menu=c.menu,this.enabled=!0,this.active=!1,this.input.hasFocus()&&this.activate(),this.dir=this.input.getLangDir(),this._hacks(),this.menu.bind().onSync("selectableClicked",this._onSelectableClicked,this).onSync("asyncRequested",this._onAsyncRequested,this).onSync("asyncCanceled",this._onAsyncCanceled,this).onSync("asyncReceived",this._onAsyncReceived,this).onSync("datasetRendered",this._onDatasetRendered,this).onSync("datasetCleared",this._onDatasetCleared,this),f=d(this,"activate","open","_onFocused"),g=d(this,"deactivate","_onBlurred"),h=d(this,"isActive","isOpen","_onEnterKeyed"),i=d(this,"isActive","isOpen","_onTabKeyed"),j=d(this,"isActive","_onEscKeyed"),k=d(this,"isActive","open","_onUpKeyed"),l=d(this,"isActive","open","_onDownKeyed"),m=d(this,"isActive","isOpen","_onLeftKeyed"),n=d(this,"isActive","isOpen","_onRightKeyed"),o=d(this,"_openIfActive","_onQueryChanged"),p=d(this,"_openIfActive","_onWhitespaceChanged"),this.input.bind().onSync("focused",f,this).onSync("blurred",g,this).onSync("enterKeyed",h,this).onSync("tabKeyed",i,this).onSync("escKeyed",j,this).onSync("upKeyed",k,this).onSync("downKeyed",l,this).onSync("leftKeyed",m,this).onSync("rightKeyed",n,this).onSync("queryChanged",o,this).onSync("whitespaceChanged",p,this).onSync("langDirChanged",this._onLangDirChanged,this)}function d(a){var c=[].slice.call(arguments,1);return function(){var d=[].slice.call(arguments);b.each(c,function(b){return a[b].apply(a,d)})}}return b.mixin(c.prototype,{_hacks:function(){var c,d;c=this.input.$input||a("<div>"),d=this.menu.$node||a("<div>"),c.on("blur.tt",function(a){var e,f,g; 3799e=document.activeElement,f=d.is(e),g=d.has(e).length>0,b.isMsie()&&(f||g)&&(a.preventDefault(),a.stopImmediatePropagation(),b.defer(function(){c.focus()}))}),d.on("mousedown.tt",function(a){a.preventDefault()})},_onSelectableClicked:function(a,b){this.select(b)},_onDatasetCleared:function(){this._updateHint()},_onDatasetRendered:function(a,b,c,d){this._updateHint(),this.eventBus.trigger("render",c,d,b)},_onAsyncRequested:function(a,b,c){this.eventBus.trigger("asyncrequest",c,b)},_onAsyncCanceled:function(a,b,c){this.eventBus.trigger("asynccancel",c,b)},_onAsyncReceived:function(a,b,c){this.eventBus.trigger("asyncreceive",c,b)},_onFocused:function(){this._minLengthMet()&&this.menu.update(this.input.getQuery())},_onBlurred:function(){this.input.hasQueryChangedSinceLastFocus()&&this.eventBus.trigger("change",this.input.getQuery())},_onEnterKeyed:function(a,b){var c;(c=this.menu.getActiveSelectable())&&this.select(c)&&b.preventDefault()},_onTabKeyed:function(a,b){var c;(c=this.menu.getActiveSelectable())?this.select(c)&&b.preventDefault():(c=this.menu.getTopSelectable())&&this.autocomplete(c)&&b.preventDefault()},_onEscKeyed:function(){this.close()},_onUpKeyed:function(){this.moveCursor(-1)},_onDownKeyed:function(){this.moveCursor(1)},_onLeftKeyed:function(){"rtl"===this.dir&&this.input.isCursorAtEnd()&&this.autocomplete(this.menu.getTopSelectable())},_onRightKeyed:function(){"ltr"===this.dir&&this.input.isCursorAtEnd()&&this.autocomplete(this.menu.getTopSelectable())},_onQueryChanged:function(a,b){this._minLengthMet(b)?this.menu.update(b):this.menu.empty()},_onWhitespaceChanged:function(){this._updateHint()},_onLangDirChanged:function(a,b){this.dir!==b&&(this.dir=b,this.menu.setLanguageDirection(b))},_openIfActive:function(){this.isActive()&&this.open()},_minLengthMet:function(a){return a=b.isString(a)?a:this.input.getQuery()||"",a.length>=this.minLength},_updateHint:function(){var a,c,d,e,f,h,i;a=this.menu.getTopSelectable(),c=this.menu.getSelectableData(a),d=this.input.getInputValue(),!c||b.isBlankString(d)||this.input.hasOverflow()?this.input.clearHint():(e=g.normalizeQuery(d),f=b.escapeRegExChars(e),h=new RegExp("^(?:"+f+")(.+$)","i"),i=h.exec(c.val),i&&this.input.setHint(d+i[1]))},isEnabled:function(){return this.enabled},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},isActive:function(){return this.active},activate:function(){return this.isActive()?!0:!this.isEnabled()||this.eventBus.before("active")?!1:(this.active=!0,this.eventBus.trigger("active"),!0)},deactivate:function(){return this.isActive()?this.eventBus.before("idle")?!1:(this.active=!1,this.close(),this.eventBus.trigger("idle"),!0):!0},isOpen:function(){return this.menu.isOpen()},open:function(){return this.isOpen()||this.eventBus.before("open")||(this.menu.open(),this._updateHint(),this.eventBus.trigger("open")),this.isOpen()},close:function(){return this.isOpen()&&!this.eventBus.before("close")&&(this.menu.close(),this.input.clearHint(),this.input.resetInputValue(),this.eventBus.trigger("close")),!this.isOpen()},setVal:function(a){this.input.setQuery(b.toStr(a))},getVal:function(){return this.input.getQuery()},select:function(a){var b=this.menu.getSelectableData(a);return b&&!this.eventBus.before("select",b.obj)?(this.input.setQuery(b.val,!0),this.eventBus.trigger("select",b.obj),this.close(),!0):!1},autocomplete:function(a){var b,c,d;return b=this.input.getQuery(),c=this.menu.getSelectableData(a),d=c&&b!==c.val,d&&!this.eventBus.before("autocomplete",c.obj)?(this.input.setQuery(c.val),this.eventBus.trigger("autocomplete",c.obj),!0):!1},moveCursor:function(a){var b,c,d,e,f;return b=this.input.getQuery(),c=this.menu.selectableRelativeToCursor(a),d=this.menu.getSelectableData(c),e=d?d.obj:null,f=this._minLengthMet()&&this.menu.update(b),f||this.eventBus.before("cursorchange",e)?!1:(this.menu.setCursor(c),d?this.input.setInputValue(d.val):(this.input.resetInputValue(),this._updateHint()),this.eventBus.trigger("cursorchange",e),!0)},destroy:function(){this.input.destroy(),this.menu.destroy()}}),c}();!function(){"use strict";function e(b,c){b.each(function(){var b,d=a(this);(b=d.data(p.typeahead))&&c(b,d)})}function f(a,b){return a.clone().addClass(b.classes.hint).removeData().css(b.css.hint).css(l(a)).prop("readonly",!0).removeAttr("id name placeholder required").attr({autocomplete:"off",spellcheck:"false",tabindex:-1})}function h(a,b){a.data(p.attrs,{dir:a.attr("dir"),autocomplete:a.attr("autocomplete"),spellcheck:a.attr("spellcheck"),style:a.attr("style")}),a.addClass(b.classes.input).attr({autocomplete:"off",spellcheck:!1});try{!a.attr("dir")&&a.attr("dir","auto")}catch(c){}return a}function l(a){return{backgroundAttachment:a.css("background-attachment"),backgroundClip:a.css("background-clip"),backgroundColor:a.css("background-color"),backgroundImage:a.css("background-image"),backgroundOrigin:a.css("background-origin"),backgroundPosition:a.css("background-position"),backgroundRepeat:a.css("background-repeat"),backgroundSize:a.css("background-size")}}function m(a){var c,d;c=a.data(p.www),d=a.parent().filter(c.selectors.wrapper),b.each(a.data(p.attrs),function(c,d){b.isUndefined(c)?a.removeAttr(d):a.attr(d,c)}),a.removeData(p.typeahead).removeData(p.www).removeData(p.attr).removeClass(c.classes.input),d.length&&(a.detach().insertAfter(d),d.remove())}function n(c){var d,e;return d=b.isJQuery(c)||b.isElement(c),e=d?a(c).first():[],e.length?e:null}var o,p,q;o=a.fn.typeahead,p={www:"tt-www",attrs:"tt-attrs",typeahead:"tt-typeahead"},q={initialize:function(e,l){function m(){var c,m,q,r,s,t,u,v,w,x,y;b.each(l,function(a){a.highlight=!!e.highlight}),c=a(this),m=a(o.html.wrapper),q=n(e.hint),r=n(e.menu),s=e.hint!==!1&&!q,t=e.menu!==!1&&!r,s&&(q=f(c,o)),t&&(r=a(o.html.menu).css(o.css.menu)),q&&q.val(""),c=h(c,o),(s||t)&&(m.css(o.css.wrapper),c.css(s?o.css.input:o.css.inputWithNoHint),c.wrap(m).parent().prepend(s?q:null).append(t?r:null)),y=t?j:i,u=new d({el:c}),v=new g({hint:q,input:c},o),w=new y({node:r,datasets:l},o),x=new k({input:v,menu:w,eventBus:u,minLength:e.minLength},o),c.data(p.www,o),c.data(p.typeahead,x)}var o;return l=b.isArray(l)?l:[].slice.call(arguments,1),e=e||{},o=c(e.classNames),this.each(m)},isEnabled:function(){var a;return e(this.first(),function(b){a=b.isEnabled()}),a},enable:function(){return e(this,function(a){a.enable()}),this},disable:function(){return e(this,function(a){a.disable()}),this},isActive:function(){var a;return e(this.first(),function(b){a=b.isActive()}),a},activate:function(){return e(this,function(a){a.activate()}),this},deactivate:function(){return e(this,function(a){a.deactivate()}),this},isOpen:function(){var a;return e(this.first(),function(b){a=b.isOpen()}),a},open:function(){return e(this,function(a){a.open()}),this},close:function(){return e(this,function(a){a.close()}),this},select:function(b){var c=!1,d=a(b);return e(this.first(),function(a){c=a.select(d)}),c},autocomplete:function(b){var c=!1,d=a(b);return e(this.first(),function(a){c=a.autocomplete(d)}),c},moveCursor:function(a){var b=!1;return e(this.first(),function(c){b=c.moveCursor(a)}),b},val:function(a){var b;return arguments.length?(e(this,function(b){b.setVal(a)}),this):(e(this.first(),function(a){b=a.getVal()}),b)},destroy:function(){return e(this,function(a,b){m(b),a.destroy()}),this}},a.fn.typeahead=function(a){return q[a]?q[a].apply(this,[].slice.call(arguments,1)):q.initialize.apply(this,arguments)},a.fn.typeahead.noConflict=function(){return a.fn.typeahead=o,this}}()});
3799 3800/*! 3801 * Cropper.js v1.3.2 3802 * https://github.com/fengyuanchen/cropperjs 3803 * 3804 * Copyright (c) 2015-2018 Chen Fengyuan 3805 * Released under the MIT license 3806 * 3807 * Date: 2018-03-03T03:43:36.276Z 3808 */ 3809!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?module.exports=i():"function"==typeof define&&define.amd?define(i):t.Cropper=i()}(this,function(){"use strict";var t="undefined"!=typeof window?window:{},i="cropper",e="all",a="crop",n="move",o="zoom",h="e",r="w",s="s",d="n",c="ne",l="nw",p="se",m="sw",g=i+"-crop",u=i+"-disabled",f=i+"-hidden",v=i+"-hide",w=i+"-modal",x=i+"-move",b="action",y="preview",M="crop",C="move",D="none",B="crop",k="cropend",T="cropmove",W="cropstart",H="dblclick",N="load",E=t.PointerEvent?"pointerdown":"touchstart mousedown",z=t.PointerEvent?"pointermove":"touchmove mousemove",L=t.PointerEvent?"pointerup pointercancel":"touchend touchcancel mouseup",Y="ready",X="resize",O="wheel mousewheel DOMMouseScroll",R="zoom",S=/^(?:e|w|s|n|se|sw|ne|nw|all|crop|move|zoom)$/,I=/^data:/,A=/^data:image\/jpeg;base64,/,U=/^(?:img|canvas)$/i,P={viewMode:0,dragMode:M,aspectRatio:NaN,data:null,preview:"",responsive:!0,restore:!0,checkCrossOrigin:!0,checkOrientation:!0,modal:!0,guides:!0,center:!0,highlight:!0,background:!0,autoCrop:!0,autoCropArea:.8,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,wheelZoomRatio:.1,cropBoxMovable:!0,cropBoxResizable:!0,toggleDragModeOnDblclick:!0,minCanvasWidth:0,minCanvasHeight:0,minCropBoxWidth:0,minCropBoxHeight:0,minContainerWidth:200,minContainerHeight:100,ready:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},q=function(t,i){if(!(t instanceof i))throw new TypeError("Cannot call a class as a function")},$=function(){function t(t,i){for(var e=0;e<i.length;e++){var a=i[e];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}return function(i,e,a){return e&&t(i.prototype,e),a&&t(i,a),i}}(),Q=function(t){if(Array.isArray(t)){for(var i=0,e=Array(t.length);i<t.length;i++)e[i]=t[i];return e}return Array.from(t)},Z=Number.isNaN||t.isNaN;function F(t){return"number"==typeof t&&!Z(t)}function K(t){return void 0===t}function V(t){return"object"===(void 0===t?"undefined":j(t))&&null!==t}var G=Object.prototype.hasOwnProperty;function J(t){if(!V(t))return!1;try{var i=t.constructor,e=i.prototype;return i&&e&&G.call(e,"isPrototypeOf")}catch(t){return!1}}function _(t){return"function"==typeof t}function tt(t,i){if(t&&_(i))if(Array.isArray(t)||F(t.length)){var e=t.length,a=void 0;for(a=0;a<e&&!1!==i.call(t,t[a],a,t);a+=1);}else V(t)&&Object.keys(t).forEach(function(e){i.call(t,t[e],e,t)});return t}var it=Object.assign||function(t){for(var i=arguments.length,e=Array(i>1?i-1:0),a=1;a<i;a++)e[a-1]=arguments[a];return V(t)&&e.length>
38090&&e.forEach(function(i){V(i)&&Object.keys(i).forEach(function(e){t[e]=i[e]})}),t},et=/\.\d*(?:0|9){12}\d*$/i;function at(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e11;return et.test(t)?Math.round(t*i)/i:t}var nt=/^(?:width|height|left|top|marginLeft|marginTop)$/;function ot(t,i){var e=t.style;tt(i,function(t,i){nt.test(i)&&F(t)&&(t+="px"),e[i]=t})}function ht(t,i){if(i)if(F(t.length))tt(t,function(t){ht(t,i)});else if(t.classList)t.classList.add(i);else{var e=t.className.trim();e?e.indexOf(i)<0&&(t.className=e+" "+i):t.className=i}}function rt(t,i){i&&(F(t.length)?tt(t,function(t){rt(t,i)}):t.classList?t.classList.remove(i):t.className.indexOf(i)>=0&&(t.className=t.className.replace(i,"")))}function st(t,i,e){i&&(F(t.length)?tt(t,function(t){st(t,i,e)}):e?ht(t,i):rt(t,i))}var dt=/([a-z\d])([A-Z])/g;function ct(t){return t.replace(dt,"$1-$2").toLowerCase()}function lt(t,i){return V(t[i])?t[i]:t.dataset?t.dataset[i]:t.getAttribute("data-"+ct(i))}function pt(t,i,e){V(e)?t[i]=e:t.dataset?t.dataset[i]=e:t.setAttribute("data-"+ct(i),e)}function mt(t,i){if(V(t[i]))try{delete t[i]}catch(e){t[i]=void 0}else if(t.dataset)try{delete t.dataset[i]}catch(e){t.dataset[i]=void 0}else t.removeAttribute("data-"+ct(i))}var gt=/\s\s*/;function ut(t,i,e){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};tt(i.trim().split(gt),function(i){t.removeEventListener(i,e,a)})}function ft(t,i,e){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(a.once){var n=e;e=function(){for(var o=arguments.length,h=Array(o),r=0;r<o;r++)h[r]=arguments[r];return ut(t,i,e,a),n.apply(t,h)}}tt(i.trim().split(gt),function(i){t.addEventListener(i,e,a)})}function vt(t,i,e){var a=void 0;return _(Event)&&_(CustomEvent)?a=new CustomEvent(i,{detail:e,bubbles:!0,cancelable:!0}):(a=document.createEvent("CustomEvent")).initCustomEvent(i,!0,!0,e),t.dispatchEvent(a)}function wt(t){var i=t.getBoundingClientRect();return{left:i.left+(window.pageXOffset-document.documentElement.clientLeft),top:i.top+(window.pageYOffset-document.documentElement.clientTop)}}var xt=t.location,bt=/^(https?:)\/\/([^:/?#]+):?(\d*)/i;function yt(t){var i=t.match(bt);return i&&(i[1]!==xt.protocol||i[2]!==xt.hostname||i[3]!==xt.port)}function Mt(t){var i="timestamp="+(new Date).getTime();return t+(-1===t.indexOf("?")?"?":"&")+i}function Ct(t){var i=t.rotate,e=t.scaleX,a=t.scaleY,n=t.translateX,o=t.translateY,h=[];F(n)&&0!==n&&h.push("translateX("+n+"px)"),F(o)&&0!==o&&h.push("translateY("+o+"px)"),F(i)&&0!==i&&h.push("rotate("+i+"deg)"),F(e)&&1!==e&&h.push("scaleX("+e+")"),F(a)&&1!==a&&h.push("scaleY("+a+")");var r=h.length?h.join(" "):"none";return{WebkitTransform:r,msTransform:r,transform:r}}function Dt(t,i){var e=t.pageX,a=t.pageY,n={endX:e,endY:a};return i?n:it({startX:e,startY:a},n)}var Bt=Number.isFinite||t.isFinite;function kt(t){var i=t.aspectRatio,e=t.height,a=t.width,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"contain",o=function(t){return Bt(t)&&t>0};if(o(a)&&o(e)){var h=e*i;"contain"===n&&h>a||"cover"===n&&h<a?e=a/i:a=e*i}else o(a)?e=a/i:o(e)&&(a=e*i);return{width:a,height:e}}var Tt=String.fromCharCode;var Wt=/^data:.*,/;function Ht(t){var i=new DataView(t),e=void 0,a=void 0,n=void 0,o=void 0;if(255===i.getUint8(0)&&216===i.getUint8(1))for(var h=i.byteLength,r=2;r<h;){if(255===i.getUint8(r)&&225===i.getUint8(r+1)){n=r;break}r+=1}if(n){var s=n+10;if("Exif"===function(t,i,e){var a="",n=void 0;for(e+=i,n=i;n<e;n+=1)a+=Tt(t.getUint8(n));return a}(i,n+4,4)){var d=i.getUint16(s);if(((a=18761===d)||19789===d)&&42===i.getUint16(s+2,a)){var c=i.getUint32(s+4,a);c>=8&&(o=s+c)}}}if(o){var l=i.getUint16(o,a),p=void 0,m=void 0;for(m=0;m<l;m+=1)if(p=o+12*m+2,274===i.getUint16(p,a)){p+=8,e=i.getUint16(p,a),i.setUint16(p,1,a);break}}return e}var Nt={render:function(){this.initContainer(),this.initCanvas(),this.initCropBox(),this.renderCanvas(),this.cropped&&this.renderCropBox()},initContainer:function(){var t=this.element,i=this.options,e=this.container,a=this.cropper;ht(a,f),rt(t,f);var n={width:Math.max(e.offsetWidth,Number(i.minContainerWidth)||200),height:Math.max(e.offsetHeight,Number(i.minContainerHeight)||100)};this.containerData=n,ot(a,{width:n.width,height:n.height}),ht(t,f),rt(a,f)},initCanvas:function(){var t=this.containerData,i=this.imageData,e=this.options.viewMode,a=Math.abs(i.rotate)%180==90,n=a?i.naturalHeight:i.naturalWi
vendor: 14,394 bytes, line 3809
3809dth,o=a?i.naturalWidth:i.naturalHeight,h=n/o,r=t.width,s=t.height;t.height*h>t.width?3===e?r=t.height*h:s=t.width/h:3===e?s=t.width/h:r=t.height*h;var d={aspectRatio:h,naturalWidth:n,naturalHeight:o,width:r,height:s};d.left=(t.width-r)/2,d.top=(t.height-s)/2,d.oldLeft=d.left,d.oldTop=d.top,this.canvasData=d,this.limited=1===e||2===e,this.limitCanvas(!0,!0),this.initialImageData=it({},i),this.initialCanvasData=it({},d)},limitCanvas:function(t,i){var e=this.options,a=this.containerData,n=this.canvasData,o=this.cropBoxData,h=e.viewMode,r=n.aspectRatio,s=this.cropped&&o;if(t){var d=Number(e.minCanvasWidth)||0,c=Number(e.minCanvasHeight)||0;h>1?(d=Math.max(d,a.width),c=Math.max(c,a.height),3===h&&(c*r>d?d=c*r:c=d/r)):h>0&&(d?d=Math.max(d,s?o.width:0):c?c=Math.max(c,s?o.height:0):s&&(d=o.width,(c=o.height)*r>d?d=c*r:c=d/r));var l=kt({aspectRatio:r,width:d,height:c});d=l.width,c=l.height,n.minWidth=d,n.minHeight=c,n.maxWidth=1/0,n.maxHeight=1/0}if(i)if(h){var p=a.width-n.width,m=a.height-n.height;n.minLeft=Math.min(0,p),n.minTop=Math.min(0,m),n.maxLeft=Math.max(0,p),n.maxTop=Math.max(0,m),s&&this.limited&&(n.minLeft=Math.min(o.left,o.left+(o.width-n.width)),n.minTop=Math.min(o.top,o.top+(o.height-n.height)),n.maxLeft=o.left,n.maxTop=o.top,2===h&&(n.width>=a.width&&(n.minLeft=Math.min(0,p),n.maxLeft=Math.max(0,p)),n.height>=a.height&&(n.minTop=Math.min(0,m),n.maxTop=Math.max(0,m))))}else n.minLeft=-n.width,n.minTop=-n.height,n.maxLeft=a.width,n.maxTop=a.height},renderCanvas:function(t,i){var e=this.canvasData,a=this.imageData;if(i){var n=function(t){var i=t.width,e=t.height,a=t.degree;if(90==(a=Math.abs(a)%180))return{width:e,height:i};var n=a%90*Math.PI/180,o=Math.sin(n),h=Math.cos(n),r=i*h+e*o,s=i*o+e*h;return a>90?{width:s,height:r}:{width:r,height:s}}({width:a.naturalWidth*Math.abs(a.scaleX||1),height:a.naturalHeight*Math.abs(a.scaleY||1),degree:a.rotate||0}),o=n.width,h=n.height,r=e.width*(o/e.naturalWidth),s=e.height*(h/e.naturalHeight);e.left-=(r-e.width)/2,e.top-=(s-e.height)/2,e.width=r,e.height=s,e.aspectRatio=o/h,e.naturalWidth=o,e.naturalHeight=h,this.limitCanvas(!0,!1)}(e.width>e.maxWidth||e.width<e.minWidth)&&(e.left=e.oldLeft),(e.height>e.maxHeight||e.height<e.minHeight)&&(e.top=e.oldTop),e.width=Math.min(Math.max(e.width,e.minWidth),e.maxWidth),e.height=Math.min(Math.max(e.height,e.minHeight),e.maxHeight),this.limitCanvas(!1,!0),e.left=Math.min(Math.max(e.left,e.minLeft),e.maxLeft),e.top=Math.min(Math.max(e.top,e.minTop),e.maxTop),e.oldLeft=e.left,e.oldTop=e.top,ot(this.canvas,it({width:e.width,height:e.height},Ct({translateX:e.left,translateY:e.top}))),this.renderImage(t),this.cropped&&this.limited&&this.limitCropBox(!0,!0)},renderImage:function(t){var i=this.canvasData,e=this.imageData,a=e.naturalWidth*(i.width/i.naturalWidth),n=e.naturalHeight*(i.height/i.naturalHeight);it(e,{width:a,height:n,left:(i.width-a)/2,top:(i.height-n)/2}),ot(this.image,it({width:e.width,height:e.height},Ct(it({translateX:e.left,translateY:e.top},e)))),t&&this.output()},initCropBox:function(){var t=this.options,i=this.canvasData,e=t.aspectRatio,a=Number(t.autoCropArea)||.8,n={width:i.width,height:i.height};e&&(i.height*e>i.width?n.height=n.width/e:n.width=n.height*e),this.cropBoxData=n,this.limitCropBox(!0,!0),n.width=Math.min(Math.max(n.width,n.minWidth),n.maxWidth),n.height=Math.min(Math.max(n.height,n.minHeight),n.maxHeight),n.width=Math.max(n.minWidth,n.width*a),n.height=Math.max(n.minHeight,n.height*a),n.left=i.left+(i.width-n.width)/2,n.top=i.top+(i.height-n.height)/2,n.oldLeft=n.left,n.oldTop=n.top,this.initialCropBoxData=it({},n)},limitCropBox:function(t,i){var e=this.options,a=this.containerData,n=this.canvasData,o=this.cropBoxData,h=this.limited,r=e.aspectRatio;if(t){var s=Number(e.minCropBoxWidth)||0,d=Number(e.minCropBoxHeight)||0,c=Math.min(a.width,h?n.width:a.width),l=Math.min(a.height,h?n.height:a.height);s=Math.min(s,a.width),d=Math.min(d,a.height),r&&(s&&d?d*r>s?d=s/r:s=d*r:s?d=s/r:d&&(s=d*r),l*r>c?l=c/r:c=l*r),o.minWidth=Math.min(s,c),o.minHeight=Math.min(d,l),o.maxWidth=c,o.maxHeight=l}i&&(h?(o.minLeft=Math.max(0,n.left),o.minTop=Math.max(0,n.top),o.maxLeft=Math.min(a.width,n.left+n.width)-o.width,o.maxTop=Math.min(a.height,n.top+n.height)-o.height):(o.minLeft=0,o.minTop=0,o.maxLeft=a.width-o.width,o.maxTop=a.height-o.height))},renderCropBox:function(){var t=this.options,i=this.containerData,a=this.cropBoxData;(a.width>a.maxWidth||a.width<a.minWidth)&&(a.left=a.oldLeft),(a.height>a.maxHeight||a.height<a.minHeight)&&(a.top=a.oldTop),a.width=Math.min(Math.max(a.width,a.minWidth),a.maxWidth),a.height=Math.min(Math.max(a.height,a.minHeight),a.maxHeight),this.limitCropBox(!1,!0),a.left=Math.min(Math.max(a.left,a.minLeft),a.maxLeft),a.top=Math.min(Math.max(a.top,a.minTop),a.maxTop),a.oldLeft=a.left,a.oldTop=a.top,t.movable&&t.cropBoxMovable&&pt(this.face,b,a.width>=i.width&&a.height>=i.height?n:e),ot(this.cropBox,it({width:a.width,height:a.height},Ct({translateX:a.left,translateY:a.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),vt(this.element,B,this.getData())}},Et={initPreview:function(){var t=this.crossOrigin,i=this.options.preview,e=t?this.crossOriginUrl:this.url,a=document.createElement("img");if(t&&(a.crossOrigin=t),a.src=e,this.viewBox.appendChild(a),this.viewBoxImage=a,i){var n=i;"string"==typeof i?n=this.element.ownerDocument.querySelectorAll(i):i.querySelector&&(n=[i]),this.previews=n,tt(n,function(i){var a=document.createElement("img");pt(i,y,{width:i.offsetWidth,height:i.offsetHeight,html:i.innerHTML}),t&&(a.crossOrigin=t),a.src=e,a.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',i.innerHTML="",i.appendChild(a)})}},resetPreview:function(){tt(this.previews,function(t){var i=lt(t,y);ot(t,{width:i.width,height:i.height}),t.innerHTML=i.html,mt(t,y)})},preview:function(){var t=this.imageData,i=this.canvasData,e=this.cropBoxData,a=e.width,n=e.height,o=t.width,h=t.height,r=e.left-i.left-t.left,s=e.top-i.top-t.top;this.cropped&&!this.disabled&&(ot(this.viewBoxImage,it({width:o,height:h},Ct(it({translateX:-r,translateY:-s},t)))),tt(this.previews,function(i){var e=lt(i,y),d=e.width,c=e.height,l=d,p=c,m=1;a&&(p=n*(m=d/a)),n&&p>c&&(l=a*(m=c/n),p=c),ot(i,{width:l,height:p}),ot(i.getElementsByTagName("img")[0],it({width:o*m,height:h*m},Ct(it({translateX:-r*m,translateY:-s*m},t))))}))}},zt={bind:function(){var t=this.element,i=this.options,e=this.cropper;_(i.cropstart)&&ft(t,W,i.cropstart),_(i.cropmove)&&ft(t,T,i.cropmove),_(i.cropend)&&ft(t,k,i.cropend),_(i.crop)&&ft(t,B,i.crop),_(i.zoom)&&ft(t,R,i.zoom),ft(e,E,this.onCropStart=this.cropStart.bind(this)),i.zoomable&&i.zoomOnWheel&&ft(e,O,this.onWheel=this.wheel.bind(this)),i.toggleDragModeOnDblclick&&ft(e,H,this.onDblclick=this.dblclick.bind(this)),ft(t.ownerDocument,z,this.onCropMove=this.cropMove.bind(this)),ft(t.ownerDocument,L,this.onCropEnd=this.cropEnd.bind(this)),i.responsive&&ft(window,X,this.onResize=this.resize.bind(this))},unbind:function(){var t=this.element,i=this.options,e=this.cropper;_(i.cropstart)&&ut(t,W,i.cropstart),_(i.cropmove)&&ut(t,T,i.cropmove),_(i.cropend)&&ut(t,k,i.cropend),_(i.crop)&&ut(t,B,i.crop),_(i.zoom)&&ut(t,R,i.zoom),ut(e,E,this.onCropStart),i.zoomable&&i.zoomOnWheel&&ut(e,O,this.onWheel),i.toggleDragModeOnDblclick&&ut(e,H,this.onDblclick),ut(t.ownerDocument,z,this.onCropMove),ut(t.ownerDocument,L,this.onCropEnd),i.responsive&&ut(window,X,this.onResize)}},Lt={resize:function(){var t=this.options,i=this.container,e=this.containerData,a=Number(t.minContainerWidth)||200,n=Number(t.minContainerHeight)||100;if(!(this.disabled||e.width<=a||e.height<=n)){var o=i.offsetWidth/e.width;if(1!==o||i.offsetHeight!==e.height){var h=void 0,r=void 0;t.restore&&(h=this.getCanvasData(),r=this.getCropBoxData()),this.render(),t.restore&&(this.setCanvasData(tt(h,function(t,i){h[i]=t*o})),this.setCropBoxData(tt(r,function(t,i){r[i]=t*o})))}}},dblclick:function(){var t,i;this.disabled||this.options.dragMode===D||this.setDragMode((t=this.dragBox,i=g,(t.classList?t.classList.contains(i):t.className.indexOf(i)>-1)?C:M))},wheel:function(t){var i=this,e=Number(this.options.wheelZoomRatio)||.1,a=1;this.disabled||(t.preventDefault(),this.wheeling||(this.wheeling=!0,setTimeout(function(){i.wheeling=!1},50),t.deltaY?a=t.deltaY>0?1:-1:t.wheelDelta?a=-t.wheelDelta/120:t.detail&&(a=t.detail>0?1:-1),this.zoom(-a*e,t)))},cropStart:function(t){if(!this.disabled){var i=this.options,e=this.pointers,n=void 0;t.changedTouches?tt(t.changedTouches,function(t){e[t.identifier]=Dt(t)}):e[t.pointerId||0]=Dt(t),n=Object.keys(e).length>1&&i.zoomable&&i.zoomOnTouch?o:lt(t.target,b),S.test(n)&&!1!==vt(this.element,W,{originalEvent:t,action:n})&&(t.preventDefault(),this.action=n,this.cropping=!1,n===a&&(this.cropping=!0,ht(this.dragBox,w)))}},cropMove:function(t){var i=this.action;if(!this.disabled&&i){var e=this.pointers;t.preventDefault(),!1!==vt(this.element,T,{originalEvent:t,action:i})&&(t.changedTouches?tt(t.changedTouches,function(t){it(e[t.identifier],Dt(t,!0))}):it(e[t.pointerId||0],Dt(t,!0)),this.change(t))}},cropEnd:function(t){if(!this.disabled){var i=this.action,e=this.pointers;t.changedTouches?tt(t.changedTouches,function(t){delete e[t.identifier]}):delete e[t.pointerId||0],i&&(t.preventDefault(),Object.keys(e).length||(this.action=""),this.cropping&&(this.cropping=!1,st(this.dragBox,w,this.cropped&&this.options.modal)),vt(this.element,k,{originalEvent:t,action:i}))}}},Yt={change:function(t){var i=this.options,g=this.canvasData,u=this.containerData,v=this.cropBoxData,w=this.pointers,x=this.action,b=i.aspectRatio,y=v.left,M=v.top,C=v.width,D=v.height,B=y+C,k=M+D,T=0,W=0,H=u.width,N=u.height,E=!0,z=void 0;!b&&t.shiftKey&&(b=C&&D?C/D:1),this.limited&&(T=v.minLeft,W=v.minTop,H=T+Math.min(u.width,g.width,g.left+g.width),N=W+Math.min(u.height,g.height,g.top+g.height));var L,Y,X,O=w[Object.keys(w)[0]],R={x:O.endX-O.startX,y:O.endY-O.startY},S=function(t){switch(t){case h:B+R.x>H&&(R.x=H-B);break;case r:y+R.x<T&&(R.x=T-y);break;case d:M+R.y<W&&(R.y=W-M);break;case s:k+R.y>N&&(R.y=N-k)}};switch(x){case e:y+=R.x,M+=R.y;break;case h:if(R.x>=0&&(B>=H||b&&(M<=W||k>=N))){E=!1;break}S(h),C+=R.x,b&&(D=C/b,M-=R.x/b/2),C<0&&(x=r,C=0);break;case d:if(R.y<=0&&(M<=W||b&&(y<=T||B>=H))){E=!1;break}S(d),D-=R.y,M+=R.y,b&&(C=D*b,y+=R.y*b/2),D<0&&(x=s,D=0);break;case r:if(R.x<=0&&(y<=T||b&&(M<=W||k>=N))){E=!1;break}S(r),C-=R.x,y+=R.x,b&&(D=C/b,M+=R.x/b/2),C<0&&(x=h,C=0);break;case s:if(R.y>=0&&(k>=N||b&&(y<=T||B>=H))){E=!1;break}S(s),D+=R.y,b&&(C=D*b,y-=R.y*b/2),D<0&&(x=d,D=0);break;case c:if(b){if(R.y<=0&&(M<=W||B>=H)){E=!1;break}S(d),D-=R.y,M+=R.y,C=D*b}else S(d),S(h),R.x>=0?B<H?C+=R.x:R.y<=0&&M<=W&&(E=!1):C+=R.x,R.y<=0?M>W&&(D-=R.y,M+=R.y):(D-=R.y,M+=R.y);C<0&&D<0?(x=m,D=0,C=0):C<0?(x=l,C=0):D<0&&(x=p,D=0);break;case l:if(b){if(R.y<=0&&(M<=W||y<=T)){E=!1;break}S(d),D-=R.y,M+=R.y,C=D*b,y+=R.y*b}else S(d),S(r),R.x<=0?y>T?(C-=R.x,y+=R.x):R.y<=0&&M<=W&&(E=!1):(C-=R.x,y+=R.x),R.y<=0?M>W&&(D-=R.y,M+=R.y):(D-=R.y,M+=R.y);C<0&&D<0?(x=p,D=0,C=0):C<0?(x=c,C=0):D<0&&(x=m,D=0);break;case m:if(b){if(R.x<=0&&(y<=T||k>=N)){E=!1;break}S(r),C-=R.x,y+=R.x,D=C/b}else S(s),S(r),R.x<=0?y>T?(C-=R.x,y+=R.x):R.y>=0&&k>=N&&(E=!1):(C-=R.x,y+=R.x),R.y>=0?k<N&&(D+=R.y):D+=R.y;C<0&&D<0?(x=c,D=0,C=0):C<0?(x=p,C=0):D<0&&(x=l,D=0);break;case p:if(b){if(R.x>=0&&(B>=H||k>=N)){E=!1;break}S(h),D=(C+=R.x)/b}else S(s),S(h),R.x>=0?B<H?C+=R.x:R.y>=0&&k>=N&&(E=!1):C+=R.x,R.y>=0?k<N&&(D+=R.y):D+=R.y;C<0&&D<0?(x=l,D=0,C=0):C<0?(x=m,C=0):D<0&&(x=c,D=0);break;case n:this.move(R.x,R.y),E=!1;break;case o:this.zoom((Y=it({},L=w),X=[],tt(L,function(t,i){delete Y[i],tt(Y,function(i){var e=Math.abs(t.startX-i.startX),a=Math.abs(t.startY-i.startY),n=Math.abs(t.endX-i.endX),o=Math.abs(t.endY-i.endY),h=Math.sqrt(e*e+a*a),r=(Math.sqrt(n*n+o*o)-h)/h;X.push(r)})}),X.sort(function(t,i){return Math.abs(t)<Math.abs(i)}),X[0]),t),E=!1;break;case a:if(!R.x||!R.y){E=!1;break}z=wt(this.cropper),y=O.startX-z.left,M=O.startY-z.top,C=v.minWidth,D=v.minHeight,R.x>0?x=R.y>0?p:c:R.x<0&&(y-=C,x=R.y>0?m:l),R.y<0&&(M-=D),this.cropped||(rt(this.cropBox,f),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0))}E&&(v.width=C,v.height=D,v.left=y,v.top=M,this.action=x,this.renderCropBox()),tt(w,function(t){t.startX=t.endX,t.startY=t.endY})}},Xt={crop:function(){return!this.ready||this.cropped||this.disabled||(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&ht(this.dragBox,w),rt(this.cropBox,f),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=it({},this.initialImageData),this.canvasData=it({},this.initialCanvasData),this.cropBoxData=it({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(it(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),rt(this.dragBox,w),ht(this.cropBox,f)),this},replace:function(t){var i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!this.disabled&&t&&(this.isImg&&(this.element.src=t),i?(this.url=t,this.image.src=t,this.ready&&(this.viewBoxImage.src=t,tt(this.previews,function(i){i.getElementsByTagName("img")[0].src=t}))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(t))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,rt(this.cropper,u)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,ht(this.cropper,u)),this},destroy:function(){var t=this.element;return lt(t,i)?(this.isImg&&this.replaced&&(t.src=this.originalUrl),this.uncreate(),mt(t,i),this):this},move:function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,e=this.canvasData,a=e.left,n=e.top;return this.moveTo(K(t)?t:a+Number(t),K(i)?i:n+Number(i))},moveTo:function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,e=this.canvasData,a=!1;return t=Number(t),i=Number(i),this.ready&&!this.disabled&&this.options.movable&&(F(t)&&(e.left=t,a=!0),F(i)&&(e.top=i,a=!0),a&&this.renderCanvas(!0)),this},zoom:function(t,i){var e=this.canvasData;return t=(t=Number(t))<0?1/(1-t):1+t,this.zoomTo(e.width*t/e.naturalWi
3809dth,null,i)},zoomTo:function(t,i,e){var a,n,o,h=this.options,r=this.canvasData,s=r.width,d=r.height,c=r.naturalWidth,l=r.naturalHeight;if((t=Number(t))>=0&&this.ready&&!this.disabled&&h.zoomable){var p=c*t,m=l*t;if(!1===vt(this.element,R,{originalEvent:e,oldRatio:s/c,ratio:p/c}))return this;if(e){var g=this.pointers,u=wt(this.cropper),f=g&&Object.keys(g).length?(a=0,n=0,o=0,tt(g,function(t){var i=t.startX,e=t.startY;a+=i,n+=e,o+=1}),{pageX:a/=o,pageY:n/=o}):{pageX:e.pageX,pageY:e.pageY};r.left-=(p-s)*((f.pageX-u.left-r.left)/s),r.top-=(m-d)*((f.pageY-u.top-r.top)/d)}else J(i)&&F(i.x)&&F(i.y)?(r.left-=(p-s)*((i.x-r.left)/s),r.top-=(m-d)*((i.y-r.top)/d)):(r.left-=(p-s)/2,r.top-=(m-d)/2);r.width=p,r.height=m,this.renderCanvas(!0)}return this},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t))},rotateTo:function(t){return F(t=Number(t))&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=t%360,this.renderCanvas(!0,!0)),this},scaleX:function(t){var i=this.imageData.scaleY;return this.scale(t,F(i)?i:1)},scaleY:function(t){var i=this.imageData.scaleX;return this.scale(F(i)?i:1,t)},scale:function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,e=this.imageData,a=!1;return t=Number(t),i=Number(i),this.ready&&!this.disabled&&this.options.scalable&&(F(t)&&(e.scaleX=t,a=!0),F(i)&&(e.scaleY=i,a=!0),a&&this.renderCanvas(!0,!0)),this},getData:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=this.options,e=this.imageData,a=this.canvasData,n=this.cropBoxData,o=void 0;if(this.ready&&this.cropped){o={x:n.left-a.left,y:n.top-a.top,width:n.width,height:n.height};var h=e.width/e.naturalWidth;tt(o,function(i,e){i/=h,o[e]=t?Math.round(i):i})}else o={x:0,y:0,width:0,height:0};return i.rotatable&&(o.rotate=e.rotate||0),i.scalable&&(o.scaleX=e.scaleX||1,o.scaleY=e.scaleY||1),o},setData:function(t){var i=this.options,e=this.imageData,a=this.canvasData,n={};if(this.ready&&!this.disabled&&J(t)){var o=!1;i.rotatable&&F(t.rotate)&&t.rotate!==e.rotate&&(e.rotate=t.rotate,o=!0),i.scalable&&(F(t.scaleX)&&t.scaleX!==e.scaleX&&(e.scaleX=t.scaleX,o=!0),F(t.scaleY)&&t.scaleY!==e.scaleY&&(e.scaleY=t.
vendor: 5,430 bytes, line 3809
3809scaleY,o=!0)),o&&this.renderCanvas(!0,!0);var h=e.width/e.naturalWidth;F(t.x)&&(n.left=t.x*h+a.left),F(t.y)&&(n.top=t.y*h+a.top),F(t.width)&&(n.width=t.width*h),F(t.height)&&(n.height=t.height*h),this.setCropBoxData(n)}return this},getContainerData:function(){return this.ready?it({},this.containerData):{}},getImageData:function(){return this.sized?it({},this.imageData):{}},getCanvasData:function(){var t=this.canvasData,i={};return this.ready&&tt(["left","top","width","height","naturalWidth","naturalHeight"],function(e){i[e]=t[e]}),i},setCanvasData:function(t){var i=this.canvasData,e=i.aspectRatio;return this.ready&&!this.disabled&&J(t)&&(F(t.left)&&(i.left=t.left),F(t.top)&&(i.top=t.top),F(t.width)?(i.width=t.width,i.height=t.width/e):F(t.height)&&(i.height=t.height,i.width=t.height*e),this.renderCanvas(!0)),this},getCropBoxData:function(){var t=this.cropBoxData,i=void 0;return this.ready&&this.cropped&&(i={left:t.left,top:t.top,width:t.width,height:t.height}),i||{}},setCropBoxData:function(t){var i=this.cropBoxData,e=this.options.aspectRatio,a=void 0,n=void 0;return this.ready&&this.cropped&&!this.disabled&&J(t)&&(F(t.left)&&(i.left=t.left),F(t.top)&&(i.top=t.top),F(t.width)&&t.width!==i.width&&(a=!0,i.width=t.width),F(t.height)&&t.height!==i.height&&(n=!0,i.height=t.height),e&&(a?i.height=i.width/e:n&&(i.width=i.height*e)),this.renderCropBox()),this},getCroppedCanvas:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var i,e,a,n,o,h,r,s,d,c,l,p,m,g,u,f,v,w,x,b,y,M,C,D,B,k,T,W,H,N,E,z,L,Y,X,O,R,S,I=this.canvasData,A=(i=this.image,e=this.imageData,a=I,n=t,o=e.naturalWidth,h=e.naturalHeight,r=e.rotate,s=void 0===r?0:r,d=e.scaleX,c=void 0===d?1:d,l=e.scaleY,p=void 0===l?1:l,m=a.aspectRatio,g=a.naturalWidth,u=a.naturalHeight,f=n.fillColor,v=void 0===f?"transparent":f,w=n.imageSmoothingEnabled,x=void 0===w||w,b=n.imageSmoothingQuality,y=void 0===b?"low":b,M=n.maxWidth,C=void 0===M?1/0:M,D=n.maxHeight,B=void 0===D?1/0:D,k=n.minWidth,T=void 0===k?0:k,W=n.minHeight,H=void 0===W?0:W,N=document.createElement("canvas"),E=N.getContext("2d"),z=kt({aspectRatio:m,width:C,height:B}),L=kt({aspectRatio:m,width:T,height:H},"cover"),Y=Math.min(z.width,Math.max(L.width,g)),X=Math.min(z.height,Math.max(L.height,u)),O=Math.min(z.width,Math.max(L.width,o)),R=Math.min(z.height,Math.max(L.height,h)),S=[-O/2,-R/2,O,R],N.width=at(Y),N.height=at(X),E.fillStyle=v,E.fillRect(0,0,Y,X),E.save(),E.translate(Y/2,X/2),E.rotate(s*Math.PI/180),E.scale(c,p),E.imageSmoothingEnabled=x,E.imageSmoothingQuality=y,E.drawImage.apply(E,[i].concat(Q(S.map(function(t){return Math.floor(at(t))})))),E.restore(),N);if(!this.cropped)return A;var U=this.getData(),P=U.x,j=U.y,q=U.width,$=U.height,Z=A.width/Math.floor(I.naturalWidth);1!==Z&&(P*=Z,j*=Z,q*=Z,$*=Z);var F=q/$,K=kt({aspectRatio:F,width:t.maxWidth||1/0,height:t.maxHeight||1/0}),V=kt({aspectRatio:F,width:t.minWidth||0,height:t.minHeight||0},"cover"),G=kt({aspectRatio:F,width:t.width||(1!==Z?A.width:q),height:t.height||(1!==Z?A.height:$)}),J=G.width,_=G.height;J=Math.min(K.width,Math.max(V.width,J)),_=Math.min(K.height,Math.max(V.height,_));var tt=document.createElement("canvas"),it=tt.getContext("2d");tt.width=at(J),tt.height=at(_),it.fillStyle=t.fillColor||"transparent",it.fillRect(0,0,J,_);var et=t.imageSmoothingEnabled,nt=void 0===et||et,ot=t.imageSmoothingQuality;it.imageSmoothingEnabled=nt,ot&&(it.imageSmoothingQuality=ot);var ht=A.width,rt=A.height,st=P,dt=j,ct=void 0,lt=void 0,pt=void 0,mt=void 0,gt=void 0,ut=void 0;st<=-q||st>ht?(st=0,ct=0,pt=0,gt=0):st<=0?(pt=-st,st=0,gt=ct=Math.min(ht,q+st)):st<=ht&&(pt=0,gt=ct=Math.min(q,ht-st)),ct<=0||dt<=-$||dt>rt?(dt=0,lt=0,mt=0,ut=0):dt<=0?(mt=-dt,dt=0,ut=lt=Math.min(rt,$+dt)):dt<=rt&&(mt=0,ut=lt=Math.min($,rt-dt));var ft=[st,dt,ct,lt];if(gt>0&&ut>0){var vt=J/q;ft.push(pt*vt,mt*vt,gt*vt,ut*vt)}return it.drawImage.apply(it,[A].concat(Q(ft.map(function(t){return Math.floor(at(t))})))),tt},setAspectRatio:function(t){var i=this.options;return this.disabled||K(t)||(i.aspectRatio=Math.max(0,t)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(t){var i=this.options,e=this.dragBox,a=this.face;if(this.ready&&!this.disabled){var n=t===M,o=i.movable&&t===C;t=n||o?t:D,i.dragMode=t,pt(e,b,t),st(e,g,n),st(e,x,o),i.cropBoxMovable||(pt(a,b,t),st(a,g,n),st(a,x,o))}return this}},Ot=t.Cropper,Rt=function(){function a(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(q(this,a),!t||!U.test(t.tagName))throw new Error("The first argument is required and must be an <img> or <canvas> element.");this.element=t,this.options=it({},P,J(i)&&i),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}return $(a,[{key:"init",value:function(){var t=this.element,e=t.tagName.toLowerCase(),a=void 0;if(!lt(t,i)){if(pt(t,i,this),"img"===e){if(this.isImg=!0,a=t.getAttribute("src")||"",this.originalUrl=a,!a)return;a=t.src}else"canvas"===e&&window.HTMLCanvasElement&&(a=t.toDataURL());this.load(a)}}},{key:"load",value:function(t){var i=this;if(t){this.url=t,this.imageData={};var e=this.element,a=this.options;if(a.checkOrientation&&window.ArrayBuffer)if(I.test(t))A.test(t)?this.read((n=t.replace(Wt,""),o=atob(n),h=new ArrayBuffer(o.length),tt(r=new Uint8Array(h),function(t,i){r[i]=o.charCo
3809deAt(i)}),h)):this.clone();else{var n,o,h,r,s=new XMLHttpRequest;this.reloading=!0,this.xhr=s;var d=function(){i.reloading=!1,i.xhr=null};s.ontimeout=d,s.onabort=d,s.onerror=function(){d(),i.clone()},s.onload=function(){d(),i.read(s.response)},a.checkCrossOrigin&&yt(t)&&e.crossOrigin&&(t=Mt(t)),s.open("get",t),s.responseType="arraybuffer",s.withCredentials="use-credentials"===e.crossOrigin,s.send()}else this.clone()}}},{key:"read",value:function(t){var i,e,a,n=this.options,o=this.imageData,h=Ht(t),r=0,s=1,d=1;if(h>1){this.url=(i="image/jpeg",e=new Uint8Array(t),a="",tt(e,function(t){a+=Tt(t)}),"data:"+i+";base64,"+btoa(a));var c=function(t){var i=0,e=1,a=1;switch(t){case 2:e=-1;break;case 3:i=-180;break;case 4:a=-1;break;case 5:i=90,a=-1;break;case 6:i=90;break;case 7:i=90,e=-1;break;case 8:i=-90}return{rotate:i,scaleX:e,scaleY:a}}(h);r=c.rotate,s=c.scaleX,d=c.scaleY}n.rotatable&&(o.rotate=r),n.scalable&&(o.scaleX=s,o.scaleY=d),this.clone()}},{key:"clone",value:function(){var t=this.element,i=this.url,e=void 0,a=void 0;this.options.checkCrossOrigin&&yt(i)&&((e=t.crossOrigin)?a=i:(e="anonymous",a=Mt(i))),this.crossOrigin=e,this.crossOriginUrl=a;var n=document.createElement("img");e&&(n.crossOrigin=e),n.src=a||i;var o=this.start.bind(this),h=this.stop.bind(this);this.image=n,this.onStart=o,this.onStop=h,this.isImg?t.complete?this.timeout=setTimeout(o,0):ft(t,N,o,{once:!0}):(n.onload=o,n.onerror=h,ht(n,v),t.parentNode.insertBefore(n,t.nextSibling))}},{key:"start",value:function(i){var e=this,a=this.isImg?this.element:this.image;i&&(a.onload=null,a.onerror=null),this.sizing=!0;var n=t.navigator&&/(Macintosh|iPhone|iPod|iPad).*AppleWebKit/i.test(t.navigator.userAgent),o=function(t,i){it(e.imageData,{naturalWidth:t,naturalHeight:i,aspectRatio:t/i}),e.sizing=!1,e.sized=!0,e.build()};if(!a.naturalWidth||n){var h=document.createElement("img"),r=document.body||document.documentElement;this.sizingImage=h,h.onload=function(){o(h.width,h.height),n||r.removeChild(h)},h.src=a.src,n||(h.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",r.appendChild(h))}else o(a.naturalWidth,a.naturalHeight)}},{key:"stop",value:function(){var t=this.image;t.onload=null,t.onerror=null,t.parentNode.removeChild(t),this.image=null}},{key:"build",value:function(){if(this.sized&&!this.ready){var t=this.element,a=this.options,n=this.image,o=t.parentNode,h=document.createElement("div");h.innerHTML='<div class="cropper-container" touch-action="none"><div class="cropper-wrap-box"><div class="cropper-canvas"></div></div><div class="cropper-drag-box"></div><div class="cropper-crop-box"><span class="cropper-view-box"></span><span class="cropper-dashed dashed-h"></span><span class="cropper-dashed dashed-v"></span><span class="cropper-center"></span><span class="cropper-face"></span><span class="cropper-line line-e" data-action="e"></span><span class="cropper-line line-n" data-action="n"></span><span class="cropper-line line-w" data-action="w"></span><span class="cropper-line line-s" data-action="s"></span><span class="cropper-point point-e" data-action="e"></span><span class="cropper-point point-n" data-action="n"></span><span class="cropper-point point-w" data-action="w"></span><span class="cropper-point point-s" data-action="s"></span><span class="cropper-point point-ne" data-action="ne"></span><span class="cropper-point point-nw" data-action="nw"></span><span class="cropper-point point-sw" data-action="sw"></span><span class="cropper-point point-se" data-action="se"></span></div></div>';var r=h.querySelector("."+i+"-container"),s=r.querySelector("."+i+"-canvas"),d=r.querySelector("."+i+"-drag-box"),c=r.querySelector("."+i+"-crop-box"),l=c.querySelector("."+i+"-face");this.container=o,this.cropper=r,this.canvas=s,this.dragBox=d,this.cropBox=c,this.viewBox=r.querySelector("."+i+"-view-box"),this.face=l,s.appendChild(n),ht(t,f),o.insertBefore(r,t.nextSibling),this.isImg||rt(n,v),this.initPreview(),this.bind(),a.aspectRatio=Math.max(0,a.aspectRatio)||NaN,a.viewMode=Math.max(0,Math.min(3,Math.round(a.viewMode)))||0,ht(c,f),a.guides||ht(c.getElementsByClassName(i+"-dashed"),f),a.center||ht(c.getElementsByClassName(i+"-center"),f),a.background&&ht(r,i+"-bg"),a.highlight||ht(l,"cropper-invisible"),a.cropBoxMovable&&(ht(l,x),pt(l,b,e)),a.cropBoxResizable||(ht(c.getElementsByClassName(i+"-line"),f),ht(c.getElementsByClassName(i+"-point"),f)),this.render(),this.ready=!0,this.setDragMode(a.dragMode),a.autoCrop&&this.crop(),this.setData(a.data),_(a.ready)&&ft(t,Y,a.ready,{once:!0}),vt(t,Y)}}},{key:"unbuild",value:function(){this.ready&&(this.ready=!1,this.unbind(),this.resetPreview(),this.cropper.parentNode.removeChild(this.cropper),rt(this.element,f))}},{key:"uncreate",value:function(){var t=this.element;this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?this.xhr.abort():this.isImg?t.complete?clearTimeout(this.timeout):ut(t,N,this.onStart):this.image&&this.stop()}}],[{key:"noConflict",value:function(){return window.Cropper=Ot,a}},{key:"setDefaults",value:function(t){it(P,J(t)&&t)}}]),a}();return it(Rt.prototype,Nt,Et,zt,Lt,Yt,Xt),Rt}); 3810/* 3811 By André Rinas, www.andrerinas.de 3812 Available for use under the MIT License 3813 1.13.0 3814*/ 3815!function(X,N,Y,t){"use strict";X.fn.simpleLightbox=function(d){d=X.extend({sourceAttr:"href",overlay:!0,spinner:!0,nav:!0,navText:["‹","›"],captions:!0,captionDelay:0,captionSelector:"img",captionType:"attr",captionsData:"title",captionPosition:"bottom",captionClass:"",close:!0,closeText:"Ã",swipeClose:!0,showCounter:!0,fileExt:"png|jpg|jpeg|gif",animationSlide:!0,animationSpeed:250,preloading:!0,enableKeyboard:!0,loop:!0,rel:!1,docClose:!0,swipeTolerance:50,className:"simple-lightbox",widthRatio:.8,heightRatio:.9,scaleImageToRatio:!1,disableRightClick:!1,disableScroll:!0,alertError:!0,alertErrorMessage:"Image not found, next image will be loaded",additionalHtml:!1,history:!0},d),N.navigator.pointerEnabled||N.navigator.msPointerEnabled;var p,t,l=0,r=0,h=X(),n=function(){var t=Y.body||Y.documentElement;return""===(t=t.style).WebkitTransition?"-webkit-":""===t.MozTransition?"-moz-":""===t.OTransition?"-o-":""===t.transition&&""},g=!1,u=[],f=d.rel&&!1!==d.rel?(t=d.rel,X(this).filter(function(){return X(this).attr("rel")===t})):this,m=(n=n(),0),v=!1!==n,i="pushState"in history,x=!1,a=N.location,c=function(){return a.hash.substring(1)},b=c(),y=function(){c();var t="pid="+(S+1),e=a.href.split("#")[0]+"#"+t;i?history[x?"replaceState":"pushState"]("",Y.title,e):x?a.replace(e):a.hash=t,x=!0},w="simplelb",e=X("<div>").addClass("sl-overlay"),o=X("<button>").addClass("sl-close").html(d.closeText),E=X("<div>").addClass("sl-spinner").html("<div></div>"),T=X("<div>").addClass("sl-navigation").html('<button class="sl-prev">'+d.navText[0]+'</button><button class="sl-next">'+d.navText[1]+"</button>"),s=X("<div>").addClass("sl-counter").html('<span class="sl-current"></span>/<span class="sl-total"></span>'),C=!1,S=0,k=X("<div>").addClass("sl-caption "+d.captionClass+" pos-"+d.captionPosition),I=X("<div>").addClass("sl-image"),q=X("<div>").addClass("sl-wrapper").addClass(d.className),D=function(t){t.trigger(X.Event("show.simplelightbox")),d.disableScroll&&(m=W("hide")),q.appendTo("body"),I.appendTo(q),d.overlay&&e.a
3815ppendTo(X("body")),C=!0,S=f.index(t),h=X("<img/>").hide().attr("src",t.attr(d.sourceAttr)),-1==u.indexOf(t.attr(d.sourceAttr))&&u.push(t.attr(d.sourceAttr)),I.html("").attr("style",""),h.appendTo(I),O(),e.fadeIn("fast"),X(".sl-close").fadeIn("fast"),E.show(),T.fadeIn("fast"),X(".sl-wrapper .sl-counter .sl-current").text(S+1),s.fadeIn("fast"),M(),d.preloading&&P(),setTimeout(function(){t.trigger(X.Event("shown.simplelightbox"))},d.animationSpeed)},M=function(s){if(h.length){var l=new Image,r=X(N).width()*d.widthRatio,c=X(N).height()*d.heightRatio;l.src=h.attr("src"),X(l).on("error",function(t){f.eq(S).trigger(X.Event("error.simplelightbox")),g=!(C=!1),E.hide(),d.alertError&&alert(d.alertErrorMessage),z(1==s||-1==s?s:1)}),l.onload=function(){void 0!==s&&f.eq(S).trigger(X.Event("changed.simplelightbox")).trigger(X.Event((1===s?"nextDone":"prevDone")+".simplelightbox")),d.history&&(x?p=setTimeout(y,800):y()),-1==u.indexOf(h.attr("src"))&&u.push(h.attr("src"));var t=l.width,e=l.height;if(d.scaleImageToRatio||r<t||c<e){var i=r/c<t/e?t/r:e/c;t/=i,e/=i}X(".sl-image").css({top:(X(N).height()-e)/2+"px",left:(X(N).width()-t-m)/2+"px"}),E.hide(),h.css({width:t+"px",height:e+"px"}).fadeIn("fast"),g=!0;var n,a="self"==d.captionSelector?f.eq(S):f.eq(S).find(d.captionSelector);if(n="data"==d.captionType?a.data(d.captionsData):"text"==d.captionType?a.html():a.prop(d.captionsData),d.loop||(0===S&&X(".sl-prev").hide(),S>=f.length-1&&X(".sl-next").hide(),0<S&&X(".sl-prev").show(),S<f.length-1&&X(".sl-next").show()),1==f.length&&X(".sl-prev, .sl-next").hide(),1==s||-1==s){var o={opacity:1};d.animationSlide&&(v?(A(0,100*s+"px"),setTimeout(function(){A(d.animationSpeed/1e3,"0px")},50)):o.left=parseInt(X(".sl-image").css("left"))+100*s+"px"),X(".sl-image").animate(o,d.animationSpeed,function(){C=!1,R(n)})}else C=!1,R(n);d.additionalHtml&&0===X(".sl-additional-html").length&&X("<div>").html(d.additionalHtml).addClass("sl-additional-html").appendTo(X(".sl-image"))}}},R=function(t){""!==t&&void 0!==t&&d.captions&&k.html(t).hide().appendTo(X(".sl-image")).delay(d.captionDelay).fadeIn("fast")},A=function(t,e){var i={};i[n+"transform"]="translateX("+e+")",i[n+"transition"]=n+"transform "+t+"s linear",X(".sl-image").css(i)},O=function(){X(N).on("resize."+w,M),X(Y).on("click."+w+" touchstart."+w,".sl-close",function(t){t.preventDefault(),g&&L()}),d.history&&setTimeout(function(){X(N).on("hashchange."+w,function(){g&&c()===b&&L()})},40),T.on("click."+w,"button",function(t){t.preventDefault(),l=0,z(X(this).hasClass("sl-next")?1:-1)});var e=0,i=0,n=0,a=0,o=!1,s=0;I.on("touchstart."+w+" mousedown."+w,function(t){return!!o||(v&&(s=parseInt(I.css("left"))),o=!0,r=l=0,e=t.originalEvent.pageX||t.originalEvent.touches[0].pageX,n=t.originalEvent.pageY||t.originalEvent.touches[0].pageY,!1)}).on("touchmove."+w+" mousemove."+w+" pointermove MSPointerMove",function(t){if(!o)return!0;t.preventDefault(),i=t.originalEvent.pageX||t.originalEvent.touches[0].pageX,a=t.originalEvent.pageY||t.originalEvent.touches[0].pageY,l=e-i,r=n-a,d.animationSlide&&(v?A(0,-l+"px"):I.css("left",s-l+"px"))}).on("touchend."+w+" mouseup."+w+" touchcancel."+w+" mouseleave."+w+" pointerup pointercancel MSPointerUp MSPointerCancel",function(t){if(o){var e=!(o=!1);d.loop||(0===S&&l<0&&(e=!1),S>=f.length-1&&0<l&&(e=!1)),Math.abs(l)>d.swipeTolerance&&e?z(0<l?1:-1):d.animationSlide&&(v?A(d.animationSpeed/1e3,"0px"):I.animate({left:s+"px"},d.animationSpeed/2)),d.swipeClose&&50<Math.abs(r)&&Math.abs(l)<d.swipeTolerance&&L()}})},P=function(){var t=S+1<0?f.length-1:S+1>=f.length-1?0:S+1,e=S-1<0?f.length-1:S-1>=f.length-1?0:S-1;X("<img />").attr("src",f.eq(t).attr(d.sourceAttr)).on("load",function(){-1==u.indexOf(X(this).attr("src"))&&u.push(X(this).attr("src")),f.eq(S).trigger(X.Event("nextImageLoaded.simplelightbox"))}),X("<img />").attr("src",f.eq(e).attr(d.sourceAttr)).on("load",function(){-1==u.indexOf(X(this).attr("src"))&&u.push(X(this).attr("src")),f.eq(S).trigger(X.Event("prevImageLoaded.simplelightbox"))})},z=function(e){f.eq(S).trigger(X.Event("change.simplelightbox")).trigger(X.Event((1===e?"next":"prev")+".simplelightbox"));var t=S+e;if(!(C||(t<0||t>=f.length)&&!1===d.loop)){S=t<0?f.length-1:t>f.length-1?0:t,X(".sl-wrapper .sl-counter .sl-current").text(S+1);var i={opacity:0}
3815;d.animationSlide&&(v?A(d.animationSpeed/1e3,-100*e-l+"px"):i.left=parseInt(X(".sl-image").css("left"))+-100*e+"px"),X(".sl-image").animate(i,d.animationSpeed,function(){setTimeout(function(){var t=f.eq(S);h.attr("src",t.attr(d.sourceAttr)),-1==u.indexOf(t.attr(d.sourceAttr))&&E.show(),X(".sl-caption").remove(),M(e),d.preloading&&P()},100)})}},L=function(){if(!C){var t=f.eq(S),e=!1;t.trigger(X.Event("close.simplelightbox")),d.history&&(i?history.pushState("",Y.title,a.pathname+a.search):a.hash="",clearTimeout(p)),X(".sl-image img, .sl-overlay, .sl-close, .sl-navigation, .sl-image .sl-caption, .sl-counter").fadeOut("fast",function(){d.disableScroll&&W("show"),X(".sl-wrapper, .sl-overlay").remove(),T.off("click","button"),X(Y).off("click."+w,".sl-close"),X(N).off("resize."+w),X(N).off("hashchange."+w),e||t.trigger(X.Event("closed.simplelightbox")),e=!0}),h=X(),C=g=!1}},W=function(t){var e=0;if("hide"==t){var i=N.innerWidth;if(!i){var n=Y.documentElement.getBoundingClientRect();i=n.right-Math.abs(n.left)}if(Y.body.clientWidth<i){var a=Y.createElement("div"),o=parseInt(X("body").css("padding-right"),10);a.className="sl-scrollbar-measure",X("body").append(a),e=a.offsetWidth-a.clientWidth,X(Y.body)[0].removeChild(a),X("body").data("padding",o),0<e&&X("body").addClass("hidden-scroll").css({"padding-right":o+e})}}else X("body").removeClass("hidden-scroll").css({"padding-right":X("body").data("padding")});return e};return d.close&&o.appendTo(q),d.showCounter&&1<f.length&&(s.appendTo(q),s.find(".sl-total").text(f.length)),d.nav&&T.appendTo(q),d.spinner&&E.appendTo(q),f.on("click."+w,function(t){if(function(t){if(!d.fileExt)return!0;var e=X(t).attr(d.sourceAttr).match(/\.([0-9a-z]+)(?=[?#])|(\.)(?:[\w]+)$/gim);return e&&"a"==X(t).prop("tagName").toLowerCase()&&new RegExp(".("+d.fileExt+")$","i").test(e)}(this)){if(t.preventDefault(),C)return!1;D(X(this))}}),X(Y).on("click."+w+" touchstart."+w,function(t){g&&d.docClose&&0===X(t.target).closest(".sl-image").length&&0===X(t.target).closest(".sl-navigation").length&&L()}),d.disableRightClick&&X(Y).on("contextmenu",".sl-image img",function(t){return!1}),d.enableKeyboard&&X(Y).on("keyup."+w,function(t){if(l=0,g){t.preventDefault();var e=t.keyCode;27==e&&L(),37!=e&&39!=t.keyCode||z(39==t.keyCode?1:-1)}}),this.open=function(t){t=t||X(this[0]),D(t)},this.next=function(){z(1)},this.prev=function(){z(-1)},this.close=function(){L()},this.destroy=function(){X(Y).off("click."+w).off("keyup."+w),L(),X(".sl-overlay, .sl-wrapper").remove(),this.off("click")},this.refresh=function(){this.destroy(),X(this).simpleLightbox(d)},this}}(jQuery,window,document); 3816
vendor: 53,294 bytes, lines 3817-3820
3817/*! EmojioneArea v3.4.1 | MIT license */ 3818window="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},document=window.document||{},function(a,b){"function"==typeof require&&"object"==typeof exports&&"object"==typeof module?a(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],a):a(b.jQuery)}(function(a){"use strict";var b=0,c={},d={},e=window.emojione,f=[];function g(a){e?a():f.push(a)}var h="data:image/gif;base64,R0lGODlhAQABAJH/AP///wAAAMDAwAAAACH5BAEAAAIALAAAAAABAAEAAAICVAEAOw==",i=[].slice,j="emojionearea",k=0,l="​";function m(b,d,e){var f=!0,g=1;if(d){d=d.toLowerCase();do{var h=1==g?"@"+d:d;c[b.id][h]&&c[b.id][h].length&&a.each(c[b.id][h],function(a,c){return f=c.apply(b,e||[])!==!1})}while(f&&g--)}return f}function n(b,c,e,f){f=f||function(b,c){return a(c.currentTarget)},a.each(e,function(g,h){g=a.isArray(e)?h:g,(d[b.id][h]||(d[b.id][h]=[])).push([c,g,f])})}function o(a,b,c){var d=e.imageType,f;f="svg"==d?e.imagePathSVG:e.imagePathPNG;var g="";c&&(g=c.substr(1,c.length-2).replace(/_/g," ").replace(/\w\S*/g,function(a){return a.charAt(0).toUpperCase()+a.substr(1).toLowerCase()}));var h="";return b.uc_base&&k>4?(h=b.uc_base,b=b.uc_output.toUpperCase()):h=b,a.replace("{name}",c||"").replace("{friendlyName}",g).replace("{img}",f+(k<2?h.toUpperCase():h)+"."+d).replace("{uni}",b).replace("{alt}",e.convert(b))}function p(a,b,c){return a.replace(/:?\+?[\w_\-]+:?/g,function(a){a=":"+a.replace(/:$/,"").replace(/^:/,"")+":";var d=e.emojioneList[a];return d?k>4?o(b,d,a):(k>3&&(d=d.unicode),o(b,d[d.length-1],a)):c?"":a})}function q(a){var b,c;if(window.getSelection){if(b=window.getSelection(),b.getRangeAt&&b.rangeCount){c=b.getRangeAt(0),c.deleteContents();var d=document.createElement("div");d.innerHTML=a;var e=document.createDocumentFragment(),f,g;while(f=d.firstChild)g=e.appendChild(f);c.insertNode(e),g&&(c=c.cloneRange(),c.setStartAfter(g),c.collapse(!0),b.removeAllRanges(),b.addRange(c))}}else document.selection&&"Control"!=document.selection.type&&document.selection.createRange().pasteHTML(a)}function r(){return window.emojioneVersion||"3.1.2"}function s(a){return"object"==typeof a}function t(a){var b;return a.cacheBustParam?(b=a.cacheBustParam,s(a.jsEscapeMap)?"?v=1.2.4"===b?"2.0.0":"?v=2.0.1"===b?"2.1.0":"?v=2.1.1"===b?"2.1.1":"?v=2.1.2"===b?"2.1.2":"?v=2.1.3"===b?"2.1.3":"?v=2.1.4"===b?"2.1.4":"2.2.7":"1.5.2"):a.emojiVersion}function u(a){switch(a){case"1.5.2":return 0;case"2.0.0":return 1;case"2.1.0":case"2.1.1":return 2;case"2.1.2":return 3;case"2.1.3":case"2.1.4":case"2.2.7":return 4;case"3.0.1":case"3.0.2":case"3.0.3":case"3.0":return 5;case"3.1.0":case"3.1.1":case"3.1.2":case"3.1":default:return 6}}function v(){if(a.fn.emojioneArea&&a.fn.emojioneArea.defaults)return a.fn.emojioneArea.defaults;var b={attributes:{dir:"ltr",spellcheck:!1,autocomplete:"off",autocorrect:"off",autocapitalize:"off"},search:!0,placeholder:null,emojiPlaceholder:":smiley:",searchPlaceholder:"SEARCH",container:null,hideSource:!0,shortnames:!0,sprite:!0,pickerPosition:"top",filtersPosition:"top",searchPosition:"top",hidePickerOnBlur:!0,buttonTitle:"Use the TAB key to insert emoji faster",tones:!0,tonesStyle:"bullet",inline:null,saveEmojisAs:"unicode",shortcuts:!0,autocomplete:!0,autocompleteTones:!1,standalone:!1,useInternalCDN:!0,imageType:"png",recentEmojis:!0,textcomplete:{maxCount:15,placement:null}},c=u(e?t(e):r());return c>4?b.filters={tones:{title:"Diversity",emoji:"open_hands raised_hands palms_up_together clap pray thumbsup thumbsdown punch fist left_facing_fist right_facing_fist fingers_crossed v metal love_you_gesture ok_hand point_left point_right point_up_2 point_down point_up raised_hand raised_back_of_hand hand_splayed vulcan wave call_me muscle middle_finger writing_hand selfie nail_care ear nose baby boy girl man woman blond-haired_woman blond-haired_man older_man older_woman man_with_chinese_cap woman_wearing_turban man_wearing_turban woman_police_officer man_police_officer woman_construction_worker man_construction_worker woman_guard man_guard woman_detective man_detective woman_health_worker man_health_worker woman_farmer man_farmer woman_cook man_cook woman_student man_student woman_singer man_singer woman_teacher man_teacher woman_factory_worker man_factory_worker woman_technologist man_technologist woman_office_worker man_office_worker woman_mechanic man_mechanic woman_scientist man_scientist woman_artist man_artist woman_firefighter man_firefighter woman_pilot man_pilot woman_astronaut man_astronaut woman_judge man_judge mrs_claus santa princess prince bride_with_veil man_in_tuxedo angel pregnant_woman breast_feeding woman_bowing man_bowing man_tipping_hand woman_tipping_hand man_gesturing_no woman_gesturing_no man_gesturing_ok woman_gesturing_ok man_raising_hand woman_raising_hand woman_facepalming man_facepalming woman_shrugging man_shrugging man_pouting woman_pouting man_frowning woman_frowning man_getting_haircut woman_getting_haircut man_getting_face_massage woman_getting_face_massage man_in_business_suit_levitating dancer man_dancing woman_walking man_walking woman_running man_running adult child older_adult bearded_person woman_with_headscarf woman_mage man_mage woman_fairy man_fairy woman_vampire man_vampire mermaid merman woman_elf man_elf snowboarder woman_lifting_weights man_lifting_weights woman_cartwheeling man_cartwheeling woman_bouncing_ball man_bouncing_ball woman_playing_handball man_playing_handball woman_golfing man_golfing woman_surfing man_surfing woman_swimming man_swimming woman_playing_water_polo man_playing_water_polo woman_rowing_boat man_rowing_boat horse_racing woman_biking man_biking woman_mountain_biking man_mountain_biking woman_juggling man_juggling woman_in_steamy_room man_in_steamy_room woman_climbing man_climbing woman_in_lotus_position man_in_lotus_position bath person_in_bed"},recent:{icon:"clock3",title:"Recent",emoji:""},smileys_people:{icon:"yum",title:"Smileys & People",emoji:"grinning smiley smile grin laughing sweat_smile joy rofl relaxed blush innocent slight_smile upside_down wink relieved crazy_face star_struck heart_eyes kissing_heart kissing kissing_smiling_eyes kissing_closed_eyes yum stuck_out_tongue_winking_eye stuck_out_tongue_closed_eyes stuck_out_tongue money_mouth hugging nerd sunglasses cowboy smirk unamused disappointed pensive worried face_with_raised_eyebrow face_with_monocle confused slight_frown frowning2 persevere confounded tired_face weary triumph angry rage face_with_symbols_over_mouth no_mouth neutral_face expressionless hushed frowning anguished open_mouth astonished dizzy_face exploding_head flushed scream fearful cold_sweat cry disappointed_relieved drooling_face sob sweat sleepy sleeping rolling_eyes thinking shushing_face face_with_hand_over_mouth lying_face grimacing zipper_mouth face_vomiting nauseated_face sneezing_face mask thermometer_face head_bandage smiling_imp imp japanese_ogre japanese_goblin poop ghost skull skull_crossbones alien space_invader robot jack_o_lantern clown smiley_cat smile_cat joy_cat heart_eyes_cat smirk_cat kissing_cat scream_cat crying_cat_face pouting_cat open_hands raised_hands palms_up_together clap pray handshake thumbsup thumbsdown punch fist left_facing_fist right_facing_fist fingers_crossed v metal love_you_gesture ok_hand point_left point_right point_up_2 point_down point_up raised_hand raised_back_of_hand hand_splayed vulcan wave call_me muscle middle_finger writing_hand selfie nail_care ring lipstick kiss lips tongue ear nose footprints eye eyes speaking_head bust_in_silhouette busts_in_silhouette baby boy girl man woman blond-haired_woman blond_haired_man older_man older_woman man_with_chinese_cap woman_wearing_turban man_wearing_turban woman_police_officer police_officer woman_construction_worker construction_worker woman_guard guard woman_detective detective woman_health_worker man_health_worker woman_farmer man_farmer woman_cook man_cook woman_student man_student woman_singer man_singer woman_teacher man_teacher woman_factory_worker man_factory_worker woman_technologist man_technologist woman_office_worker man_office_worker woman_mechanic man_mechanic woman_scientist man_scientist woman_artist man_artist woman_firefighter man_firefighter woman_pilot man_pilot woman_astronaut man_astronaut woman_judge man_judge mrs_claus santa princess prince bride_with_veil man_in_tuxedo angel pregnant_woman breast_feeding woman_bowing man_bowing woman_tipping_hand man_tipping_hand woman_gesturing_no man_gesturing_no woman_gesturing_ok man_gesturing_ok woman_raising_hand man_raising_hand woman_facepalming man_facepalming woman_shrugging man_shrugging woman_pouting man_pouting woman_frowning man_frowning woman_getting_haircut man_getting_haircut woman_getting_face_massage man_getting_face_massage man_in_business_suit_levitating dancer man_dancing women_with_bunny_ears_partying men_with_bunny_ears_partying woman_walking man_walking woman_running man_running couple two_women_holding_hands two_men_holding_hands couple_with_heart couple_ww couple_mm couplekiss kiss_ww kiss_mm family family_mwg family_mwgb family_mwbb family_mwgg family_wwb family_wwg family_wwgb family_wwbb family_wwgg family_mmb family_mmg family_mmgb family_mmbb family_mmgg family_woman_boy family_woman_girl family_woman_girl_boy family_woman_boy_boy family_woman_girl_girl family_man_boy family_man_girl family_man_girl_boy family_man_boy_boy family_man_girl_girl bearded_person woman_with_headscarf woman_mage man_mage woman_fairy man_fairy woman_vampire man_vampire mermaid merman woman_elf man_elf woman_genie man_genie woman_zombie man_zombie womans_clothes shirt jeans necktie dress bikini kimono high_heel sandal boot mans_shoe athletic_shoe womans_hat tophat mortar_board crown helmet_with_cross school_satchel pouch purse handbag briefcase eyeglasses dark_sunglasses closed_umbrella umbrella2 brain billed_cap scarf gloves coat socks "},animals_nature:{icon:"hamster",title:"Animals & Nature",emoji:"dog cat mouse hamster rabbit fox bear panda_face koala tiger lion_face cow pig pig_nose frog monkey_face see_no_evil hear_no_evil speak_no_evil monkey chicken penguin bird baby_chick hatching_chick hatched_chick duck eagle owl bat wolf boar horse unicorn bee bug butterfly snail shell beetle ant spider spider_web turtle snake lizard scorpion crab squid octopus shrimp tropical_fish fish blowfish dolphin shark whale whale2 crocodile leopard tiger2 water_buffalo ox cow2 deer dromedary_camel camel elephant rhino gorilla racehorse pig2 goat ram sheep dog2 poodle cat2 rooster turkey dove rabbit2 mouse2 rat chipmunk dragon giraffe zebra hedgehog sauropod t_rex cricket dragon_face feet cactus christmas_tree evergreen_tree deciduous_tree palm_tree seedling herb shamrock four_leaf_clover bamboo tanabata_tree leaves fallen_leaf maple_leaf mushroom ear_of_rice bouquet tulip rose wilted_rose sunflower blossom cherry_blossom hibiscus earth_americas earth_africa earth_asia full_moon waning_gibbous_moon last_quarter_moon waning_crescent_moon new_moon waxing_crescent_moon first_quarter_moon waxing_gibbous_moon new_moon_with_face full_moon_with_face sun_with_face first_quarter_moon_with_face last_quarter_moon_with_face crescent_moon dizzy star star2 sparkles zap fire boom comet sunny white_sun_small_cloud partly_sunny white_sun_cloud white_sun_rain_cloud rainbow cloud cloud_rain thunder_cloud_rain cloud_lightning cloud_snow snowman2 snowman snowflake wind_blowing_face dash cloud_tornado fog ocean droplet sweat_drops umbrella "},food_drink:{icon:"pizza",title:"Food & Drink",emoji:"green_apple apple pear tangerine lemon banana watermelon grapes strawberry melon cherries peach pineapple kiwi avocado tomato eggplant cucumber carrot corn hot_pepper potato sweet_potato chestnut peanuts honey_pot croissant bread french_bread cheese egg cooking bacon pancakes fried_shrimp poultry_leg meat_on_bone pizza hotdog hamburger fries stuffed_flatbread taco burrito salad shallow_pan_of_food spaghetti ramen stew fish_cake sushi bento curry rice_ball rice rice_cracker oden dango shaved_ice ice_cream icecream cake birthday custard lollipop candy chocolate_bar popcorn doughnut cookie milk baby_bottle coffee tea sake beer beers champagne_glass wine_glass tumbler_glass cocktail tropical_drink champagne spoon fork_and_knife fork_knife_plate dumpling fortune_cookie takeout_box chopsticks bowl_with_spoon cup_with_straw coconut broccoli pie pretzel cut_of_meat sandwich canned_food"},activity:{icon:"basketball",title:"Activity",emoji:"soccer basketball football baseball tennis volleyball rugby_football 8ball ping_pong badminton goal hockey field_hockey cricket_game golf bow_and_arrow fishing_pole_and_fish boxing_glove martial_arts_uniform ice_skate ski skier snowboarder woman_lifting_weights man_lifting_weights person_fencing women_wrestling men_wrestling woman_cartwheeling man_cartwheeling woman_bouncing_ball man_bouncing_ball woman_playing_handball man_playing_handball woman_golfing man_golfing woman_surfing man_surfing woman_swimming man_swimming woman_playing_water_polo man_playing_water_polo woman_rowing_boat man_rowing_boat horse_racing woman_biking man_biking woman_mountain_biking man_mountain_biking woman_in_steamy_room man_in_steamy_room woman_climbing man_climbing woman_in_lotus_position man_in_lotus_position running_shirt_with_sash medal military_medal first_place second_place third_place trophy rosette reminder_ribbon ticket tickets circus_tent woman_juggling man_juggling performing_arts art clapper microphone headphones musical_score musical_keyboard drum saxophone trumpet guitar violin game_die dart bowling video_game slot_machine sled curling_stone "},travel_places:{icon:"rocket",title:"Travel & Places",emoji:"red_car taxi blue_car bus trolleybus race_car police_car ambulance fire_engine minibus truck articulated_lorry tractor scooter bike motor_scooter motorcycle rotating_light oncoming_police_car oncoming_bus oncoming_automobile oncoming_taxi aerial_tramway mountain_cableway suspension_railway railway_car train mountain_railway monorail bullettrain_side bullettrain_front light_rail steam_locomotive train2 metro tram station helicopter airplane_small airplane airplane_departure airplane_arriving rocket satellite_orbital seat canoe sailboat motorboat speedboat cruise_ship ferry ship anchor construction fuelpump busstop vertical_traffic_light traffic_light map moyai statue_of_liberty fountain tokyo_tower european_castle japanese_castle stadium ferris_wheel roller_coaster carousel_horse beach_umbrella beach island mountain mountain_snow mount_fuji volcano desert camping tent railway_track motorway construction_site factory house house_with_garden homes house_abandoned office department_store post_office european_post_office hospital bank hotel convenience_store school love_hotel wedding classical_building church mosque synagogue kaaba shinto_shrine japan rice_scene park sunrise sunrise_over_mountains stars sparkler fireworks city_sunset city_dusk cityscape night_with_stars milky_way bridge_at_night foggy flying_saucer"},objects:{icon:"bulb",title:"Objects",emoji:"watch iphone calling computer keyboard desktop printer mouse_three_button trackball joystick compression minidisc floppy_disk cd dvd vhs camera camera_with_flash video_camera movie_camera projector film_frames telephone_receiver telephone pager fax tv radio microphone2 level_slider control_knobs stopwatch timer alarm_clock clock hourglass hourglass_flowing_sand satellite battery electric_plug bulb flashlight candle wastebasket oil money_with_wings dollar yen euro pound moneybag credit_card gem scales wrench hammer hammer_pick tools pick nut_and_bolt gear chains gun bomb knife dagger crossed_swords shield smoking coffin urn amphora crystal_ball prayer_beads barber alembic telescope microscope hole pill syringe thermometer toilet potable_water shower bathtub bath bellhop key key2 door couch bed sleeping_accommodation frame_photo shopping_bags shopping_cart gift balloon flags ribbon confetti_ball tada dolls izakaya_lantern wind_chime envelope envelope_with_arrow incoming_envelope e-mail love_letter inbox_tray outbox_tray package label mailbox_closed mailbox mailbox_with_mail mailbox_with_no_mail postbox postal_horn scroll page_with_curl page_facing_up bookmark_tabs bar_chart chart_with_upwards_trend chart_with_downwards_trend notepad_spiral calendar_spiral calendar date card_index card_box ballot_box file_cabinet clipboard file_folder open_file_folder dividers newspaper2 newspaper notebook notebook_with_decorative_cover ledger closed_book green_book blue_book orange_book books book bookmark link paperclip paperclips triangular_ruler straight_ruler pushpin round_pushpin scissors pen_ballpoint pen_fountain black_nib paintbrush crayon pencil pencil2 mag mag_right lock_with_ink_pen closed_lock_with_key lock unlock"},symbols:{icon:"heartpulse",title:"Symbols",emoji:"heart orange_heart yellow_heart green_heart blue_heart purple_heart black_heart broken_heart heart_exclamation two_hearts revolving_hearts heartbeat heartpulse sparkling_heart cupid gift_heart heart_decoration peace cross star_and_crescent om_symbol wheel_of_dharma star_of_david six_pointed_star menorah yin_yang orthodox_cross place_of_worship ophiuchus aries taurus gemini cancer leo virgo libra scorpius sagittarius capricorn aquarius pisces id atom accept radioactive biohazard mobile_phone_off vibration_mode u6709 u7121 u7533 u55b6 u6708 eight_pointed_black_star vs white_flower ideograph_advantage secret congratulations u5408 u6e80 u5272 u7981 a b ab cl o2 sos x o octagonal_sign no_entry name_badge no_entry_sign 100 anger hotsprings no_pedestrians do_not_litter no_bicycles non-potable_water underage no_mobile_phones no_smoking exclamation grey_exclamation question grey_question bangbang interrobang low_brightness high_brightness part_alternation_mark warning children_crossing trident fleur-de-lis beginner recycle white_check_mark u6307 chart sparkle eight_spoked_asterisk negative_squared_cross_mark globe_with_meridians diamond_shape_with_a_dot_inside m cyclone zzz atm wc wheelchair parking u7a7a sa passport_control customs baggage_claim left_luggage mens womens baby_symbol restroom put_litter_in_its_place cinema signal_strength koko symbols information_source abc abcd capital_abcd ng ok up cool new free zero one two three four five six seven eight nine keycap_ten 1234 hash asterisk arrow_forward pause_button play_pause stop_button record_button eject track_next track_previous fast_forward rewind arrow_double_up arrow_double_down arrow_backward arrow_up_small arrow_down_small arrow_right arrow_left arrow_up arrow_down arrow_upper_right arrow_lower_right arrow_lower_left arrow_upper_left arrow_up_down left_right_arrow arrow_right_hook leftwards_arrow_with_hook arrow_heading_up arrow_heading_down twisted_rightwards_arrows repeat repeat_one arrows_counterclockwise arrows_clockwise musical_note notes heavy_plus_sign heavy_minus_sign heavy_division_sign heavy_multiplication_x heavy_dollar_sign currency_exchange tm copyright registered wavy_dash curly_loop loop end back on top soon heavy_check_mark ballot_box_with_check radio_button white_circle black_circle red_circle blue_circle small_red_triangle small_red_triangle_down small_orange_diamond small_blue_diamond large_orange_diamond large_blue_diamond white_square_button black_square_button black_small_square white_small_square black_medium_small_square white_medium_small_square black_medium_square white_medium_square black_large_square white_large_square speaker mute sound loud_sound bell no_bell mega loudspeaker speech_left eye_in_speech_bubble speech_balloon thought_balloon anger_right spades clubs hearts diamonds black_joker flower_playing_cards mahjong clock1 clock2 clock3 clock4 clock5 clock6 clock7 clock8 clock9 clock10 clock11 clock12 clock130 clock230 clock330 clock430 clock530 clock630 clock730 clock830 clock930 clock1030 clock1130 clock1230"},flags:{icon:"flag_gb",title:"Flags",emoji:"flag_white flag_black checkered_flag triangular_flag_on_post rainbow_flag flag_af flag_ax flag_al flag_dz flag_as flag_ad flag_ao flag_ai flag_aq flag_ag flag_ar flag_am flag_aw flag_au flag_at flag_az flag_bs flag_bh flag_bd flag_bb flag_by flag_be flag_bz flag_bj flag_bm flag_bt flag_bo flag_ba flag_bw flag_br flag_io flag_vg flag_bn flag_bg flag_bf flag_bi flag_kh flag_cm flag_ca flag_ic flag_cv flag_bq flag_ky flag_cf flag_td flag_cl flag_cn flag_cx flag_cc flag_co flag_km flag_cg flag_cd flag_ck flag_cr flag_ci flag_hr flag_cu flag_cw flag_cy flag_cz flag_dk flag_dj flag_dm flag_do flag_ec flag_eg flag_sv flag_gq flag_er flag_ee flag_et flag_eu flag_fk flag_fo flag_fj flag_fi flag_fr flag_gf flag_pf flag_tf flag_ga flag_gm flag_ge flag_de flag_gh flag_gi flag_gr flag_gl flag_gd flag_gp flag_gu flag_gt flag_gg flag_gn flag_gw flag_gy flag_ht flag_hn flag_hk flag_hu flag_is flag_in flag_id flag_ir flag_iq flag_ie flag_im flag_il flag_it flag_jm flag_jp crossed_flags flag_je flag_jo flag_kz flag_ke flag_ki flag_xk flag_kw flag_kg flag_la flag_lv flag_lb flag_ls flag_lr flag_ly flag_li flag_lt flag_lu flag_mo flag_mk flag_mg flag_mw flag_my flag_mv flag_ml flag_mt flag_mh flag_mq flag_mr flag_mu flag_yt flag_mx flag_fm flag_md flag_mc flag_mn flag_me flag_ms flag_ma flag_mz flag_mm flag_na flag_nr flag_np flag_nl flag_nc flag_nz flag_ni flag_ne flag_ng flag_nu flag_nf flag_kp flag_mp flag_no flag_om flag_pk flag_pw flag_ps flag_pa flag_pg flag_py flag_pe flag_ph flag_pn flag_pl flag_pt flag_pr flag_qa flag_re flag_ro flag_ru flag_rw flag_ws flag_sm flag_st flag_sa flag_sn flag_rs flag_sc flag_sl flag_sg flag_sx flag_sk flag_si flag_gs flag_sb flag_so flag_za flag_kr flag_ss flag_es flag_lk flag_bl flag_sh flag_kn flag_lc flag_pm flag_vc flag_sd flag_sr flag_sz flag_se flag_ch flag_sy flag_tw flag_tj flag_tz flag_th flag_tl flag_tg flag_tk flag_to flag_tt flag_tn flag_tr flag_tm flag_tc flag_tv flag_vi flag_ug flag_ua flag_ae flag_gb flag_us flag_uy flag_uz flag_vu flag_va flag_ve flag_vn flag_wf flag_eh flag_ye flag_zm flag_zw flag_ac flag_ta flag_bv flag_hm flag_sj flag_um flag_ea flag_cp flag_dg flag_mf united_nations england scotland wales"}}:b.filters={tones:{title:"Diversity",emoji:"santa runner surfer swimmer lifter ear nose point_up_2 point_down point_left point_right punch wave ok_hand thumbsup thumbsdown clap open_hands boy girl man woman cop bride_with_veil person_with_blond_hair man_with_gua_pi_mao man_with_turban older_man grandma baby construction_worker princess angel information_desk_person guardsman dancer nail_care massage haircut muscle spy hand_splayed middle_finger vulcan no_good ok_woman bow raising_hand raised_hands person_frowning person_with_pouting_face pray rowboat bicyclist mountain_bicyclist walking bath metal point_up basketball_player fist raised_hand v writing_hand"},recent:{icon:"clock3",title:"Recent",emoji:""},smileys_people:{icon:"yum",title:"Smileys & People",emoji:"grinning grimacing grin joy smiley smile sweat_smile laughing innocent wink blush slight_smile upside_down relaxed yum relieved heart_eyes kissing_heart kissing kissing_smiling_eyes kissing_closed_eyes stuck_out_tongue_winking_eye stuck_out_tongue_closed_eyes stuck_out_tongue money_mouth nerd sunglasses hugging smirk no_mouth neutral_face expressionless unamused rolling_eyes thinking flushed disappointed worried angry rage pensive confused slight_frown frowning2 persevere confounded tired_face weary triumph open_mouth scream fearful cold_sweat hushed frowning anguished cry disappointed_relieved sleepy sweat sob dizzy_face astonished zipper_mouth mask thermometer_face head_bandage sleeping zzz poop smiling_imp imp japanese_ogre japanese_goblin skull ghost alien robot smiley_cat smile_cat joy_cat heart_eyes_cat smirk_cat kissing_cat scream_cat crying_cat_face pouting_cat raised_hands clap wave thumbsup thumbsdown punch fist v ok_hand raised_hand open_hands muscle pray point_up point_up_2 point_down point_left point_right middle_finger hand_splayed metal vulcan writing_hand nail_care lips tongue ear nose eye eyes bust_in_silhouette busts_in_silhouette speaking_head baby boy girl man woman person_with_blond_hair older_man older_woman man_with_gua_pi_mao man_with_turban cop construction_worker guardsman spy santa angel princess bride_with_veil walking runner dancer dancers couple two_men_holding_hands two_women_holding_hands bow information_desk_person no_good ok_woman raising_hand person_with_pouting_face person_frowning haircut massage couple_with_heart couple_ww couple_mm couplekiss kiss_ww kiss_mm family family_mwg family_mwgb family_mwbb family_mwgg family_wwb family_wwg family_wwgb family_wwbb family_wwgg family_mmb family_mmg family_mmgb family_mmbb family_mmgg womans_clothes shirt jeans necktie dress bikini kimono lipstick kiss footprints high_heel sandal boot mans_shoe athletic_shoe womans_hat tophat helmet_with_cross mortar_board crown school_satchel pouch purse handbag briefcase eyeglasses dark_sunglasses ring closed_umbrella"},animals_nature:{icon:"hamster",title:"Animals & Nature",emoji:"dog cat mouse hamster rabbit bear panda_face koala tiger lion_face cow pig pig_nose frog octopus monkey_face see_no_evil hear_no_evil speak_no_evil monkey chicken penguin bird baby_chick hatching_chick hatched_chick wolf boar horse unicorn bee bug snail beetle ant spider scorpion crab snake turtle tropical_fish fish blowfish dolphin whale whale2 crocodile leopard tiger2 water_buffalo ox cow2 dromedary_camel camel elephant goat ram sheep racehorse pig2 rat mouse2 rooster turkey dove dog2 poodle cat2 rabbit2 chipmunk feet dragon dragon_face cactus christmas_tree evergreen_tree deciduous_tree palm_tree seedling herb shamrock four_leaf_clover bamboo tanabata_tree leaves fallen_leaf maple_leaf ear_of_rice hibiscus sunflower rose tulip blossom cherry_blossom bouquet mushroom chestnut jack_o_lantern shell spider_web earth_americas earth_africa earth_asia full_moon waning_gibbous_moon last_quarter_moon waning_crescent_moon new_moon waxing_crescent_moon first_quarter_moon waxing_gibbous_moon new_moon_with_face full_moon_with_face first_quarter_moon_with_face last_quarter_moon_with_face sun_with_face crescent_moon star star2 dizzy sparkles comet sunny white_sun_small_cloud partly_sunny white_sun_cloud white_sun_rain_cloud cloud cloud_rain thunder_cloud_rain cloud_lightning zap fire boom snowflake cloud_snow snowman2 snowman wind_blowing_face dash cloud_tornado fog umbrella2 umbrella droplet sweat_drops ocean"},food_drink:{icon:"pizza",title:"Food & Drink",emoji:"green_apple apple pear tangerine lemon banana watermelon grapes strawberry melon cherries peach pineapple tomato eggplant hot_pepper corn sweet_potato honey_pot bread cheese poultry_leg meat_on_bone fried_shrimp egg hamburger fries hotdog pizza spaghetti taco burrito ramen stew fish_cake sushi bento curry rice_ball rice rice_cracker oden dango shaved_ice ice_cream icecream cake birthday custard candy lollipop chocolate_bar popcorn doughnut cookie beer beers wine_glass cocktail tropical_drink champagne sake tea coffee baby_bottle fork_and_knife fork_knife_plate"},activity:{icon:"basketball",title:"Activity",emoji:"soccer basketball football baseball tennis volleyball rugby_football 8ball golf golfer ping_pong badminton hockey field_hockey cricket ski skier snowboarder ice_skate bow_and_arrow fishing_pole_and_fish rowboat swimmer surfer bath basketball_player lifter bicyclist mountain_bicyclist horse_racing levitate trophy running_shirt_with_sash medal military_medal reminder_ribbon rosette ticket tickets performing_arts art circus_tent microphone headphones musical_score musical_keyboard saxophone trumpet guitar violin clapper video_game space_invader dart game_die slot_machine bowling"},travel_places:{icon:"rocket",title:"Travel & Places",emoji:"red_car taxi blue_car bus trolleybus race_car police_car ambulance fire_engine minibus truck articulated_lorry tractor motorcycle bike rotating_light oncoming_police_car oncoming_bus oncoming_automobile oncoming_taxi aerial_tramway mountain_cableway suspension_railway railway_car train monorail bullettrain_side bullettrain_front light_rail mountain_railway steam_locomotive train2 metro tram station helicopter airplane_small airplane airplane_departure airplane_arriving sailboat motorboat speedboat ferry cruise_ship rocket satellite_orbital seat anchor construction fuelpump busstop vertical_traffic_light traffic_light checkered_flag ship ferris_wheel roller_coaster carousel_horse construction_site foggy tokyo_tower factory fountain rice_scene mountain mountain_snow mount_fuji volcano japan camping tent park motorway railway_track sunrise sunrise_over_mountains desert beach island city_sunset city_dusk cityscape night_with_stars bridge_at_night milky_way stars sparkler fireworks rainbow homes european_castle japanese_castle stadium statue_of_liberty house house_with_garden house_abandoned office department_store post_office european_post_office hospital bank hotel convenience_store school love_hotel wedding classical_building church mosque synagogue kaaba shinto_shrine"},objects:{icon:"bulb",title:"Objects",emoji:"watch iphone calling computer keyboard desktop printer mouse_three_button trackball joystick compression minidisc floppy_disk cd dvd vhs camera camera_with_flash video_camera movie_camera projector film_frames telephone_receiver telephone pager fax tv radio microphone2 level_slider control_knobs stopwatch timer alarm_clock clock hourglass_flowing_sand hourglass satellite battery electric_plug bulb flashlight candle wastebasket oil money_with_wings dollar yen euro pound moneybag credit_card gem scales wrench hammer hammer_pick tools pick nut_and_bolt gear chains gun bomb knife dagger crossed_swords shield smoking skull_crossbones coffin urn amphora crystal_ball prayer_beads barber alembic telescope microscope hole pill syringe thermometer label bookmark toilet shower bathtub key key2 couch sleeping_accommodation bed door bellhop frame_photo map beach_umbrella moyai shopping_bags balloon flags ribbon gift confetti_ball tada dolls wind_chime crossed_flags izakaya_lantern envelope envelope_with_arrow incoming_envelope e-mail love_letter postbox mailbox_closed mailbox mailbox_with_mail mailbox_with_no_mail package postal_horn inbox_tray outbox_tray scroll page_with_curl bookmark_tabs bar_chart chart_with_upwards_trend chart_with_downwards_trend page_facing_up date calendar calendar_spiral card_index card_box ballot_box file_cabinet clipboard notepad_spiral file_folder open_file_folder dividers newspaper2 newspaper notebook closed_book green_book blue_book orange_book notebook_with_decorative_cover ledger books book link paperclip paperclips scissors triangular_ruler straight_ruler pushpin round_pushpin triangular_flag_on_post flag_white flag_black closed_lock_with_key lock unlock lock_with_ink_pen pen_ballpoint pen_fountain black_nib pencil pencil2 crayon paintbrush mag mag_right"},symbols:{icon:"heartpulse",title:"Symbols",emoji:"heart yellow_heart green_heart blue_heart purple_heart broken_heart heart_exclamation two_hearts revolving_hearts heartbeat heartpulse sparkling_heart cupid gift_heart heart_decoration peace cross star_and_crescent om_symbol wheel_of_dharma star_of_david six_pointed_star menorah yin_yang orthodox_cross place_of_worship ophiuchus aries taurus gemini cancer leo virgo libra scorpius sagittarius capricorn aquarius pisces id atom u7a7a u5272 radioactive biohazard mobile_phone_off vibration_mode u6709 u7121 u7533 u55b6 u6708 eight_pointed_black_star vs accept white_flower ideograph_advantage secret congratulations u5408 u6e80 u7981 a b ab cl o2 sos no_entry name_badge no_entry_sign x o anger hotsprings no_pedestrians do_not_litter no_bicycles non-potable_water underage no_mobile_phones exclamation grey_exclamation question grey_question bangbang interrobang 100 low_brightness high_brightness trident fleur-de-lis part_alternation_mark warning children_crossing beginner recycle u6307 chart sparkle eight_spoked_asterisk negative_squared_cross_mark white_check_mark diamond_shape_with_a_dot_inside cyclone loop globe_with_meridians m atm sa passport_control customs baggage_claim left_luggage wheelchair no_smoking wc parking potable_water mens womens baby_symbol restroom put_litter_in_its_place cinema signal_strength koko ng ok up cool new free zero one two three four five six seven eight nine ten 1234 arrow_forward pause_button play_pause stop_button record_button track_next track_previous fast_forward rewind twisted_rightwards_arrows repeat repeat_one arrow_backward arrow_up_small arrow_down_small arrow_double_up arrow_double_down arrow_right arrow_left arrow_up arrow_down arrow_upper_right arrow_lower_right arrow_lower_left arrow_upper_left arrow_up_down left_right_arrow arrows_counterclockwise arrow_right_hook leftwards_arrow_with_hook arrow_heading_up arrow_heading_down hash asterisk information_source abc abcd capital_abcd symbols musical_note notes wavy_dash curly_loop heavy_check_mark arrows_clockwise heavy_plus_sign heavy_minus_sign heavy_division_sign heavy_multiplication_x heavy_dollar_sign currency_exchange copyright registered tm end back on top soon ballot_box_with_check radio_button white_circle black_circle red_circle large_blue_circle small_orange_diamond small_blue_diamond large_orange_diamond large_blue_diamond small_red_triangle black_small_square white_small_square black_large_square white_large_square small_red_triangle_down black_medium_square white_medium_square black_medium_small_square white_medium_small_square black_square_button white_square_button speaker sound loud_sound mute mega loudspeaker bell no_bell black_joker mahjong spades clubs hearts diamonds flower_playing_cards thought_balloon anger_right speech_balloon clock1 clock2 clock3 clock4 clock5 clock6 clock7 clock8 clock9 clock10 clock11 clock12 clock130 clock230 clock330 clock430 clock530 clock630 clock730 clock830 clock930 clock1030 clock1130 clock1230 eye_in_speech_bubble" 3819},flags:{icon:"flag_gb",title:"Flags",emoji:"ac af al dz ad ao ai ag ar am aw au at az bs bh bd bb by be bz bj bm bt bo ba bw br bn bg bf bi cv kh cm ca ky cf td flag_cl cn co km cg flag_cd cr hr cu cy cz dk dj dm do ec eg sv gq er ee et fk fo fj fi fr pf ga gm ge de gh gi gr gl gd gu gt gn gw gy ht hn hk hu is in flag_id ir iq ie il it ci jm jp je jo kz ke ki xk kw kg la lv lb ls lr ly li lt lu mo mk mg mw my mv ml mt mh mr mu mx fm md mc mn me ms ma mz mm na nr np nl nc nz ni ne flag_ng nu kp no om pk pw ps pa pg py pe ph pl pt pr qa ro ru rw sh kn lc vc ws sm st flag_sa sn rs sc sl sg sk si sb so za kr es lk sd sr sz se ch sy tw tj tz th tl tg to tt tn tr flag_tm flag_tm ug ua ae gb us vi uy uz vu va ve vn wf eh ye zm zw re ax ta io bq cx cc gg im yt nf pn bl pm gs tk bv hm sj um ic ea cp dg as aq vg ck cw eu gf tf gp mq mp sx ss tc "}},b}function w(b){var c=v();if(b&&b.filters){var d=c.filters;a.each(b.filters,function(b,c){return!s(c)||a.isEmptyObject(c)?void delete d[b]:void a.each(c,function(a,c){d[b][a]=c})}),b.filters=d}return a.extend({},c,b)}var x,y;window.getSelection&&document.createRange?(x=function(a){var b=window.getSelection&&window.getSelection();if(b&&b.rangeCount>0)return b.getRangeAt(0)},y=function(a,b){var c=document.createRange();c.setStart(b.startContainer,b.startOffset),c.setEnd(b.endContainer,b.endOffset),b=window.getSelection(),b.removeAllRanges(),b.addRange(c)}):document.selection&&document.body.createTextRange&&(x=function(a){return document.selection.createRange()},y=function(a,b){var c=document.body.createTextRange();c.moveToElementText(a),c.setStart(b.startContanier,b.startOffset),c.setEnd(b.endContainer,b.endOffset),c.select()});var z;function A(a,b){return a.replace(z,function(a){var c=e[0===k?"jsecapeMap":"jsEscapeMap"];return"undefined"!=typeof a&&a in c?o(b,c[a]):a})}function B(a,b){return a=a.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/`/g,"`").replace(/(?:\r\n|\r|\n)/g,"\n").replace(/(\n+)/g,"<div>$1</div>").replace(/\n/g,"<br/>").replace(/<br\/><\/div>/g,"</div>"),b.shortnames&&(a=e.shortnameToUnicode(a)),A(a,b.emojiTemplate).replace(/\t/g," ").replace(/ /g," ")}function C(a,b){switch(a=a.replace(/ /g,"\n").replace(/	/g,"\t").replace(/<img[^>]*alt="([^"]+)"[^>]*>/gi,"$1").replace(/\n|\r/g,"").replace(/<br[^>]*>/gi,"\n").replace(/(?:<(?:div|p|ol|ul|li|pre|code|object)[^>]*>)+/gi,"<div>").replace(/(?:<\/(?:div|p|ol|ul|li|pre|code|object)>)+/gi,"</div>").replace(/\n<div><\/div>/gi,"\n").replace(/<div><\/div>\n/gi,"\n").replace(/(?:<div>)+<\/div>/gi,"\n").replace(/([^\n])<\/div><div>/gi,"$1\n").replace(/(?:<\/div>)+/gi,"</div>").replace(/([^\n])<\/div>([^\n])/gi,"$1\n$2").replace(/<\/div>/gi,"").replace(/([^\n])<div>/gi,"$1\n").replace(/\n<div>/gi,"\n").replace(/<div>\n/gi,"\n\n").replace(/<(?:[^>]+)?>/g,"").replace(new RegExp(l,"g"),"").replace(/ /g," ").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'").replace(/`/g,"`").replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&"),b.saveEmojisAs){case"image":a=A(a,b.emojiTemplate);break;case"shortname":a=e.toShort(a)}return a}function D(){var a=this,b=a.editor[0].offsetWidth-a.editor[0].clientWidth,c=parseInt(a.button.css("marginRight"));c!==b&&(a.button.css({marginRight:b}),a.floatingPicker&&a.picker.css({right:parseInt(a.picker.css("right"))-c+b}))}function E(){var b=this;if(!b.sprite&&b.lasyEmoji[0]&&b.lasyEmoji.eq(0).is(".lazy-emoji")){var c=b.picker.offset().top,d=c+b.picker.height()+20;b.lasyEmoji.each(function(){var b=a(this),e=b.offset().top;if(e>c&&e<d&&b.attr("src",b.data("src")).removeClass("lazy-emoji"),e>d)return!1}),b.lasyEmoji=b.lasyEmoji.filter(".lazy-emoji")}}function F(a,b){return(b?"":".")+j+(a?"-"+a:"")}function G(b){var c=a("<div/>",s(b)?b:{"class":F(b,!0)});return a.each(i.call(arguments).slice(1),function(b,d){a.isFunction(d)&&(d=d.call(c)),d&&a(d).appendTo(c)}),c}function H(){return localStorage.getItem("recent_emojis")||""}function I(b,c){var d=H();if(!b.recent||b.recent!==d||c){if(d.length){var e=b.scrollArea.is(".skinnable"),f,g;e||(f=b.scrollArea.scrollTop(),c&&b.recentCategory.show(),g=b.recentCategory.is(":visible")?b.recentCategory.height():0);var h=p(d,b.emojiBtnTemplate,!0).split("|").join("");if(b.recentCategory.children(".emojibtn").remove(),a(h).insertAfter(b.recentCategory.children(".emojionearea-category-title")),b.recentCategory.children(".emojibtn").on("click",function(){b.trigger("emojibtn.click",a(this))}),b.recentFilter.show(),!e){b.recentCategory.show();var i=b.recentCategory.height();g!==i&&b.scrollArea.scrollTop(f+i-g)}}else b.recentFilter.hasClass("active")&&b.recentFilter.removeClass("active").next().addClass("active"),b.recentCategory.hide(),b.recentFilter.hide();b.recent=d}}function J(a,b){var c=H(),d=c.split("|"),e=d.indexOf(b);e!==-1&&d.splice(e,1),d.unshift(b),d.length>9&&d.pop(),localStorage.setItem("recent_emojis",d.join("|")),I(a)}function K(){var a="test";try{return localStorage.setItem(a,a),localStorage.removeItem(a),!0}catch(b){return!1}}function L(b,c,d){b.options=d=w(d),b.sprite=d.sprite&&k<3,b.inline=null===d.inline?c.is("INPUT"):d.inline,b.shortnames=d.shortnames,b.saveEmojisAs=d.saveEmojisAs,b.standalone=d.standalone,b.emojiTemplate='<img alt="{alt}" class="emojione'+(b.sprite?'-{uni}" src="'+h+'"/>':'emoji" src="{img}"/>'),b.emojiTemplateAlt=b.sprite?'<i class="emojione-{uni}"/>':'<img class="emojioneemoji" src="{img}"/>',b.emojiBtnTemplate='<i class="emojibtn" role="button" data-name="{name}" title="{friendlyName}">'+b.emojiTemplateAlt+"</i>",b.recentEmojis=d.recentEmojis&&K();var f=d.pickerPosition;b.floatingPicker="top"===f||"bottom"===f,b.source=c,(c.is(":disabled")||c.is(".disabled"))&&b.disable();var g=c.is("TEXTAREA")||c.is("INPUT")?"val":"text",i,o,r,t,u,v,z,A,L,M,N=G("tones",d.tones?function(){this.addClass(F("tones-"+d.tonesStyle,!0));for(var b=0;b<=5;b++)this.append(a("<i/>",{"class":"btn-tone btn-tone-"+b+(b?"":" active"),"data-skin":b,role:"button"}))}:null),O=G({"class":j+(b.standalone?" "+j+"-standalone ":" ")+(c.attr("class")||""),role:"application"},i=b.editor=G("editor").attr({contenteditable:!b.standalone,placeholder:d.placeholder||c.data("placeholder")||c.attr("placeholder")||"",tabindex:0}),o=b.button=G("button",G("button-open"),G("button-close")).attr("title",d.buttonTitle),r=b.picker=G("picker",G("wrapper",t=G("filters"),d.search?v=G("search-panel",G("search",d.search?function(){b.search=a("<input/>",{placeholder:d.searchPlaceholder||"",type:"text","class":"search"}),this.append(b.search)}:null),N):null,M=G("scroll-area",d.tones&&!d.search?G("tones-panel",N):null,z=G("emojis-list")))).addClass(F("picker-position-"+d.pickerPosition,!0)).addClass(F("filters-position-"+d.filtersPosition,!0)).addClass(F("search-position-"+d.searchPosition,!0)).addClass("hidden"));d.search&&v.addClass(F("with-search",!0)),b.searchSel=null,i.data(c.data()),a.each(d.attributes,function(a,b){i.attr(a,b)});var P=G("category-block").attr({"data-tone":0}).prependTo(z);if(a.each(d.filters,function(c,e){var f=0;if("recent"!==c||b.recentEmojis){if("tones"!==c)a("<i/>",{"class":F("filter",!0)+" "+F("filter-"+c,!0),"data-filter":c,title:e.title}).wrapInner(p(e.icon,b.emojiTemplateAlt)).appendTo(t);else{if(!d.tones)return;f=5}do{var g,h=e.emoji.replace(/[\s,;]+/g,"|");g=0===f?G("category").attr({name:c,"data-tone":f}).appendTo(P):G("category-block").attr({name:c,"data-tone":f}).appendTo(z),f>0&&(g.hide(),h=h.split("|").join("_tone"+f+"|")+"_tone"+f),"recent"===c&&(h=H()),h=p(h,b.sprite?'<i class="emojibtn" role="button" data-name="{name}" title="{friendlyName}"><i class="emojione-{uni}"></i></i>':'<i class="emojibtn" role="button" data-name="{name}" title="{friendlyName}"><img class="emojioneemoji lazy-emoji" data-src="{img}"/></i>',!0).split("|").join(""),g.html(h),a('<div class="emojionearea-category-title"/>').text(e.title).prependTo(g)}while(--f>0)}}),d.filters=null,b.sprite||(b.lasyEmoji=z.find(".lazy-emoji")),u=t.find(F("filter")),u.eq(0).addClass("active"),L=z.find(F("category-block")),A=z.find(F("category")),b.recentFilter=u.filter('[data-filter="recent"]'),b.recentCategory=A.filter("[name=recent]"),b.scrollArea=M,d.container?a(d.container).wrapInner(O):O.insertAfter(c),d.hideSource&&c.hide(),b.setText(c[g]()),c[g](b.getText()),D.apply(b),b.standalone&&!b.getText().length){var Q=a(c).data("emoji-placeholder")||d.emojiPlaceholder;b.setText(Q),i.addClass("has-placeholder")}n(b,z.find(".emojibtn"),{click:"emojibtn.click"}),n(b,window,{resize:"!resize"}),n(b,N.children(),{click:"tone.click"}),n(b,[r,o],{mousedown:"!mousedown"},i),n(b,o,{click:"button.click"}),n(b,i,{paste:"!paste"},i),n(b,i,["focus","blur"],function(){return!b.stayFocused&&i}),n(b,r,{mousedown:"picker.mousedown",mouseup:"picker.mouseup",click:"picker.click",keyup:"picker.keyup",keydown:"picker.keydown",keypress:"picker.keypress"}),n(b,i,["mousedown","mouseup","click","keyup","keydown","keypress"]),n(b,r.find(".emojionearea-filter"),{click:"filter.click"}),n(b,c,{change:"source.change"}),d.search&&n(b,b.search,{keyup:"search.keypress",focus:"search.focus",blur:"search.blur"});var R=!1;if(M.on("scroll",function(){if(!R&&(E.call(b),M.is(":not(.skinnable)"))){var c=A.eq(0),d=M.offset().top;A.each(function(b,e){return!(a(e).offset().top-d>=10)&&void(c=a(e))});var e=u.filter('[data-filter="'+c.attr("name")+'"]');e[0]&&!e.is(".active")&&(u.removeClass("active"),e.addClass("active"))}}),b.on("@filter.click",function(a){var c=a.is(".active");if(M.is(".skinnable")){if(c)return;N.children().eq(0).click()}R=!0,c||(u.filter(".active").removeClass("active"),a.addClass("active"));var d=A.filter('[name="'+a.data("filter")+'"]').offset().top,e=M.scrollTop(),f=M.offset().top;M.stop().animate({scrollTop:d+e-f-2},200,"swing",function(){E.call(b),R=!1})}).on("@picker.show",function(){b.recentEmojis&&I(b),E.call(b)}).on("@tone.click",function(a){N.children().removeClass("active");var c=a.addClass("active").data("skin");c?(M.addClass("skinnable"),L.hide().filter("[data-tone="+c+"]").show(),u.removeClass("active")):(M.removeClass("skinnable"),L.hide().filter("[data-tone=0]").show(),u.eq(0).click()),E.call(b),d.search&&b.trigger("search.keypress")}).on("@button.click",function(a){a.is(".active")?b.hidePicker():(b.showPicker(),b.searchSel=null)}).on("@!paste",function(c,d){var e=function(d){var e="caret-"+(new Date).getTime(),f=B(d,b);q(f),q('<i id="'+e+'"></i>'),c.scrollTop(h);var g=a("#"+e),i=g.offset().top-c.offset().top,j=c.height();(h+i>=j||h>i)&&c.scrollTop(h+i-2*j/3),g.remove(),b.stayFocused=!1,D.apply(b),m(b,"paste",[c,d,f])};if(d.originalEvent.clipboardData){var f=d.originalEvent.clipboardData.getData("text/plain");return e(f),d.preventDefault?d.preventDefault():d.stop(),d.returnValue=!1,d.stopPropagation(),!1}b.stayFocused=!0,q("<span>"+l+"</span>");var g=x(c[0]),h=c.scrollTop(),i=a("<div/>",{contenteditable:!0}).css({position:"fixed",left:"-999px",width:"1px",height:"1px",top:"20px",overflow:"hidden"}).appendTo(a("BODY")).focus();window.setTimeout(function(){c.focus(),y(c[0],g);var a=C(i.html().replace(/\r\n|\n|\r/g,"<br>"),b);i.remove(),e(a)},200)}).on("@emojibtn.click",function(a){i.removeClass("has-placeholder"),null!==b.searchSel&&(i.focus(),y(i[0],b.searchSel),b.searchSel=null),b.standalone?(i.html(p(a.data("name"),b.emojiTemplate)),b.trigger("blur")):(x(i[0]),q(p(a.data("name"),b.emojiTemplate))),b.recentEmojis&&J(b,a.data("name")),b.trigger("search.keypress")}).on("@!resize @keyup @emojibtn.click",D).on("@!mousedown",function(c,d){return a(d.target).hasClass("search")?(b.stayFocused=!0,null===b.searchSel&&(b.searchSel=x(c[0]))):(O.is(".focused")||c.trigger("focus"),d.preventDefault()),!1}).on("@change",function(){var a=b.editor.html().replace(/<\/?(?:div|span|p)[^>]*>/gi,"");a.length&&!/^<br[^>]*>$/i.test(a)||b.editor.html(b.content=""),c[g](b.getText())}).on("@source.change",function(){b.setText(c[g]()),m("change")}).on("@focus",function(){O.addClass("focused")}).on("@blur",function(){O.removeClass("focused"),d.hidePickerOnBlur&&b.hidePicker();var a=b.editor.html();b.content!==a?(b.content=a,m(b,"change",[b.editor]),c.trigger("blur").trigger("change")):c.trigger("blur"),d.search&&(b.search.val(""),b.trigger("search.keypress",!0))}),d.search&&b.on("@search.focus",function(){b.stayFocused=!0,b.search.addClass("focused")}).on("@search.keypress",function(c){var e=r.find(".emojionearea-filter"),f=d.tones?N.find("i.active").data("skin"):0,g=b.search.val().replace(/ /g,"_").replace(/"/g,'\\"');g&&g.length?(b.recentFilter.hasClass("active")&&b.recentFilter.removeClass("active").next().addClass("active"),b.recentCategory.hide(),b.recentFilter.hide(),L.each(function(){var b=function(a,b){var c=a.find('.emojibtn[data-name*="'+g+'"]');if(0===c.length)a.data("tone")===b&&a.hide(),e.filter('[data-filter="'+a.attr("name")+'"]').hide();else{var d=a.find('.emojibtn:not([data-name*="'+g+'"])');d.hide(),c.show(),a.data("tone")===b&&a.show(),e.filter('[data-filter="'+a.attr("name")+'"]').show()}},c=a(this);0===c.data("tone")?A.filter(':not([name="recent"])').each(function(){b(a(this),0)}):b(c,f)}),R?E.call(b):M.trigger("scroll")):(I(b,!0),L.filter('[data-tone="'+N.find("i.active").data("skin")+'"]:not([name="recent"])').show(),a(".emojibtn",L).show(),e.show(),E.call(b))}).on("@search.blur",function(){b.stayFocused=!1,b.search.removeClass("focused"),b.trigger("blur")}),d.shortcuts&&b.on("@keydown",function(a,c){c.ctrlKey||(9==c.which?(c.preventDefault(),o.click()):27==c.which&&(c.preventDefault(),o.is(".active")&&b.hidePicker()))}),s(d.events)&&!a.isEmptyObject(d.events)&&a.each(d.events,function(a,c){b.on(a.replace(/_/g,"."),c)}),d.autocomplete){var S=function(){var c={maxCount:d.textcomplete.maxCount,placement:d.textcomplete.placement};d.shortcuts&&(c.onKeydown=function(a,b){if(!a.ctrlKey&&13==a.which)return b.KEY_ENTER});var f=a.map(e.emojioneList,function(a,b){return d.autocompleteTones?b:/_tone[12345]/.test(b)?null:b});f.sort(),i.textcomplete([{id:j,match:/\B(:[\-+\w]*)$/,search:function(b,c){c(a.map(f,function(a){return 0===a.indexOf(b)?a:null}))},template:function(a){return p(a,b.emojiTemplate)+" "+a.replace(/:/g,"")},replace:function(a){return p(a,b.emojiTemplate)},cache:!0,index:1}],c),d.textcomplete.placement&&"static"==a(i.data("textComplete").option.appendTo).css("position")&&a(i.data("textComplete").option.appendTo).css("position","relative")},T=function(){if(b.disabled){var a=function(){b.off("enabled",a),S()};b.on("enabled",a)}else S()};a.fn.textcomplete?T():a.ajax({url:"https://cdn.rawgit.com/yuku-t/jquery-textcomplete/v1.3.4/dist/jquery.textcomplete.js",dataType:"script",cache:!0,success:T})}b.inline&&(O.addClass(F("inline",!0)),b.on("@keydown",function(a,b){13==b.which&&b.preventDefault()})),/firefox/i.test(navigator.userAgent)&&document.execCommand("enableObjectResizing",!1,!1),b.isReady=!0,b.trigger("onLoad",i),b.trigger("ready",i)}var M={defaultBase:"https://cdnjs.cloudflare.com/ajax/libs/emojione/",defaultBase3:"https://cdn.jsdelivr.net/",base:null,isLoading:!1};function N(b){var c=r();if(b=w(b),!M.isLoading)if(!e||u(t(e))<2){M.isLoading=!0;var d;d=u(c)>5?M.defaultBase3+"npm/emojione@"+c:u(c)>4?M.defaultBase3+"emojione/"+c:M.defaultBase+"/"+c,a.ajax({url:d+"/lib/js/emojione.min.js",dataType:"script",cache:!0,success:function(){e=window.emojione,c=t(e),k=u(c);var d;k>4?(M.base=M.defaultBase3+"emojione/assets/"+c,d=M.base+"/sprites/emojione-sprite-"+e.emojiSize+".css"):(M.base=M.defaultBase+c+"/assets",d=M.base+"/sprites/emojione.sprites.css"),b.sprite&&(document.createStyleSheet?document.createStyleSheet(d):a("<link/>",{rel:"stylesheet",href:d}).appendTo("head"));while(f.length)f.shift().call();M.isLoading=!1}})}else c=t(e),k=u(c),k>4?M.base=M.defaultBase3+"emojione/assets/"+c:M.base=M.defaultBase+c+"/assets";g(function(){var a="";b.useInternalCDN&&(k>4&&(a=e.emojiSize+"/"),e.imagePathPNG=M.base+"/png/"+a,e.imagePathSVG=M.base+"/svg/"+a,e.imagePathSVGSprites=M.base+"/sprites/emojione.sprites.svg",e.imageType=b.imageType),u(c)>4?(z=e.regUnicode,e.imageType=b.imageType||"png"):z=new RegExp("<object[^>]*>.*?</object>|<span[^>]*>.*?</span>|<(?:object|embed|svg|img|div|span|p|a)[^>]*>|("+e.unicodeRegexp+")","gi")})}var O=function(a,e){var f=this;N(e),c[f.id=++b]={},d[f.id]={},g(function(){L(f,a,e)})};function P(b,c){c=c.replace(/^@/,"");var e=b.id;d[e][c]&&(a.each(d[e][c],function(d,e){a.each(a.isArray(e[0])?e[0]:[e[0]],function(d,f){a(f).on(e[1],function(){var d=i.call(arguments),f=a.isFunction(e[2])?e[2].apply(b,[c].concat(d)):e[2];f&&m(b,c,[f].concat(d))})})}),d[e][c]=null)}O.prototype.on=function(b,d){if(b&&a.isFunction(d)){var e=this;a.each(b.toLowerCase().split(" "),function(a,b){P(e,b),(c[e.id][b]||(c[e.id][b]=[])).push(d)})}return this},O.prototype.off=function(b,d){if(b){var e=this.id;a.each(b.toLowerCase().replace(/_/g,".").split(" "),function(b,f){c[e][f]&&!/^@/.test(f)&&(d?a.each(c[e][f],function(a,b){b===d&&(c[e][f]=c[e][f].splice(a,1))}):c[e][f]=[])})}return this},O.prototype.trigger=function(){var a=i.call(arguments),b=[this].concat(a.slice(0,1));return b.push(a.slice(1)),m.apply(this,b)},O.prototype.setFocus=function(){var a=this;return g(function(){a.editor.focus()}),a},O.prototype.setText=function(a){var b=this;return g(function(){b.editor.html(B(a,b)),b.content=b.editor.html(),m(b,"change",[b.editor]),D.apply(b)}),b},O.prototype.getText=function(){return C(this.editor.html(),this)},O.prototype.showPicker=function(){var a=this;return a._sh_timer&&window.clearTimeout(a._sh_timer),a.picker.removeClass("hidden"),a._sh_timer=window.setTimeout(function(){a.button.addClass("active")},50),m(a,"picker.show",[a.picker]),a},O.prototype.hidePicker=function(){var a=this;return a._sh_timer&&window.clearTimeout(a._sh_timer),a.button.removeClass("active"),a._sh_timer=window.setTimeout(function(){a.picker.addClass("hidden")},500),m(a,"picker.hide",[a.picker]),a},O.prototype.enable=function(){var a=this,b=function(){a.disabled=!1,a.editor.prop("contenteditable",!0),a.button.show();var b=a[a.standalone?"button":"editor"];b.parent().removeClass("emojionearea-disable"),m(a,"enabled",[b])};return a.isReady?b():a.on("ready",b),a},O.prototype.disable=function(){var a=this;a.disabled=!0;var b=function(){a.editor.prop("contenteditable",!1),a.hidePicker(),a.button.hide();var b=a[a.standalone?"button":"editor"];b.parent().addClass("emojionearea-disable"),m(a,"disabled",[b])};return a.isReady?b():a.on("ready",b),a},a.fn.emojioneArea=function(b){return this.each(function(){return this.emojioneArea?this.emojioneArea:(a.data(this,"emojioneArea",this.emojioneArea=new O(a(this),b)),this.emojioneArea)})},a.fn.emojioneArea.defaults=v(),a.fn.emojioneAreaText=function(b){b=w(b);var c=this,d={shortnames:!b||"undefined"==typeof b.shortnames||b.shortnames,emojiTemplate:'<img alt="{alt}" class="emojione'+(b&&b.sprite&&k<3?'-{uni}" src="'+h:'emoji" src="{img}')+'"/>'};return N(b),g(function(){c.each(function(){var b=a(this);return b.hasClass("emojionearea-text")||b.addClass("emojionearea-text").html(B(b.is("TEXTAREA")||b.is("INPUT")?b.val():b.text(),d)),b})}),this}},window); 3820//# sourceMappingURL=emojionearea.min.map
3820 3821// СкÑÐ¸Ð¿Ñ Ð¾ÑпÑавки ÑообÑений об оÑибке http://mistakes.ru/script/mistakes_dev 3822// ÐеÑÑÐ¸Ñ 4.1 3823// 27.04.2015 3824var loc = window.location; 3825var mis; 3826nN = navigator.appName; 3827 3828function createMessage() { 3829 var misphploc = '/error/reporting'; 3830 var container = document.createElement('div'); 3831 var scroll = dde.scrollTop || db.scrollTop; 3832 var mtop = scroll + 100 + 'px'; 3833 var mleft = Math.floor(dde.clientWidth/2) - 175 + 'px'; 3834 container.innerHTML = '<div id="mistake">\ 3835 <div id="m_window" style="top:' + mtop + '; left:' + mleft + '";>\ 3836 <iframe frameborder="0" name="mis" id="m_frame" src="' + misphploc + '"></iframe></div> \ 3837 </div></div>'; 3838 3839 return container.firstChild; 3840} 3841 3842function positionMessage(elem) { 3843 elem.style.position = 'absolute'; 3844 var pageheight = Math.max(dde.scrollHeight, db.scrollHeight, dde.clientHeight); 3845 var pagewidth = Math.max(dde.scrollWidth, db.scrollWidth, dde.clientWidth); 3846 elem.style.height = pageheight + 'px'; 3847 elem.style.width = pagewidth + 'px'; 3848} 3849 3850function winop() { 3851 dde=document.documentElement; 3852 db=document.body; 3853 var messageElem = createMessage() 3854 positionMessage(messageElem) 3855 db.appendChild(messageElem) 3856} 3857 3858function getText(e) 3859{ 3860 if (!e) e= window.event; 3861 if((e.ctrlKey) && ((e.keyCode==10)||(e.keyCode==13))) 3862 {CtrlEnter();} 3863 return true;} 3864 3865function mis_get_sel_text(){ 3866 if (window.getSelection) { 3867 txt = window.getSelection(); 3868 selected_text = txt.toString(); 3869 full_text = txt.anchorNode.textContent; 3870 selection_start = txt.anchorOffset; 3871 selection_end = txt.focusOffset; 3872 } 3873 else if (document.getSelection) { 3874 txt = document.getSelection(); 3875 selected_text = txt.toString(); 3876 full_text = txt.anchorNode.textContent; 3877 selection_start = txt.anchorOffset; 3878 selection_end = txt.focusOffset; 3879 } 3880 else if (document.selection) { 3881 txt = document.selection.createRange(); 3882 selected_text = txt.text; 3883 full_text = txt.parentElement().innerText; 3884 3885 var stored_range = txt.duplicate(); 3886 stored_range.moveToElementText(txt.parentElement()); 3887 stored_range.setEndPoint('EndToEnd', txt); 3888 selection_start = stored_range.text.length - txt.text.length; 3889 selection_end = selection_start + selected_text.length; 3890 } 3891 else { 3892 return; 3893 } 3894 var txt = { 3895 selected_text: selected_text, 3896 full_text: full_text, 3897 selection_start: selection_start, 3898 selection_end: selection_end 3899 }; 3900 return txt; 3901} 3902 3903function mis_get_sel_context(sel) { 3904 selection_start = sel.selection_start; 3905 selection_end = sel.selection_end; 3906 if (selection_start > selection_end) { 3907 tmp = selection_start; 3908 selection_start = selection_end; 3909 selection_end = tmp; 3910 } 3911 3912 context = sel.full_text; 3913 3914 context_first = context.substring(0, selection_start); 3915 context_second = context.substring(selection_start, selection_end); 3916 context_third = context.substring(selection_end, context.length); 3917 context = context_first + '<strong>' + context_second + '</strong>' + context_third; 3918 3919 context_start = selection_start - 60; 3920 if (context_start < 0) { 3921 context_start = 0; 3922 } 3923 3924 context_end = selection_end + 60; 3925 if (context_end > context.length) { 3926 context_end = context.length; 3927 } 3928 3929 context = context.substring(context_start, context_end); 3930
3931 context_start = context.indexOf(' ') + 1; 3932 3933 if (selection_start + 60 < context.length) { 3934 context_end = context.lastIndexOf(' ', selection_start + 60); 3935 } 3936 else { 3937 context_end = context.length; 3938 } 3939 3940 selection_start = context.indexOf('<strong>'); 3941 if (context_start > selection_start) { 3942 context_start = 0; 3943 } 3944 3945 if (context_start) { 3946 context = context.substring(context_start, context_end); 3947 } 3948 3949 return context; 3950} 3951 3952function CtrlEnter(){ 3953 var sel = mis_get_sel_text(); 3954 if (sel.selected_text.length > 300) { 3955 alert('Ðожно вÑделиÑÑ Ð½Ðµ более 300 Ñимволов!'); 3956 } 3957 else if (sel.selected_text.length == 0) { 3958 alert('ÐÑделиÑе оÑибкÑ!'); 3959 } 3960 else { 3961 // Get selection context. 3962 mis = mis_get_sel_context(sel); 3963 winop(); 3964 3965 } 3966}; 3967 3968function PressLink(){ 3969 mis = 'ÐожалÑйÑÑа, опиÑиÑе оÑÐ¸Ð±ÐºÑ Ð² комменÑаÑии.'; 3970 winop(); 3971}; 3972 3973document.onkeypress = getText; 3974 3975/*! 3976 * JavaScript Cookie v2.2.0 3977 * https://github.com/js-cookie/js-cookie 3978 * 3979 * Copyright 2006, 2015 Klaus Hartl & Fagner Brack 3980 * Released under the MIT license 3981 */ 3982;(function (factory) { 3983 var registeredInModuleLoader; 3984 if (typeof define === 'function' && define.amd) { 3985 define(factory); 3986 registeredInModuleLoader = true; 3987 } 3988 if (typeof exports === 'object') { 3989 module.exports = factory(); 3990 registeredInModuleLoader = true; 3991 } 3992 if (!registeredInModuleLoader) { 3993 var OldCookies = window.Cookies; 3994 var api = window.Cookies = factory(); 3995 api.noConflict = function () { 3996 window.Cookies = OldCookies; 3997 return api; 3998 }; 3999 } 4000}(function () { 4001 function extend () { 4002 var i = 0; 4003 var result = {}; 4004 for (; i < arguments.length; i++) { 4005 var attributes = arguments[ i ]; 4006 for (var key in attributes) { 4007 result[key] = attributes[key]; 4008 } 4009 } 4010 return result; 4011 } 4012 4013 function decode (s) { 4014 return s.replace(/(%[0-9A-Z]{2})+/g, decodeURIComponent); 4015 } 4016 4017 function init (converter) { 4018 function api() {} 4019 4020 function set (key, value, attributes) { 4021 if (typeof document === 'undefined') { 4022 return; 4023 } 4024 4025 attributes = extend({ 4026 path: '/' 4027 }, api.defaults, attributes); 4028 4029 if (typeof attributes.expires === 'number') { 4030 attributes.expires = new Date(new Date() * 1 + attributes.expires * 864e+5); 4031 } 4032 4033 // We're using "expires" because "max-age" is not supported by IE 4034 attributes.expires = attributes.expires ? attributes.expires.toUTCString() : ''; 4035 4036 try { 4037 var result = JSON.stringify(value); 4038 if (/^[\{\[]/.test(result)) { 4039 value = result; 4040 } 4041 } catch (e) {} 4042 4043 value = converter.write ? 4044 converter.write(value, key) : 4045 encodeURIComponent(String(value)) 4046 .replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent); 4047 4048 key = encodeURIComponent(String(key)) 4049 .replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent) 4050 .replace(/[\(\)]/g, escape); 4051 4052 var stringifiedAttributes = ''; 4053 for (var attributeName in attributes) { 4054 if (!attributes[attributeName]) { 4055 continue; 4056 } 4057 stringifiedAttributes += '; ' + attributeName; 4058 if (attributes[attributeName] === true) { 4059 continue; 4060 } 4061 4062 // Considers RFC 6265 section 5.2: 4063 // ... 4064 // 3. If the remaining unparsed-attributes contains a %x3B (";") 4065 // character: 4066 // Consume the characters of the unparsed-attributes up to, 4067 // not including, the first %x3B (";") character. 4068 // ... 4069 stringifiedAttributes += '=' + attributes[attributeName].split(';')[0]; 4070 } 4071 4072 return (document.cookie = key + '=' + value + stringifiedAttributes); 4073 } 4074 4075 function get (key, json) { 4076 if (typeof document === 'undefined') { 4077 return; 4078 } 4079 4080 var jar = {}; 4081 // To prevent the for loop in the first place assign an empty array 4082 // in case there are no cookies at all. 4083 var cookies = document.cookie ? document.cookie.split('; ') : []; 4084 var i = 0; 4085 4086 for (; i < cookies.length; i++) { 4087 var parts = cookies[i].split('='); 4088 var cookie = parts.slice(1).join('='); 4089 4090 if (!json && cookie.charAt(0) === '"') { 4091 cookie = cookie.slice(1, -1); 4092 } 4093
4094 try { 4095 var name = decode(parts[0]); 4096 cookie = (converter.read || converter)(cookie, name) || 4097 decode(cookie); 4098 4099 if (json) { 4100 try { 4101 cookie = JSON.parse(cookie); 4102 } catch (e) {} 4103 } 4104 4105 jar[name] = cookie; 4106 4107 if (key === name) { 4108 break; 4109 } 4110 } catch (e) {} 4111 } 4112 4113 return key ? jar[key] : jar; 4114 } 4115 4116 api.set = set; 4117 api.get = function (key) { 4118 return get(key, false /* read as raw */); 4119 }; 4120 api.getJSON = function (key) { 4121 return get(key, true /* read as json */); 4122 }; 4123 api.remove = function (key, attributes) { 4124 set(key, '', extend(attributes, { 4125 expires: -1 4126 })); 4127 }; 4128 4129 api.defaults = {}; 4130 4131 api.withConverter = init; 4132 4133 return api; 4134 } 4135 4136 return init(function () {}); 4137})); 4138$(function() { 4139 4140 //SVG Fallback 4141 // $("img[src*='svg']").attr("src", function() { 4142 // return $(this).attr("src").replace(".svg", ".png"); 4143 // }); 4144 4145 //Chrome Smooth Scroll 4146 // try { 4147 // $.browserSelector(); 4148 // if($("html").hasClass("chrome")) { 4149 // $.smoothScroll(); 4150 // } 4151 // } catch(err) { 4152 // 4153 // }; 4154 4155 $("img, a").on("dragstart", function(event) { event.preventDefault(); }); 4156 4157 $('.phone_with').mask('000000000000000'); 4158 4159 // if (typeof ($('.news-list').data('next-page')) !== 'undefined'){ 4160 // $(window).scroll(fetchPosts); 4161 // } 4162 // 4163 // function fetchPosts() { 4164 // 4165 // var page = $('.news-list').data('next-page'); 4166 // 4167 // if(page !== null) { 4168 // 4169 // clearTimeout( $.data( this, "scrollCheck" ) ); 4170 // 4171 // $.data( this, "scrollCheck", setTimeout(function() { 4172 // var scroll_position_for_posts_load = $(window).height() + $(window).scrollTop() + 3500; 4173 // if(scroll_position_for_posts_load >= $(document).height()) { 4174 // $.get(page, function(data){ 4175 // $('.posts').append(data.posts); 4176 // $('.news-list').data('next-page', data.next_page); 4177 // }); 4178 // } 4179 // }, 350)) 4180 // } 4181 // } 4182 4183 $('.news_ratings_read').on('click', function(e){ 4184 e.preventDefault(); 4185 var than = $(this); 4186 4187 var lang = $('.ratings_news_list').data('lang'); 4188 var period = $(this).data('date'); 4189 $.ajax({
4190 url: APP_URL + lang + "/yangiliklar/ajax", 4191 data: {"days": period, "lang": lang}, 4192 type: 'GET', 4193 success: function (data, textStatus) { 4194 if (textStatus != 'success') {return;} 4195 if (data == '') {return;} 4196 $('.news_ratings_read').removeClass('active'); 4197 than.addClass('active'); 4198 than.parents('.ratings_news_list').find('.tab-content-link_list').html(data.posts); 4199 // analytics 4200 var tracker = window.ga.getAll()[0]; 4201 if (tracker && tracker.set && tracker.send) { 4202 tracker.set('page', '/yangiliklar/ajax?days='+period+'/'); 4203 tracker.send('pageview'); 4204 } 4205 } 4206 }); 4207 }); 4208 4209 $('.news_ratings_comments').on('click', function(e){ 4210 e.preventDefault(); 4211 var than = $(this); 4212 4213 var lang = $('.ratings_news_list').data('lang'); 4214 var period = $(this).data('date'); 4215 $.ajax({
4216 url: APP_URL + lang + "/yangiliklar/comments_ajax", 4217 data: {"days": period, "lang": lang}, 4218 type: 'GET', 4219 success: function (data, textStatus) { 4220 if (textStatus != 'success') {return;} 4221 if (data == '') {return;} 4222 $('.news_ratings_comments').removeClass('active'); 4223 than.addClass('active'); 4224 than.parents('.comments_news_list').find('.tab-content-link_list').html(data.posts); 4225 // analytics 4226 var tracker = window.ga.getAll()[0]; 4227 if (tracker && tracker.set && tracker.send) { 4228 tracker.set('page', '/yangiliklar/comments_ajax?days='+period+'/'); 4229 tracker.send('pageview'); 4230 } 4231 } 4232 }); 4233 }); 4234 4235 $('.more-trigger').on('click', function(e){ 4236 e.preventDefault(); 4237 $('.entry-know').css('max-height', 'none'); 4238 $(this).hide(); 4239 }); 4240 4241 var loading = $('.loading-block'); 4242 var news = $('.more-news'); 4243 4244 news.on('click', function (e) { 4245 e.preventDefault(); 4246 var t = $(window).scrollTop(); 4247 var news_list = $('.entry-news tr:last'); // last news block 4248 var id = news_list.data('id'); 4249 var lang = news_list.data('lang'); 4250 var date = news_list.data('date'); 4251 console.log(id); 4252 4253 $.ajax({
4254 url: lang + "/yangiliklar/latest", 4255 type: "get", 4256 data: {"id": id, "lang": lang}, 4257 beforeSend: function () { 4258 _loading('show'); 4259 $(window).scrollTop(t); 4260 }, 4261 success: function (data) { 4262 if (data !== '') { 4263 news_list.after(data.posts); 4264 $(window).scrollTop(t); 4265 } 4266 // analytics 4267 var tracker = window.ga.getAll()[0]; 4268 if (tracker && tracker.set && tracker.send) { 4269 tracker.set('page', '/yangiliklar/boshqa/habarlar'); 4270 tracker.send('pageview'); 4271 } 4272 }, 4273 error: function () { 4274 alert("Error #7"); 4275 }, 4276 complete: function () { 4277 _loading('hide'); 4278 } 4279 }); 4280 }); 4281 4282 function _loading(type) { 4283 if (type === 'show') { 4284 $(loading).show(); 4285 } else { 4286 $(loading).hide(); 4287 } 4288 } 4289 4290 $('.poll-image-field').on('click', function(e){ 4291 e.preventDefault(); 4292 $('<input type="hidden" value="'+$(this).data('value')+'" name="variant">').appendTo('.poll-image-form'); 4293 $(this).parents('.poll-image-form').submit(); 4294 }); 4295 4296 if (typeof ($('.news-list').data('next-page')) !== 'undefined') { 4297 var page = $('.news-list').data('next-page'); 4298 var block = true; 4299 $(window).scroll(function () { 4300 if (( $(window).height() + ( $(window).scrollTop() + 3500 ) ) >= $(document).height() && block) { 4301 page = $('.news-list').data('next-page'); 4302 block = false; 4303 $.get(page, function (data) { 4304 stopLoading(); 4305 if (data !== '' && data.last_page == 1) { 4306 return; 4307 } 4308 if (data.posts == '') { 4309 block = false; 4310 } else { 4311 $('.posts').append(data.posts); 4312 if (data.current_page == data.last_page){ 4313 block = false; 4314 return; 4315 } 4316 $('.news-list').data('next-page', data.next_page); 4317 block = true; 4318 } 4319 }); 4320 startLoading(); 4321 } 4322 }); 4323 4324 function startLoading() { 4325 $('.loading-block-list').fadeIn(300); 4326 } 4327 4328 function stopLoading() { 4329 $('.loading-block-list').fadeOut(); 4330 } 4331 } 4332 4333 var bestPictures = new Bloodhound({ 4334 datumTokenizer: Bloodhound.tokenizers.obj.whitespace('title'), 4335 queryTokenizer: Bloodhound.tokenizers.whitespace, 4336 prefetch: "/query.json", 4337 remote: { 4338 url: '/query?q=%QUERY%', 4339 wildcard: '%QUERY', 4340 4341 } 4342 }); 4343 4344 bestPictures.clearPrefetchCache(); 4345 bestPictures.initialize(); 4346 4347 function nflTeamsWithDefaults(q, sync) { 4348 if (q === '') { 4349 sync(bestPictures.all()); 4350 } 4351 4352 else { 4353 bestPictures.search(q, sync); 4354 } 4355 } 4356 4357 $('.typeahead').typeahead({ 4358 minLength: 0, 4359 items: 10, 4360 highlight: true 4361 }, { 4362 name: 'title', 4363 display: 'title', 4364 limit: 10, 4365 source: bestPictures 4366 }); 4367 4368 $(".w_option_id").change(function() { 4369 var than = $(this); 4370 var option_id = than.val(); 4371 $.get(APP_URL + "/statistika/option", { 4372 "option_id": option_id, 4373 "lang": LANG 4374 }, 4375 function(data) { 4376 panel = than.parents('.panel-body').find('.option_content'); 4377 panel.empty(); 4378 panel.html(data.attributes); 4379 }, "json"); 4380 }); 4381 4382 4383 4384 if ($(location).attr('hash') == '#registerModel'){ 4385 $('#registerModel').modal('show'); 4386 } 4387 4388 function updateClockU() { 4389 var now = new Date(); 4390 var 4391 sec = now.getSeconds(), 4392 min = now.getMinutes(), 4393 hou = now.getHours(), 4394 mo = now.getMonth() + 1, 4395 dy = now.getDate(), 4396 yr = now.getFullYear(); 4397 var corr = hou.pad(2) + ':' + min.pad(2) + ':' + sec.pad(2) + ' ' + dy.pad(2) + '.' + mo.pad(2) + '.' + yr; 4398 let widget = document.getElementById('time_widget_c_u'); 4399 if (widget) { 4400 widget.firstChild.nodeValue = corr; 4401 } 4402 } 4403 4404 $('.select-region').on('change', function (e) { 4405 e.preventDefault(); 4406 $('#ruza-table').addClass('hide-save'); 4407 var than = $(this); 4408 var lang = $('.select-region').data('lang'); 4409 var city = $('.select-region option:selected').text(); 4410 4411 $.ajax({
4412 url: APP_URL + lang + '/statistika/ajax', 4413 data: {"region": $(this).val()}, 4414 type: 'GET', 4415 success: function (data, textStatus) { 4416 if (textStatus != 'success') { 4417 return; 4418 } 4419 if (data == '') { 4420 return; 4421 } 4422 4423 $('.widget-container').html(data.attribute); 4424 $('#ruza-table').removeClass('hide-save'); 4425 // analytics 4426 var tracker = window.ga.getAll()[0]; 4427 if (tracker && tracker.set && tracker.send) { 4428 tracker.set('page', '/ramazon_taqvimi/' + city + '/'); 4429 tracker.send('pageview'); 4430 } 4431 } 4432 }); 4433 }); 4434});
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.