!function(e,t){"object"==typeof exports&&exports?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):(e.Mustache={},t(Mustache))}(this,function(F){var t=Object.prototype.toString,A=Array.isArray||function(e){return"[object Array]"===t.call(e)};function u(e){return"function"==typeof e}function D(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function a(e,t){return null!=e&&"object"==typeof e&&t in e}var n=RegExp.prototype.test;var i=/\S/;function E(e){return!n.call(i,e)}var r={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};var L=/\s*/,B=/\s+/,M=/\s*=/,N=/\s*\}/,j=/#|\^|\/|>|\{|&|=|!/;function s(e,t){if(!e)return[];var n,i,r,s=[],o=[],a=[],l=!1,u=!1;function c(e){if("string"==typeof e&&(e=e.split(B,2)),!A(e)||2!==e.length)throw new Error("Invalid tags: "+e);n=new RegExp(D(e[0])+"\\s*"),i=new RegExp("\\s*"+D(e[1])),r=new RegExp("\\s*"+D("}"+e[1]))}c(t||F.tags);for(var d,h,f,p,g,m,v=new P(e);!v.eos();){if(d=v.pos,f=v.scanUntil(n))for(var y=0,b=f.length;y<b;++y)if(E(p=f.charAt(y))?a.push(o.length):u=!0,o.push(["text",p,d,d+1]),d+=1,"\n"===p){if(l&&!u)for(;a.length;)delete o[a.pop()];else a=[];u=l=!1}if(!v.scan(n))break;if(l=!0,h=v.scan(j)||"name",v.scan(L),"="===h?(f=v.scanUntil(M),v.scan(M),v.scanUntil(i)):"{"===h?(f=v.scanUntil(r),v.scan(N),v.scanUntil(i),h="&"):f=v.scanUntil(i),!v.scan(i))throw new Error("Unclosed tag at "+v.pos);if(g=[h,f,d,v.pos],o.push(g),"#"===h||"^"===h)s.push(g);else if("/"===h){if(!(m=s.pop()))throw new Error('Unopened section "'+f+'" at '+d);if(m[1]!==f)throw new Error('Unclosed section "'+m[1]+'" at '+d)}else"name"===h||"{"===h||"&"===h?u=!0:"="===h&&c(f)}if(m=s.pop())throw new Error('Unclosed section "'+m[1]+'" at '+v.pos);for(var x,_=function(e){for(var t,n,i=[],r=0,s=e.length;r<s;++r)(t=e[r])&&("text"===t[0]&&n&&"text"===n[0]?(n[1]+=t[1],n[3]=t[3]):(i.push(t),n=t));return i}(o),w=[],C=w,S=[],T=0,k=_.length;T<k;++T)switch((x=_[T])[0]){case"#":case"^":C.push(x),S.push(x),C=x[4]=[];break;case"/":S.pop()[5]=x[2],C=0<S.length?S[S.length-1][4]:w;break;default:C.push(x)}return w}function P(e){this.string=e,this.tail=e,this.pos=0}function o(e,t){this.view=e,this.cache={".":this.view},this.parent=t}function e(){this.cache={}}P.prototype.eos=function(){return""===this.tail},P.prototype.scan=function(e){var e=this.tail.match(e);return e&&0===e.index?(e=e[0],this.tail=this.tail.substring(e.length),this.pos+=e.length,e):""},P.prototype.scanUntil=function(e){var t,n=this.tail.search(e);switch(n){case-1:t=this.tail,this.tail="";break;case 0:t="";break;default:t=this.tail.substring(0,n),this.tail=this.tail.substring(n)}return this.pos+=t.length,t},o.prototype.push=function(e){return new o(e,this)},o.prototype.lookup=function(e){var t,n=this.cache;if(n.hasOwnProperty(e))t=n[e];else{for(var i,r,s=this,o=!1;s;){if(0<e.indexOf("."))for(t=s.view,i=e.split("."),r=0;null!=t&&r<i.length;)r===i.length-1&&(o=a(t,i[r])),t=t[i[r++]];else t=s.view[e],o=a(s.view,e);if(o)break;s=s.parent}n[e]=t}return t=u(t)?t.call(this.view):t},e.prototype.clearCache=function(){this.cache={}},e.prototype.parse=function(e,t){var n=this.cache,i=n[e];return i=null==i?n[e]=s(e,t):i},e.prototype.render=function(e,t,n){var i=this.parse(e),t=t instanceof o?t:new o(t);return this.renderTokens(i,t,n,e)},e.prototype.renderTokens=function(e,t,n,i){for(var r,s,o,a="",l=0,u=e.length;l<u;++l)o=void 0,"#"===(s=(r=e[l])[0])?o=this.renderSection(r,t,n,i):"^"===s?o=this.renderInverted(r,t,n,i):">"===s?o=this.renderPartial(r,t,n,i):"&"===s?o=this.unescapedValue(r,t):"name"===s?o=this.escapedValue(r,t):"text"===s&&(o=this.rawValue(r)),void 0!==o&&(a+=o);return a},e.prototype.renderSection=function(e,t,n,i){var r=this,s="",o=t.lookup(e[1]);if(o){if(A(o))for(var a=0,l=o.length;a<l;++a)s+=this.renderTokens(e[4],t.push(o[a]),n,i);else if("object"==typeof o||"string"==typeof o||"number"==typeof o)s+=this.renderTokens(e[4],t.push(o),n,i);else if(u(o)){if("string"!=typeof i)throw new Error("Cannot use higher-order sections without the original template");null!=(o=o.call(t.view,i.slice(e[3],e[5]),function(e){return r.render(e,t,n)}))&&(s+=o)}else s+=this.renderTokens(e[4],t,n,i);return s}},e.prototype.renderInverted=function(e,t,n,i){var r=t.lookup(e[1]);if(!r||A(r)&&0===r.length)return this.renderTokens(e[4],t,n,i)},e.prototype.renderPartial=function(e,t,n){return n&&null!=(e=u(n)?n(e[1]):n[e[1]])?this.renderTokens(this.parse(e),t,n,e):void 0},e.prototype.unescapedValue=function(e,t){t=t.lookup(e[1]);if(null!=t)return t},e.prototype.escapedValue=function(e,t){t=t.lookup(e[1]);if(null!=t)return F.escape(t)},e.prototype.rawValue=function(e){return e[1]},F.name="mustache.js",F.version="2.1.2",F.tags=["{{","}}"];var l=new e;F.clearCache=function(){return l.clearCache()},F.parse=function(e,t){return l.parse(e,t)},F.render=function(e,t,n){return l.render(e,t,n)},F.to_html=function(e,t,n,i){e=F.render(e,t,n);if(!u(i))return e;i(e)},F.escape=function(e){return String(e).replace(/[&<>"'\/]/g,function(e){return r[e]})},F.Scanner=P,F.Context=o,F.Writer=e}),function(p,_){function P(e,t){return t.toUpperCase()}function R(){m.addEventListener?(m.removeEventListener("DOMContentLoaded",i,!1),p.removeEventListener("load",i,!1)):(m.detachEvent("onreadystatechange",i),p.detachEvent("onload",i))}var O,g=typeof _,I=p.location,m=p.document,H=m.documentElement,z=p.jQuery,q=p.$,W={},$=[],t="1.10.2",V=$.concat,U=$.push,c=$.slice,Z=$.indexOf,Q=W.toString,Y=W.hasOwnProperty,X=t.trim,w=function(e,t){return new w.fn.init(e,t,me)},K=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,C=/\S+/g,G=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,J=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,ee=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,te=/^[\],:{}\s]*$/,ne=/(?:^|:|,)(?:\s*\[)+/g,ie=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,re=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,se=/^-ms-/,oe=/-([\da-z])/gi,i=function(e){!m.addEventListener&&"load"!==e.type&&"complete"!==m.readyState||(R(),w.ready())};function ae(e){var t=e.length,n=w.type(e);return!w.isWindow(e)&&(!(1!==e.nodeType||!t)||"array"===n||"function"!==n&&(0===t||"number"==typeof t&&0<t&&t-1 in e))}w.fn=w.prototype={jquery:t,constructor:w,init:function(e,t,n){var i,r;if(e){if("string"!=typeof e)return e.nodeType?(this.context=this[0]=e,this.length=1,this):w.isFunction(e)?n.ready(e):(e.selector!==_&&(this.selector=e.selector,this.context=e.context),w.makeArray(e,this));if(!(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&3<=e.length?[null,e,null]:J.exec(e))||!i[1]&&t)return(!t||t.jquery?t||n:this.constructor(t)).find(e);if(i[1]){if(t=t instanceof w?t[0]:t,w.merge(this,w.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:m,!0)),ee.test(i[1])&&w.isPlainObject(t))for(i in t)w.isFunction(this[i])?this[i](t[i]):this.attr(i,t[i])}else{if((r=m.getElementById(i[2]))&&r.parentNode){if(r.id!==i[2])return n.find(e);this.length=1,this[0]=r}this.context=m,this.selector=e}}return this},selector:"",length:0,toArray:function(){return c.call(this)},get:function(e){return null==e?this.toArray():e<0?this[this.length+e]:this[e]},pushStack:function(e){e=w.merge(this.constructor(),e);return e.prevObject=this,e.context=this.context,e},each:function(e,t){return w.each(this,e,t)},ready:function(e){return w.ready.promise().done(e),this},slice:function(){return this.pushStack(c.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,e=+e+(e<0?t:0);return this.pushStack(0<=e&&e<t?[this[e]]:[])},map:function(n){return this.pushStack(w.map(this,function(e,t){return n.call(e,t,e)}))},end:function(){return this.prevObject||this.constructor(null)},push:U,sort:[].sort,splice:[].splice},w.fn.init.prototype=w.fn,w.extend=w.fn.extend=function(){var e,t,n,i,r,s=arguments[0]||{},o=1,a=arguments.length,l=!1;for("boolean"==typeof s&&(l=s,s=arguments[1]||{},o=2),"object"==typeof s||w.isFunction(s)||(s={}),a===o&&(s=this,--o);o<a;o++)if(null!=(i=arguments[o]))for(n in i)r=s[n],t=i[n],s!==t&&(l&&t&&(w.isPlainObject(t)||(e=w.isArray(t)))?(r=e?(e=!1,r&&w.isArray(r)?r:[]):r&&w.isPlainObject(r)?r:{},s[n]=w.extend(l,r,t)):t!==_&&(s[n]=t));return s},w.extend({expando:"jQuery"+(t+Math.random()).replace(/\D/g,""),noConflict:function(e){return p.$===w&&(p.$=q),e&&p.jQuery===w&&(p.jQuery=z),w},isReady:!1,readyWait:1,holdReady:function(e){e?w.readyWait++:w.ready(!0)},ready:function(e){if(!0===e?!--w.readyWait:!w.isReady){if(!m.body)return setTimeout(w.ready);(w.isReady=!0)!==e&&0<--w.readyWait||(O.resolveWith(m,[w]),w.fn.trigger&&w(m).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===w.type(e)},isArray:Array.isArray||function(e){return"array"===w.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?W[Q.call(e)]||"object":typeof e},isPlainObject:function(e){if(!e||"object"!==w.type(e)||e.nodeType||w.isWindow(e))return!1;try{if(e.constructor&&!Y.call(e,"constructor")&&!Y.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(e){return!1}if(w.support.ownLast)for(var t in e)return Y.call(e,t);for(t in e);return t===_||Y.call(e,t)},isEmptyObject:function(e){for(var t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||m;var i=ee.exec(e),n=!n&&[];return i?[t.createElement(i[1])]:(i=w.buildFragment([e],t,n),n&&w(n).remove(),w.merge([],i.childNodes))},parseJSON:function(e){return p.JSON&&p.JSON.parse?p.JSON.parse(e):null===e?e:"string"==typeof e&&(e=w.trim(e))&&te.test(e.replace(ie,"@").replace(re,"]").replace(ne,""))?Function("return "+e)():(w.error("Invalid JSON: "+e),_)},parseXML:function(e){var t;if(!e||"string"!=typeof e)return null;try{p.DOMParser?t=(new DOMParser).parseFromString(e,"text/xml"):((t=new ActiveXObject("Microsoft.XMLDOM")).async="false",t.loadXML(e))}catch(e){t=_}return t&&t.documentElement&&!t.getElementsByTagName("parsererror").length||w.error("Invalid XML: "+e),t},noop:function(){},globalEval:function(e){e&&w.trim(e)&&(p.execScript||function(e){p.eval.call(p,e)})(e)},camelCase:function(e){return e.replace(se,"ms-").replace(oe,P)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var i,r=0,s=e.length,o=ae(e);if(n){if(o)for(;r<s&&!1!==(i=t.apply(e[r],n));r++);else for(r in e)if(i=t.apply(e[r],n),!1===i)break}else if(o)for(;r<s&&!1!==(i=t.call(e[r],r,e[r]));r++);else for(r in e)if(i=t.call(e[r],r,e[r]),!1===i)break;return e},trim:X&&!X.call("\ufeff ")?function(e){return null==e?"":X.call(e)}:function(e){return null==e?"":(e+"").replace(G,"")},makeArray:function(e,t){t=t||[];return null!=e&&(ae(Object(e))?w.merge(t,"string"==typeof e?[e]:e):U.call(t,e)),t},inArray:function(e,t,n){var i;if(t){if(Z)return Z.call(t,e,n);for(i=t.length,n=n?n<0?Math.max(0,i+n):n:0;n<i;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,t){var n=t.length,i=e.length,r=0;if("number"==typeof n)for(;r<n;r++)e[i++]=t[r];else for(;t[r]!==_;)e[i++]=t[r++];return e.length=i,e},grep:function(e,t,n){var i=[],r=0,s=e.length;for(n=!!n;r<s;r++)n!==!!t(e[r],r)&&i.push(e[r]);return i},map:function(e,t,n){var i,r=0,s=e.length,o=[];if(ae(e))for(;r<s;r++)null!=(i=t(e[r],r,n))&&(o[o.length]=i);else for(r in e)i=t(e[r],r,n),null!=i&&(o[o.length]=i);return V.apply([],o)},guid:1,proxy:function(e,t){var n,i;return"string"==typeof t&&(i=e[t],t=e,e=i),w.isFunction(e)?(n=c.call(arguments,2),(i=function(){return e.apply(t||this,n.concat(c.call(arguments)))}).guid=e.guid=e.guid||w.guid++,i):_},access:function(e,t,n,i,r,s,o){var a=0,l=e.length,u=null==n;if("object"===w.type(n))for(a in r=!0,n)w.access(e,t,a,n[a],!0,s,o);else if(i!==_&&(r=!0,w.isFunction(i)||(o=!0),t=u?o?(t.call(e,i),null):(u=t,function(e,t,n){return u.call(w(e),n)}):t))for(;a<l;a++)t(e[a],n,o?i:i.call(e[a],a,t(e[a],n)));return r?e:u?t.call(e):l?t(e[0],n):s},now:function(){return(new Date).getTime()},swap:function(e,t,n,i){var r,s={};for(r in t)s[r]=e.style[r],e.style[r]=t[r];for(r in n=n.apply(e,i||[]),t)e.style[r]=s[r];return n}}),w.ready.promise=function(e){if(!O)if(O=w.Deferred(),"complete"===m.readyState)setTimeout(w.ready);else if(m.addEventListener)m.addEventListener("DOMContentLoaded",i,!1),p.addEventListener("load",i,!1);else{m.attachEvent("onreadystatechange",i),p.attachEvent("onload",i);var n=!1;try{n=null==p.frameElement&&m.documentElement}catch(e){}n&&n.doScroll&&function t(){if(!w.isReady){try{n.doScroll("left")}catch(e){return setTimeout(t,50)}R(),w.ready()}}()}return O.promise(e)},w.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){W["[object "+t+"]"]=t.toLowerCase()});var le,x,ue,S,ce,de,he,fe,u,T,k,n,F,A,r,pe,ge,me=w(m),ve=p,s=void 0,D="sizzle"+-new Date,E=ve.document,L=0,ye=0,be=Ze(),xe=Ze(),_e=Ze(),we=!1,Ce=function(e,t){return e===t&&(we=!0),0},Se=typeof s,Te={}.hasOwnProperty,t=[],ke=t.pop,Fe=t.push,B=t.push,Ae=t.slice,y=t.indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(this[t]===e)return t;return-1},De="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",o="[\\x20\\t\\r\\n\\f]",Ee="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",Le=Ee.replace("w","w#"),Be="\\["+o+"*("+Ee+")"+o+"*(?:([*^$|!~]?=)"+o+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+Le+")|)|)"+o+"*\\]",Me=":("+Ee+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+Be.replace(3,8)+")*)|.*)\\)|)",Ne=RegExp("^"+o+"+|((?:^|[^\\\\])(?:\\\\.)*)"+o+"+$","g"),je=RegExp("^"+o+"*,"+o+"*"),Pe=RegExp("^"+o+"*([>+~]|"+o+")"+o+"*"),Re=RegExp(o+"*[+~]"),Oe=RegExp("="+o+"*([^\\]'\"]*)"+o+"*\\]","g"),Ie=RegExp(Me),He=RegExp("^"+Le+"$"),ze={ID:RegExp("^#("+Ee+")"),CLASS:RegExp("^\\.("+Ee+")"),TAG:RegExp("^("+Ee.replace("w","w*")+")"),ATTR:RegExp("^"+Be),PSEUDO:RegExp("^"+Me),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+o+"*(even|odd|(([+-]|)(\\d*)n|)"+o+"*(?:([+-]|)"+o+"*(\\d+)|))"+o+"*\\)|)","i"),bool:RegExp("^(?:"+De+")$","i"),needsContext:RegExp("^"+o+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+o+"*((?:-\\d)?\\d*)"+o+"*\\)|)(?=[^-]|$)","i")},qe=/^[^{]+\{\s*\[native \w/,We=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$e=/^(?:input|select|textarea|button)$/i,Ve=/^h\d$/i,Ue=/'|\\/g,M=RegExp("\\\\([\\da-f]{1,6}"+o+"?|("+o+")|.)","ig"),N=function(e,t,n){var i="0x"+t-65536;return i!=i||n?t:i<0?String.fromCharCode(65536+i):String.fromCharCode(55296|i>>10,56320|1023&i)};try{B.apply(t=Ae.call(E.childNodes),E.childNodes),t[E.childNodes.length].nodeType}catch(e){B={apply:t.length?function(e,t){Fe.apply(e,Ae.call(t))}:function(e,t){for(var n=e.length,i=0;e[n++]=t[i++];);e.length=n-1}}}function j(e,t,n,i){var r,s,o,a,l,u;if((t?t.ownerDocument||t:E)!==k&&T(t),n=n||[],!e||"string"!=typeof e)return n;if(1!==(b=(t=t||k).nodeType)&&9!==b)return[];if(F&&!i){if(l=We.exec(e))if(u=l[1]){if(9===b){if(!(o=t.getElementById(u))||!o.parentNode)return n;if(o.id===u)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(u))&&ge(t,o)&&o.id===u)return n.push(o),n}else{if(l[2])return B.apply(n,t.getElementsByTagName(e)),n;if((u=l[3])&&x.getElementsByClassName&&t.getElementsByClassName)return B.apply(n,t.getElementsByClassName(u)),n}if(x.qsa&&(!A||!A.test(e))){if(a=o=D,l=t,u=9===b&&e,1===b&&"object"!==t.nodeName.toLowerCase()){for(s=Ke(e),(o=t.getAttribute("id"))?a=o.replace(Ue,"\\$&"):t.setAttribute("id",a),a="[id='"+a+"'] ",r=s.length;r--;)s[r]=a+Ge(s[r]);l=Re.test(e)&&t.parentNode||t,u=s.join(",")}if(u)try{return B.apply(n,l.querySelectorAll(u)),n}catch(e){}finally{o||t.removeAttribute("id")}}}var c,d,h,f,p,g=e.replace(Ne,"$1"),m=t,v=n,y=i,b=Ke(g);if(!y&&1===b.length){if(2<(d=b[0]=b[0].slice(0)).length&&"ID"===(h=d[0]).type&&x.getById&&9===m.nodeType&&F&&S.relative[d[1].type]){if(!(m=(S.find.ID(h.matches[0].replace(M,N),m)||[])[0]))return v;g=g.slice(d.shift().value.length)}for(c=ze.needsContext.test(g)?0:d.length;c--&&(h=d[c],!S.relative[f=h.type]);)if((p=S.find[f])&&(y=p(h.matches[0].replace(M,N),Re.test(d[0].type)&&m.parentNode||m))){if(d.splice(c,1),g=y.length&&Ge(d))break;return B.apply(v,y),v}}return he(g,b)(y,m,!F,v,Re.test(g)),v}function Ze(){var n=[];function i(e,t){return n.push(e+=" ")>S.cacheLength&&delete i[n.shift()],i[e]=t}return i}function l(e){return e[D]=!0,e}function a(e){var t=k.createElement("div");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t)}}function Qe(e,t){for(var n=e.split("|"),i=e.length;i--;)S.attrHandle[n[i]]=t}function Ye(e,t){var n=t&&e,i=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||1<<31)-(~e.sourceIndex||1<<31);if(i)return i;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function e(o){return l(function(s){return s=+s,l(function(e,t){for(var n,i=o([],e.length,s),r=i.length;r--;)e[n=i[r]]&&(e[n]=!(t[n]=e[n]))})})}for(le in de=j.isXML=function(e){e=e&&(e.ownerDocument||e).documentElement;return!!e&&"HTML"!==e.nodeName},x=j.support={},T=j.setDocument=function(e){var l=e?e.ownerDocument||e:E,e=l.defaultView;return l!==k&&9===l.nodeType&&l.documentElement?(n=(k=l).documentElement,F=!de(l),e&&e.attachEvent&&e!==e.top&&e.attachEvent("onbeforeunload",function(){T()}),x.attributes=a(function(e){return e.className="i",!e.getAttribute("className")}),x.getElementsByTagName=a(function(e){return e.appendChild(l.createComment("")),!e.getElementsByTagName("*").length}),x.getElementsByClassName=a(function(e){return e.innerHTML="<div class='a'></div><div class='a i'></div>",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),x.getById=a(function(e){return n.appendChild(e).id=D,!l.getElementsByName||!l.getElementsByName(D).length}),x.getById?(S.find.ID=function(e,t){if(typeof t.getElementById!=Se&&F)return(t=t.getElementById(e))&&t.parentNode?[t]:[]},S.filter.ID=function(e){var t=e.replace(M,N);return function(e){return e.getAttribute("id")===t}}):(delete S.find.ID,S.filter.ID=function(e){var t=e.replace(M,N);return function(e){e=typeof e.getAttributeNode!=Se&&e.getAttributeNode("id");return e&&e.value===t}}),S.find.TAG=x.getElementsByTagName?function(e,t){return typeof t.getElementsByTagName!=Se?t.getElementsByTagName(e):s}:function(e,t){var n,i=[],r=0,s=t.getElementsByTagName(e);if("*"!==e)return s;for(;n=s[r++];)1===n.nodeType&&i.push(n);return i},S.find.CLASS=x.getElementsByClassName&&function(e,t){return typeof t.getElementsByClassName!=Se&&F?t.getElementsByClassName(e):s},r=[],A=[],(x.qsa=qe.test(l.querySelectorAll))&&(a(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||A.push("\\["+o+"*(?:value|"+De+")"),e.querySelectorAll(":checked").length||A.push(":checked")}),a(function(e){var t=l.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("t",""),e.querySelectorAll("[t^='']").length&&A.push("[*^$]="+o+"*(?:''|\"\")"),e.querySelectorAll(":enabled").length||A.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),A.push(",.*:")})),(x.matchesSelector=qe.test(pe=n.webkitMatchesSelector||n.mozMatchesSelector||n.oMatchesSelector||n.msMatchesSelector))&&a(function(e){x.disconnectedMatch=pe.call(e,"div"),pe.call(e,"[s!='']:x"),r.push("!=",Me)}),A=A.length&&RegExp(A.join("|")),r=r.length&&RegExp(r.join("|")),ge=qe.test(n.contains)||n.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,t=t&&t.parentNode;return e===t||!(!t||1!==t.nodeType||!(n.contains?n.contains(t):e.compareDocumentPosition&&16&e.compareDocumentPosition(t)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},Ce=n.compareDocumentPosition?function(e,t){var n;return e===t?(we=!0,0):(n=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t))?1&n||!x.sortDetached&&t.compareDocumentPosition(e)===n?e===l||ge(E,e)?-1:t===l||ge(E,t)?1:u?y.call(u,e)-y.call(u,t):0:4&n?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var n,i=0,r=e.parentNode,s=t.parentNode,o=[e],a=[t];if(e===t)return we=!0,0;if(!r||!s)return e===l?-1:t===l?1:r?-1:s?1:u?y.call(u,e)-y.call(u,t):0;if(r===s)return Ye(e,t);for(n=e;n=n.parentNode;)o.unshift(n);for(n=t;n=n.parentNode;)a.unshift(n);for(;o[i]===a[i];)i++;return i?Ye(o[i],a[i]):o[i]===E?-1:a[i]===E?1:0},l):k},j.matches=function(e,t){return j(e,null,null,t)},j.matchesSelector=function(e,t){if((e.ownerDocument||e)!==k&&T(e),t=t.replace(Oe,"='$1']"),!(!x.matchesSelector||!F||r&&r.test(t)||A&&A.test(t)))try{var n=pe.call(e,t);if(n||x.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){}return 0<j(t,k,null,[e]).length},j.contains=function(e,t){return(e.ownerDocument||e)!==k&&T(e),ge(e,t)},j.attr=function(e,t){(e.ownerDocument||e)!==k&&T(e);var n=S.attrHandle[t.toLowerCase()],n=n&&Te.call(S.attrHandle,t.toLowerCase())?n(e,t,!F):s;return n===s?x.attributes||!F?e.getAttribute(t):(n=e.getAttributeNode(t))&&n.specified?n.value:null:n},j.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},j.uniqueSort=function(e){var t,n=[],i=0,r=0;if(we=!x.detectDuplicates,u=!x.sortStable&&e.slice(0),e.sort(Ce),we){for(;t=e[r++];)t===e[r]&&(i=n.push(r));for(;i--;)e.splice(n[i],1)}return e},ce=j.getText=function(e){var t,n="",i=0,r=e.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=ce(e)}else if(3===r||4===r)return e.nodeValue}else for(;t=e[i];i++)n+=ce(t);return n},(S=j.selectors={cacheLength:50,createPseudo:l,match:ze,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(M,N),e[3]=(e[4]||e[5]||"").replace(M,N),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||j.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&j.error(e[0]),e},PSEUDO:function(e){var t,n=!e[5]&&e[2];return ze.CHILD.test(e[0])?null:(e[3]&&e[4]!==s?e[2]=e[4]:n&&Ie.test(n)&&(t=(t=Ke(n,!0))&&n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(M,N).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=be[e+" "];return t||(t=RegExp("(^|"+o+")"+e+"("+o+"|$)"))&&be(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!=Se&&e.getAttribute("class")||"")})},ATTR:function(t,n,i){return function(e){e=j.attr(e,t);return null==e?"!="===n:!n||(e+="","="===n?e===i:"!="===n?e!==i:"^="===n?i&&0===e.indexOf(i):"*="===n?i&&-1<e.indexOf(i):"$="===n?i&&e.slice(-i.length)===i:"~="===n?-1<(" "+e+" ").indexOf(i):"|="===n&&(e===i||e.slice(0,i.length+1)===i+"-"))}},CHILD:function(f,e,t,p,g){var m="nth"!==f.slice(0,3),v="last"!==f.slice(-4),y="of-type"===e;return 1===p&&0===g?function(e){return!!e.parentNode}:function(e,t,n){var i,r,s,o,a,l,u=m!=v?"nextSibling":"previousSibling",c=e.parentNode,d=y&&e.nodeName.toLowerCase(),h=!n&&!y;if(c){if(m){for(;u;){for(s=e;s=s[u];)if(y?s.nodeName.toLowerCase()===d:1===s.nodeType)return!1;l=u="only"===f&&!l&&"nextSibling"}return!0}if(l=[v?c.firstChild:c.lastChild],v&&h){for(a=(i=(r=c[D]||(c[D]={}))[f]||[])[0]===L&&i[1],o=i[0]===L&&i[2],s=a&&c.childNodes[a];s=++a&&s&&s[u]||(o=a=0,l.pop());)if(1===s.nodeType&&++o&&s===e){r[f]=[L,a,o];break}}else if(h&&(i=(e[D]||(e[D]={}))[f])&&i[0]===L)o=i[1];else for(;(s=++a&&s&&s[u]||(o=a=0,l.pop()))&&((y?s.nodeName.toLowerCase()!==d:1!==s.nodeType)||!++o||(h&&((s[D]||(s[D]={}))[f]=[L,o]),s!==e)););return(o-=g)===p||0==o%p&&0<=o/p}}},PSEUDO:function(e,s){var t,o=S.pseudos[e]||S.setFilters[e.toLowerCase()]||j.error("unsupported pseudo: "+e);return o[D]?o(s):1<o.length?(t=[e,e,"",s],S.setFilters.hasOwnProperty(e.toLowerCase())?l(function(e,t){for(var n,i=o(e,s),r=i.length;r--;)e[n=y.call(e,i[r])]=!(t[n]=i[r])}):function(e){return o(e,0,t)}):o}},pseudos:{not:l(function(e){var i=[],r=[],a=he(e.replace(Ne,"$1"));return a[D]?l(function(e,t,n,i){for(var r,s=a(e,null,i,[]),o=e.length;o--;)(r=s[o])&&(e[o]=!(t[o]=r))}):function(e,t,n){return i[0]=e,a(i,null,n,r),!r.pop()}}),has:l(function(t){return function(e){return 0<j(t,e).length}}),contains:l(function(t){return function(e){return-1<(e.textContent||e.innerText||ce(e)).indexOf(t)}}),lang:l(function(n){return He.test(n||"")||j.error("unsupported lang: "+n),n=n.replace(M,N).toLowerCase(),function(e){var t;do{if(t=F?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(t=t.toLowerCase())===n||0===t.indexOf(n+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=ve.location&&ve.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===n},focus:function(e){return e===k.activeElement&&(!k.hasFocus||k.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return!1===e.disabled},disabled:function(e){return!0===e.disabled},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if("@"<e.nodeName||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!S.pseudos.empty(e)},header:function(e){return Ve.test(e.nodeName)},input:function(e){return $e.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:e(function(){return[0]}),last:e(function(e,t){return[t-1]}),eq:e(function(e,t,n){return[n<0?n+t:n]}),even:e(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:e(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:e(function(e,t,n){for(var i=n<0?n+t:n;0<=--i;)e.push(i);return e}),gt:e(function(e,t,n){for(var i=n<0?n+t:n;t>++i;)e.push(i);return e})}}).pseudos.nth=S.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})S.pseudos[le]=function(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}(le);for(le in{submit:!0,reset:!0})S.pseudos[le]=function(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}(le);function Xe(){}function Ke(e,t){var n,i,r,s,o,a,l,u=xe[e+" "];if(u)return t?0:u.slice(0);for(o=e,a=[],l=S.preFilter;o;){for(s in n&&!(i=je.exec(o))||(i&&(o=o.slice(i[0].length)||o),a.push(r=[])),n=!1,(i=Pe.exec(o))&&(n=i.shift(),r.push({value:n,type:i[0].replace(Ne," ")}),o=o.slice(n.length)),S.filter)!(i=ze[s].exec(o))||l[s]&&!(i=l[s](i))||(n=i.shift(),r.push({value:n,type:s,matches:i}),o=o.slice(n.length));if(!n)break}return t?o.length:o?j.error(e):xe(e,a).slice(0)}function Ge(e){for(var t=0,n=e.length,i="";t<n;t++)i+=e[t].value;return i}function Je(a,e,t){var l=e.dir,u=t&&"parentNode"===l,c=ye++;return e.first?function(e,t,n){for(;e=e[l];)if(1===e.nodeType||u)return a(e,t,n)}:function(e,t,n){var i,r,s,o=L+" "+c;if(n){for(;e=e[l];)if((1===e.nodeType||u)&&a(e,t,n))return!0}else for(;e=e[l];)if(1===e.nodeType||u)if((r=(s=e[D]||(e[D]={}))[l])&&r[0]===o){if(!0===(i=r[1])||i===ue)return!0===i}else if((r=s[l]=[o])[1]=a(e,t,n)||ue,!0===r[1])return!0}}function et(r){return 1<r.length?function(e,t,n){for(var i=r.length;i--;)if(!r[i](e,t,n))return!1;return!0}:r[0]}function tt(e,t,n,i,r){for(var s,o=[],a=0,l=e.length,u=null!=t;a<l;a++)(s=e[a])&&(!n||n(s,i,r))&&(o.push(s),u)&&t.push(a);return o}function nt(f,p,g,m,v,e){return m&&!m[D]&&(m=nt(m)),v&&!v[D]&&(v=nt(v,e)),l(function(e,t,n,i){var r,s,o,a=[],l=[],u=t.length,c=e||function(e,t,n){for(var i=0,r=t.length;i<r;i++)j(e,t[i],n);return n}(p||"*",n.nodeType?[n]:n,[]),d=!f||!e&&p?c:tt(c,a,f,n,i),h=g?v||(e?f:u||m)?[]:t:d;if(g&&g(d,h,n,i),m)for(r=tt(h,l),m(r,[],n,i),s=r.length;s--;)(o=r[s])&&(h[l[s]]=!(d[l[s]]=o));if(e){if(v||f){if(v){for(r=[],s=h.length;s--;)(o=h[s])&&r.push(d[s]=o);v(null,h=[],r,i)}for(s=h.length;s--;)(o=h[s])&&-1<(r=v?y.call(e,o):a[s])&&(e[r]=!(t[r]=o))}}else h=tt(h===t?h.splice(u,h.length):h),v?v(null,t,h,i):B.apply(t,h)})}function it(m,v){function e(e,t,n,i,r){var s,o,a,l=[],u=0,c="0",d=e&&[],h=null!=r,f=fe,p=e||x&&S.find.TAG("*",r&&t.parentNode||t),g=L+=null==f?1:Math.random()||.1;for(h&&(fe=t!==k&&t,ue=y);null!=(s=p[c]);c++){if(x&&s){for(o=0;a=m[o++];)if(a(s,t,n)){i.push(s);break}h&&(L=g,ue=++y)}b&&((s=!a&&s)&&u--,e)&&d.push(s)}if(u+=c,b&&c!==u){for(o=0;a=v[o++];)a(d,l,t,n);if(e){if(0<u)for(;c--;)d[c]||l[c]||(l[c]=ke.call(i));l=tt(l)}B.apply(i,l),h&&!e&&0<l.length&&1<u+v.length&&j.uniqueSort(i)}return h&&(L=g,fe=f),d}var y=0,b=0<v.length,x=0<m.length;return b?l(e):e}Xe.prototype=S.filters=S.pseudos,S.setFilters=new Xe,he=j.compile=function(e,t){var n,i=[],r=[],s=_e[e+" "];if(!s){for(n=(t=t||Ke(e)).length;n--;)((s=function e(t){for(var i,n,r,s=t.length,o=S.relative[t[0].type],a=o||S.relative[" "],l=o?1:0,u=Je(function(e){return e===i},a,!0),c=Je(function(e){return-1<y.call(i,e)},a,!0),d=[function(e,t,n){return!o&&(n||t!==fe)||((i=t).nodeType?u:c)(e,t,n)}];l<s;l++)if(n=S.relative[t[l].type])d=[Je(et(d),n)];else{if((n=S.filter[t[l].type].apply(null,t[l].matches))[D]){for(r=++l;r<s&&!S.relative[t[r].type];r++);return nt(1<l&&et(d),1<l&&Ge(t.slice(0,l-1).concat({value:" "===t[l-2].type?"*":""})).replace(Ne,"$1"),n,l<r&&e(t.slice(l,r)),r<s&&e(t=t.slice(r)),r<s&&Ge(t))}d.push(n)}return et(d)}(t[n]))[D]?i:r).push(s);s=_e(e,it(r,i))}return s},x.sortStable=D.split("").sort(Ce).join("")===D,x.detectDuplicates=we,T(),x.sortDetached=a(function(e){return 1&e.compareDocumentPosition(k.createElement("div"))}),a(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||Qe("type|href|height|width",function(e,t,n){return n?s:e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),x.attributes&&a(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||Qe("value",function(e,t,n){return n||"input"!==e.nodeName.toLowerCase()?s:e.defaultValue}),a(function(e){return null==e.getAttribute("disabled")})||Qe(De,function(e,t,n){return n?s:(n=e.getAttributeNode(t))&&n.specified?n.value:!0===e[t]?t.toLowerCase():null}),w.find=j,w.expr=j.selectors,w.expr[":"]=w.expr.pseudos,w.unique=j.uniqueSort,w.text=j.getText,w.isXMLDoc=j.isXML,w.contains=j.contains;var rt={};w.Callbacks=function(r){var e,n;r="string"==typeof r?rt[r]||(n=rt[e=r]={},w.each(e.match(C)||[],function(e,t){n[t]=!0}),n):w.extend({},r);function i(e){for(t=r.memory&&e,o=!0,l=u||0,u=0,a=c.length,s=!0;c&&l<a;l++)if(!1===c[l].apply(e[0],e[1])&&r.stopOnFalse){t=!1;break}s=!1,c&&(d?d.length&&i(d.shift()):t?c=[]:h.disable())}var s,t,o,a,l,u,c=[],d=!r.once&&[],h={add:function(){var e;return c&&(e=c.length,function i(e){w.each(e,function(e,t){var n=w.type(t);"function"===n?r.unique&&h.has(t)||c.push(t):t&&t.length&&"string"!==n&&i(t)})}(arguments),s?a=c.length:t&&(u=e,i(t))),this},remove:function(){return c&&w.each(arguments,function(e,t){for(var n;-1<(n=w.inArray(t,c,n));)c.splice(n,1),s&&(n<=a&&a--,n<=l)&&l--}),this},has:function(e){return e?-1<w.inArray(e,c):!(!c||!c.length)},empty:function(){return c=[],a=0,this},disable:function(){return c=d=t=_,this},disabled:function(){return!c},lock:function(){return d=_,t||h.disable(),this},locked:function(){return!d},fireWith:function(e,t){return!c||o&&!d||(t=[e,(t=t||[]).slice?t.slice():t],s?d.push(t):i(t)),this},fire:function(){return h.fireWith(this,arguments),this},fired:function(){return!!o}};return h},w.extend({Deferred:function(e){var o=[["resolve","done",w.Callbacks("once memory"),"resolved"],["reject","fail",w.Callbacks("once memory"),"rejected"],["notify","progress",w.Callbacks("memory")]],r="pending",a={state:function(){return r},always:function(){return l.done(arguments).fail(arguments),this},then:function(){var s=arguments;return w.Deferred(function(r){w.each(o,function(e,t){var n=t[0],i=w.isFunction(s[e])&&s[e];l[t[1]](function(){var e=i&&i.apply(this,arguments);e&&w.isFunction(e.promise)?e.promise().done(r.resolve).fail(r.reject).progress(r.notify):r[n+"With"](this===a?r.promise():this,i?[e]:arguments)})}),s=null}).promise()},promise:function(e){return null!=e?w.extend(e,a):a}},l={};return a.pipe=a.then,w.each(o,function(e,t){var n=t[2],i=t[3];a[t[1]]=n.add,i&&n.add(function(){r=i},o[1^e][2].disable,o[2][2].lock),l[t[0]]=function(){return l[t[0]+"With"](this===l?a:this,arguments),this},l[t[0]+"With"]=n.fireWith}),a.promise(l),e&&e.call(l,l),l},when:function(e){function t(t,n,i){return function(e){n[t]=this,i[t]=1<arguments.length?c.call(arguments):e,i===r?u.notifyWith(n,i):--l||u.resolveWith(n,i)}}var r,n,i,s=0,o=c.call(arguments),a=o.length,l=1!==a||e&&w.isFunction(e.promise)?a:0,u=1===l?e:w.Deferred();if(1<a)for(r=Array(a),n=Array(a),i=Array(a);s<a;s++)o[s]&&w.isFunction(o[s].promise)?o[s].promise().done(t(s,i,o)).fail(u.reject).progress(t(s,n,r)):--l;return l||u.resolveWith(i,o),u.promise()}}),w.support=function(r){var e,t,n,i,s,o,a,l=m.createElement("div");if(l.setAttribute("className","t"),l.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=l.getElementsByTagName("*")||[],(e=l.getElementsByTagName("a")[0])&&e.style&&n.length){i=(n=m.createElement("select")).appendChild(m.createElement("option")),t=l.getElementsByTagName("input")[0],e.style.cssText="top:1px;float:left;opacity:.5",r.getSetAttribute="t"!==l.className,r.leadingWhitespace=3===l.firstChild.nodeType,r.tbody=!l.getElementsByTagName("tbody").length,r.htmlSerialize=!!l.getElementsByTagName("link").length,r.style=/top/.test(e.getAttribute("style")),r.hrefNormalized="/a"===e.getAttribute("href"),r.opacity=/^0.5/.test(e.style.opacity),r.cssFloat=!!e.style.cssFloat,r.checkOn=!!t.value,r.optSelected=i.selected,r.enctype=!!m.createElement("form").enctype,r.html5Clone="<:nav></:nav>"!==m.createElement("nav").cloneNode(!0).outerHTML,r.inlineBlockNeedsLayout=!1,r.shrinkWrapBlocks=!1,r.pixelPosition=!1,r.deleteExpando=!0,r.noCloneEvent=!0,r.reliableMarginRight=!0,t.checked=r.boxSizingReliable=!0,r.noCloneChecked=t.cloneNode(!0).checked,n.disabled=!0,r.optDisabled=!i.disabled;try{delete l.test}catch(e){r.deleteExpando=!1}for(a in(t=m.createElement("input")).setAttribute("value",""),r.input=""===t.getAttribute("value"),t.value="t",t.setAttribute("type","radio"),r.radioValue="t"===t.value,t.setAttribute("checked","t"),t.setAttribute("name","t"),(i=m.createDocumentFragment()).appendChild(t),r.appendChecked=t.checked,r.checkClone=i.cloneNode(!0).cloneNode(!0).lastChild.checked,l.attachEvent&&(l.attachEvent("onclick",function(){r.noCloneEvent=!1}),l.cloneNode(!0).click()),{submit:!0,change:!0,focusin:!0})l.setAttribute(s="on"+a,"t"),r[a+"Bubbles"]=s in p||!1===l.attributes[s].expando;for(a in l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",r.clearCloneStyle="content-box"===l.style.backgroundClip,w(r))break;r.ownLast="0"!==a,w(function(){var e,t,n="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",i=m.getElementsByTagName("body")[0];i&&((e=m.createElement("div")).style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",i.appendChild(e).appendChild(l),l.innerHTML="<table><tr><td></td><td>t</td></tr></table>",(t=l.getElementsByTagName("td"))[0].style.cssText="padding:0;margin:0;border:0;display:none",o=0===t[0].offsetHeight,t[0].style.display="",t[1].style.display="none",r.reliableHiddenOffsets=o&&0===t[0].offsetHeight,l.innerHTML="",l.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",w.swap(i,null!=i.style.zoom?{zoom:1}:{},function(){r.boxSizing=4===l.offsetWidth}),p.getComputedStyle&&(r.pixelPosition="1%"!==(p.getComputedStyle(l,null)||{}).top,r.boxSizingReliable="4px"===(p.getComputedStyle(l,null)||{width:"4px"}).width,(t=l.appendChild(m.createElement("div"))).style.cssText=l.style.cssText=n,t.style.marginRight=t.style.width="0",l.style.width="1px",r.reliableMarginRight=!parseFloat((p.getComputedStyle(t,null)||{}).marginRight)),typeof l.style.zoom!=g&&(l.innerHTML="",l.style.cssText=n+"width:1px;padding:1px;display:inline;zoom:1",r.inlineBlockNeedsLayout=3===l.offsetWidth,l.style.display="block",l.innerHTML="<div></div>",l.firstChild.style.width="5px",r.shrinkWrapBlocks=3!==l.offsetWidth,r.inlineBlockNeedsLayout)&&(i.style.zoom=1),i.removeChild(e),l=null)}),n=i=e=t=null}return r}({});var st=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,ot=/([A-Z])/g;function at(e,t,n,i){if(w.acceptData(e)){var r,s=w.expando,o=e.nodeType,a=o?w.cache:e,l=o?e[s]:e[s]&&s;if(l&&a[l]&&(i||a[l].data)||n!==_||"string"!=typeof t)return a[l=l||(o?e[s]=$.pop()||w.guid++:s)]||(a[l]=o?{}:{toJSON:w.noop}),"object"!=typeof t&&"function"!=typeof t||(i?a[l]=w.extend(a[l],t):a[l].data=w.extend(a[l].data,t)),e=a[l],i||(e.data||(e.data={}),e=e.data),n!==_&&(e[w.camelCase(t)]=n),"string"==typeof t?null==(r=e[t])&&(r=e[w.camelCase(t)]):r=e,r}}function lt(e,t,n){if(w.acceptData(e)){var i,r,s=e.nodeType,o=s?w.cache:e,a=s?e[w.expando]:w.expando;if(o[a]){if(t&&(i=n?o[a]:o[a].data)){r=(t=w.isArray(t)?t.concat(w.map(t,w.camelCase)):t in i||(t=w.camelCase(t))in i?[t]:t.split(" ")).length;for(;r--;)delete i[t[r]];if(n?!ct(i):!w.isEmptyObject(i))return}(n||(delete o[a].data,ct(o[a])))&&(s?w.cleanData([e],!0):w.support.deleteExpando||o!=o.window?delete o[a]:o[a]=null)}}}function ut(e,t,n){if(n===_&&1===e.nodeType){var i="data-"+t.replace(ot,"-$1").toLowerCase();if("string"==typeof(n=e.getAttribute(i))){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:st.test(n)?w.parseJSON(n):n)}catch(e){}w.data(e,t,n)}else n=_}return n}function ct(e){for(var t in e)if(("data"!==t||!w.isEmptyObject(e[t]))&&"toJSON"!==t)return;return 1}w.extend({cache:{},noData:{applet:!0,embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return!!(e=e.nodeType?w.cache[e[w.expando]]:e[w.expando])&&!ct(e)},data:function(e,t,n){return at(e,t,n)},removeData:function(e,t){return lt(e,t)},_data:function(e,t,n){return at(e,t,n,!0)},_removeData:function(e,t){return lt(e,t,!0)},acceptData:function(e){var t;return!(e.nodeType&&1!==e.nodeType&&9!==e.nodeType||(t=e.nodeName&&w.noData[e.nodeName.toLowerCase()])&&(!0===t||e.getAttribute("classid")!==t))}}),w.fn.extend({data:function(e,t){var n,i,r=null,s=0,o=this[0];if(e!==_)return"object"==typeof e?this.each(function(){w.data(this,e)}):1<arguments.length?this.each(function(){w.data(this,e,t)}):o?ut(o,e,w.data(o,e)):null;if(this.length&&(r=w.data(o),1===o.nodeType)&&!w._data(o,"parsedAttrs")){for(n=o.attributes;n.length>s;s++)0===(i=n[s].name).indexOf("data-")&&ut(o,i=w.camelCase(i.slice(5)),r[i]);w._data(o,"parsedAttrs",!0)}return r},removeData:function(e){return this.each(function(){w.removeData(this,e)})}}),w.extend({queue:function(e,t,n){var i;return e?(i=w._data(e,t=(t||"fx")+"queue"),n&&(!i||w.isArray(n)?i=w._data(e,t,w.makeArray(n)):i.push(n)),i||[]):_},dequeue:function(e,t){t=t||"fx";var n=w.queue(e,t),i=n.length,r=n.shift(),s=w._queueHooks(e,t);"inprogress"===r&&(r=n.shift(),i--),r&&("fx"===t&&n.unshift("inprogress"),delete s.stop,r.call(e,function(){w.dequeue(e,t)},s)),!i&&s&&s.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return w._data(e,n)||w._data(e,n,{empty:w.Callbacks("once memory").add(function(){w._removeData(e,t+"queue"),w._removeData(e,n)})})}}),w.fn.extend({queue:function(t,n){var e=2;return"string"!=typeof t&&(n=t,t="fx",e--),arguments.length<e?w.queue(this[0],t):n===_?this:this.each(function(){var e=w.queue(this,t,n);w._queueHooks(this,t),"fx"===t&&"inprogress"!==e[0]&&w.dequeue(this,t)})},dequeue:function(e){return this.each(function(){w.dequeue(this,e)})},delay:function(i,e){return i=w.fx&&w.fx.speeds[i]||i,this.queue(e=e||"fx",function(e,t){var n=setTimeout(e,i);t.stop=function(){clearTimeout(n)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){function n(){--r||s.resolveWith(o,[o])}var i,r=1,s=w.Deferred(),o=this,a=this.length;for("string"!=typeof e&&(t=e,e=_),e=e||"fx";a--;)(i=w._data(o[a],e+"queueHooks"))&&i.empty&&(r++,i.empty.add(n));return n(),s.promise(t)}});var dt,ht,ft=/[\t\r\n\f]/g,pt=/\r/g,gt=/^(?:input|select|textarea|button|object)$/i,mt=/^(?:a|area)$/i,vt=/^(?:checked|selected)$/i,d=w.support.getSetAttribute,yt=w.support.input,bt=(w.fn.extend({attr:function(e,t){return w.access(this,w.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){w.removeAttr(this,e)})},prop:function(e,t){return w.access(this,w.prop,e,t,1<arguments.length)},removeProp:function(e){return e=w.propFix[e]||e,this.each(function(){try{this[e]=_,delete this[e]}catch(e){}})},addClass:function(t){var e,n,i,r,s,o=0,a=this.length,l="string"==typeof t&&t;if(w.isFunction(t))return this.each(function(e){w(this).addClass(t.call(this,e,this.className))});if(l)for(e=(t||"").match(C)||[];o<a;o++)if(i=1===(n=this[o]).nodeType&&(n.className?(" "+n.className+" ").replace(ft," "):" ")){for(s=0;r=e[s++];)i.indexOf(" "+r+" ")<0&&(i+=r+" ");n.className=w.trim(i)}return this},removeClass:function(t){var e,n,i,r,s,o=0,a=this.length,l=0===arguments.length||"string"==typeof t&&t;if(w.isFunction(t))return this.each(function(e){w(this).removeClass(t.call(this,e,this.className))});if(l)for(e=(t||"").match(C)||[];o<a;o++)if(i=1===(n=this[o]).nodeType&&(n.className?(" "+n.className+" ").replace(ft," "):"")){for(s=0;r=e[s++];)for(;0<=i.indexOf(" "+r+" ");)i=i.replace(" "+r+" "," ");n.className=t?w.trim(i):""}return this},toggleClass:function(r,t){var s=typeof r;return"boolean"==typeof t&&"string"==s?t?this.addClass(r):this.removeClass(r):w.isFunction(r)?this.each(function(e){w(this).toggleClass(r.call(this,e,this.className,t),t)}):this.each(function(){if("string"==s)for(var e,t=0,n=w(this),i=r.match(C)||[];e=i[t++];)n.hasClass(e)?n.removeClass(e):n.addClass(e);else s!=g&&"boolean"!=s||(this.className&&w._data(this,"__className__",this.className),this.className=!this.className&&!1!==r&&w._data(this,"__className__")||"")})},hasClass:function(e){for(var t=" "+e+" ",n=0,i=this.length;n<i;n++)if(1===this[n].nodeType&&0<=(" "+this[n].className+" ").replace(ft," ").indexOf(t))return!0;return!1},val:function(t){var e,n,i,r=this[0];return arguments.length?(i=w.isFunction(t),this.each(function(e){1===this.nodeType&&(null==(e=i?t.call(this,e,w(this).val()):t)?e="":"number"==typeof e?e+="":w.isArray(e)&&(e=w.map(e,function(e){return null==e?"":e+""})),(n=w.valHooks[this.type]||w.valHooks[this.nodeName.toLowerCase()])&&"set"in n&&n.set(this,e,"value")!==_||(this.value=e))})):r?(n=w.valHooks[r.type]||w.valHooks[r.nodeName.toLowerCase()])&&"get"in n&&(e=n.get(r,"value"))!==_?e:"string"==typeof(e=r.value)?e.replace(pt,""):null==e?"":e:void 0}}),w.extend({valHooks:{option:{get:function(e){var t=w.find.attr(e,"value");return null!=t?t:e.text}},select:{get:function(e){for(var t,n=e.options,i=e.selectedIndex,r="select-one"===e.type||i<0,s=r?null:[],o=r?i+1:n.length,a=i<0?o:r?i:0;a<o;a++)if(!(!(t=n[a]).selected&&a!==i||(w.support.optDisabled?t.disabled:null!==t.getAttribute("disabled"))||t.parentNode.disabled&&w.nodeName(t.parentNode,"optgroup"))){if(t=w(t).val(),r)return t;s.push(t)}return s},set:function(e,t){for(var n,i,r=e.options,s=w.makeArray(t),o=r.length;o--;)((i=r[o]).selected=0<=w.inArray(w(i).val(),s))&&(n=!0);return n||(e.selectedIndex=-1),s}}},attr:function(e,t,n){var i,r,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return typeof e.getAttribute==g?w.prop(e,t,n):(1===s&&w.isXMLDoc(e)||(t=t.toLowerCase(),i=w.attrHooks[t]||(w.expr.match.bool.test(t)?ht:dt)),n===_?!(i&&"get"in i&&null!==(r=i.get(e,t)))&&null==(r=w.find.attr(e,t))?_:r:null!==n?i&&"set"in i&&(r=i.set(e,n,t))!==_?r:(e.setAttribute(t,n+""),n):(w.removeAttr(e,t),_))},removeAttr:function(e,t){var n,i,r=0,s=t&&t.match(C);if(s&&1===e.nodeType)for(;n=s[r++];)i=w.propFix[n]||n,w.expr.match.bool.test(n)?yt&&d||!vt.test(n)?e[i]=!1:e[w.camelCase("default-"+n)]=e[i]=!1:w.attr(e,n,""),e.removeAttribute(d?n:i)},attrHooks:{type:{set:function(e,t){var n;if(!w.support.radioValue&&"radio"===t&&w.nodeName(e,"input"))return n=e.value,e.setAttribute("type",t),n&&(e.value=n),t}}},propFix:{for:"htmlFor",class:"className"},prop:function(e,t,n){var i,r,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return(1!==s||!w.isXMLDoc(e))&&(t=w.propFix[t]||t,r=w.propHooks[t]),n!==_?r&&"set"in r&&(i=r.set(e,n,t))!==_?i:e[t]=n:r&&"get"in r&&null!==(i=r.get(e,t))?i:e[t]},propHooks:{tabIndex:{get:function(e){var t=w.find.attr(e,"tabindex");return t?parseInt(t,10):gt.test(e.nodeName)||mt.test(e.nodeName)&&e.href?0:-1}}}}),ht={set:function(e,t,n){return!1===t?w.removeAttr(e,n):yt&&d||!vt.test(n)?e.setAttribute(!d&&w.propFix[n]||n,n):e[w.camelCase("default-"+n)]=e[n]=!0,n}},w.each(w.expr.match.bool.source.match(/\w+/g),function(e,t){var r=w.expr.attrHandle[t]||w.find.attr;w.expr.attrHandle[t]=yt&&d||!vt.test(t)?function(e,t,n){var i=w.expr.attrHandle[t],e=n?_:(w.expr.attrHandle[t]=_)!=r(e,t,n)?t.toLowerCase():null;return w.expr.attrHandle[t]=i,e}:function(e,t,n){return n?_:e[w.camelCase("default-"+t)]?t.toLowerCase():null}}),yt&&d||(w.attrHooks.value={set:function(e,t,n){return w.nodeName(e,"input")?(e.defaultValue=t,_):dt&&dt.set(e,t,n)}}),d||(dt={set:function(e,t,n){var i=e.getAttributeNode(n);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(n)),i.value=t+="","value"===n||t===e.getAttribute(n)?t:_}},w.expr.attrHandle.id=w.expr.attrHandle.name=w.expr.attrHandle.coords=function(e,t,n){return n?_:(n=e.getAttributeNode(t))&&""!==n.value?n.value:null},w.valHooks.button={get:function(e,t){e=e.getAttributeNode(t);return e&&e.specified?e.value:_},set:dt.set},w.attrHooks.contenteditable={set:function(e,t,n){dt.set(e,""!==t&&t,n)}},w.each(["width","height"],function(e,n){w.attrHooks[n]={set:function(e,t){return""===t?(e.setAttribute(n,"auto"),t):_}}})),w.support.hrefNormalized||w.each(["href","src"],function(e,t){w.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),w.support.style||(w.attrHooks.style={get:function(e){return e.style.cssText||_},set:function(e,t){return e.style.cssText=t+""}}),w.support.optSelected||(w.propHooks.selected={get:function(e){e=e.parentNode;return e&&(e.selectedIndex,e.parentNode)&&e.parentNode.selectedIndex,null}}),w.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){w.propFix[this.toLowerCase()]=this}),w.support.enctype||(w.propFix.enctype="encoding"),w.each(["radio","checkbox"],function(){w.valHooks[this]={set:function(e,t){return w.isArray(t)?e.checked=0<=w.inArray(w(e).val(),t):_}},w.support.checkOn||(w.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),/^(?:input|select|textarea)$/i),xt=/^key/,_t=/^(?:mouse|contextmenu)|click/,wt=/^(?:focusinfocus|focusoutblur)$/,Ct=/^([^.]*)(?:\.(.+)|)$/;function St(){return!0}function Tt(){return!1}function kt(){try{return m.activeElement}catch(e){}}w.event={global:{},add:function(e,t,n,i,r){var s,o,a,l,u,c,d,h,f,p=w._data(e);if(p)for(n.handler&&(n=(a=n).handler,r=a.selector),n.guid||(n.guid=w.guid++),s=(s=p.events)||(p.events={}),(u=p.handle)||((u=p.handle=function(e){return typeof w==g||e&&w.event.triggered===e.type?_:w.event.dispatch.apply(u.elem,arguments)}).elem=e),o=(t=(t||"").match(C)||[""]).length;o--;)d=f=(h=Ct.exec(t[o])||[])[1],h=(h[2]||"").split(".").sort(),d&&(l=w.event.special[d]||{},d=(r?l.delegateType:l.bindType)||d,l=w.event.special[d]||{},f=w.extend({type:d,origType:f,data:i,handler:n,guid:n.guid,selector:r,needsContext:r&&w.expr.match.needsContext.test(r),namespace:h.join(".")},a),(c=s[d])||((c=s[d]=[]).delegateCount=0,l.setup&&!1!==l.setup.call(e,i,h,u))||(e.addEventListener?e.addEventListener(d,u,!1):e.attachEvent&&e.attachEvent("on"+d,u)),l.add&&(l.add.call(e,f),f.handler.guid||(f.handler.guid=n.guid)),r?c.splice(c.delegateCount++,0,f):c.push(f),w.event.global[d]=!0)},remove:function(e,t,n,i,r){var s,o,a,l,u,c,d,h,f,p,g,m=w.hasData(e)&&w._data(e);if(m&&(c=m.events)){for(u=(t=(t||"").match(C)||[""]).length;u--;)if(f=g=(a=Ct.exec(t[u])||[])[1],p=(a[2]||"").split(".").sort(),f){for(d=w.event.special[f]||{},h=c[f=(i?d.delegateType:d.bindType)||f]||[],a=a[2]&&RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=s=h.length;s--;)o=h[s],!r&&g!==o.origType||n&&n.guid!==o.guid||a&&!a.test(o.namespace)||i&&i!==o.selector&&("**"!==i||!o.selector)||(h.splice(s,1),o.selector&&h.delegateCount--,d.remove&&d.remove.call(e,o));l&&!h.length&&(d.teardown&&!1!==d.teardown.call(e,p,m.handle)||w.removeEvent(e,f,m.handle),delete c[f])}else for(f in c)w.event.remove(e,f+t[u],n,i,!0);w.isEmptyObject(c)&&(delete m.handle,w._removeData(e,"events"))}},trigger:function(e,t,n,i){var r,s,o,a,l,u,c=[n||m],d=Y.call(e,"type")?e.type:e,h=Y.call(e,"namespace")?e.namespace.split("."):[],f=l=n=n||m;if(3!==n.nodeType&&8!==n.nodeType&&!wt.test(d+w.event.triggered)&&(0<=d.indexOf(".")&&(d=(h=d.split(".")).shift(),h.sort()),s=d.indexOf(":")<0&&"on"+d,(e=e[w.expando]?e:new w.Event(d,"object"==typeof e&&e)).isTrigger=i?2:3,e.namespace=h.join("."),e.namespace_re=e.namespace?RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=_,e.target||(e.target=n),t=null==t?[e]:w.makeArray(t,[e]),a=w.event.special[d]||{},i||!a.trigger||!1!==a.trigger.apply(n,t))){if(!i&&!a.noBubble&&!w.isWindow(n)){for(o=a.delegateType||d,wt.test(o+d)||(f=f.parentNode);f;f=f.parentNode)c.push(f),l=f;l===(n.ownerDocument||m)&&c.push(l.defaultView||l.parentWindow||p)}for(u=0;(f=c[u++])&&!e.isPropagationStopped();)e.type=1<u?o:a.bindType||d,(r=(w._data(f,"events")||{})[e.type]&&w._data(f,"handle"))&&r.apply(f,t),(r=s&&f[s])&&w.acceptData(f)&&r.apply&&!1===r.apply(f,t)&&e.preventDefault();if(e.type=d,!i&&!e.isDefaultPrevented()&&(!a._default||!1===a._default.apply(c.pop(),t))&&w.acceptData(n)&&s&&n[d]&&!w.isWindow(n)){(l=n[s])&&(n[s]=null),w.event.triggered=d;try{n[d]()}catch(e){}w.event.triggered=_,l&&(n[s]=l)}return e.result}},dispatch:function(e){e=w.event.fix(e);var t,n,i,r,s,o=c.call(arguments),a=(w._data(this,"events")||{})[e.type]||[],l=w.event.special[e.type]||{};if((o[0]=e).delegateTarget=this,!l.preDispatch||!1!==l.preDispatch.call(this,e)){for(s=w.event.handlers.call(this,e,a),t=0;(i=s[t++])&&!e.isPropagationStopped();)for(e.currentTarget=i.elem,r=0;(n=i.handlers[r++])&&!e.isImmediatePropagationStopped();)e.namespace_re&&!e.namespace_re.test(n.namespace)||(e.handleObj=n,e.data=n.data,(n=((w.event.special[n.origType]||{}).handle||n.handler).apply(i.elem,o))===_)||!1!==(e.result=n)||(e.preventDefault(),e.stopPropagation());return l.postDispatch&&l.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,i,r,s,o=[],a=t.delegateCount,l=e.target;if(a&&l.nodeType&&(!e.button||"click"!==e.type))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(!0!==l.disabled||"click"!==e.type)){for(r=[],s=0;s<a;s++)r[n=(i=t[s]).selector+" "]===_&&(r[n]=i.needsContext?0<=w(n,this).index(l):w.find(n,this,null,[l]).length),r[n]&&r.push(i);r.length&&o.push({elem:l,handlers:r})}return t.length>a&&o.push({elem:this,handlers:t.slice(a)}),o},fix:function(e){if(e[w.expando])return e;var t,n,i,r=e.type,s=e,o=this.fixHooks[r];for(o||(this.fixHooks[r]=o=_t.test(r)?this.mouseHooks:xt.test(r)?this.keyHooks:{}),i=o.props?this.props.concat(o.props):this.props,e=new w.Event(s),t=i.length;t--;)e[n=i[t]]=s[n];return e.target||(e.target=s.srcElement||m),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,o.filter?o.filter(e,s):e},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(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var n,i,r=t.button,s=t.fromElement;return null==e.pageX&&null!=t.clientX&&(i=(n=e.target.ownerDocument||m).documentElement,n=n.body,e.pageX=t.clientX+(i&&i.scrollLeft||n&&n.scrollLeft||0)-(i&&i.clientLeft||n&&n.clientLeft||0),e.pageY=t.clientY+(i&&i.scrollTop||n&&n.scrollTop||0)-(i&&i.clientTop||n&&n.clientTop||0)),!e.relatedTarget&&s&&(e.relatedTarget=s===e.target?t.toElement:s),e.which||r===_||(e.which=1&r?1:2&r?3:4&r?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==kt()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===kt()&&this.blur?(this.blur(),!1):_},delegateType:"focusout"},click:{trigger:function(){return w.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):_},_default:function(e){return w.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){e.result!==_&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,i){e=w.extend(new w.Event,n,{type:e,isSimulated:!0,originalEvent:{}});i?w.event.trigger(e,null,t):w.event.dispatch.call(t,e),e.isDefaultPrevented()&&n.preventDefault()}},w.removeEvent=m.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){t="on"+t;e.detachEvent&&(typeof e[t]==g&&(e[t]=null),e.detachEvent(t,n))},w.Event=function(e,t){return this instanceof w.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||!1===e.returnValue||e.getPreventDefault&&e.getPreventDefault()?St:Tt):this.type=e,t&&w.extend(this,t),this.timeStamp=e&&e.timeStamp||w.now(),this[w.expando]=!0,_):new w.Event(e,t)},w.Event.prototype={isDefaultPrevented:Tt,isPropagationStopped:Tt,isImmediatePropagationStopped:Tt,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=St,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=St,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=St,this.stopPropagation()}},w.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,r){w.event.special[e]={delegateType:r,bindType:r,handle:function(e){var t,n=e.relatedTarget,i=e.handleObj;return n&&(n===this||w.contains(this,n))||(e.type=i.origType,t=i.handler.apply(this,arguments),e.type=r),t}}}),w.support.submitBubbles||(w.event.special.submit={setup:function(){return!w.nodeName(this,"form")&&(w.event.add(this,"click._submit keypress._submit",function(e){e=e.target,e=w.nodeName(e,"input")||w.nodeName(e,"button")?e.form:_;e&&!w._data(e,"submitBubbles")&&(w.event.add(e,"submit._submit",function(e){e._submit_bubble=!0}),w._data(e,"submitBubbles",!0))}),_)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode)&&!e.isTrigger&&w.event.simulate("submit",this.parentNode,e,!0)},teardown:function(){return!w.nodeName(this,"form")&&(w.event.remove(this,"._submit"),_)}}),w.support.changeBubbles||(w.event.special.change={setup:function(){return bt.test(this.nodeName)?("checkbox"!==this.type&&"radio"!==this.type||(w.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),w.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),w.event.simulate("change",this,e,!0)})),!1):(w.event.add(this,"beforeactivate._change",function(e){e=e.target;bt.test(e.nodeName)&&!w._data(e,"changeBubbles")&&(w.event.add(e,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||w.event.simulate("change",this.parentNode,e,!0)}),w._data(e,"changeBubbles",!0))}),_)},handle:function(e){var t=e.target;return this!==t||e.isSimulated||e.isTrigger||"radio"!==t.type&&"checkbox"!==t.type?e.handleObj.handler.apply(this,arguments):_},teardown:function(){return w.event.remove(this,"._change"),!bt.test(this.nodeName)}}),w.support.focusinBubbles||w.each({focus:"focusin",blur:"focusout"},function(e,t){function n(e){w.event.simulate(t,e.target,w.event.fix(e),!0)}var i=0;w.event.special[t]={setup:function(){0==i++&&m.addEventListener(e,n,!0)},teardown:function(){0==--i&&m.removeEventListener(e,n,!0)}}}),w.fn.extend({on:function(e,t,n,i,r){var s,o;if("object"==typeof e){for(s in"string"!=typeof t&&(n=n||t,t=_),e)this.on(s,t,n,e[s],r);return this}if(null==n&&null==i?(i=t,n=t=_):null==i&&("string"==typeof t?(i=n,n=_):(i=n,n=t,t=_)),!1===i)i=Tt;else if(!i)return this;return 1===r&&(o=i,(i=function(e){return w().off(e),o.apply(this,arguments)}).guid=o.guid||(o.guid=w.guid++)),this.each(function(){w.event.add(this,e,i,n,t)})},one:function(e,t,n,i){return this.on(e,t,n,i,1)},off:function(e,t,n){var i,r;if(e&&e.preventDefault&&e.handleObj)i=e.handleObj,w(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler);else{if("object"!=typeof e)return!1!==t&&"function"!=typeof t||(n=t,t=_),!1===n&&(n=Tt),this.each(function(){w.event.remove(this,e,n,t)});for(r in e)this.off(r,t,e[r])}return this},trigger:function(e,t){return this.each(function(){w.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];return n?w.event.trigger(e,t,n,!0):_}});var Ft=/^.[^:#\[\.,]*$/,At=/^(?:parents|prev(?:Until|All))/,Dt=w.expr.match.needsContext,Et={children:!0,contents:!0,next:!0,prev:!0};function Lt(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function Bt(e,n,i){if(w.isFunction(n))return w.grep(e,function(e,t){return!!n.call(e,t,e)!==i});if(n.nodeType)return w.grep(e,function(e){return e===n!==i});if("string"==typeof n){if(Ft.test(n))return w.filter(n,e,i);n=w.filter(n,e)}return w.grep(e,function(e){return 0<=w.inArray(e,n)!==i})}function Mt(e){var t=Nt.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}w.fn.extend({find:function(e){var t,n=[],i=this,r=i.length;if("string"!=typeof e)return this.pushStack(w(e).filter(function(){for(t=0;t<r;t++)if(w.contains(i[t],this))return!0}));for(t=0;t<r;t++)w.find(e,i[t],n);return(n=this.pushStack(1<r?w.unique(n):n)).selector=this.selector?this.selector+" "+e:e,n},has:function(e){var t,n=w(e,this),i=n.length;return this.filter(function(){for(t=0;t<i;t++)if(w.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(Bt(this,e||[],!0))},filter:function(e){return this.pushStack(Bt(this,e||[],!1))},is:function(e){return!!Bt(this,"string"==typeof e&&Dt.test(e)?w(e):e||[],!1).length},closest:function(e,t){for(var n,i=0,r=this.length,s=[],o=Dt.test(e)||"string"!=typeof e?w(e,t||this.context):0;i<r;i++)for(n=this[i];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(o?-1<o.index(n):1===n.nodeType&&w.find.matchesSelector(n,e))){n=s.push(n);break}return this.pushStack(1<s.length?w.unique(s):s)},index:function(e){return e?"string"==typeof e?w.inArray(this[0],w(e)):w.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){t="string"==typeof e?w(e,t):w.makeArray(e&&e.nodeType?[e]:e),e=w.merge(this.get(),t);return this.pushStack(w.unique(e))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),w.each({parent:function(e){e=e.parentNode;return e&&11!==e.nodeType?e:null},parents:function(e){return w.dir(e,"parentNode")},parentsUntil:function(e,t,n){return w.dir(e,"parentNode",n)},next:function(e){return Lt(e,"nextSibling")},prev:function(e){return Lt(e,"previousSibling")},nextAll:function(e){return w.dir(e,"nextSibling")},prevAll:function(e){return w.dir(e,"previousSibling")},nextUntil:function(e,t,n){return w.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return w.dir(e,"previousSibling",n)},siblings:function(e){return w.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return w.sibling(e.firstChild)},contents:function(e){return w.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:w.merge([],e.childNodes)}},function(i,r){w.fn[i]=function(e,t){var n=w.map(this,r,e);return(t="Until"!==i.slice(-5)?e:t)&&"string"==typeof t&&(n=w.filter(t,n)),1<this.length&&(Et[i]||(n=w.unique(n)),At.test(i))&&(n=n.reverse()),this.pushStack(n)}}),w.extend({filter:function(e,t,n){var i=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===i.nodeType?w.find.matchesSelector(i,e)?[i]:[]:w.find.matches(e,w.grep(t,function(e){return 1===e.nodeType}))},dir:function(e,t,n){for(var i=[],r=e[t];r&&9!==r.nodeType&&(n===_||1!==r.nodeType||!w(r).is(n));)1===r.nodeType&&i.push(r),r=r[t];return i},sibling:function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});var Nt="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",jt=/ jQuery\d+="(?:null|\d+)"/g,Pt=RegExp("<(?:"+Nt+")[\\s/>]","i"),Rt=/^\s+/,Ot=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,It=/<([\w:]+)/,Ht=/<tbody/i,zt=/<|&#?\w+;/,qt=/<(?:script|style|link)/i,Wt=/^(?:checkbox|radio)$/i,$t=/checked\s*(?:[^=]|=\s*.checked.)/i,Vt=/^$|\/(?:java|ecma)script/i,Ut=/^true\/(.*)/,Zt=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,v={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:w.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},Qt=Mt(m).appendChild(m.createElement("div"));function Yt(e,t){return w.nodeName(e,"table")&&w.nodeName(1===t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function Xt(e){return e.type=(null!==w.find.attr(e,"type"))+"/"+e.type,e}function Kt(e){var t=Ut.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function Gt(e,t){for(var n,i=0;null!=(n=e[i]);i++)w._data(n,"globalEval",!t||w._data(t[i],"globalEval"))}function Jt(e,t){if(1===t.nodeType&&w.hasData(e)){var n,i,r,e=w._data(e),s=w._data(t,e),o=e.events;if(o)for(n in delete s.handle,s.events={},o)for(i=0,r=o[n].length;i<r;i++)w.event.add(t,n,o[n][i]);s.data&&(s.data=w.extend({},s.data))}}function b(e,t){var n,i,r=0,s=typeof e.getElementsByTagName!=g?e.getElementsByTagName(t||"*"):typeof e.querySelectorAll!=g?e.querySelectorAll(t||"*"):_;if(!s)for(s=[],n=e.childNodes||e;null!=(i=n[r]);r++)!t||w.nodeName(i,t)?s.push(i):w.merge(s,b(i,t));return t===_||t&&w.nodeName(e,t)?w.merge([e],s):s}function en(e){Wt.test(e.type)&&(e.defaultChecked=e.checked)}v.optgroup=v.option,v.tbody=v.tfoot=v.colgroup=v.caption=v.thead,v.th=v.td,w.fn.extend({text:function(e){return w.access(this,function(e){return e===_?w.text(this):this.empty().append((this[0]&&this[0].ownerDocument||m).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Yt(this,e).appendChild(e)})},prepend:function(){return this.domManip(arguments,function(e){var t;1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(t=Yt(this,e)).insertBefore(e,t.firstChild)})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){for(var n,i=e?w.filter(e,this):this,r=0;null!=(n=i[r]);r++)t||1!==n.nodeType||w.cleanData(b(n)),n.parentNode&&(t&&w.contains(n.ownerDocument,n)&&Gt(b(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&&w.cleanData(b(e,!1));e.firstChild;)e.removeChild(e.firstChild);e.options&&w.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return w.clone(this,e,t)})},html:function(e){return w.access(this,function(e){var t=this[0]||{},n=0,i=this.length;if(e===_)return 1===t.nodeType?t.innerHTML.replace(jt,""):_;if(!("string"!=typeof e||qt.test(e)||!w.support.htmlSerialize&&Pt.test(e)||!w.support.leadingWhitespace&&Rt.test(e)||v[(It.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(Ot,"<$1></$2>");try{for(;n<i;n++)1===(t=this[n]||{}).nodeType&&(w.cleanData(b(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var i=w.map(this,function(e){return[e.nextSibling,e.parentNode]}),r=0;return this.domManip(arguments,function(e){var t=i[r++],n=i[r++];n&&(t&&t.parentNode!==n&&(t=this.nextSibling),w(this).remove(),n.insertBefore(e,t))},!0),r?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(n,i,r){n=V.apply([],n);var e,t,s,o,a,l,u=0,c=this.length,d=this,h=c-1,f=n[0],p=w.isFunction(f);if(p||!(c<=1||"string"!=typeof f||w.support.checkClone)&&$t.test(f))return this.each(function(e){var t=d.eq(e);p&&(n[0]=f.call(this,e,t.html())),t.domManip(n,i,r)});if(c&&(e=(l=w.buildFragment(n,this[0].ownerDocument,!1,!r&&this)).firstChild,1===l.childNodes.length&&(l=e),e)){for(s=(o=w.map(b(l,"script"),Xt)).length;u<c;u++)t=l,u!==h&&(t=w.clone(t,!0,!0),s)&&w.merge(o,b(t,"script")),i.call(this[u],t,u);if(s)for(a=o[o.length-1].ownerDocument,w.map(o,Kt),u=0;u<s;u++)t=o[u],Vt.test(t.type||"")&&!w._data(t,"globalEval")&&w.contains(a,t)&&(t.src?w._evalUrl(t.src):w.globalEval((t.text||t.textContent||t.innerHTML||"").replace(Zt,"")));l=e=null}return this}}),w.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,o){w.fn[e]=function(e){for(var t,n=0,i=[],r=w(e),s=r.length-1;n<=s;n++)t=n===s?this:this.clone(!0),w(r[n])[o](t),U.apply(i,t.get());return this.pushStack(i)}}),w.extend({clone:function(e,t,n){var i,r,s,o,a,l,u,c,d=w.contains(e.ownerDocument,e);if(w.support.html5Clone||w.isXMLDoc(e)||!Pt.test("<"+e.nodeName+">")?s=e.cloneNode(!0):(Qt.innerHTML=e.outerHTML,Qt.removeChild(s=Qt.firstChild)),!(w.support.noCloneEvent&&w.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||w.isXMLDoc(e)))for(i=b(s),a=b(e),o=0;null!=(r=a[o]);++o)if(i[o]){h=void 0;f=void 0;l=void 0;u=void 0;c=void 0;var h=r;var f=i[o];if(1===f.nodeType){if(l=f.nodeName.toLowerCase(),!w.support.noCloneEvent&&f[w.expando]){for(u in(c=w._data(f)).events)w.removeEvent(f,u,c.handle);f.removeAttribute(w.expando)}"script"===l&&f.text!==h.text?(Xt(f).text=h.text,Kt(f)):"object"===l?(f.parentNode&&(f.outerHTML=h.outerHTML),w.support.html5Clone&&h.innerHTML&&!w.trim(f.innerHTML)&&(f.innerHTML=h.innerHTML)):"input"===l&&Wt.test(h.type)?(f.defaultChecked=f.checked=h.checked,f.value!==h.value&&(f.value=h.value)):"option"===l?f.defaultSelected=f.selected=h.defaultSelected:"input"!==l&&"textarea"!==l||(f.defaultValue=h.defaultValue)}}if(t)if(n)for(a=a||b(e),i=i||b(s),o=0;null!=(r=a[o]);o++)Jt(r,i[o]);else Jt(e,s);return 0<(i=b(s,"script")).length&&Gt(i,!d&&b(e,"script")),i=a=r=null,s},buildFragment:function(e,t,n,i){for(var r,s,o,a,l,u,c,d=e.length,h=Mt(t),f=[],p=0;p<d;p++)if((s=e[p])||0===s)if("object"===w.type(s))w.merge(f,s.nodeType?[s]:s);else if(zt.test(s)){for(a=a||h.appendChild(t.createElement("div")),l=(It.exec(s)||["",""])[1].toLowerCase(),a.innerHTML=(c=v[l]||v._default)[1]+s.replace(Ot,"<$1></$2>")+c[2],r=c[0];r--;)a=a.lastChild;if(!w.support.leadingWhitespace&&Rt.test(s)&&f.push(t.createTextNode(Rt.exec(s)[0])),!w.support.tbody)for(r=(s="table"!==l||Ht.test(s)?"<table>"!==c[1]||Ht.test(s)?0:a:a.firstChild)&&s.childNodes.length;r--;)w.nodeName(u=s.childNodes[r],"tbody")&&!u.childNodes.length&&s.removeChild(u);for(w.merge(f,a.childNodes),a.textContent="";a.firstChild;)a.removeChild(a.firstChild);a=h.lastChild}else f.push(t.createTextNode(s));for(a&&h.removeChild(a),w.support.appendChecked||w.grep(b(f,"input"),en),p=0;s=f[p++];)if((!i||-1===w.inArray(s,i))&&(o=w.contains(s.ownerDocument,s),a=b(h.appendChild(s),"script"),o&&Gt(a),n))for(r=0;s=a[r++];)Vt.test(s.type||"")&&n.push(s);return a=null,h},cleanData:function(e,t){for(var n,i,r,s,o=0,a=w.expando,l=w.cache,u=w.support.deleteExpando,c=w.event.special;null!=(n=e[o]);o++)if((t||w.acceptData(n))&&(s=(r=n[a])&&l[r])){if(s.events)for(i in s.events)c[i]?w.event.remove(n,i):w.removeEvent(n,i,s.handle);l[r]&&(delete l[r],u?delete n[a]:typeof n.removeAttribute!=g?n.removeAttribute(a):n[a]=null,$.push(r))}},_evalUrl:function(e){return w.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,throws:!0})}}),w.fn.extend({wrapAll:function(t){var e;return w.isFunction(t)?this.each(function(e){w(this).wrapAll(t.call(this,e))}):(this[0]&&(e=w(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e}).append(this)),this)},wrapInner:function(n){return w.isFunction(n)?this.each(function(e){w(this).wrapInner(n.call(this,e))}):this.each(function(){var e=w(this),t=e.contents();t.length?t.wrapAll(n):e.append(n)})},wrap:function(t){var n=w.isFunction(t);return this.each(function(e){w(this).wrapAll(n?t.call(this,e):t)})},unwrap:function(){return this.parent().each(function(){w.nodeName(this,"body")||w(this).replaceWith(this.childNodes)}).end()}});var tn,h,nn,rn=/alpha\([^)]*\)/i,sn=/opacity\s*=\s*([^)]*)/,on=/^(top|right|bottom|left)$/,an=/^(none|table(?!-c[ea]).+)/,ln=/^margin/,un=RegExp("^("+K+")(.*)$","i"),cn=RegExp("^("+K+")(?!px)[a-z%]+$","i"),dn=RegExp("^([+-])=("+K+")","i"),hn={BODY:"block"},fn={position:"absolute",visibility:"hidden",display:"block"},pn={letterSpacing:0,fontWeight:400},gn=["Top","Right","Bottom","Left"],mn=["Webkit","O","Moz","ms"];function vn(e,t){if(t in e)return t;for(var n=t.charAt(0).toUpperCase()+t.slice(1),i=t,r=mn.length;r--;)if((t=mn[r]+n)in e)return t;return i}function yn(e,t){return"none"===w.css(e=t||e,"display")||!w.contains(e.ownerDocument,e)}function bn(e,t){for(var n,i,r,s=[],o=0,a=e.length;o<a;o++)(i=e[o]).style&&(s[o]=w._data(i,"olddisplay"),n=i.style.display,t?(s[o]||"none"!==n||(i.style.display=""),""===i.style.display&&yn(i)&&(s[o]=w._data(i,"olddisplay",Cn(i.nodeName)))):!s[o]&&(r=yn(i),n&&"none"!==n||!r)&&w._data(i,"olddisplay",r?n:w.css(i,"display")));for(o=0;o<a;o++)!(i=e[o]).style||t&&"none"!==i.style.display&&""!==i.style.display||(i.style.display=t?s[o]||"":"none");return e}function xn(e,t,n){var i=un.exec(t);return i?Math.max(0,i[1]-(n||0))+(i[2]||"px"):t}function _n(e,t,n,i,r){for(var s=n===(i?"border":"content")?4:"width"===t?1:0,o=0;s<4;s+=2)"margin"===n&&(o+=w.css(e,n+gn[s],!0,r)),i?("content"===n&&(o-=w.css(e,"padding"+gn[s],!0,r)),"margin"!==n&&(o-=w.css(e,"border"+gn[s]+"Width",!0,r))):(o+=w.css(e,"padding"+gn[s],!0,r),"padding"!==n&&(o+=w.css(e,"border"+gn[s]+"Width",!0,r)));return o}function wn(e,t,n){var i=!0,r="width"===t?e.offsetWidth:e.offsetHeight,s=h(e),o=w.support.boxSizing&&"border-box"===w.css(e,"boxSizing",!1,s);if(r<=0||null==r){if(((r=nn(e,t,s))<0||null==r)&&(r=e.style[t]),cn.test(r))return r;i=o&&(w.support.boxSizingReliable||r===e.style[t]),r=parseFloat(r)||0}return r+_n(e,t,n||(o?"border":"content"),i,s)+"px"}function Cn(e){var t=m,n=hn[e];return n||("none"!==(n=Sn(e,t))&&n||((t=((tn=(tn||w("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement))[0].contentWindow||tn[0].contentDocument).document).write("<!doctype html><html><body>"),t.close(),n=Sn(e,t),tn.detach()),hn[e]=n),n}function Sn(e,t){e=w(t.createElement(e)).appendTo(t.body),t=w.css(e[0],"display");return e.remove(),t}w.fn.extend({css:function(e,t){return w.access(this,function(e,t,n){var i,r,s={},o=0;if(w.isArray(t)){for(r=h(e),i=t.length;o<i;o++)s[t[o]]=w.css(e,t[o],!1,r);return s}return n!==_?w.style(e,t,n):w.css(e,t)},e,t,1<arguments.length)},show:function(){return bn(this,!0)},hide:function(){return bn(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){yn(this)?w(this).show():w(this).hide()})}}),w.extend({cssHooks:{opacity:{get:function(e,t){if(t)return""===(t=nn(e,"opacity"))?"1":t}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:w.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,t,n,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var r,s,o,a=w.camelCase(t),l=e.style;if(t=w.cssProps[a]||(w.cssProps[a]=vn(l,a)),o=w.cssHooks[t]||w.cssHooks[a],n===_)return o&&"get"in o&&(r=o.get(e,!1,i))!==_?r:l[t];if("string"===(s=typeof n)&&(r=dn.exec(n))&&(n=(r[1]+1)*r[2]+parseFloat(w.css(e,t)),s="number"),!(null==n||"number"===s&&isNaN(n)||("number"!==s||w.cssNumber[a]||(n+="px"),w.support.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),o&&"set"in o&&(n=o.set(e,n,i))===_)))try{l[t]=n}catch(e){}}},css:function(e,t,n,i){var r,s=w.camelCase(t);return t=w.cssProps[s]||(w.cssProps[s]=vn(e.style,s)),"normal"===(r=(r=(s=w.cssHooks[t]||w.cssHooks[s])&&"get"in s?s.get(e,!0,n):r)===_?nn(e,t,i):r)&&t in pn&&(r=pn[t]),(""===n||n)&&(s=parseFloat(r),!0===n||w.isNumeric(s))?s||0:r}}),p.getComputedStyle?(h=function(e){return p.getComputedStyle(e,null)},nn=function(e,t,n){var i,n=n||h(e),r=n?n.getPropertyValue(t)||n[t]:_,s=e.style;return n&&(""!==r||w.contains(e.ownerDocument,e)||(r=w.style(e,t)),cn.test(r))&&ln.test(t)&&(e=s.width,t=s.minWidth,i=s.maxWidth,s.minWidth=s.maxWidth=s.width=r,r=n.width,s.width=e,s.minWidth=t,s.maxWidth=i),r}):m.documentElement.currentStyle&&(h=function(e){return e.currentStyle},nn=function(e,t,n){var i,r,s,n=n||h(e),n=n?n[t]:_,o=e.style;return null==n&&o&&o[t]&&(n=o[t]),cn.test(n)&&!on.test(t)&&(i=o.left,(s=(r=e.runtimeStyle)&&r.left)&&(r.left=e.currentStyle.left),o.left="fontSize"===t?"1em":n,n=o.pixelLeft+"px",o.left=i,s)&&(r.left=s),""===n?"auto":n}),w.each(["height","width"],function(e,r){w.cssHooks[r]={get:function(e,t,n){return t?0===e.offsetWidth&&an.test(w.css(e,"display"))?w.swap(e,fn,function(){return wn(e,r,n)}):wn(e,r,n):_},set:function(e,t,n){var i=n&&h(e);return xn(0,t,n?_n(e,r,n,w.support.boxSizing&&"border-box"===w.css(e,"boxSizing",!1,i),i):0)}}}),w.support.opacity||(w.cssHooks.opacity={get:function(e,t){return sn.test((t&&e.currentStyle?e.currentStyle:e.style).filter||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,e=e.currentStyle,i=w.isNumeric(t)?"alpha(opacity="+100*t+")":"",r=e&&e.filter||n.filter||"";((n.zoom=1)<=t||""===t)&&""===w.trim(r.replace(rn,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||e&&!e.filter)||(n.filter=rn.test(r)?r.replace(rn,i):r+" "+i)}}),w(function(){w.support.reliableMarginRight||(w.cssHooks.marginRight={get:function(e,t){return t?w.swap(e,{display:"inline-block"},nn,[e,"marginRight"]):_}}),!w.support.pixelPosition&&w.fn.position&&w.each(["top","left"],function(e,n){w.cssHooks[n]={get:function(e,t){return t?(t=nn(e,n),cn.test(t)?w(e).position()[n]+"px":t):_}}})}),w.expr&&w.expr.filters&&(w.expr.filters.hidden=function(e){return e.offsetWidth<=0&&e.offsetHeight<=0||!w.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||w.css(e,"display"))},w.expr.filters.visible=function(e){return!w.expr.filters.hidden(e)}),w.each({margin:"",padding:"",border:"Width"},function(r,s){w.cssHooks[r+s]={expand:function(e){for(var t=0,n={},i="string"==typeof e?e.split(" "):[e];t<4;t++)n[r+gn[t]+s]=i[t]||i[t-2]||i[0];return n}},ln.test(r)||(w.cssHooks[r+s].set=xn)});var Tn=/%20/g,kn=/\[\]$/,Fn=/\r?\n/g,An=/^(?:submit|button|image|reset|file)$/i,Dn=/^(?:input|select|textarea|keygen)/i;w.fn.extend({serialize:function(){return w.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=w.prop(this,"elements");return e?w.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!w(this).is(":disabled")&&Dn.test(this.nodeName)&&!An.test(e)&&(this.checked||!Wt.test(e))}).map(function(e,t){var n=w(this).val();return null==n?null:w.isArray(n)?w.map(n,function(e){return{name:t.name,value:e.replace(Fn,"\r\n")}}):{name:t.name,value:n.replace(Fn,"\r\n")}}).get()}}),w.param=function(e,t){function n(e,t){t=w.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)}var i,r=[];if(t===_&&(t=w.ajaxSettings&&w.ajaxSettings.traditional),w.isArray(e)||e.jquery&&!w.isPlainObject(e))w.each(e,function(){n(this.name,this.value)});else for(i in e)!function n(i,e,r,s){if(w.isArray(e))w.each(e,function(e,t){r||kn.test(i)?s(i,t):n(i+"["+("object"==typeof t?e:"")+"]",t,r,s)});else if(r||"object"!==w.type(e))s(i,e);else for(var t in e)n(i+"["+t+"]",e[t],r,s)}(i,e[i],t,n);return r.join("&").replace(Tn,"+")},w.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(e,n){w.fn[n]=function(e,t){return 0<arguments.length?this.on(n,null,e,t):this.trigger(n)}}),w.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,i){return this.on(t,e,n,i)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var En,Ln,Bn=w.now(),Mn=/\?/,Nn=/#.*$/,jn=/([?&])_=[^&]*/,Pn=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Rn=/^(?:GET|HEAD)$/,On=/^\/\//,In=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Hn=w.fn.load,zn={},qn={},Wn="*/".concat("*");try{Ln=I.href}catch(e){(Ln=m.createElement("a")).href="",Ln=Ln.href}function $n(s){return function(e,t){"string"!=typeof e&&(t=e,e="*");var n,i=0,r=e.toLowerCase().match(C)||[];if(w.isFunction(t))for(;n=r[i++];)"+"===n[0]?(n=n.slice(1)||"*",(s[n]=s[n]||[]).unshift(t)):(s[n]=s[n]||[]).push(t)}}function Vn(t,i,r,s){var o={},a=t===qn;function l(e){var n;return o[e]=!0,w.each(t[e]||[],function(e,t){t=t(i,r,s);return"string"!=typeof t||a||o[t]?a?!(n=t):_:(i.dataTypes.unshift(t),l(t),!1)}),n}return l(i.dataTypes[0])||!o["*"]&&l("*")}function Un(e,t){var n,i,r=w.ajaxSettings.flatOptions||{};for(i in t)t[i]!==_&&((r[i]?e:n=n||{})[i]=t[i]);return n&&w.extend(!0,e,n),e}En=In.exec(Ln.toLowerCase())||[],w.fn.load=function(e,t,n){var i,r,s,o,a;return"string"!=typeof e&&Hn?Hn.apply(this,arguments):(o=this,0<=(a=e.indexOf(" "))&&(i=e.slice(a,e.length),e=e.slice(0,a)),w.isFunction(t)?(n=t,t=_):t&&"object"==typeof t&&(s="POST"),0<o.length&&w.ajax({url:e,type:s,dataType:"html",data:t}).done(function(e){r=arguments,o.html(i?w("<div>").append(w.parseHTML(e)).find(i):e)}).complete(n&&function(e,t){o.each(n,r||[e.responseText,t,e])}),this)},w.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){w.fn[t]=function(e){return this.on(t,e)}}),w.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ln,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(En[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Wn,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":w.parseJSON,"text xml":w.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Un(Un(e,w.ajaxSettings),t):Un(w.ajaxSettings,e)},ajaxPrefilter:$n(zn),ajaxTransport:$n(qn),ajax:function(e,t){"object"==typeof e&&(t=e,e=_);var n,l,u,c,d,h,i,f=w.ajaxSetup({},t=t||{}),p=f.context||f,g=f.context&&(p.nodeType||p.jquery)?w(p):w.event,m=w.Deferred(),v=w.Callbacks("once memory"),y=f.statusCode||{},r={},s={},b=0,o="canceled",x={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!i)for(i={};t=Pn.exec(u);)i[t[1].toLowerCase()]=t[2];t=i[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?u:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=s[n]=s[n]||e,r[e]=t),this},overrideMimeType:function(e){return b||(f.mimeType=e),this},statusCode:function(e){if(e)if(b<2)for(var t in e)y[t]=[y[t],e[t]];else x.always(e[x.status]);return this},abort:function(e){e=e||o;return h&&h.abort(e),a(0,e),this}};if(m.promise(x).complete=v.add,x.success=x.done,x.error=x.fail,f.url=((e||f.url||Ln)+"").replace(Nn,"").replace(On,En[1]+"//"),f.type=t.method||t.type||f.method||f.type,f.dataTypes=w.trim(f.dataType||"*").toLowerCase().match(C)||[""],null==f.crossDomain&&(e=In.exec(f.url.toLowerCase()),f.crossDomain=!(!e||e[1]===En[1]&&e[2]===En[2]&&(e[3]||("http:"===e[1]?"80":"443"))===(En[3]||("http:"===En[1]?"80":"443")))),f.data&&f.processData&&"string"!=typeof f.data&&(f.data=w.param(f.data,f.traditional)),Vn(zn,f,t,x),2!==b){for(n in(d=f.global)&&0==w.active++&&w.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!Rn.test(f.type),l=f.url,f.hasContent||(f.data&&(l=f.url+=(Mn.test(l)?"&":"?")+f.data,delete f.data),!1===f.cache&&(f.url=jn.test(l)?l.replace(jn,"$1_="+Bn++):l+(Mn.test(l)?"&":"?")+"_="+Bn++)),f.ifModified&&(w.lastModified[l]&&x.setRequestHeader("If-Modified-Since",w.lastModified[l]),w.etag[l])&&x.setRequestHeader("If-None-Match",w.etag[l]),(f.data&&f.hasContent&&!1!==f.contentType||t.contentType)&&x.setRequestHeader("Content-Type",f.contentType),x.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+Wn+"; q=0.01":""):f.accepts["*"]),f.headers)x.setRequestHeader(n,f.headers[n]);if(f.beforeSend&&(!1===f.beforeSend.call(p,x,f)||2===b))return x.abort();for(n in o="abort",{success:1,error:1,complete:1})x[n](f[n]);if(h=Vn(qn,f,t,x)){x.readyState=1,d&&g.trigger("ajaxSend",[x,f]),f.async&&0<f.timeout&&(c=setTimeout(function(){x.abort("timeout")},f.timeout));try{b=1,h.send(r,a)}catch(e){if(!(b<2))throw e;a(-1,e)}}else a(-1,"No Transport")}return x;function a(e,t,n,i){var r,s,o,a=t;2!==b&&(b=2,c&&clearTimeout(c),h=_,u=i||"",x.readyState=0<e?4:0,i=200<=e&&e<300||304===e,n&&(o=function(e,t,n){var i,r,s,o,a=e.contents,l=e.dataTypes;for(;"*"===l[0];)l.shift(),r===_&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(o in a)if(a[o]&&a[o].test(r)){l.unshift(o);break}if(l[0]in n)s=l[0];else{for(o in n){if(!l[0]||e.converters[o+" "+l[0]]){s=o;break}i=i||o}s=s||i}return s?(s!==l[0]&&l.unshift(s),n[s]):_}(f,x,n)),o=function(e,t,n,i){var r,s,o,a,l,u={},c=e.dataTypes.slice();if(c[1])for(o in e.converters)u[o.toLowerCase()]=e.converters[o];s=c.shift();for(;s;)if(e.responseFields[s]&&(n[e.responseFields[s]]=t),!l&&i&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=s,s=c.shift())if("*"===s)s=l;else if("*"!==l&&l!==s){if(!(o=u[l+" "+s]||u["* "+s]))for(r in u)if(a=r.split(" "),a[1]===s&&(o=u[l+" "+a[0]]||u["* "+a[0]])){!0===o?o=u[r]:!0!==u[r]&&(s=a[0],c.unshift(a[1]));break}if(!0!==o)if(o&&e.throws)t=o(t);else try{t=o(t)}catch(e){return{state:"parsererror",error:o?e:"No conversion from "+l+" to "+s}}}return{state:"success",data:t}}(f,o,x,i),i?(f.ifModified&&((n=x.getResponseHeader("Last-Modified"))&&(w.lastModified[l]=n),n=x.getResponseHeader("etag"))&&(w.etag[l]=n),204===e||"HEAD"===f.type?a="nocontent":304===e?a="notmodified":(a=o.state,r=o.data,i=!(s=o.error))):(s=a,(e||!a)&&(a="error",e<0)&&(e=0)),x.status=e,x.statusText=(t||a)+"",i?m.resolveWith(p,[r,a,x]):m.rejectWith(p,[x,a,s]),x.statusCode(y),y=_,d&&g.trigger(i?"ajaxSuccess":"ajaxError",[x,f,i?r:s]),v.fireWith(p,[x,a]),d)&&(g.trigger("ajaxComplete",[x,f]),--w.active||w.event.trigger("ajaxStop"))}},getJSON:function(e,t,n){return w.get(e,t,n,"json")},getScript:function(e,t){return w.get(e,_,t,"script")}}),w.each(["get","post"],function(e,r){w[r]=function(e,t,n,i){return w.isFunction(t)&&(i=i||n,n=t,t=_),w.ajax({url:e,type:r,dataType:i,data:t,success:n})}}),w.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return w.globalEval(e),e}}}),w.ajaxPrefilter("script",function(e){e.cache===_&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),w.ajaxTransport("script",function(t){var i,r;if(t.crossDomain)return r=m.head||w("head")[0]||m.documentElement,{send:function(e,n){(i=m.createElement("script")).async=!0,t.scriptCharset&&(i.charset=t.scriptCharset),i.src=t.url,i.onload=i.onreadystatechange=function(e,t){!t&&i.readyState&&!/loaded|complete/.test(i.readyState)||(i.onload=i.onreadystatechange=null,i.parentNode&&i.parentNode.removeChild(i),i=null,t)||n(200,"success")},r.insertBefore(i,r.firstChild)},abort:function(){i&&i.onload(_,!0)}}});var Zn=[],Qn=/(=)\?(?=&|$)|\?\?/;w.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Zn.pop()||w.expando+"_"+Bn++;return this[e]=!0,e}}),w.ajaxPrefilter("json jsonp",function(e,t,n){var i,r,s,o=!1!==e.jsonp&&(Qn.test(e.url)?"url":"string"==typeof e.data&&!(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Qn.test(e.data)&&"data");return o||"jsonp"===e.dataTypes[0]?(i=e.jsonpCallback=w.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,o?e[o]=e[o].replace(Qn,"$1"+i):!1!==e.jsonp&&(e.url+=(Mn.test(e.url)?"&":"?")+e.jsonp+"="+i),e.converters["script json"]=function(){return s||w.error(i+" was not called"),s[0]},e.dataTypes[0]="json",r=p[i],p[i]=function(){s=arguments},n.always(function(){p[i]=r,e[i]&&(e.jsonpCallback=t.jsonpCallback,Zn.push(i)),s&&w.isFunction(r)&&r(s[0]),s=r=_}),"script"):_});var Yn,Xn=0,Kn=p.ActiveXObject&&function(){for(var e in Yn)Yn[e](_,!0)};function Gn(){try{return new p.XMLHttpRequest}catch(e){}}w.ajaxSettings.xhr=p.ActiveXObject?function(){return!this.isLocal&&Gn()||function(){try{return new p.ActiveXObject("Microsoft.XMLHTTP")}catch(e){}}()}:Gn,Le=w.ajaxSettings.xhr(),w.support.cors=!!Le&&"withCredentials"in Le,(w.support.ajax=!!Le)&&w.ajaxTransport(function(u){var c;if(!u.crossDomain||w.support.cors)return{send:function(e,o){var a,t,l=u.xhr();if(u.username?l.open(u.type,u.url,u.async,u.username,u.password):l.open(u.type,u.url,u.async),u.xhrFields)for(t in u.xhrFields)l[t]=u.xhrFields[t];u.mimeType&&l.overrideMimeType&&l.overrideMimeType(u.mimeType),u.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest");try{for(t in e)l.setRequestHeader(t,e[t])}catch(e){}l.send(u.hasContent&&u.data||null),c=function(e,t){var n,i,r,s;try{if(c&&(t||4===l.readyState))if(c=_,a&&(l.onreadystatechange=w.noop,Kn)&&delete Yn[a],t)4!==l.readyState&&l.abort();else{s={},n=l.status,i=l.getAllResponseHeaders(),"string"==typeof l.responseText&&(s.text=l.responseText);try{r=l.statusText}catch(e){r=""}n||!u.isLocal||u.crossDomain?1223===n&&(n=204):n=s.text?200:404}}catch(e){t||o(-1,e)}s&&o(n,r,s,i)},u.async?4===l.readyState?setTimeout(c):(a=++Xn,Kn&&(Yn||(Yn={},w(p).unload(Kn)),Yn[a]=c),l.onreadystatechange=c):c()},abort:function(){c&&c(_,!0)}}});var Jn,ei,ti=/^(?:toggle|show|hide)$/,ni=RegExp("^(?:([+-])=|)("+K+")([a-z%]*)$","i"),ii=/queueHooks$/,ri=[function(t,e,n){var i,r,s,o,a,l,u=this,c={},d=t.style,h=t.nodeType&&yn(t),f=w._data(t,"fxshow");for(i in n.queue||(null==(a=w._queueHooks(t,"fx")).unqueued&&(a.unqueued=0,l=a.empty.fire,a.empty.fire=function(){a.unqueued||l()}),a.unqueued++,u.always(function(){u.always(function(){a.unqueued--,w.queue(t,"fx").length||a.empty.fire()})})),1===t.nodeType&&("height"in e||"width"in e)&&(n.overflow=[d.overflow,d.overflowX,d.overflowY],"inline"===w.css(t,"display"))&&"none"===w.css(t,"float")&&(w.support.inlineBlockNeedsLayout&&"inline"!==Cn(t.nodeName)?d.zoom=1:d.display="inline-block"),n.overflow&&(d.overflow="hidden",w.support.shrinkWrapBlocks||u.always(function(){d.overflow=n.overflow[0],d.overflowX=n.overflow[1],d.overflowY=n.overflow[2]})),e)if(r=e[i],ti.exec(r)){if(delete e[i],s=s||"toggle"===r,r===(h?"hide":"show"))continue;c[i]=f&&f[i]||w.style(t,i)}if(!w.isEmptyObject(c))for(i in f?"hidden"in f&&(h=f.hidden):f=w._data(t,"fxshow",{}),s&&(f.hidden=!h),h?w(t).show():u.done(function(){w(t).hide()}),u.done(function(){for(var e in w._removeData(t,"fxshow"),c)w.style(t,e,c[e])}),c)o=ai(h?f[i]:0,i,u),i in f||(f[i]=o.start,h&&(o.end=o.start,o.start="width"===i||"height"===i?1:0))}],si={"*":[function(e,t){var n=this.createTween(e,t),i=n.cur(),t=ni.exec(t),r=t&&t[3]||(w.cssNumber[e]?"":"px"),s=(w.cssNumber[e]||"px"!==r&&+i)&&ni.exec(w.css(n.elem,e)),o=1,a=20;if(s&&s[3]!==r)for(r=r||s[3],t=t||[],s=+i||1;w.style(n.elem,e,(s/=o=o||".5")+r),o!==(o=n.cur()/i)&&1!==o&&--a;);return t&&(s=n.start=+s||+i||0,n.unit=r,n.end=t[1]?s+(t[1]+1)*t[2]:+t[2]),n}]};function oi(){return setTimeout(function(){Jn=_}),Jn=w.now()}function ai(e,t,n){for(var i,r=(si[t]||[]).concat(si["*"]),s=0,o=r.length;s<o;s++)if(i=r[s].call(n,t,e))return i}function li(r,e,t){var n,s,i,o,a,l,u,c=0,d=ri.length,h=w.Deferred().always(function(){delete f.elem}),f=function(){if(s)return!1;for(var e=Jn||oi(),e=Math.max(0,p.startTime+p.duration-e),t=1-(e/p.duration||0),n=0,i=p.tweens.length;n<i;n++)p.tweens[n].run(t);return h.notifyWith(r,[p,t,e]),t<1&&i?e:(h.resolveWith(r,[p]),!1)},p=h.promise({elem:r,props:w.extend({},e),opts:w.extend(!0,{specialEasing:{}},t),originalProperties:e,originalOptions:t,startTime:Jn||oi(),duration:t.duration,tweens:[],createTween:function(e,t){t=w.Tween(r,p.opts,e,t,p.opts.specialEasing[e]||p.opts.easing);return p.tweens.push(t),t},stop:function(e){var t=0,n=e?p.tweens.length:0;if(!s){for(s=!0;t<n;t++)p.tweens[t].run(1);e?h.resolveWith(r,[p,e]):h.rejectWith(r,[p,e])}return this}}),g=p.props,m=g,v=p.opts.specialEasing;for(i in m)if(o=w.camelCase(i),a=v[o],l=m[i],w.isArray(l)&&(a=l[1],l=m[i]=l[0]),i!==o&&(m[o]=l,delete m[i]),u=w.cssHooks[o],u&&"expand"in u)for(i in l=u.expand(l),delete m[o],l)i in m||(m[i]=l[i],v[i]=a);else v[o]=a;for(;c<d;c++)if(n=ri[c].call(p,r,g,p.opts))return n;return w.map(g,ai,p),w.isFunction(p.opts.start)&&p.opts.start.call(r,p),w.fx.timer(w.extend(f,{elem:r,anim:p,queue:p.opts.queue})),p.progress(p.opts.progress).done(p.opts.done,p.opts.complete).fail(p.opts.fail).always(p.opts.always)}function f(e,t,n,i,r){return new f.prototype.init(e,t,n,i,r)}function ui(e,t){var n,i={height:e},r=0;for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=gn[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function ci(e){return w.isWindow(e)?e:9===e.nodeType&&(e.defaultView||e.parentWindow)}w.Animation=w.extend(li,{tweener:function(e,t){for(var n,i=0,r=(e=w.isFunction(e)?(t=e,["*"]):e.split(" ")).length;i<r;i++)n=e[i],si[n]=si[n]||[],si[n].unshift(t)},prefilter:function(e,t){t?ri.unshift(e):ri.push(e)}}),((w.Tween=f).prototype={constructor:f,init:function(e,t,n,i,r,s){this.elem=e,this.prop=n,this.easing=r||"swing",this.options=t,this.start=this.now=this.cur(),this.end=i,this.unit=s||(w.cssNumber[n]?"":"px")},cur:function(){var e=f.propHooks[this.prop];return(e&&e.get?e:f.propHooks._default).get(this)},run:function(e){var t=f.propHooks[this.prop];return this.pos=e=this.options.duration?w.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),(t&&t.set?t:f.propHooks._default).set(this),this}}).init.prototype=f.prototype,(f.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=w.css(e.elem,e.prop,""))&&"auto"!==t?t:0:e.elem[e.prop]},set:function(e){w.fx.step[e.prop]?w.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[w.cssProps[e.prop]]||w.cssHooks[e.prop])?w.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}}).scrollTop=f.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},w.each(["toggle","show","hide"],function(e,i){var r=w.fn[i];w.fn[i]=function(e,t,n){return null==e||"boolean"==typeof e?r.apply(this,arguments):this.animate(ui(i,!0),e,t,n)}}),w.fn.extend({fadeTo:function(e,t,n,i){return this.filter(yn).css("opacity",0).show().end().animate({opacity:t},e,n,i)},animate:function(t,e,n,i){function r(){var e=li(this,w.extend({},t),o);(s||w._data(this,"finish"))&&e.stop(!0)}var s=w.isEmptyObject(t),o=w.speed(e,n,i);return r.finish=r,s||!1===o.queue?this.each(r):this.queue(o.queue,r)},stop:function(r,e,s){function o(e){var t=e.stop;delete e.stop,t(s)}return"string"!=typeof r&&(s=e,e=r,r=_),e&&!1!==r&&this.queue(r||"fx",[]),this.each(function(){var e=!0,t=null!=r&&r+"queueHooks",n=w.timers,i=w._data(this);if(t)i[t]&&i[t].stop&&o(i[t]);else for(t in i)i[t]&&i[t].stop&&ii.test(t)&&o(i[t]);for(t=n.length;t--;)n[t].elem!==this||null!=r&&n[t].queue!==r||(n[t].anim.stop(s),e=!1,n.splice(t,1));!e&&s||w.dequeue(this,r)})},finish:function(o){return!1!==o&&(o=o||"fx"),this.each(function(){var e,t=w._data(this),n=t[o+"queue"],i=t[o+"queueHooks"],r=w.timers,s=n?n.length:0;for(t.finish=!0,w.queue(this,o,[]),i&&i.stop&&i.stop.call(this,!0),e=r.length;e--;)r[e].elem===this&&r[e].queue===o&&(r[e].anim.stop(!0),r.splice(e,1));for(e=0;e<s;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete t.finish})}}),w.each({slideDown:ui("show"),slideUp:ui("hide"),slideToggle:ui("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,i){w.fn[e]=function(e,t,n){return this.animate(i,e,t,n)}}),w.speed=function(e,t,n){var i=e&&"object"==typeof e?w.extend({},e):{complete:n||!n&&t||w.isFunction(e)&&e,duration:e,easing:n&&t||t&&!w.isFunction(t)&&t};return i.duration=w.fx.off?0:"number"==typeof i.duration?i.duration:i.duration in w.fx.speeds?w.fx.speeds[i.duration]:w.fx.speeds._default,null!=i.queue&&!0!==i.queue||(i.queue="fx"),i.old=i.complete,i.complete=function(){w.isFunction(i.old)&&i.old.call(this),i.queue&&w.dequeue(this,i.queue)},i},w.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},w.timers=[],w.fx=f.prototype.init,w.fx.tick=function(){var e,t=w.timers,n=0;for(Jn=w.now();t.length>n;n++)(e=t[n])()||t[n]!==e||t.splice(n--,1);t.length||w.fx.stop(),Jn=_},w.fx.timer=function(e){e()&&w.timers.push(e)&&w.fx.start()},w.fx.interval=13,w.fx.start=function(){ei=ei||setInterval(w.fx.tick,w.fx.interval)},w.fx.stop=function(){clearInterval(ei),ei=null},w.fx.speeds={slow:600,fast:200,_default:400},w.fx.step={},w.expr&&w.expr.filters&&(w.expr.filters.animated=function(t){return w.grep(w.timers,function(e){return t===e.elem}).length}),w.fn.offset=function(t){var e,n,i,r;return arguments.length?t===_?this:this.each(function(e){w.offset.setOffset(this,t,e)}):(n={top:0,left:0},(r=(i=this[0])&&i.ownerDocument)?(e=r.documentElement,w.contains(e,i)?(typeof i.getBoundingClientRect!=g&&(n=i.getBoundingClientRect()),i=ci(r),{top:n.top+(i.pageYOffset||e.scrollTop)-(e.clientTop||0),left:n.left+(i.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}):n):void 0)},w.offset={setOffset:function(e,t,n){var i,r=w.css(e,"position"),s=("static"===r&&(e.style.position="relative"),w(e)),o=s.offset(),a=w.css(e,"top"),l=w.css(e,"left"),u={},r=("absolute"===r||"fixed"===r)&&-1<w.inArray("auto",[a,l])?(i=(r=s.position()).top,r.left):(i=parseFloat(a)||0,parseFloat(l)||0);null!=(t=w.isFunction(t)?t.call(e,n,o):t).top&&(u.top=t.top-o.top+i),null!=t.left&&(u.left=t.left-o.left+r),"using"in t?t.using.call(e,u):s.css(u)}},w.fn.extend({position:function(){var e,t,n,i;if(this[0])return n={top:0,left:0},i=this[0],"fixed"===w.css(i,"position")?t=i.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),(n=w.nodeName(e[0],"html")?n:e.offset()).top+=w.css(e[0],"borderTopWidth",!0),n.left+=w.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-w.css(i,"marginTop",!0),left:t.left-n.left-w.css(i,"marginLeft",!0)}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||H;e&&!w.nodeName(e,"html")&&"static"===w.css(e,"position");)e=e.offsetParent;return e||H})}}),w.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,r){var s=/Y/.test(r);w.fn[t]=function(e){return w.access(this,function(e,t,n){var i=ci(e);return n===_?i?r in i?i[r]:i.document.documentElement[t]:e[t]:(i?i.scrollTo(s?w(i).scrollLeft():n,s?n:w(i).scrollTop()):e[t]=n,_)},t,e,arguments.length,null)}}),w.each({Height:"height",Width:"width"},function(s,o){w.each({padding:"inner"+s,content:o,"":"outer"+s},function(i,e){w.fn[e]=function(e,t){var n=arguments.length&&(i||"boolean"!=typeof e),r=i||(!0===e||!0===t?"margin":"border");return w.access(this,function(e,t,n){var i;return w.isWindow(e)?e.document.documentElement["client"+s]:9===e.nodeType?(i=e.documentElement,Math.max(e.body["scroll"+s],i["scroll"+s],e.body["offset"+s],i["offset"+s],i["client"+s])):n===_?w.css(e,t,r):w.style(e,t,n,r)},o,n?e:_,n,null)}})}),w.fn.size=function(){return this.length},w.fn.andSelf=w.fn.addBack,"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=w:(p.jQuery=p.$=w,"function"==typeof define&&define.amd&&define("jquery",[],function(){return w}))}(window),window.$=jQuery.noConflict(),function(e,c){var i,t=e.jQuery||e.Cowboy||(e.Cowboy={});t.throttle=i=function(r,s,o,a){var l,u=0;function e(){var e=this,t=+new Date-u,n=arguments;function i(){u=+new Date,o.apply(e,n)}a&&!l&&i(),l&&clearTimeout(l),a===c&&r<t?i():!0!==s&&(l=setTimeout(a?function(){l=c}:i,a===c?r-t:r))}return"boolean"!=typeof s&&(a=o,o=s,s=c),t.guid&&(e.guid=o.guid=o.guid||t.guid++),e},t.debounce=function(e,t,n){return n===c?i(e,t,!1):i(e,n,!1!==t)}}(this),function(c,d,h){var f,p,g,m,z,q,W,$,v,y,b,x,V,U,a,e,s,o,Z,Q,_,w,C,S,T,k,F,A,D,E,Y,L,r,i={html:!1,photo:!1,iframe:!1,inline:!1,transition:"elastic",speed:300,fadeOut:300,width:!1,initialWidth:"600",innerWidth:!1,maxWidth:!1,height:!1,initialHeight:"450",innerHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,opacity:.9,preloading:!0,className:!1,overlayClose:!0,escKey:!0,arrowKey:!0,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:void 0,closeButton:!0,fastIframe:!0,open:!1,reposition:!0,loop:!0,slideshow:!1,slideshowAuto:!0,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",photoRegex:/\.(gif|png|jp(e|g|eg)|bmp|ico|webp|jxr|svg)((#|\?).*)?$/i,retinaImage:!1,retinaUrl:!1,retinaSuffix:"@2x.$1",current:"image {current} of {total}",previous:"previous",next:"next",close:"close",xhrError:"This content failed to load.",imgError:"This image failed to load.",returnFocus:!0,trapFocus:!0,onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1,rel:function(){return this.rel},href:function(){return c(this).attr("href")},title:function(){return this.title}},B="colorbox",M="cbox",N=M+"Element",X=M+"_open",K=M+"_load",l=M+"_complete",u=M+"_cleanup",G=M+"_closed",J=M+"_purge",j=c("<a/>"),P="div",ee=0,te={};function R(e,t,n){e=d.createElement(e);return t&&(e.id=M+t),n&&(e.style.cssText=n),c(e)}function ne(){return h.innerHeight||c(h).height()}function ie(e,n){n!==Object(n)&&(n={}),this.cache={},this.el=e,this.value=function(e){var t;return void 0===this.cache[e]&&(void 0!==(t=c(this.el).attr("data-cbox-"+e))?this.cache[e]=t:void 0!==n[e]?this.cache[e]=n[e]:void 0!==i[e]&&(this.cache[e]=i[e])),this.cache[e]},this.get=function(e){e=this.value(e);return c.isFunction(e)?e.call(this.el,this):e}}function re(e){var t=v.length,e=(k+e)%t;return e<0?t+e:e}function O(e,t){return Math.round((/%/.test(e)?("x"===t?y.width():ne())/100:1)*parseInt(e,10))}function se(e,t){return e.get("photo")||e.get("photoRegex").test(t)}function oe(e,t){return e.get("retinaUrl")&&1<h.devicePixelRatio?t.replace(e.get("photoRegex"),e.get("retinaSuffix")):t}function ae(e){"contains"in p[0]&&!p[0].contains(e.target)&&e.target!==f[0]&&(e.stopPropagation(),p.focus())}function I(e){I.str!==e&&(p.add(f).removeClass(I.str).addClass(e),I.str=e)}function H(e){c(d).trigger(e),j.triggerHandler(e)}t=M+"Slideshow_",ce="click."+M;var le,ue,t,ce,de=function(){le?_.get("slideshow")||(j.unbind(u,ge),ge()):_.get("slideshow")&&v[1]&&(le=!0,j.one(u,ge),(_.get("slideshowAuto")?fe:pe)(),e.show())};function n(){clearTimeout(ue)}function he(){(_.get("loop")||v[k+1])&&(n(),ue=setTimeout(L.next,_.get("slideshowSpeed")))}function fe(){e.html(_.get("slideshowStop")).unbind(ce).one(ce,pe),j.bind(l,he).bind(K,n),p.removeClass(t+"off").addClass(t+"on")}function pe(){n(),j.unbind(l,he).unbind(K,n),e.html(_.get("slideshowStart")).unbind(ce).one(ce,function(){L.next(),fe()}),p.removeClass(t+"on").addClass(t+"off")}function ge(){le=!1,e.hide(),n(),j.unbind(l,he).unbind(K,n),p.removeClass(t+"off "+t+"on")}function me(e){var t,n,i,r,s,o,a,l,u;E||(n=c(e).data("colorbox"),_=new ie(e,n),u=_.get("rel"),k=0,u&&!1!==u&&"nofollow"!==u?(v=c("."+N).filter(function(){return new ie(this,c.data(this,B)).get("rel")===u}),-1===(k=v.index(_.el))&&(v=v.add(_.el),k=v.length-1)):v=c(_.el),A||(A=D=!0,I(_.get("className")),p.css({visibility:"hidden",display:"block",opacity:""}),b=R(P,"LoadedContent","width:0; height:0; overflow:hidden; visibility:hidden"),m.css({width:"",height:""}).append(b),w=z.height()+$.height()+m.outerHeight(!0)-m.height(),C=q.width()+W.width()+m.outerWidth(!0)-m.width(),S=b.outerHeight(!0),T=b.outerWidth(!0),e=O(_.get("initialWidth"),"x"),n=O(_.get("initialHeight"),"y"),r=_.get("maxWidth"),t=_.get("maxHeight"),_.w=(!1!==r?Math.min(e,O(r,"x")):e)-T-C,_.h=(!1!==t?Math.min(n,O(t,"y")):n)-S-w,b.css({width:"",height:_.h}),L.position(),H(X),_.get("onOpen"),Q.add(U).hide(),p.focus(),_.get("trapFocus")&&d.addEventListener&&(d.addEventListener("focus",ae,!0),j.one(G,function(){d.removeEventListener("focus",ae,!0)})),_.get("returnFocus")&&j.one(G,function(){c(_.el).focus()})),f.css({opacity:parseFloat(_.get("opacity"))||"",cursor:_.get("overlayClose")?"pointer":"",visibility:"visible"}).show(),_.get("closeButton")?Z.html(_.get("close")).appendTo(m):Z.appendTo("<div/>"),a=L.prep,l=++ee,F=!(D=!0),H(J),H(K),_.get("onLoad"),_.h=_.get("height")?O(_.get("height"),"y")-S-w:_.get("innerHeight")&&O(_.get("innerHeight"),"y"),_.w=_.get("width")?O(_.get("width"),"x")-T-C:_.get("innerWidth")&&O(_.get("innerWidth"),"x"),_.mw=_.w,_.mh=_.h,_.get("maxWidth")&&(_.mw=O(_.get("maxWidth"),"x")-T-C,_.mw=_.w&&_.w<_.mw?_.w:_.mw),_.get("maxHeight")&&(_.mh=O(_.get("maxHeight"),"y")-S-w,_.mh=_.h&&_.h<_.mh?_.h:_.mh),r=_.get("href"),Y=setTimeout(function(){V.show()},100),_.get("inline")?(i=c(r),o=c("<div>").hide().insertBefore(i),j.one(J,function(){o.replaceWith(i)}),a(i)):_.get("iframe")?a(" "):_.get("html")?a(_.get("html")):se(_,r)?(r=oe(_,r),F=new Image,c(F).addClass(M+"Photo").bind("error",function(){a(R(P,"Error").html(_.get("imgError")))}).one("load",function(){l===ee&&setTimeout(function(){var e;c.each(["alt","longdesc","aria-describedby"],function(e,t){var n=c(_.el).attr(t)||c(_.el).attr("data-"+t);n&&F.setAttribute(t,n)}),_.get("retinaImage")&&1<h.devicePixelRatio&&(F.height=F.height/h.devicePixelRatio,F.width=F.width/h.devicePixelRatio),_.get("scalePhotos")&&(s=function(){F.height-=F.height*e,F.width-=F.width*e},_.mw&&F.width>_.mw&&(e=(F.width-_.mw)/F.width,s()),_.mh)&&F.height>_.mh&&(e=(F.height-_.mh)/F.height,s()),_.h&&(F.style.marginTop=Math.max(_.mh-F.height,0)/2+"px"),v[1]&&(_.get("loop")||v[k+1])&&(F.style.cursor="pointer",F.onclick=function(){L.next()}),F.style.width=F.width+"px",F.style.height=F.height+"px",a(F)},1)}),F.src=r):r&&x.load(r,_.get("data"),function(e,t){l===ee&&a("error"===t?R(P,"Error").html(_.get("xhrError")):c(this).contents())}))}function ve(){!p&&d.body&&(r=!1,y=c(h),p=R(P).attr({id:B,class:!1===c.support.opacity?M+"IE":"",role:"dialog",tabindex:"-1"}).hide(),f=R(P,"Overlay").hide(),V=c([R(P,"LoadingOverlay")[0],R(P,"LoadingGraphic")[0]]),g=R(P,"Wrapper"),m=R(P,"Content").append(U=R(P,"Title"),a=R(P,"Current"),o=c('<button type="button"/>').attr({id:M+"Previous"}),s=c('<button type="button"/>').attr({id:M+"Next"}),e=R("button","Slideshow"),V),Z=c('<button type="button"/>').attr({id:M+"Close"}),g.append(R(P).append(R(P,"TopLeft"),z=R(P,"TopCenter"),R(P,"TopRight")),R(P,!1,"clear:left").append(q=R(P,"MiddleLeft"),m,W=R(P,"MiddleRight")),R(P,!1,"clear:left").append(R(P,"BottomLeft"),$=R(P,"BottomCenter"),R(P,"BottomRight"))).find("div div").css({float:"left"}),x=R(P,!1,"position:absolute; width:9999px; visibility:hidden; display:none; max-width:none;"),Q=s.add(o).add(a).add(e),c(d.body).append(f,p.append(g,x)))}c.colorbox||(c(ve),(L=c.fn[B]=c[B]=function(t,e){var n=this;if(t=t||{},c.isFunction(n))n=c("<a/>"),t.open=!0;else if(!n[0])return n;return n[0]&&(ve(),p)&&(r||(r=!0,s.click(function(){L.next()}),o.click(function(){L.prev()}),Z.click(function(){L.close()}),f.click(function(){_.get("overlayClose")&&L.close()}),c(d).bind("keydown."+M,function(e){var t=e.keyCode;A&&_.get("escKey")&&27===t&&(e.preventDefault(),L.close()),A&&_.get("arrowKey")&&v[1]&&!e.altKey&&(37===t?(e.preventDefault(),o.click()):39===t&&(e.preventDefault(),s.click()))}),c.isFunction(c.fn.on)?c(d).on("click."+M,"."+N,i):c("."+N).live("click."+M,i)),1)&&(e&&(t.onComplete=e),n.each(function(){var e=c.data(this,B)||{};c.data(this,B,c.extend(e,t))}).addClass(N),new ie(n[0],t).get("open")&&me(n[0])),n;function i(e){1<e.which||e.shiftKey||e.altKey||e.metaKey||e.ctrlKey||(e.preventDefault(),me(this))}}).position=function(t,e){var n,i,r,s,o=0,a=0,l=p.offset();function u(){z[0].style.width=$[0].style.width=m[0].style.width=parseInt(p[0].style.width,10)-C+"px",m[0].style.height=q[0].style.height=W[0].style.height=parseInt(p[0].style.height,10)-w+"px"}y.unbind("resize."+M),p.css({top:-9e4,left:-9e4}),i=y.scrollTop(),r=y.scrollLeft(),_.get("fixed")?(l.top-=i,l.left-=r,p.css({position:"fixed"})):(o=i,a=r,p.css({position:"absolute"})),!1!==_.get("right")?a+=Math.max(y.width()-_.w-T-C-O(_.get("right"),"x"),0):!1!==_.get("left")?a+=O(_.get("left"),"x"):a+=Math.round(Math.max(y.width()-_.w-T-C,0)/2),!1!==_.get("bottom")?o+=Math.max(ne()-_.h-S-w-O(_.get("bottom"),"y"),0):!1!==_.get("top")?o+=O(_.get("top"),"y"):o+=Math.round(Math.max(ne()-_.h-S-w,0)/2),p.css({top:l.top,left:l.left,visibility:"visible"}),g[0].style.width=g[0].style.height="9999px",n={width:_.w+T+C,height:_.h+S+w,top:o,left:a},t&&(s=0,c.each(n,function(e){n[e]!==te[e]&&(s=t)}),t=s),te=n,t||p.css(n),p.dequeue().animate(n,{duration:t||0,complete:function(){u(),D=!1,g[0].style.width=_.w+T+C+"px",g[0].style.height=_.h+S+w+"px",_.get("reposition")&&setTimeout(function(){y.bind("resize."+M,L.position)},1),e&&e()},step:u})},L.resize=function(e){var t,n;A&&((e=e||{}).width&&(_.w=O(e.width,"x")-T-C),e.innerWidth&&(_.w=O(e.innerWidth,"x")),e.maxWidth&&(n=O(e.maxWidth,"x"),_.w>n)&&(_.w=n),b.css({width:_.w}),e.height&&(_.h=O(e.height,"y")-S-w),e.innerHeight&&(_.h=O(e.innerHeight,"y")),e.innerHeight||e.height||(t=b.scrollTop(),b.css({height:"auto"}),_.h=b.height()),b.css({height:_.h}),t&&b.scrollTop(t),L.position("none"===_.get("transition")?0:_.get("speed")))},L.prep=function(e){var t,r;A&&(r="none"===_.get("transition")?0:_.get("speed"),b.remove(),(b=R(P,"LoadedContent").append(e)).hide().appendTo(x.show()).css({width:(_.w=_.w||b.width(),_.w=_.mw&&_.mw<_.w?_.mw:_.w,_.w),overflow:_.get("scrolling")?"auto":"hidden"}).css({height:(_.h=_.h||b.height(),_.h=_.mh&&_.mh<_.h?_.mh:_.h,_.h)}).prependTo(m),x.hide(),c(F).css({float:"none"}),I(_.get("className")),t=function(){var e,t,n=v.length;function i(){!1===c.support.opacity&&p[0].style.removeAttribute("filter")}A&&(t=function(){clearTimeout(Y),V.hide(),H(l),_.get("onComplete")},U.html(_.get("title")).show(),b.show(),1<n?("string"==typeof _.get("current")&&a.html(_.get("current").replace("{current}",k+1).replace("{total}",n)).show(),s[_.get("loop")||k<n-1?"show":"hide"]().html(_.get("next")),o[_.get("loop")||k?"show":"hide"]().html(_.get("previous")),de(),_.get("preloading")&&c.each([re(-1),re(1)],function(){var e=v[this],e=new ie(e,c.data(e,B)),t=e.get("href");t&&se(e,t)&&(t=oe(e,t),d.createElement("img").src=t)})):Q.hide(),_.get("iframe")?("frameBorder"in(e=d.createElement("iframe"))&&(e.frameBorder=0),"allowTransparency"in e&&(e.allowTransparency="true"),_.get("scrolling")||(e.scrolling="no"),c(e).attr({src:_.get("href"),name:(new Date).getTime(),class:M+"Iframe",allowFullScreen:!0}).one("load",t).appendTo(b),j.one(J,function(){e.src="//about:blank"}),_.get("fastIframe")&&c(e).trigger("load")):t(),"fade"===_.get("transition")?p.fadeTo(r,1,i):i())},"fade"===_.get("transition")?p.fadeTo(r,0,function(){L.position(0,t)}):L.position(r,t))},L.next=function(){!D&&v[1]&&(_.get("loop")||v[k+1])&&(k=re(1),me(v[k]))},L.prev=function(){!D&&v[1]&&(_.get("loop")||k)&&(k=re(-1),me(v[k]))},L.close=function(){A&&!E&&(A=!(E=!0),H(u),_.get("onCleanup"),y.unbind("."+M),f.fadeTo(_.get("fadeOut")||0,0),p.stop().fadeTo(_.get("fadeOut")||0,0,function(){p.hide(),f.hide(),H(J),b.remove(),setTimeout(function(){E=!1,H(G),_.get("onClosed")},1)}))},L.remove=function(){p&&(p.stop(),c.colorbox.close(),p.stop().remove(),f.remove(),E=!1,p=null,c("."+N).removeData(B).removeClass(N),c(d).unbind("click."+M).unbind("keydown."+M))},L.element=function(){return c(_.el)},L.settings=i)}(jQuery,document,window),function(y,f){var e;e=function(T){function a(e){u[e]&&(clearTimeout(u[e]),A._delete.call(null,u[e]))}var l="mCustomScrollbar",k="mCS",i=".mCustomScrollbar",r={setWidth:!1,setHeight:!1,setTop:0,setLeft:0,axis:"y",scrollbarPosition:"inside",scrollInertia:950,autoDraggerLength:!0,autoHideScrollbar:!1,autoExpandScrollbar:!1,alwaysShowScrollbar:0,snapAmount:null,snapOffset:0,mouseWheel:{enable:!0,scrollAmount:"auto",axis:"y",preventDefault:!1,deltaFactor:"auto",normalizeDelta:!1,invert:!1,disableOver:["select","option","keygen","datalist","textarea"]},scrollButtons:{enable:!1,scrollType:"stepless",scrollAmount:"auto"},keyboard:{enable:!0,scrollType:"stepless",scrollAmount:"auto"},contentTouchScroll:25,advanced:{autoExpandHorizontalScroll:!1,autoScrollOnFocus:"input,textarea,select,button,datalist,keygen,a[tabindex],area,object,[contenteditable='true']",updateOnContentResize:!0,updateOnImageLoad:!0,updateOnSelectorChange:!1},theme:"light",callbacks:{onScrollStart:!1,onScroll:!1,onTotalScroll:!1,onTotalScrollBack:!1,whileScrolling:!1,onTotalScrollOffset:0,onTotalScrollBackOffset:0,alwaysTriggerOffsets:!0},live:!1,liveSelector:null},o=0,u={},p=y.attachEvent&&!y.addEventListener?1:0,F=!1,v={init:function(s){var s=T.extend(!0,{},r,s),e=A._selector.call(this);if(s.live){var t=s.liveSelector||this.selector||i,n=T(t);if("off"===s.live)return void a(t);u[t]=setTimeout(function(){n.mCustomScrollbar(s),"once"===s.live&&n.length&&a(t)},500)}else a(t);return s.setWidth=s.set_width||s.setWidth,s.setHeight=s.set_height||s.setHeight,s.axis=s.horizontalScroll?"x":A._findAxis.call(null,s.axis),s.scrollInertia=s.scrollInertia<17?17:s.scrollInertia,"object"!=typeof s.mouseWheel&&1==s.mouseWheel&&(s.mouseWheel={enable:!0,scrollAmount:"auto",axis:"y",preventDefault:!1,deltaFactor:"auto",normalizeDelta:!1,invert:!1}),s.mouseWheel.scrollAmount=s.mouseWheelPixels||s.mouseWheel.scrollAmount,s.mouseWheel.normalizeDelta=s.advanced.normalizeMouseWheelDelta||s.mouseWheel.normalizeDelta,s.scrollButtons.scrollType=A._findScrollButtonsType.call(null,s.scrollButtons.scrollType),A._theme.call(null,s),T(e).each(function(){var e,t,n,i,r=T(this);r.data(k)||(r.data(k,{idx:++o,opt:s,scrollRatio:{y:null,x:null},overflowed:null,bindEvents:!1,tweenRunning:!1,sequential:{},langDir:r.css("direction"),cbOffsets:null,trigger:null}),e=r.data(k).opt,t=r.data("mcs-axis"),n=r.data("mcs-scrollbar-position"),i=r.data("mcs-theme"),t&&(e.axis=t),n&&(e.scrollbarPosition=n),i&&(e.theme=i,A._theme.call(null,e)),A._pluginMarkup.call(this),v.update.call(null,r))})},update:function(e){e=e||A._selector.call(this);return T(e).each(function(){var e,t,n,i,r=T(this);r.data(k)&&(t=(e=r.data(k)).opt,i=T("#mCSB_"+e.idx+"_container"),n=[T("#mCSB_"+e.idx+"_dragger_vertical"),T("#mCSB_"+e.idx+"_dragger_horizontal")],i.length)&&(e.tweenRunning&&A._stop.call(null,r),r.hasClass("mCS_disabled")&&r.removeClass("mCS_disabled"),r.hasClass("mCS_destroyed")&&r.removeClass("mCS_destroyed"),A._maxHeight.call(this),A._expandContentHorizontally.call(this),"y"===t.axis||t.advanced.autoExpandHorizontalScroll||i.css("width",A._contentWidth(i.children())),e.overflowed=A._overflowed.call(this),A._scrollbarVisibility.call(this),t.autoDraggerLength&&A._setDraggerLength.call(this),A._scrollRatio.call(this),A._bindEvents.call(this),i=[Math.abs(i[0].offsetTop),Math.abs(i[0].offsetLeft)],"x"!==t.axis&&(e.overflowed[0]?n[0].height()>n[0].parent().height()?A._resetContentPosition.call(this):A._scrollTo.call(this,r,i[0].toString(),{dir:"y",dur:0,overwrite:"none"}):(A._resetContentPosition.call(this),"y"===t.axis?A._unbindEvents.call(this):"yx"===t.axis&&e.overflowed[1]&&A._scrollTo.call(this,r,i[1].toString(),{dir:"x",dur:0,overwrite:"none"}))),"y"!==t.axis&&(e.overflowed[1]?n[1].width()>n[1].parent().width()?A._resetContentPosition.call(this):A._scrollTo.call(this,r,i[1].toString(),{dir:"x",dur:0,overwrite:"none"}):(A._resetContentPosition.call(this),"x"===t.axis?A._unbindEvents.call(this):"yx"===t.axis&&e.overflowed[0]&&A._scrollTo.call(this,r,i[0].toString(),{dir:"y",dur:0,overwrite:"none"}))),A._autoUpdate.call(this))})},scrollTo:function(o,a){var e;if(void 0!==o&&null!=o)return e=A._selector.call(this),T(e).each(function(){var e,t,n,i,r,s=T(this);s.data(k)&&(e=s.data(k),r={trigger:"external",scrollInertia:(t=e.opt).scrollInertia,scrollEasing:"mcsEaseInOut",moveDragger:!1,callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},n=T.extend(!0,{},r,a),i=A._arr.call(this,o),r=n.scrollInertia<17?17:n.scrollInertia,i[0]=A._to.call(this,i[0],"y"),i[1]=A._to.call(this,i[1],"x"),n.moveDragger&&(i[0]*=e.scrollRatio.y,i[1]*=e.scrollRatio.x),n.dur=r,setTimeout(function(){null!==i[0]&&void 0!==i[0]&&"x"!==t.axis&&e.overflowed[0]&&(n.dir="y",n.overwrite="all",A._scrollTo.call(this,s,i[0].toString(),n)),null!==i[1]&&void 0!==i[1]&&"y"!==t.axis&&e.overflowed[1]&&(n.dir="x",n.overwrite="none",A._scrollTo.call(this,s,i[1].toString(),n))},60))})},stop:function(){var e=A._selector.call(this);return T(e).each(function(){var e=T(this);e.data(k)&&A._stop.call(null,e)})},disable:function(t){var e=A._selector.call(this);return T(e).each(function(){var e=T(this);e.data(k)&&(e.data(k).opt,A._autoUpdate.call(this,"remove"),A._unbindEvents.call(this),t&&A._resetContentPosition.call(this),A._scrollbarVisibility.call(this,!0),e.addClass("mCS_disabled"))})},destroy:function(){var o=A._selector.call(this);return T(o).each(function(){var e,t,n,i,r,s=T(this);s.data(k)&&(t=(e=s.data(k)).opt,n=T("#mCSB_"+e.idx),i=T("#mCSB_"+e.idx+"_container"),r=T(".mCSB_"+e.idx+"_scrollbar"),t.live&&a(o),A._autoUpdate.call(this,"remove"),A._unbindEvents.call(this),A._resetContentPosition.call(this),s.removeData(k),A._delete.call(null,this.mcs),r.remove(),n.replaceWith(i.contents()),s.removeClass(l+" _"+k+"_"+e.idx+" mCS-autoHide mCS-dir-rtl mCS_no_scrollbar mCS_disabled").addClass("mCS_destroyed"))})}},A={_selector:function(){return"object"!=typeof T(this)||T(this).length<1?i:this},_theme:function(e){e.autoDraggerLength=!(-1<T.inArray(e.theme,["rounded","rounded-dark","rounded-dots","rounded-dots-dark"]))&&e.autoDraggerLength,e.autoExpandScrollbar=!(-1<T.inArray(e.theme,["rounded-dots","rounded-dots-dark","3d","3d-dark","3d-thick","3d-thick-dark","inset","inset-dark","inset-2","inset-2-dark","inset-3","inset-3-dark"]))&&e.autoExpandScrollbar,e.scrollButtons.enable=!(-1<T.inArray(e.theme,["minimal","minimal-dark"]))&&e.scrollButtons.enable,e.autoHideScrollbar=-1<T.inArray(e.theme,["minimal","minimal-dark"])||e.autoHideScrollbar,e.scrollbarPosition=-1<T.inArray(e.theme,["minimal","minimal-dark"])?"outside":e.scrollbarPosition},_findAxis:function(e){return"yx"===e||"xy"===e||"auto"===e?"yx":"x"===e||"horizontal"===e?"x":"y"},_findScrollButtonsType:function(e){return"stepped"===e||"pixels"===e||"step"===e||"click"===e?"stepped":"stepless"},_pluginMarkup:function(){var e=T(this),t=e.data(k),n=t.opt,i=n.autoExpandScrollbar?" mCSB_scrollTools_onDrag_expand":"",i=["<div id='mCSB_"+t.idx+"_scrollbar_vertical' class='mCSB_scrollTools mCSB_"+t.idx+"_scrollbar mCS-"+n.theme+" mCSB_scrollTools_vertical"+i+"'><div class='mCSB_draggerContainer'><div id='mCSB_"+t.idx+"_dragger_vertical' class='mCSB_dragger' style='position:absolute;' oncontextmenu='return false;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>","<div id='mCSB_"+t.idx+"_scrollbar_horizontal' class='mCSB_scrollTools mCSB_"+t.idx+"_scrollbar mCS-"+n.theme+" mCSB_scrollTools_horizontal"+i+"'><div class='mCSB_draggerContainer'><div id='mCSB_"+t.idx+"_dragger_horizontal' class='mCSB_dragger' style='position:absolute;' oncontextmenu='return false;'><div class='mCSB_dragger_bar' /></div><div class='mCSB_draggerRail' /></div></div>"],r="yx"===n.axis?"mCSB_vertical_horizontal":"x"===n.axis?"mCSB_horizontal":"mCSB_vertical",i="yx"===n.axis?i[0]+i[1]:"x"===n.axis?i[1]:i[0],s="yx"===n.axis?"<div id='mCSB_"+t.idx+"_container_wrapper' class='mCSB_container_wrapper' />":"",o=n.autoHideScrollbar?" mCS-autoHide":"",a="x"!==n.axis&&"rtl"===t.langDir?" mCS-dir-rtl":"",o=(n.setWidth&&e.css("width",n.setWidth),n.setHeight&&e.css("height",n.setHeight),n.setLeft="y"!==n.axis&&"rtl"===t.langDir?"989999px":n.setLeft,e.addClass(l+" _"+k+"_"+t.idx+o+a).wrapInner("<div id='mCSB_"+t.idx+"' class='mCustomScrollBox mCS-"+n.theme+" "+r+"'><div id='mCSB_"+t.idx+"_container' class='mCSB_container' style='position:relative; top:"+n.setTop+"; left:"+n.setLeft+";' dir="+t.langDir+" /></div>"),T("#mCSB_"+t.idx)),a=T("#mCSB_"+t.idx+"_container"),r=("y"===n.axis||n.advanced.autoExpandHorizontalScroll||a.css("width",A._contentWidth(a.children())),"outside"===n.scrollbarPosition?("static"===e.css("position")&&e.css("position","relative"),e.css("overflow","visible"),o.addClass("mCSB_outside").after(i)):(o.addClass("mCSB_inside").append(i),a.wrap(s)),A._scrollButtons.call(this),[T("#mCSB_"+t.idx+"_dragger_vertical"),T("#mCSB_"+t.idx+"_dragger_horizontal")]);r[0].css("min-height",r[0].height()),r[1].css("min-width",r[1].width())},_contentWidth:function(e){return Math.max.apply(Math,e.map(function(){return T(this).outerWidth(!0)}).get())},_expandContentHorizontally:function(){var e=T(this).data(k),t=e.opt,e=T("#mCSB_"+e.idx+"_container");t.advanced.autoExpandHorizontalScroll&&"y"!==t.axis&&e.css({position:"absolute",width:"auto"}).wrap("<div class='mCSB_h_wrapper' style='position:relative; left:0; width:999999px;' />").css({width:Math.ceil(e[0].getBoundingClientRect().right+.4)-Math.floor(e[0].getBoundingClientRect().left),position:"relative"}).unwrap()},_scrollButtons:function(){var e=T(this).data(k),t=e.opt,e=T(".mCSB_"+e.idx+"_scrollbar:first"),n=["<a href='#' class='mCSB_buttonUp' oncontextmenu='return false;' />","<a href='#' class='mCSB_buttonDown' oncontextmenu='return false;' />","<a href='#' class='mCSB_buttonLeft' oncontextmenu='return false;' />","<a href='#' class='mCSB_buttonRight' oncontextmenu='return false;' />"],n=["x"===t.axis?n[2]:n[0],"x"===t.axis?n[3]:n[1],n[2],n[3]];t.scrollButtons.enable&&e.prepend(n[0]).append(n[1]).next(".mCSB_scrollTools").prepend(n[2]).append(n[3])},_maxHeight:function(){var e=T(this),t=e.data(k),t=(t.opt,T("#mCSB_"+t.idx)),n=e.css("max-height"),i=-1!==n.indexOf("%"),r=e.css("box-sizing");"none"!==n&&(i=i?e.parent().height()*parseInt(n)/100:parseInt(n),"border-box"===r&&(i-=e.innerHeight()-e.height()+(e.outerHeight()-e.innerHeight())),t.css("max-height",Math.round(i)))},_setDraggerLength:function(){var e=T(this).data(k),t=T("#mCSB_"+e.idx),n=T("#mCSB_"+e.idx+"_container"),e=[T("#mCSB_"+e.idx+"_dragger_vertical"),T("#mCSB_"+e.idx+"_dragger_horizontal")],t=[t.height()/n.outerHeight(!1),t.width()/n.outerWidth(!1)],n=[parseInt(e[0].css("min-height")),Math.round(t[0]*e[0].parent().height()),parseInt(e[1].css("min-width")),Math.round(t[1]*e[1].parent().width())],t=p&&n[3]<n[2]?n[2]:n[3];e[0].css({height:p&&n[1]<n[0]?n[0]:n[1],"max-height":e[0].parent().height()-10}).find(".mCSB_dragger_bar").css({"line-height":n[0]+"px"}),e[1].css({width:t,"max-width":e[1].parent().width()-10})},_scrollRatio:function(){var e=T(this).data(k),t=T("#mCSB_"+e.idx),n=T("#mCSB_"+e.idx+"_container"),i=[T("#mCSB_"+e.idx+"_dragger_vertical"),T("#mCSB_"+e.idx+"_dragger_horizontal")],n=[n.outerHeight(!1)-t.height(),n.outerWidth(!1)-t.width()],t=[n[0]/(i[0].parent().height()-i[0].height()),n[1]/(i[1].parent().width()-i[1].width())];e.scrollRatio={y:t[0],x:t[1]}},_onDragClasses:function(e,t,n){var n=n?"mCSB_dragger_onDrag_expanded":"",i=["mCSB_dragger_onDrag","mCSB_scrollTools_onDrag"],r=e.closest(".mCSB_scrollTools");"active"===t?(e.toggleClass(i[0]+" "+n),r.toggleClass(i[1]),e[0]._draggable=e[0]._draggable?0:1):e[0]._draggable||("hide"===t?(e.removeClass(i[0]),r.removeClass(i[1])):(e.addClass(i[0]),r.addClass(i[1])))},_overflowed:function(){var e=T(this).data(k),t=T("#mCSB_"+e.idx),n=T("#mCSB_"+e.idx+"_container"),i=null==e.overflowed?n.height():n.outerHeight(!1),e=null==e.overflowed?n.width():n.outerWidth(!1);return[i>t.height(),e>t.width()]},_resetContentPosition:function(){var e=T(this),t=e.data(k),n=t.opt,i=T("#mCSB_"+t.idx),r=T("#mCSB_"+t.idx+"_container"),s=[T("#mCSB_"+t.idx+"_dragger_vertical"),T("#mCSB_"+t.idx+"_dragger_horizontal")];A._stop(e),("x"!==n.axis&&!t.overflowed[0]||"y"===n.axis&&t.overflowed[0])&&s[0].add(r).css("top",0),("y"!==n.axis&&!t.overflowed[1]||"x"===n.axis&&t.overflowed[1])&&(e=dx=0,"rtl"===t.langDir&&(e=i.width()-r.outerWidth(!1),dx=Math.abs(e/t.scrollRatio.x)),r.css("left",e),s[1].css("left",dx))},_bindEvents:function(){var t,n=T(this),e=n.data(k),i=e.opt;e.bindEvents||(A._draggable.call(this),i.contentTouchScroll&&A._contentDraggable.call(this),i.mouseWheel.enable&&function e(){t=setTimeout(function(){T.event.special.mousewheel?(clearTimeout(t),A._mousewheel.call(n[0])):e()},1e3)}(),A._draggerRail.call(this),A._wrapperScroll.call(this),i.advanced.autoScrollOnFocus&&A._focus.call(this),i.scrollButtons.enable&&A._buttons.call(this),i.keyboard.enable&&A._keyboard.call(this),e.bindEvents=!0)},_unbindEvents:function(){var e=T(this),t=e.data(k),n="mCS_"+t.idx,i=".mCSB_"+t.idx+"_scrollbar",i=T("#mCSB_"+t.idx+",#mCSB_"+t.idx+"_container,#mCSB_"+t.idx+"_container_wrapper,"+i+" .mCSB_draggerContainer,#mCSB_"+t.idx+"_dragger_vertical,#mCSB_"+t.idx+"_dragger_horizontal,"+i+">a"),r=T("#mCSB_"+t.idx+"_container");t.bindEvents&&(T(f).unbind("."+n),i.each(function(){T(this).unbind("."+n)}),clearTimeout(e[0]._focusTimeout),A._delete.call(null,e[0]._focusTimeout),clearTimeout(t.sequential.step),A._delete.call(null,t.sequential.step),clearTimeout(r[0].onCompleteTimeout),A._delete.call(null,r[0].onCompleteTimeout),t.bindEvents=!1)},_scrollbarVisibility:function(e){var t=T(this),n=t.data(k),i=n.opt,r=T("#mCSB_"+n.idx+"_container_wrapper"),r=r.length?r:T("#mCSB_"+n.idx+"_container"),s=[T("#mCSB_"+n.idx+"_scrollbar_vertical"),T("#mCSB_"+n.idx+"_scrollbar_horizontal")],o=[s[0].find(".mCSB_dragger"),s[1].find(".mCSB_dragger")];"x"!==i.axis&&(n.overflowed[0]&&!e?(s[0].add(o[0]).add(s[0].children("a")).css("display","block"),r.removeClass("mCS_no_scrollbar_y mCS_y_hidden")):(i.alwaysShowScrollbar?(2!==i.alwaysShowScrollbar&&o[0].add(s[0].children("a")).css("display","none"),r.removeClass("mCS_y_hidden")):(s[0].css("display","none"),r.addClass("mCS_y_hidden")),r.addClass("mCS_no_scrollbar_y"))),"y"!==i.axis&&(n.overflowed[1]&&!e?(s[1].add(o[1]).add(s[1].children("a")).css("display","block"),r.removeClass("mCS_no_scrollbar_x mCS_x_hidden")):(i.alwaysShowScrollbar?(2!==i.alwaysShowScrollbar&&o[1].add(s[1].children("a")).css("display","none"),r.removeClass("mCS_x_hidden")):(s[1].css("display","none"),r.addClass("mCS_x_hidden")),r.addClass("mCS_no_scrollbar_x"))),n.overflowed[0]||n.overflowed[1]?t.removeClass("mCS_no_scrollbar"):t.addClass("mCS_no_scrollbar")},_coordinates:function(e){switch(e.type){case"pointerdown":case"MSPointerDown":case"pointermove":case"MSPointerMove":case"pointerup":case"MSPointerUp":return[e.originalEvent.pageY,e.originalEvent.pageX];case"touchstart":case"touchmove":case"touchend":var t=e.originalEvent.touches[0]||e.originalEvent.changedTouches[0];return[t.pageY,t.pageX];default:return[e.pageY,e.pageX]}},_draggable:function(){var s,r,o,a=T(this),l=a.data(k),u=l.opt,e="mCS_"+l.idx,c=["mCSB_"+l.idx+"_dragger_vertical","mCSB_"+l.idx+"_dragger_horizontal"],d=T("#mCSB_"+l.idx+"_container"),t=T("#"+c[0]+",#"+c[1]);function h(e){var t=d.find("iframe");t.length&&t.css("pointer-events",e?"auto":"none")}function i(e,t,n,i){var r;d[0].idleTimer=u.scrollInertia<233?250:0,t=s.attr("id")===c[1]?(r="x",(s[0].offsetLeft-t+i)*l.scrollRatio.x):(r="y",(s[0].offsetTop-e+n)*l.scrollRatio.y),A._scrollTo(a,t.toString(),{dir:r,drag:!0})}t.bind("mousedown."+e+" touchstart."+e+" pointerdown."+e+" MSPointerDown."+e,function(e){var t,n,i;e.stopImmediatePropagation(),e.preventDefault(),A._mouseBtnLeft(e)&&(F=!0,p&&(f.onselectstart=function(){return!1}),h(!1),A._stop(a),i=(s=T(this)).offset(),t=A._coordinates(e)[0]-i.top,e=A._coordinates(e)[1]-i.left,n=s.height()+i.top,i=s.width()+i.left,t<n&&0<t&&e<i&&0<e&&(r=t,o=e),A._onDragClasses(s,"active",u.autoExpandScrollbar))}).bind("touchmove."+e,function(e){e.stopImmediatePropagation(),e.preventDefault();var t=s.offset(),n=A._coordinates(e)[0]-t.top,e=A._coordinates(e)[1]-t.left;i(r,o,n,e)}),T(f).bind("mousemove."+e+" pointermove."+e+" MSPointerMove."+e,function(e){var t,n;s&&(t=s.offset(),n=A._coordinates(e)[0]-t.top,e=A._coordinates(e)[1]-t.left,r!==n)&&i(r,o,n,e)}).add(t).bind("mouseup."+e+" touchend."+e+" pointerup."+e+" MSPointerUp."+e,function(e){s&&(A._onDragClasses(s,"active",u.autoExpandScrollbar),s=null),F=!1,p&&(f.onselectstart=null),h(!0)})},_contentDraggable:function(){var o,a,s,l,u,c,d,h,f,p=T(this),g=p.data(k),m=g.opt,e="mCS_"+g.idx,v=T("#mCSB_"+g.idx),y=T("#mCSB_"+g.idx+"_container"),b=[T("#mCSB_"+g.idx+"_dragger_vertical"),T("#mCSB_"+g.idx+"_dragger_horizontal")],x=[],_=[],w="yx"===m.axis?"none":"all";function C(e,t){var n=[1.5*t,2*t,t/1.5,t/2];return 90<e?4<t?n[0]:n[3]:60<e?3<t?n[3]:n[2]:30<e?8<t?n[1]:6<t?n[0]:4<t?t:n[2]:8<t?t:n[3]}function S(e,t,n,i,r,s){e&&A._scrollTo(p,e.toString(),{dur:t,scrollEasing:n,dir:i,overwrite:r,drag:s})}y.bind("touchstart."+e+" pointerdown."+e+" MSPointerDown."+e,function(e){var t;A._pointerTouch(e)&&!F&&(t=y.offset(),o=A._coordinates(e)[0]-t.top,a=A._coordinates(e)[1]-t.left)}).bind("touchmove."+e+" pointermove."+e+" MSPointerMove."+e,function(e){var t,n,i,r,s;A._pointerTouch(e)&&!F&&(e.stopImmediatePropagation(),c=A._getTime(),n=v.offset(),t=A._coordinates(e)[0]-n.top,n=A._coordinates(e)[1]-n.left,i="mcsLinearOut",x.push(t),_.push(n),g.overflowed[0]&&(r=b[0].parent().height()-b[0].height(),r=0<o-t&&t-o>-(r*g.scrollRatio.y)),g.overflowed[1]&&(s=b[1].parent().width()-b[1].width(),s=0<a-n&&n-a>-(s*g.scrollRatio.x)),(r||s)&&e.preventDefault(),h="yx"===m.axis?[o-t,a-n]:"x"===m.axis?[null,a-n]:[o-t,null],y[0].idleTimer=250,g.overflowed[0]&&S(h[0],0,i,"y","all",!0),g.overflowed[1])&&S(h[1],0,i,"x",w,!0)}),v.bind("touchstart."+e+" pointerdown."+e+" MSPointerDown."+e,function(e){var t;A._pointerTouch(e)&&!F&&(e.stopImmediatePropagation(),A._stop(p),u=A._getTime(),t=v.offset(),s=A._coordinates(e)[0]-t.top,l=A._coordinates(e)[1]-t.left,x=[],_=[])}).bind("touchend."+e+" pointerup."+e+" MSPointerUp."+e,function(e){var t,n,i,r;!A._pointerTouch(e)||F||(e.stopImmediatePropagation(),d=A._getTime(),t=v.offset(),r=A._coordinates(e)[0]-t.top,e=A._coordinates(e)[1]-t.left,30<d-c)||(t="mcsEaseOut",i=(n=(d=1e3/(d-u))<2.5)?[x[x.length-2],_[_.length-2]]:[0,0],f=n?[r-i[0],e-i[1]]:[r-s,e-l],i=[Math.abs(f[0]),Math.abs(f[1])],d=n?[Math.abs(f[0]/4),Math.abs(f[1]/4)]:[d,d],r=[Math.abs(y[0].offsetTop)-f[0]*C(i[0]/d[0],d[0]),Math.abs(y[0].offsetLeft)-f[1]*C(i[1]/d[1],d[1])],h="yx"===m.axis?[r[0],r[1]]:"x"===m.axis?[null,r[1]]:[r[0],null],f=[4*i[0]+m.scrollInertia,4*i[1]+m.scrollInertia],e=parseInt(m.contentTouchScroll)||0,h[0]=e<i[0]?h[0]:0,h[1]=e<i[1]?h[1]:0,g.overflowed[0]&&S(h[0],f[0],t,"y",w,!1),g.overflowed[1]&&S(h[1],f[1],t,"x",w,!1))})},_mousewheel:function(){var u,e,c,d,h=T(this),f=h.data(k);f&&(u=f.opt,e="mCS_"+f.idx,c=T("#mCSB_"+f.idx),d=[T("#mCSB_"+f.idx+"_dragger_vertical"),T("#mCSB_"+f.idx+"_dragger_horizontal")],c.bind("mousewheel."+e,function(e,t){var n,i,r,s,o,a,l;A._stop(h),A._disableMousewheel(h,e.target)||(l="auto"!==u.mouseWheel.deltaFactor?parseInt(u.mouseWheel.deltaFactor):p&&e.deltaFactor<100?100:e.deltaFactor<40?40:e.deltaFactor||100,l="x"===u.axis||"x"===u.mouseWheel.axis?(n="x",i=[Math.round(l*f.scrollRatio.x),parseInt(u.mouseWheel.scrollAmount)],r="auto"!==u.mouseWheel.scrollAmount?i[1]:i[0]>=c.width()?.9*c.width():i[0],s=Math.abs(T("#mCSB_"+f.idx+"_container")[0].offsetLeft),o=d[1][0].offsetLeft,a=d[1].parent().width()-d[1].width(),e.deltaX||e.deltaY||t):(n="y",i=[Math.round(l*f.scrollRatio.y),parseInt(u.mouseWheel.scrollAmount)],r="auto"!==u.mouseWheel.scrollAmount?i[1]:i[0]>=c.height()?.9*c.height():i[0],s=Math.abs(T("#mCSB_"+f.idx+"_container")[0].offsetTop),o=d[0][0].offsetTop,a=d[0].parent().height()-d[0].height(),e.deltaY||t),"y"===n&&!f.overflowed[0])||"x"===n&&!f.overflowed[1]||(u.mouseWheel.invert&&(l=-l),(0<(l=u.mouseWheel.normalizeDelta?l<0?-1:1:l)&&0!==o||l<0&&o!==a||u.mouseWheel.preventDefault)&&(e.stopImmediatePropagation(),e.preventDefault()),A._scrollTo(h,(s-l*r).toString(),{dir:n}))}))},_disableMousewheel:function(e,t){var n=t.nodeName.toLowerCase(),e=e.data(k).opt.mouseWheel.disableOver;return-1<T.inArray(n,e)&&!(-1<T.inArray(n,["select","textarea"])&&!T(t).is(":focus"))},_draggerRail:function(){var o=T(this),a=o.data(k),e="mCS_"+a.idx,l=T("#mCSB_"+a.idx+"_container"),u=l.parent();T(".mCSB_"+a.idx+"_scrollbar .mCSB_draggerContainer").bind("touchstart."+e+" pointerdown."+e+" MSPointerDown."+e,function(e){F=!0}).bind("touchend."+e+" pointerup."+e+" MSPointerUp."+e,function(e){F=!1}).bind("click."+e,function(e){if(T(e.target).hasClass("mCSB_draggerContainer")||T(e.target).hasClass("mCSB_draggerRail")){A._stop(o);var t=T(this),n=t.find(".mCSB_dragger");if(0<t.parent(".mCSB_scrollTools_horizontal").length){if(!a.overflowed[1])return;var i="x",r=e.pageX>n.offset().left?-1:1,s=Math.abs(l[0].offsetLeft)-r*(.9*u.width())}else{if(!a.overflowed[0])return;i="y",r=e.pageY>n.offset().top?-1:1,s=Math.abs(l[0].offsetTop)-r*(.9*u.height())}A._scrollTo(o,s.toString(),{dir:i,scrollEasing:"mcsEaseInOut"})}})},_focus:function(){var r=T(this),e=r.data(k),s=e.opt,t="mCS_"+e.idx,o=T("#mCSB_"+e.idx+"_container"),a=o.parent();o.bind("focusin."+t,function(e){var i=T(f.activeElement),t=o.find(".mCustomScrollBox").length;i.is(s.advanced.autoScrollOnFocus)&&(A._stop(r),clearTimeout(r[0]._focusTimeout),r[0]._focusTimer=t?17*t:0,r[0]._focusTimeout=setTimeout(function(){var e=[i.offset().top-o.offset().top,i.offset().left-o.offset().left],t=[o[0].offsetTop,o[0].offsetLeft],t=[0<=t[0]+e[0]&&t[0]+e[0]<a.height()-i.outerHeight(!1),0<=t[1]+e[1]&&t[0]+e[1]<a.width()-i.outerWidth(!1)],n="yx"!==s.axis||t[0]||t[1]?"all":"none";"x"===s.axis||t[0]||A._scrollTo(r,e[0].toString(),{dir:"y",scrollEasing:"mcsEaseInOut",overwrite:n,dur:0}),"y"===s.axis||t[1]||A._scrollTo(r,e[1].toString(),{dir:"x",scrollEasing:"mcsEaseInOut",overwrite:n,dur:0})},r[0]._focusTimer))})},_wrapperScroll:function(){var e=T(this).data(k),t="mCS_"+e.idx,n=T("#mCSB_"+e.idx+"_container").parent();n.bind("scroll."+t,function(e){n.scrollTop(0).scrollLeft(0)})},_buttons:function(){var i=T(this),r=i.data(k),s=r.opt,o=r.sequential,e="mCS_"+r.idx,t=(T("#mCSB_"+r.idx+"_container"),".mCSB_"+r.idx+"_scrollbar");T(t+">a").bind("mousedown."+e+" touchstart."+e+" pointerdown."+e+" MSPointerDown."+e+" mouseup."+e+" touchend."+e+" pointerup."+e+" MSPointerUp."+e+" mouseout."+e+" pointerout."+e+" MSPointerOut."+e+" click."+e,function(e){if(e.preventDefault(),A._mouseBtnLeft(e)){var t=T(this).attr("class");switch(o.type=s.scrollButtons.scrollType,e.type){case"mousedown":case"touchstart":case"pointerdown":case"MSPointerDown":"stepped"!==o.type&&(F=!0,r.tweenRunning=!1,n("on",t));break;case"mouseup":case"touchend":case"pointerup":case"MSPointerUp":case"mouseout":case"pointerout":case"MSPointerOut":"stepped"!==o.type&&(F=!1,o.dir)&&n("off",t);break;case"click":"stepped"!==o.type||r.tweenRunning||n("on",t)}}function n(e,t){o.scrollAmount=s.snapAmount||s.scrollButtons.scrollAmount,A._sequentialScroll.call(this,i,e,t)}})},_keyboard:function(){var o=T(this),a=o.data(k),l=a.opt,u=a.sequential,e="mCS_"+a.idx,t=T("#mCSB_"+a.idx),c=T("#mCSB_"+a.idx+"_container"),d=c.parent(),h="input,textarea,select,datalist,keygen,[contenteditable='true']";t.attr("tabindex","0").bind("blur."+e+" keydown."+e+" keyup."+e,function(e){switch(e.type){case"blur":a.tweenRunning&&u.dir&&s("off",null);break;case"keydown":case"keyup":var t,n,i=e.keyCode||e.which,r="on";if("x"!==l.axis&&(38===i||40===i)||"y"!==l.axis&&(37===i||39===i)){if((38===i||40===i)&&!a.overflowed[0]||(37===i||39===i)&&!a.overflowed[1])return;"keyup"===e.type&&(r="off"),T(f.activeElement).is(h)||(e.preventDefault(),e.stopImmediatePropagation(),s(r,i))}else 33===i||34===i?((a.overflowed[0]||a.overflowed[1])&&(e.preventDefault(),e.stopImmediatePropagation()),"keyup"===e.type&&(A._stop(o),r=34===i?-1:1,n="x"===l.axis||"yx"===l.axis&&a.overflowed[1]&&!a.overflowed[0]?(t="x",Math.abs(c[0].offsetLeft)-r*(.9*d.width())):(t="y",Math.abs(c[0].offsetTop)-r*(.9*d.height())),A._scrollTo(o,n.toString(),{dir:t,scrollEasing:"mcsEaseInOut"}))):35!==i&&36!==i||T(f.activeElement).is(h)||((a.overflowed[0]||a.overflowed[1])&&(e.preventDefault(),e.stopImmediatePropagation()),"keyup"===e.type&&(n="x"===l.axis||"yx"===l.axis&&a.overflowed[1]&&!a.overflowed[0]?(t="x",35===i?Math.abs(d.width()-c.outerWidth(!1)):0):(t="y",35===i?Math.abs(d.height()-c.outerHeight(!1)):0),A._scrollTo(o,n.toString(),{dir:t,scrollEasing:"mcsEaseInOut"})))}function s(e,t){u.type=l.keyboard.scrollType,u.scrollAmount=l.snapAmount||l.keyboard.scrollAmount,"stepped"===u.type&&a.tweenRunning||A._sequentialScroll.call(this,o,e,t)}})},_sequentialScroll:function(o,e,t){var a=o.data(k),l=a.opt,u=a.sequential,c=T("#mCSB_"+a.idx+"_container"),n="stepped"===u.type;switch(e){case"on":u.dir=["mCSB_buttonRight"===t||"mCSB_buttonLeft"===t||39===t||37===t?"x":"y","mCSB_buttonUp"===t||"mCSB_buttonLeft"===t||38===t||37===t?-1:1],A._stop(o),A._isNumeric(t)&&"stepped"===u.type||d(n);break;case"off":clearTimeout(u.step),A._stop(o),(n||a.tweenRunning&&u.dir)&&d(!0)}function d(e){var t="stepped"!==u.type,n=e?t?l.scrollInertia/1.5:l.scrollInertia:1e3/60,i=e?t?7.5:40:2.5,r=[Math.abs(c[0].offsetTop),Math.abs(c[0].offsetLeft)],s=[10<a.scrollRatio.y?10:a.scrollRatio.y,10<a.scrollRatio.x?10:a.scrollRatio.x],s="x"===u.dir[0]?r[1]+u.dir[1]*(s[1]*i):r[0]+u.dir[1]*(s[0]*i),i="x"===u.dir[0]?r[1]+u.dir[1]*parseInt(u.scrollAmount):r[0]+u.dir[1]*parseInt(u.scrollAmount),i="auto"!==u.scrollAmount?i:s,s=e?t?"mcsLinearOut":"mcsEaseInOut":"mcsLinear",t=!!e;e&&n<17&&(i="x"===u.dir[0]?r[1]:r[0]),A._scrollTo(o,i.toString(),{dir:u.dir[0],scrollEasing:s,dur:n,onComplete:t}),e?u.dir=!1:(clearTimeout(u.step),u.step=setTimeout(function(){d()},n))}},_arr:function(e){var t=T(this).data(k).opt,n=[];return(e="function"==typeof e?e():e)instanceof Array?n=1<e.length?[e[0],e[1]]:"x"===t.axis?[null,e[0]]:[e[0],null]:(n[0]=e.y||(e.x||"x"===t.axis?null:e),n[1]=e.x||(e.y||"y"===t.axis?null:e)),"function"==typeof n[0]&&(n[0]=n[0]()),"function"==typeof n[1]&&(n[1]=n[1]()),n},_to:function(e,t){if(null!=e&&void 0!==e){var n,i=T(this),r=i.data(k),s=r.opt,o=T("#mCSB_"+r.idx+"_container"),a=o.parent(),r=typeof e,l="x"===(t=t||("x"===s.axis?"x":"y"))?o.outerWidth(!1):o.outerHeight(!1),u="x"===t?o.offset().left:o.offset().top,c="x"===t?o[0].offsetLeft:o[0].offsetTop,d="x"===t?"left":"top";switch(r){case"function":return e();case"object":if(e.nodeType)var h="x"===t?T(e).offset().left:T(e).offset().top;else if(e.jquery){if(!e.length)return;var h="x"===t?e.offset().left:e.offset().top}return h-u;case"string":case"number":return A._isNumeric.call(null,e)?Math.abs(e):-1!==e.indexOf("%")?Math.abs(l*parseInt(e)/100):-1!==e.indexOf("-=")?Math.abs(c-parseInt(e.split("-=")[1])):-1!==e.indexOf("+=")?0<=(n=c+parseInt(e.split("+=")[1]))?0:Math.abs(n):-1!==e.indexOf("px")&&A._isNumeric.call(null,e.split("px")[0])?Math.abs(e.split("px")[0]):"top"===e||"left"===e?0:"bottom"===e?Math.abs(a.height()-o.outerHeight(!1)):"right"===e?Math.abs(a.width()-o.outerWidth(!1)):"first"===e||"last"===e?(n=o.find(":"+e),(h="x"===t?T(n).offset().left:T(n).offset().top)-u):T(e).length?(h="x"===t?T(e).offset().left:T(e).offset().top)-u:(o.css(d,e),void v.update.call(null,i[0]))}}},_autoUpdate:function(e){var t,n,i,r,s,o,a,l,u=T(this),c=u.data(k),d=c.opt,h=T("#mCSB_"+c.idx+"_container");function f(){var e=0;return e=d.advanced.updateOnImageLoad?h.find("img").length:e}function p(e){var t,n,i=new Image;i.onload=(t=i,n=function(){this.onload=null,m()},function(){return n.apply(t,arguments)}),i.src=e}function g(){!0===d.advanced.updateOnSelectorChange&&(d.advanced.updateOnSelectorChange="*");var e=0,t=h.find(d.advanced.updateOnSelectorChange);return d.advanced.updateOnSelectorChange&&0<t.length&&t.each(function(){e+=T(this).height()+T(this).width()}),e}function m(){clearTimeout(h[0].autoUpdate),v.update.call(null,u[0])}e?(clearTimeout(h[0].autoUpdate),A._delete.call(null,h[0].autoUpdate)):(t=h.parent(),n=[T("#mCSB_"+c.idx+"_scrollbar_vertical"),T("#mCSB_"+c.idx+"_scrollbar_horizontal")],i=function(){return[n[0].is(":visible")?n[0].outerHeight(!0):0,n[1].is(":visible")?n[1].outerWidth(!0):0]},r=g(),s=[h.outerHeight(!1),h.outerWidth(!1),t.height(),t.width(),i()[0],i()[1]],a=f(),function e(){clearTimeout(h[0].autoUpdate);h[0].autoUpdate=setTimeout(function(){d.advanced.updateOnSelectorChange&&(o=g())!==r?(m(),r=o):(!d.advanced.updateOnContentResize||(o=[h.outerHeight(!1),h.outerWidth(!1),t.height(),t.width(),i()[0],i()[1]])[0]===s[0]&&o[1]===s[1]&&o[2]===s[2]&&o[3]===s[3]&&o[4]===s[4]&&o[5]===s[5]||(m(),s=o),d.advanced.updateOnImageLoad&&(l=f())!==a&&(h.find("img").each(function(){p(this.src)}),a=l),(d.advanced.updateOnSelectorChange||d.advanced.updateOnContentResize||d.advanced.updateOnImageLoad)&&e())},60)}())},_snapAmount:function(e,t,n){return Math.round(e/t)*t-n},_stop:function(e){e=e.data(k);T("#mCSB_"+e.idx+"_container,#mCSB_"+e.idx+"_container_wrapper,#mCSB_"+e.idx+"_dragger_vertical,#mCSB_"+e.idx+"_dragger_horizontal").each(function(){A._stopTween.call(this)})},_scrollTo:function(r,e,s){var t=r.data(k),n=t.opt,i={trigger:"internal",dir:"y",scrollEasing:"mcsEaseOut",drag:!1,dur:n.scrollInertia,overwrite:"all",callbacks:!0,onStart:!0,onUpdate:!0,onComplete:!0},i=[(s=T.extend(i,s)).dur,s.drag?0:s.dur],o=T("#mCSB_"+t.idx),a=T("#mCSB_"+t.idx+"_container"),l=n.callbacks.onTotalScrollOffset?A._arr.call(r,n.callbacks.onTotalScrollOffset):[0,0],u=n.callbacks.onTotalScrollBackOffset?A._arr.call(r,n.callbacks.onTotalScrollBackOffset):[0,0];switch(t.trigger=s.trigger,n.snapAmount&&(e=A._snapAmount(e,n.snapAmount,n.snapOffset)),s.dir){case"x":var c=T("#mCSB_"+t.idx+"_dragger_horizontal"),d="left",h=a[0].offsetLeft,f=[o.width()-a.outerWidth(!1),c.parent().width()-c.width()],p=[e,e/t.scrollRatio.x],g=l[1],m=u[1],v=0<g?g/t.scrollRatio.x:0,y=0<m?m/t.scrollRatio.x:0;break;case"y":c=T("#mCSB_"+t.idx+"_dragger_vertical"),d="top",h=a[0].offsetTop,f=[o.height()-a.outerHeight(!1),c.parent().height()-c.height()],p=[e,e/t.scrollRatio.y],g=l[0],m=u[0],v=0<g?g/t.scrollRatio.y:0,y=0<m?m/t.scrollRatio.y:0}function b(e){return t&&n.callbacks[e]&&"function"==typeof n.callbacks[e]}function x(){var e=[a[0].offsetTop,a[0].offsetLeft],t=[c[0].offsetTop,c[0].offsetLeft],n=[a.outerHeight(!1),a.outerWidth(!1)],i=[o.height(),o.width()];r[0].mcs={content:a,top:e[0],left:e[1],draggerTop:t[0],draggerLeft:t[1],topPct:Math.round(100*Math.abs(e[0])/(Math.abs(n[0])-i[0])),leftPct:Math.round(100*Math.abs(e[1])/(Math.abs(n[1])-i[1])),direction:s.dir}}p[1]<0?p=[0,0]:p[1]>=f[1]?p=[f[0],f[1]]:p[0]=-p[0],clearTimeout(a[0].onCompleteTimeout),!t.tweenRunning&&(0===h&&0<=p[0]||h===f[0]&&p[0]<=f[0])||(A._tweenTo.call(null,c[0],d,Math.round(p[1]),i[1],s.scrollEasing),A._tweenTo.call(null,a[0],d,Math.round(p[0]),i[0],s.scrollEasing,s.overwrite,{onStart:function(){s.callbacks&&s.onStart&&!t.tweenRunning&&(b("onScrollStart")&&(x(),n.callbacks.onScrollStart.call(r[0])),t.tweenRunning=!0,A._onDragClasses(c),t.cbOffsets=[n.callbacks.alwaysTriggerOffsets||h>=f[0]+g,n.callbacks.alwaysTriggerOffsets||h<=-m])},onUpdate:function(){s.callbacks&&s.onUpdate&&b("whileScrolling")&&(x(),n.callbacks.whileScrolling.call(r[0]))},onComplete:function(){var e;s.callbacks&&s.onComplete&&("yx"===n.axis&&clearTimeout(a[0].onCompleteTimeout),e=a[0].idleTimer||0,a[0].onCompleteTimeout=setTimeout(function(){b("onScroll")&&(x(),n.callbacks.onScroll.call(r[0])),b("onTotalScroll")&&p[1]>=f[1]-v&&t.cbOffsets[0]&&(x(),n.callbacks.onTotalScroll.call(r[0])),b("onTotalScrollBack")&&p[1]<=y&&t.cbOffsets[1]&&(x(),n.callbacks.onTotalScrollBack.call(r[0])),t.tweenRunning=!1,a[0].idleTimer=0,A._onDragClasses(c,"hide")},e))}}))},_tweenTo:function(e,t,n,i,r,s,o){var a,l=(o=o||{}).onStart||function(){},u=o.onUpdate||function(){},c=o.onComplete||function(){},d=A._getTime(),h=0,f=e.offsetTop,p=e.style,g=("left"===t&&(f=e.offsetLeft),n-f);function m(){e._mcsstop||(h||l.call(),h=A._getTime()-d,v(),h>=e._mcstime&&(e._mcstime=h>e._mcstime?h+a-(h-e._mcstime):h+a-1,e._mcstime<h+1)&&(e._mcstime=h+1),e._mcstime<i?e._mcsid=_request(m):c.call())}function v(){0<i?(e._mcscurrVal=function(e,t,n,i,r){switch(r){case"linear":case"mcsLinear":return n*e/i+t;case"mcsLinearOut":return e/=i,e--,n*Math.sqrt(1-e*e)+t;case"easeInOutSmooth":return(e/=i/2)<1?n/2*e*e+t:-n/2*(--e*(e-2)-1)+t;case"easeInOutStrong":return(e/=i/2)<1?n/2*Math.pow(2,10*(e-1))+t:(e--,n/2*(2-Math.pow(2,-10*e))+t);case"easeInOut":case"mcsEaseInOut":return(e/=i/2)<1?n/2*e*e*e+t:n/2*((e-=2)*e*e+2)+t;case"easeOutSmooth":return e/=i,-n*(--e*e*e*e-1)+t;case"easeOutStrong":return n*(1-Math.pow(2,-10*e/i))+t;default:var s=(e/=i)*e,o=s*e;return t+n*(.499999999999997*o*s+-2.5*s*s+5.5*o+-6.5*s+4*e)}}(e._mcstime,f,g,i,r),p[t]=Math.round(e._mcscurrVal)+"px"):p[t]=n+"px",u.call()}e._mcsstop=0,"none"!==s&&null!=e._mcsid&&(y.requestAnimationFrame?y.cancelAnimationFrame(e._mcsid):clearTimeout(e._mcsid),e._mcsid=null),a=1e3/60,e._mcstime=h+a,_request=y.requestAnimationFrame||function(e){return v(),setTimeout(e,.01)},e._mcsid=_request(m)},_getTime:function(){return y.performance&&y.performance.now?y.performance.now():y.performance&&y.performance.webkitNow?y.performance.webkitNow():Date.now?Date.now():(new Date).getTime()},_stopTween:function(){var e=this;null!=e._mcsid&&(y.requestAnimationFrame?y.cancelAnimationFrame(e._mcsid):clearTimeout(e._mcsid),e._mcsid=null,e._mcsstop=1)},_delete:function(e){try{0}catch(e){}},_mouseBtnLeft:function(e){return!(e.which&&1!==e.which)},_pointerTouch:function(e){e=e.originalEvent.pointerType;return!(e&&"touch"!==e&&2!==e)},_isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)}};T.fn[l]=function(e){return v[e]?v[e].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof e&&e?void T.error("Method "+e+" does not exist"):v.init.apply(this,arguments)},T[l]=function(e){return v[e]?v[e].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof e&&e?void T.error("Method "+e+" does not exist"):v.init.apply(this,arguments)},T[l].defaults=r,y[l]=!0,T(y).load(function(){T(i)[l]()})},"function"==typeof define&&define.amd?define(["jquery","jquery-mousewheel"],e):e(jQuery)}(window,document),function(O){function I(e){var i=arguments;return(""+e).replace(/{(\d+|(\w+))}/g,function(e,t,n){return n&&i[1]?i[1][n]:i[t]})}function n(t,s){function e(){function t(e){/^(9|13|27)$/.test(e.keyCode||e.which)&&(e.stopPropagation(),a(g,!0))}var e=_.children();_$li="<ul>",selectedIndex=e.filter(":"+j).index(),m=g=~selectedIndex?selectedIndex:0,(x=e.length)&&(e.each(function(e){var t=O(this),n=t.html(),i=t.prop("disabled"),r=s.optionsItemBuilder;k[e]={value:t.val(),text:n,slug:function(e){var t,n="40-46 50-53 54-57 62-70 71-74 61 47 77".replace(/\d+/g,"\\3$&").split(" ");for(t in n){if(!n.hasOwnProperty(t))return;e=e.toLowerCase().replace(RegExp("["+n[t]+"]","g"),"aeiouncy".charAt(t))}return e}(n),disabled:i},_$li+=I('<li class="{1}">{2}</li>',O.trim([e==m?j:"",e==x-1?"last":"",i?"disabled":""].join(" ")),O.isFunction(r)?r(k[e],t,e):I(r,k[e]))}),S.html(_$li+"</ul>"),F.html(k[m].text)),C.add(_).off(A),T.data(H,!0).prop("class",[c[6],_.prop("class"),M,s.responsive?c[8]:""].join(" ")),_.prop("disabled")?w.prop("disabled",!0):(T.removeClass(M).hover(function(){O(this).toggleClass(c[7])}),s.openOnHover&&C.on("mouseenter"+A,i),C.on(L,function(e){h?o():i(e)}),w.prop("disabled",!1).off().on({keypress:t,keydown:function(e){t(e),clearTimeout(p),p=setTimeout(function(){w.val("")},s.keySearchTimeout);e=e.keyCode||e.which;36<e&&e<41&&a((e<39?function(e){if(k[e=(0<g?g:x)-1].disabled)for(;k[e=(0<e?e:x)-1].disabled;);return e}:function(e){if(k[e=(g+1)%x].disabled)for(;k[e=(e+1)%x].disabled;);return e})())},focusin:function(e){w.one("blur",function(){w.blur()}),h||i(e)}}).on(R,function(){w.val().length&&O.each(k,function(e,t){return RegExp("^"+w.val(),"i").test(t.slug)&&!t.disabled?(a(e),!1):void 0})}),f=O("li",S.removeAttr("style")).click(function(){return a(O(this).index(),!0),!1}))}function n(){var e=S.closest(":visible").children(":hidden"),t=s.maxHeight,n=(e.addClass(N),S.outerWidth()),i=C.outerWidth()-(n-S.width());!s.expandToItemText||n<i?b=i:(S.css("overflow","scroll"),T.width(9e4),b=S.width(),S.css("overflow",""),T.width("")),S.width(b).height()>t&&S.height(t),e.removeClass(N)}function i(e){e.preventDefault(),e.stopPropagation(),n(),O("."+B).removeClass(B),h=!0,v=S.outerHeight(),w.val("").is(":focus")||w.focus(),D.on(L,o).on("scroll"+A,r),r(),s.openOnHover&&(clearTimeout(y),T.one("mouseleave"+A,function(){y=setTimeout(o,500)})),T.addClass(B),l(g),s.onOpen(t)}function r(){n(),S.css("top",T.offset().top+T.outerHeight()+v>E.scrollTop()+E.height()?-v:"")}function o(e){e||m==g||(e=k[g].text,_.prop("selectedIndex",m=g).data("value",e).trigger("change",[e,m]),s.onChange(t),F.html(e)),D.off(A),T.removeClass(B),h=!1,s.onClose(t)}function a(e,t){k[g=e].disabled||(f.removeClass(j).eq(e).addClass(j),l(e),t&&o())}function l(e){var t=f.eq(e).outerHeight(),e=f[e].offsetTop,n=S.scrollTop(),i=e+2*t;S.scrollTop(n+v<i?i-v:e-t<n?e-t:n)}var u=(s=O.extend(!0,{onOpen:O.noop,onClose:O.noop,onChange:O.noop,maxHeight:300,keySearchTimeout:500,arrowButtonMarkup:'<b class="button">&#x25be;</b>',disableOnMobile:!0,openOnHover:!1,expandToItemText:!1,responsive:!1,customClass:{prefix:"selectric",postfixes:"Input Items Open Disabled TempShow HideSelect Wrapper Hover Responsive",camelCase:!0},optionsItemBuilder:"{text}"},s)).customClass,P=u.postfixes.split(" "),c=[];if(!s.disableOnMobile||!/android|ip(hone|od|ad)/i.test(navigator.userAgent)){for(;d=P.shift();){var d=u.prefix+d;c.push(u.camelCase?d:d.replace(/([A-Z])/g,"-$&").toLowerCase())}var h,f,p,g,m,v,y,b,x,_=O(t),w=O('<input type="text" class="'+c[0]+'"/>'),C=O('<div class="'+u.prefix+'"><p class="label"/>'+s.arrowButtonMarkup+"</div>"),S=O('<div class="'+c[1]+'" tabindex="-1"></div>'),T=_.data(H,!0).wrap("<div>").parent().append(C.add(S).add(w)),k=[],F=O(".label",C),A=".sl",D=O(document),E=O(window),L="click"+A,B=c[2],M=c[3],N=c[4],j="selected",R="oninput"in w[0]?"input":"keyup";_.wrap('<div class="'+c[5]+'">'),e(),_.on({refresh:e,destroy:function(){S.add(C).add(w).remove(),_.removeData(H).removeData("value").off(A+" refresh destroy open close").unwrap().unwrap()},open:i,close:o})}}var H="selectric";O.fn[H]=function(e,t){return this.each(function(){O(this).data(H)?""+e===e&&O(this).trigger(e):n(this,e||t)})}}(jQuery),function(a){"use strict";function l(e){var t=Array.prototype.slice.call(arguments,1);return(e.prop||e.attr).apply(e,t)}function u(e,t,n){var i,r;for(i in n)n.hasOwnProperty(i)&&(r=i.replace(/ |$/g,t.eventNamespace),e.bind(r,n[i]))}function c(e,t,n){u(e,n,{focus:function(){t.addClass(n.focusClass)},blur:function(){t.removeClass(n.focusClass),t.removeClass(n.activeClass)},mouseenter:function(){t.addClass(n.hoverClass)},mouseleave:function(){t.removeClass(n.hoverClass),t.removeClass(n.activeClass)},"mousedown touchbegin":function(){e.is(":disabled")||t.addClass(n.activeClass)},"mouseup touchend":function(){t.removeClass(n.activeClass)}})}function d(e,t){e.removeClass(t.hoverClass+" "+t.focusClass+" "+t.activeClass)}function s(e,t,n){n?e.addClass(t):e.removeClass(t)}function o(e,t,n){var i="checked",r=t.is(":"+i);t.prop?t.prop(i,r):r?t.attr(i,i):t.removeAttr(i),s(e,n.checkedClass,r)}function h(e,t,n){s(e,n.disabledClass,t.is(":disabled"))}function f(e,t,n){switch(n){case"after":return e.after(t),e.next();case"before":return e.before(t),e.prev();case"wrap":return e.wrap(t),e.parent()}return null}function p(e,t,n){var i,r,s;return n=a.extend({bind:{},divClass:null,divWrap:"wrap",spanClass:null,spanHtml:null,spanWrap:"wrap"},n=n||{}),i=a("<div />"),r=a("<span />"),t.autoHide&&e.is(":hidden")&&"none"===e.css("display")&&i.hide(),n.divClass&&i.addClass(n.divClass),t.wrapperClass&&i.addClass(t.wrapperClass),n.spanClass&&r.addClass(n.spanClass),s=l(e,"id"),t.useID&&s&&l(i,"id",t.idPrefix+"-"+s),n.spanHtml&&r.html(n.spanHtml),i=f(e,i,n.divWrap),r=f(e,r,n.spanWrap),h(i,e,t),{div:i,span:r}}function r(e,t){return t.wrapperClass?f(e,a("<span />").addClass(t.wrapperClass),"wrap"):null}function g(){return navigator.cpuClass&&!navigator.product}function t(e){return!(!e[0].multiple&&(!(e=l(e,"size"))||e<=1))}function m(){return!1}function v(e,t){var n="none";u(e,t,{"selectstart dragstart mousedown":m}),e.css({MozUserSelect:n,msUserSelect:n,webkitUserSelect:n,userSelect:n})}function y(e,t,n){e=""===(e=e.val())?n.fileDefaultHtml:(e=e.split(/[\/\\]+/))[e.length-1];t.text(e)}function b(e,t,n){var i,r=[];for(e.each(function(){for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r.push({el:this,name:e,old:this.style[e]}),this.style[e]=t[e])}),n();r.length;)(i=r.pop()).el.style[i.name]=i.old}function x(e,t){var n=e.parents();n.push(e[0]),b(n=n.not(":visible"),{visibility:"hidden",display:"block",position:"absolute"},t)}function _(e,t){return function(){e.unwrap().unwrap().unbind(t.eventNamespace)}}var w=!0,C=!1,S=[{match:function(e){return e.is("a, button, :submit, :reset, input[type='button']")},apply:function(n,e){var t,i,r,s,o=e.submitDefaultHtml;return n.is(":reset")&&(o=e.resetDefaultHtml),r=n.is("a, button")?function(){return n.html()||o}:function(){return((e=l(n,"value"))?a("<span />").text(e).html():"")||o;var e},i=p(n,e,{divClass:e.buttonClass,spanHtml:r()}),t=i.div,c(n,t,e),s=!1,u(t,e,{"click touchend":function(){var e,t;s||n.is(":disabled")||(s=!0,n[0].dispatchEvent?((e=document.createEvent("MouseEvents")).initEvent("click",!0,!0),e=n[0].dispatchEvent(e),n.is("a")&&e&&(e=l(n,"target"),t=l(n,"href"),e&&"_self"!==e?window.open(t,e):document.location.href=t)):n.click(),s=!1)}}),v(t,e),{remove:function(){return t.after(n),t.remove(),n.unbind(e.eventNamespace),n},update:function(){d(t,e),h(t,n,e),n.detach(),i.span.html(r()).append(n)}}}},{match:function(e){return e.is(":checkbox")},apply:function(e,t){var n=p(e,t,{divClass:t.checkboxClass}),i=n.div,r=n.span;return c(e,i,t),u(e,t,{"click touchend":function(){o(r,e,t)}}),o(r,e,t),{remove:_(e,t),update:function(){d(i,t),r.removeClass(t.checkedClass),o(r,e,t),h(i,e,t)}}}},{match:function(e){return e.is(":file")},apply:function(e,t){function n(){y(e,o,t)}var i=p(e,t,{divClass:t.fileClass,spanClass:t.fileButtonClass,spanHtml:t.fileButtonHtml,spanWrap:"after"}),r=i.div,s=i.span,o=a("<span />").html(t.fileDefaultHtml);return o.addClass(t.filenameClass),o=f(e,o,"after"),l(e,"size")||l(e,"size",r.width()/10),c(e,r,t),n(),g()?u(e,t,{click:function(){e.trigger("change"),setTimeout(n,0)}}):u(e,t,{change:n}),v(o,t),v(s,t),{remove:function(){return o.remove(),s.remove(),e.unwrap().unbind(t.eventNamespace)},update:function(){d(r,t),y(e,o,t),h(r,e,t)}}}},{match:function(e){return!!e.is("input")&&(e=(" "+l(e,"type")+" ").toLowerCase(),0<=" color date datetime datetime-local email month number password search tel text time url week ".indexOf(e))},apply:function(e,t){var n,i=l(e,"type");return e.addClass(t.inputClass),n=r(e,t),c(e,e,t),t.inputAddTypeAsClass&&e.addClass(i),{remove:function(){e.removeClass(t.inputClass),t.inputAddTypeAsClass&&e.removeClass(i),n&&e.unwrap()},update:m}}},{match:function(e){return e.is(":radio")},apply:function(e,t){var n=p(e,t,{divClass:t.radioClass}),i=n.div,r=n.span;return c(e,i,t),u(e,t,{"click touchend":function(){a.uniform.update(a(':radio[name="'+l(e,"name")+'"]'))}}),o(r,e,t),{remove:_(e,t),update:function(){d(i,t),o(r,e,t),h(i,e,t)}}}},{match:function(e){return!(!e.is("select")||t(e))},apply:function(t,e){var n,i,r,s;return e.selectAutoWidth&&x(t,function(){s=t.width()}),n=p(t,e,{divClass:e.selectClass,spanHtml:(t.find(":selected:first")||t.find("option:first")).html(),spanWrap:"before"}),i=n.div,r=n.span,e.selectAutoWidth?x(t,function(){b(a([r[0],i[0]]),{display:"block"},function(){var e=r.outerWidth()-r.width();i.width(s+e),r.width(s)})}):i.addClass("fixedWidth"),c(t,i,e),u(t,e,{change:function(){r.html(t.find(":selected").html()),i.removeClass(e.activeClass)},"click touchend":function(){var e=t.find(":selected").html();r.html()!==e&&t.trigger("change")},keyup:function(){r.html(t.find(":selected").html())}}),v(r,e),{remove:function(){return r.remove(),t.unwrap().unbind(e.eventNamespace),t},update:function(){e.selectAutoWidth?(a.uniform.restore(t),t.uniform(e)):(d(i,e),r.html(t.find(":selected").html()),h(i,t,e))}}}},{match:function(e){return!(!e.is("select")||!t(e))},apply:function(e,t){var n;return e.addClass(t.selectMultiClass),n=r(e,t),c(e,e,t),{remove:function(){e.removeClass(t.selectMultiClass),n&&e.unwrap()},update:m}}},{match:function(e){return e.is("textarea")},apply:function(e,t){var n;return e.addClass(t.textareaClass),n=r(e,t),c(e,e,t),{remove:function(){e.removeClass(t.textareaClass),n&&e.unwrap()},update:m}}}];g()&&void 0===window.XMLHttpRequest&&(w=!1),a.uniform={defaults:{activeClass:"active",autoHide:!0,buttonClass:"button",checkboxClass:"checker",checkedClass:"checked",disabledClass:"disabled",eventNamespace:".uniform",fileButtonClass:"action",fileButtonHtml:"Choose File",fileClass:"uploader",fileDefaultHtml:"No file selected",filenameClass:"filename",focusClass:"focus",hoverClass:"hover",idPrefix:"uniform",inputAddTypeAsClass:!0,inputClass:"uniform-input",radioClass:"radio",resetDefaultHtml:"Reset",resetSelector:!1,selectAutoWidth:!0,selectClass:"selector",selectMultiClass:"uniform-multiselect",submitDefaultHtml:"Submit",textareaClass:"uniform",useID:!0,wrapperClass:null},elements:[]},a.fn.uniform=function(i){var e,t,n,r=this;return i=a.extend({},a.uniform.defaults,i),C||(C=!0,n=a('<div style="width:0;height:0;color:'+(t="rgb(120,2,153)")+'">'),a("body").append(n),e=n.get(0),e=(window.getComputedStyle?window.getComputedStyle(e,""):e.currentStyle||e.style||{}).color,n.remove(),e.replace(/ /g,"")!==t&&(w=!1)),w?(i.resetSelector&&a(i.resetSelector).mouseup(function(){window.setTimeout(function(){a.uniform.update(r)},10)}),this.each(function(){var e,t,n=a(this);if(n.data("uniformed"))a.uniform.update(n);else for(e=0;e<S.length;e+=1)if((t=S[e]).match(n,i))return t=t.apply(n,i),n.data("uniformed",t),void a.uniform.elements.push(n.get(0))})):this},a.uniform.restore=a.fn.uniform.restore=function(e){void 0===e&&(e=a.uniform.elements),a(e).each(function(){var e=a(this),t=e.data("uniformed");t&&(t.remove(),0<=(t=a.inArray(this,a.uniform.elements))&&a.uniform.elements.splice(t,1),e.removeData("uniformed"))})},a.uniform.update=a.fn.uniform.update=function(e){void 0===e&&(e=a.uniform.elements),a(e).each(function(){var e=a(this),t=e.data("uniformed");t&&t.update(e,t.options)})}}(jQuery),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof module&&module.exports?module.exports=e(require("jquery")):e(jQuery)}(function(c){c.extend(c.fn,{validate:function(e){var i;if(this.length)return(i=c.data(this[0],"validator"))||(this.attr("novalidate","novalidate"),i=new c.validator(e,this[0]),c.data(this[0],"validator",i),i.settings.onsubmit&&(this.on("click.validate",":submit",function(e){i.submitButton=e.currentTarget,c(this).hasClass("cancel")&&(i.cancelSubmit=!0),void 0!==c(this).attr("formnovalidate")&&(i.cancelSubmit=!0)}),this.on("submit.validate",function(n){function e(){var e,t;return i.submitButton&&(i.settings.submitHandler||i.formSubmitted)&&(e=c("<input type='hidden'/>").attr("name",i.submitButton.name).val(c(i.submitButton).val()).appendTo(i.currentForm)),!i.settings.submitHandler||(t=i.settings.submitHandler.call(i,i.currentForm,n),e&&e.remove(),void 0!==t&&t)}return i.settings.debug&&n.preventDefault(),i.cancelSubmit?(i.cancelSubmit=!1,e()):i.form()?i.pendingRequest?!(i.formSubmitted=!0):e():(i.focusInvalid(),!1)}))),i;e&&e.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing.")},valid:function(){var e,t,n;return c(this[0]).is("form")?e=this.validate().form():(n=[],e=!0,t=c(this[0].form).validate(),this.each(function(){(e=t.element(this)&&e)||(n=n.concat(t.errorList))}),t.errorList=n),e},rules:function(e,t){var n,i,r,s,o,a=this[0];if(null!=a&&(!a.form&&a.hasAttribute("contenteditable")&&(a.form=this.closest("form")[0],a.name=this.attr("name")),null!=a.form)){if(e)switch(i=(n=c.data(a.form,"validator").settings).rules,r=c.validator.staticRules(a),e){case"add":c.extend(r,c.validator.normalizeRule(t)),delete r.messages,i[a.name]=r,t.messages&&(n.messages[a.name]=c.extend(n.messages[a.name],t.messages));break;case"remove":return t?(o={},c.each(t.split(/\s/),function(e,t){o[t]=r[t],delete r[t]}),o):(delete i[a.name],r)}return(e=c.validator.normalizeRules(c.extend({},c.validator.classRules(a),c.validator.attributeRules(a),c.validator.dataRules(a),c.validator.staticRules(a)),a)).required&&(s=e.required,delete e.required,e=c.extend({required:s},e)),e.remote&&(s=e.remote,delete e.remote,e=c.extend(e,{remote:s})),e}}}),c.extend(c.expr.pseudos||c.expr[":"],{blank:function(e){return!c.trim(""+c(e).val())},filled:function(e){e=c(e).val();return null!==e&&!!c.trim(""+e)},unchecked:function(e){return!c(e).prop("checked")}}),c.validator=function(e,t){this.settings=c.extend(!0,{},c.validator.defaults,e),this.currentForm=t,this.init()},c.validator.format=function(n,e){return 1===arguments.length?function(){var e=c.makeArray(arguments);return e.unshift(n),c.validator.format.apply(this,e)}:(void 0!==e&&((e=2<arguments.length&&e.constructor!==Array?c.makeArray(arguments).slice(1):e).constructor!==Array&&(e=[e]),c.each(e,function(e,t){n=n.replace(new RegExp("\\{"+e+"\\}","g"),function(){return t})})),n)},c.extend(c.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:c([]),errorLabelContainer:c([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(e){this.lastActive=e,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,e,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(e)))},onfocusout:function(e){this.checkable(e)||!(e.name in this.submitted)&&this.optional(e)||this.element(e)},onkeyup:function(e,t){9===t.which&&""===this.elementValue(e)||-1!==c.inArray(t.keyCode,[16,17,18,20,35,36,37,38,39,40,45,144,225])||(e.name in this.submitted||e.name in this.invalid)&&this.element(e)},onclick:function(e){e.name in this.submitted?this.element(e):e.parentNode.name in this.submitted&&this.element(e.parentNode)},highlight:function(e,t,n){("radio"===e.type?this.findByName(e.name):c(e)).addClass(t).removeClass(n)},unhighlight:function(e,t,n){("radio"===e.type?this.findByName(e.name):c(e)).removeClass(t).addClass(n)}},setDefaults:function(e){c.extend(c.validator.defaults,e)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",equalTo:"Please enter the same value again.",maxlength:c.validator.format("Please enter no more than {0} characters."),minlength:c.validator.format("Please enter at least {0} characters."),rangelength:c.validator.format("Please enter a value between {0} and {1} characters long."),range:c.validator.format("Please enter a value between {0} and {1}."),max:c.validator.format("Please enter a value less than or equal to {0}."),min:c.validator.format("Please enter a value greater than or equal to {0}."),step:c.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){this.labelContainer=c(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||c(this.currentForm),this.containers=c(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var n,i=this.groups={};function e(e){!this.form&&this.hasAttribute("contenteditable")&&(this.form=c(this).closest("form")[0],this.name=c(this).attr("name"));var t=c.data(this.form,"validator"),n="on"+e.type.replace(/^validate/,""),i=t.settings;i[n]&&!c(this).is(i.ignore)&&i[n].call(t,this,e)}c.each(this.settings.groups,function(n,e){"string"==typeof e&&(e=e.split(/\s/)),c.each(e,function(e,t){i[t]=n})}),n=this.settings.rules,c.each(n,function(e,t){n[e]=c.validator.normalizeRule(t)}),c(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox'], [contenteditable], [type='button']",e).on("click.validate","select, option, [type='radio'], [type='checkbox']",e),this.settings.invalidHandler&&c(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),c.extend(this.submitted,this.errorMap),this.invalid=c.extend({},this.errorMap),this.valid()||c(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var e=0,t=this.currentElements=this.elements();t[e];e++)this.check(t[e]);return this.valid()},element:function(e){var t,n,i=this.clean(e),r=this.validationTargetFor(i),s=this,o=!0;return void 0===r?delete this.invalid[i.name]:(this.prepareElement(r),this.currentElements=c(r),(n=this.groups[r.name])&&c.each(this.groups,function(e,t){t===n&&e!==r.name&&(i=s.validationTargetFor(s.clean(s.findByName(e))))&&i.name in s.invalid&&(s.currentElements.push(i),o=s.check(i)&&o)}),t=!1!==this.check(r),o=o&&t,this.invalid[r.name]=!t,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),c(e).attr("aria-invalid",!t)),o},showErrors:function(t){var n;t&&(c.extend((n=this).errorMap,t),this.errorList=c.map(this.errorMap,function(e,t){return{message:e,element:n.findByName(t)[0]}}),this.successList=c.grep(this.successList,function(e){return!(e.name in t)})),this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){c.fn.resetForm&&c(this.currentForm).resetForm(),this.invalid={},this.submitted={},this.prepareForm(),this.hideErrors();var e=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(e)},resetElements:function(e){var t;if(this.settings.unhighlight)for(t=0;e[t];t++)this.settings.unhighlight.call(this,e[t],this.settings.errorClass,""),this.findByName(e[t].name).removeClass(this.settings.validClass);else e.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(e){var t,n=0;for(t in e)void 0!==e[t]&&null!==e[t]&&!1!==e[t]&&n++;return n},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(e){e.not(this.containers).text(""),this.addWrapper(e).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{c(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(e){}},findLastActive:function(){var t=this.lastActive;return t&&1===c.grep(this.errorList,function(e){return e.element.name===t.name}).length&&t},elements:function(){var t=this,n={};return c(this.currentForm).find("input, select, textarea, [contenteditable]").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){var e=this.name||c(this).attr("name");return!e&&t.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.hasAttribute("contenteditable")&&(this.form=c(this).closest("form")[0],this.name=e),!(e in n||!t.objectLength(c(this).rules()))&&(n[e]=!0)})},clean:function(e){return c(e)[0]},errors:function(){var e=this.settings.errorClass.split(" ").join(".");return c(this.settings.errorElement+"."+e,this.errorContext)},resetInternals:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=c([]),this.toHide=c([])},reset:function(){this.resetInternals(),this.currentElements=c([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(e){this.reset(),this.toHide=this.errorsFor(e)},elementValue:function(e){var t=c(e),n=e.type;return"radio"===n||"checkbox"===n?this.findByName(e.name).filter(":checked").val():"number"===n&&void 0!==e.validity?e.validity.badInput?"NaN":t.val():(e=e.hasAttribute("contenteditable")?t.text():t.val(),"file"===n?"C:\\fakepath\\"===e.substr(0,12)?e.substr(12):0<=(t=e.lastIndexOf("/"))||0<=(t=e.lastIndexOf("\\"))?e.substr(t+1):e:"string"==typeof e?e.replace(/\r/g,""):e)},check:function(t){t=this.validationTargetFor(this.clean(t));var e,n,i,r,s=c(t).rules(),o=c.map(s,function(e,t){return t}).length,a=!1,l=this.elementValue(t);if("function"==typeof s.normalizer?r=s.normalizer:"function"==typeof this.settings.normalizer&&(r=this.settings.normalizer),r){if("string"!=typeof(l=r.call(t,l)))throw new TypeError("The normalizer should return a string value.");delete s.normalizer}for(n in s){i={method:n,parameters:s[n]};try{if("dependency-mismatch"===(e=c.validator.methods[n].call(this,l,t,i.parameters))&&1===o)a=!0;else{if(a=!1,"pending"===e)return void(this.toHide=this.toHide.not(this.errorsFor(t)));if(!e)return this.formatAndAdd(t,i),!1}}catch(e){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+t.id+", check the '"+i.method+"' method.",e),e instanceof TypeError&&(e.message+=".  Exception occurred when checking element "+t.id+", check the '"+i.method+"' method."),e}}if(!a)return this.objectLength(s)&&this.successList.push(t),!0},customDataMessage:function(e,t){return c(e).data("msg"+t.charAt(0).toUpperCase()+t.substring(1).toLowerCase())||c(e).data("msg")},customMessage:function(e,t){e=this.settings.messages[e];return e&&(e.constructor===String?e:e[t])},findDefined:function(){for(var e=0;e<arguments.length;e++)if(void 0!==arguments[e])return arguments[e]},defaultMessage:function(e,t){var n=this.findDefined(this.customMessage(e.name,(t="string"==typeof t?{method:t}:t).method),this.customDataMessage(e,t.method),!this.settings.ignoreTitle&&e.title||void 0,c.validator.messages[t.method],"<strong>Warning: No message defined for "+e.name+"</strong>"),i=/\$?\{(\d+)\}/g;return"function"==typeof n?n=n.call(this,t.parameters,e):i.test(n)&&(n=c.validator.format(n.replace(i,"{$1}"),t.parameters)),n},formatAndAdd:function(e,t){var n=this.defaultMessage(e,t);this.errorList.push({message:n,element:e,method:t.method}),this.errorMap[e.name]=n,this.submitted[e.name]=n},addWrapper:function(e){return e=this.settings.wrapper?e.add(e.parent(this.settings.wrapper)):e},defaultShowErrors:function(){for(var e,t,n=0;this.errorList[n];n++)t=this.errorList[n],this.settings.highlight&&this.settings.highlight.call(this,t.element,this.settings.errorClass,this.settings.validClass),this.showLabel(t.element,t.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(n=0;this.successList[n];n++)this.showLabel(this.successList[n]);if(this.settings.unhighlight)for(n=0,e=this.validElements();e[n];n++)this.settings.unhighlight.call(this,e[n],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return c(this.errorList).map(function(){return this.element})},showLabel:function(e,t){var n,i,r,s=this.errorsFor(e),o=this.idOrName(e),a=c(e).attr("aria-describedby");s.length?(s.removeClass(this.settings.validClass).addClass(this.settings.errorClass),s.html(t)):(i=s=c("<"+this.settings.errorElement+">").attr("id",o+"-error").addClass(this.settings.errorClass).html(t||""),this.settings.wrapper&&(i=s.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(i):this.settings.errorPlacement?this.settings.errorPlacement.call(this,i,c(e)):i.insertAfter(e),s.is("label")?s.attr("for",o):0===s.parents("label[for='"+this.escapeCssMeta(o)+"']").length&&(i=s.attr("id"),a?a.match(new RegExp("\\b"+this.escapeCssMeta(i)+"\\b"))||(a+=" "+i):a=i,c(e).attr("aria-describedby",a),n=this.groups[e.name])&&c.each((r=this).groups,function(e,t){t===n&&c("[name='"+r.escapeCssMeta(e)+"']",r.currentForm).attr("aria-describedby",s.attr("id"))})),!t&&this.settings.success&&(s.text(""),"string"==typeof this.settings.success?s.addClass(this.settings.success):this.settings.success(s,e)),this.toShow=this.toShow.add(s)},errorsFor:function(e){var t=this.escapeCssMeta(this.idOrName(e)),e=c(e).attr("aria-describedby"),t="label[for='"+t+"'], label[for='"+t+"'] *";return e&&(t=t+", #"+this.escapeCssMeta(e).replace(/\s+/g,", #")),this.errors().filter(t)},escapeCssMeta:function(e){return e.replace(/([\\!"#$%&'()*+,./:;<=>?@\[\]^`{|}~])/g,"\\$1")},idOrName:function(e){return this.groups[e.name]||!this.checkable(e)&&e.id||e.name},validationTargetFor:function(e){return this.checkable(e)&&(e=this.findByName(e.name)),c(e).not(this.settings.ignore)[0]},checkable:function(e){return/radio|checkbox/i.test(e.type)},findByName:function(e){return c(this.currentForm).find("[name='"+this.escapeCssMeta(e)+"']")},getLength:function(e,t){switch(t.nodeName.toLowerCase()){case"select":return c("option:selected",t).length;case"input":if(this.checkable(t))return this.findByName(t.name).filter(":checked").length}return e.length},depend:function(e,t){return!this.dependTypes[typeof e]||this.dependTypes[typeof e](e,t)},dependTypes:{boolean:function(e){return e},string:function(e,t){return!!c(e,t.form).length},function:function(e,t){return e(t)}},optional:function(e){var t=this.elementValue(e);return!c.validator.methods.required.call(this,t,e)&&"dependency-mismatch"},startRequest:function(e){this.pending[e.name]||(this.pendingRequest++,c(e).addClass(this.settings.pendingClass),this.pending[e.name]=!0)},stopRequest:function(e,t){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[e.name],c(e).removeClass(this.settings.pendingClass),t&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(c(this.currentForm).submit(),this.submitButton&&c("input:hidden[name='"+this.submitButton.name+"']",this.currentForm).remove(),this.formSubmitted=!1):!t&&0===this.pendingRequest&&this.formSubmitted&&(c(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(e,t){return t="string"==typeof t&&t||"remote",c.data(e,"previousValue")||c.data(e,"previousValue",{old:null,valid:!0,message:this.defaultMessage(e,{method:t})})},destroy:function(){this.resetForm(),c(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(e,t){e.constructor===String?this.classRuleSettings[e]=t:c.extend(this.classRuleSettings,e)},classRules:function(e){var t={},e=c(e).attr("class");return e&&c.each(e.split(" "),function(){this in c.validator.classRuleSettings&&c.extend(t,c.validator.classRuleSettings[this])}),t},normalizeAttributeRule:function(e,t,n,i){(i=/min|max|step/.test(n)&&(null===t||/number|range|text/.test(t))&&(i=Number(i),isNaN(i))?void 0:i)||0===i?e[n]=i:t===n&&"range"!==t&&(e[n]=!0)},attributeRules:function(e){var t,n,i={},r=c(e),s=e.getAttribute("type");for(t in c.validator.methods)n="required"===t?!!(n=""===(n=e.getAttribute(t))?!0:n):r.attr(t),this.normalizeAttributeRule(i,s,t,n);return i.maxlength&&/-1|2147483647|524288/.test(i.maxlength)&&delete i.maxlength,i},dataRules:function(e){var t,n,i={},r=c(e),s=e.getAttribute("type");for(t in c.validator.methods)n=r.data("rule"+t.charAt(0).toUpperCase()+t.substring(1).toLowerCase()),this.normalizeAttributeRule(i,s,t,n);return i},staticRules:function(e){var t={},n=c.data(e.form,"validator");return t=n.settings.rules?c.validator.normalizeRule(n.settings.rules[e.name])||{}:t},normalizeRules:function(i,r){return c.each(i,function(e,t){if(!1===t)delete i[e];else if(t.param||t.depends){var n=!0;switch(typeof t.depends){case"string":n=!!c(t.depends,r.form).length;break;case"function":n=t.depends.call(r,r)}n?i[e]=void 0===t.param||t.param:(c.data(r.form,"validator").resetElements(c(r)),delete i[e])}}),c.each(i,function(e,t){i[e]=c.isFunction(t)&&"normalizer"!==e?t(r):t}),c.each(["minlength","maxlength"],function(){i[this]&&(i[this]=Number(i[this]))}),c.each(["rangelength","range"],function(){var e;i[this]&&(c.isArray(i[this])?i[this]=[Number(i[this][0]),Number(i[this][1])]:"string"==typeof i[this]&&(e=i[this].replace(/[\[\]]/g,"").split(/[\s,]+/),i[this]=[Number(e[0]),Number(e[1])]))}),c.validator.autoCreateRanges&&(null!=i.min&&null!=i.max&&(i.range=[i.min,i.max],delete i.min,delete i.max),null!=i.minlength)&&null!=i.maxlength&&(i.rangelength=[i.minlength,i.maxlength],delete i.minlength,delete i.maxlength),i},normalizeRule:function(e){var t;return"string"==typeof e&&(t={},c.each(e.split(/\s/),function(){t[this]=!0}),e=t),e},addMethod:function(e,t,n){c.validator.methods[e]=t,c.validator.messages[e]=void 0!==n?n:c.validator.messages[e],t.length<3&&c.validator.addClassRules(e,c.validator.normalizeRule(e))},methods:{required:function(e,t,n){return this.depend(n,t)?"select"===t.nodeName.toLowerCase()?(n=c(t).val())&&0<n.length:this.checkable(t)?0<this.getLength(e,t):0<e.length:"dependency-mismatch"},email:function(e,t){return this.optional(t)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(e)},url:function(e,t){return this.optional(t)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(e)},date:function(e,t){return this.optional(t)||!/Invalid|NaN/.test(new Date(e).toString())},dateISO:function(e,t){return this.optional(t)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(e)},number:function(e,t){return this.optional(t)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(e)},digits:function(e,t){return this.optional(t)||/^\d+$/.test(e)},minlength:function(e,t,n){e=c.isArray(e)?e.length:this.getLength(e,t);return this.optional(t)||n<=e},maxlength:function(e,t,n){e=c.isArray(e)?e.length:this.getLength(e,t);return this.optional(t)||e<=n},rangelength:function(e,t,n){e=c.isArray(e)?e.length:this.getLength(e,t);return this.optional(t)||e>=n[0]&&e<=n[1]},min:function(e,t,n){return this.optional(t)||n<=e},max:function(e,t,n){return this.optional(t)||e<=n},range:function(e,t,n){return this.optional(t)||e>=n[0]&&e<=n[1]},step:function(e,t,n){function i(e){return(e=(""+e).match(/(?:\.(\d+))?$/))&&e[1]?e[1].length:0}function r(e){return Math.round(e*Math.pow(10,s))}var s,o=c(t).attr("type"),a="Step attribute on input type "+o+" is not supported.",l=new RegExp("\\b"+o+"\\b"),u=!0;if(o&&!l.test(["text","number","range"].join()))throw new Error(a);return s=i(n),(i(e)>s||r(e)%r(n)!=0)&&(u=!1),this.optional(t)||u},equalTo:function(e,t,n){n=c(n);return this.settings.onfocusout&&n.not(".validate-equalTo-blur").length&&n.addClass("validate-equalTo-blur").on("blur.validate-equalTo",function(){c(t).valid()}),e===n.val()},remote:function(i,r,e,s){if(this.optional(r))return"dependency-mismatch";s="string"==typeof s&&s||"remote";var o,t,a=this.previousValue(r,s);return this.settings.messages[r.name]||(this.settings.messages[r.name]={}),a.originalMessage=a.originalMessage||this.settings.messages[r.name][s],this.settings.messages[r.name][s]=a.message,t=c.param(c.extend({data:i},(e="string"==typeof e?{url:e}:e).data)),a.old===t?a.valid:(a.old=t,(o=this).startRequest(r),(t={})[r.name]=i,c.ajax(c.extend(!0,{mode:"abort",port:"validate"+r.name,dataType:"json",data:t,context:o.currentForm,success:function(e){var t,n=!0===e||"true"===e;o.settings.messages[r.name][s]=a.originalMessage,n?(t=o.formSubmitted,o.resetInternals(),o.toHide=o.errorsFor(r),o.formSubmitted=t,o.successList.push(r),o.invalid[r.name]=!1,o.showErrors()):(t={},e=e||o.defaultMessage(r,{method:s,parameters:i}),t[r.name]=a.message=e,o.invalid[r.name]=!0,o.showErrors(t)),a.valid=n,o.stopRequest(r,n)}},e)),"pending")}}});var i,r={};return c.ajaxPrefilter?c.ajaxPrefilter(function(e,t,n){var i=e.port;"abort"===e.mode&&(r[i]&&r[i].abort(),r[i]=n)}):(i=c.ajax,c.ajax=function(e){var t=("mode"in e?e:c.ajaxSettings).mode,n=("port"in e?e:c.ajaxSettings).port;return"abort"===t?(r[n]&&r[n].abort(),r[n]=i.apply(this,arguments),r[n]):i.apply(this,arguments)}),c}),function(c,d){var t=/\+/g;function h(e){return e}function f(e){return decodeURIComponent(e.replace(t," "))}var p=c.cookie=function(e,t,n){var i,r;if(void 0!==t)return n=c.extend({},p.defaults,n),null===t&&(n.expires=-1),"number"==typeof n.expires&&(i=n.expires,(r=n.expires=new Date).setDate(r.getDate()+i)),t=p.json?JSON.stringify(t):String(t),d.cookie=[encodeURIComponent(e),"=",p.raw?t:encodeURIComponent(t),n.expires?"; expires="+n.expires.toUTCString():"",n.path?"; path="+n.path:"",n.domain?"; domain="+n.domain:"",n.secure?"; secure":""].join("");for(var s=p.raw?h:f,o=d.cookie.split("; "),a=0,l=o.length;a<l;a++){var u=o[a].split("=");if(s(u.shift())===e)return u=s(u.join("=")),p.json?JSON.parse(u):u}return null};p.defaults={},c.removeCookie=function(e,t){return null!==c.cookie(e)&&(c.cookie(e,null,t),!0)}}(jQuery,document),function(){function r(e){return e.replace(/<.[^<>]*?>/g," ").replace(/&nbsp;|&#160;/gi," ").replace(/[.(),;:!?%#$'"_+=\/\-]*/g,"")}jQuery.validator.addMethod("maxWords",function(e,t,n){return this.optional(t)||n>=r(e).match(/\b\w+\b/g).length},jQuery.validator.format("Please enter {0} words or less.")),jQuery.validator.addMethod("minWords",function(e,t,n){return this.optional(t)||r(e).match(/\b\w+\b/g).length>=n},jQuery.validator.format("Please enter at least {0} words.")),jQuery.validator.addMethod("rangeWords",function(e,t,n){var e=r(e),i=/\b\w+\b/g;return this.optional(t)||e.match(i).length>=n[0]&&e.match(i).length<=n[1]},jQuery.validator.format("Please enter between {0} and {1} words."))}(),jQuery.validator.addMethod("letterswithbasicpunc",function(e,t){return this.optional(t)||/^[a-z\-.,()'"\s]+$/i.test(e)},"Letters or punctuation only please"),jQuery.validator.addMethod("alphanumeric",function(e,t){return this.optional(t)||/^\w+$/i.test(e)},"Letters, numbers, and underscores only please"),jQuery.validator.addMethod("lettersonly",function(e,t){return this.optional(t)||/^[a-z]+$/i.test(e)},"Letters only please"),jQuery.validator.addMethod("nowhitespace",function(e,t){return this.optional(t)||/^\S+$/i.test(e)},"No white space please"),jQuery.validator.addMethod("ziprange",function(e,t){return this.optional(t)||/^90[2-5]\d\{2\}-\d{4}$/.test(e)},"Your ZIP-code must be in the range 902xx-xxxx to 905-xx-xxxx"),jQuery.validator.addMethod("zipcodeUS",function(e,t){return this.optional(t)||/\d{5}-\d{4}$|^\d{5}$/.test(e)},"The specified US ZIP Code is invalid"),jQuery.validator.addMethod("integer",function(e,t){return this.optional(t)||/^-?\d+$/.test(e)},"A positive or negative non-decimal number please"),jQuery.validator.addMethod("vinUS",function(e){if(17!==e.length)return!1;for(var t,n,i,r,s,o=["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"],a=[1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9],l=[8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2],u=0,c=0;c<17;c++){if(i=l[c],n=e.slice(c,c+1),8===c&&(s=n),isNaN(n)){for(t=0;t<o.length;t++)if(n.toUpperCase()===o[t]){n=a[t],n*=i,isNaN(s)&&8===t&&(s=o[t]);break}}else n*=i;u+=n}return(r=10===(r=u%11)?"X":r)===s},"The specified vehicle identification number (VIN) is invalid."),jQuery.validator.addMethod("dateITA",function(e,t){var n,i,r,s=!1;return s=!!/^\d{1,2}\/\d{1,2}\/\d{4}$/.test(e)&&(e=e.split("/"),n=parseInt(e[0],10),i=parseInt(e[1],10),e=parseInt(e[2],10),(r=new Date(e,i-1,n)).getFullYear()===e)&&r.getMonth()===i-1&&r.getDate()===n,this.optional(t)||s},"Please enter a correct date"),jQuery.validator.addMethod("iban",function(e,t){if(this.optional(t))return!0;if(!/^([a-zA-Z0-9]{4} ){2,8}[a-zA-Z0-9]{1,4}|[a-zA-Z0-9]{12,34}$/.test(e))return!1;t=e.replace(/ /g,"").toUpperCase(),e={AL:"\\d{8}[\\dA-Z]{16}",AD:"\\d{8}[\\dA-Z]{12}",AT:"\\d{16}",AZ:"[\\dA-Z]{4}\\d{20}",BE:"\\d{12}",BH:"[A-Z]{4}[\\dA-Z]{14}",BA:"\\d{16}",BR:"\\d{23}[A-Z][\\dA-Z]",BG:"[A-Z]{4}\\d{6}[\\dA-Z]{8}",CR:"\\d{17}",HR:"\\d{17}",CY:"\\d{8}[\\dA-Z]{16}",CZ:"\\d{20}",DK:"\\d{14}",DO:"[A-Z]{4}\\d{20}",EE:"\\d{16}",FO:"\\d{14}",FI:"\\d{14}",FR:"\\d{10}[\\dA-Z]{11}\\d{2}",GE:"[\\dA-Z]{2}\\d{16}",DE:"\\d{18}",GI:"[A-Z]{4}[\\dA-Z]{15}",GR:"\\d{7}[\\dA-Z]{16}",GL:"\\d{14}",GT:"[\\dA-Z]{4}[\\dA-Z]{20}",HU:"\\d{24}",IS:"\\d{22}",IE:"[\\dA-Z]{4}\\d{14}",IL:"\\d{19}",IT:"[A-Z]\\d{10}[\\dA-Z]{12}",KZ:"\\d{3}[\\dA-Z]{13}",KW:"[A-Z]{4}[\\dA-Z]{22}",LV:"[A-Z]{4}[\\dA-Z]{13}",LB:"\\d{4}[\\dA-Z]{20}",LI:"\\d{5}[\\dA-Z]{12}",LT:"\\d{16}",LU:"\\d{3}[\\dA-Z]{13}",MK:"\\d{3}[\\dA-Z]{10}\\d{2}",MT:"[A-Z]{4}\\d{5}[\\dA-Z]{18}",MR:"\\d{23}",MU:"[A-Z]{4}\\d{19}[A-Z]{3}",MC:"\\d{10}[\\dA-Z]{11}\\d{2}",MD:"[\\dA-Z]{2}\\d{18}",ME:"\\d{18}",NL:"[A-Z]{4}\\d{10}",NO:"\\d{11}",PK:"[\\dA-Z]{4}\\d{16}",PS:"[\\dA-Z]{4}\\d{21}",PL:"\\d{24}",PT:"\\d{21}",RO:"[A-Z]{4}[\\dA-Z]{16}",SM:"[A-Z]\\d{10}[\\dA-Z]{12}",SA:"\\d{2}[\\dA-Z]{18}",RS:"\\d{18}",SK:"\\d{20}",SI:"\\d{15}",ES:"\\d{20}",SE:"\\d{20}",CH:"\\d{5}[\\dA-Z]{12}",TN:"\\d{20}",TR:"\\d{5}[\\dA-Z]{17}",AE:"\\d{3}\\d{16}",GB:"[A-Z]{4}\\d{14}",VG:"[\\dA-Z]{4}\\d{16}"}[t.substring(0,2)];if(void 0!==e&&!RegExp("^[A-Z]{2}\\d{2}"+e+"$","").test(t))return!1;for(var n,i=t.substring(4,t.length)+t.substring(0,4),r="",s=!0,o=0;i.length>o;o++)(s="0"!==(n=i.charAt(o))?!1:s)||(r+="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf(n));for(var a="",l=0;r.length>l;l++)a=(""+a+r.charAt(l))%97;return 1===a},"Please specify a valid IBAN"),jQuery.validator.addMethod("dateNL",function(e,t){return this.optional(t)||/^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(e)},"Please enter a correct date"),jQuery.validator.addMethod("phoneNL",function(e,t){return this.optional(t)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(e)},"Please specify a valid phone number."),jQuery.validator.addMethod("mobileNL",function(e,t){return this.optional(t)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test(e)},"Please specify a valid mobile number"),jQuery.validator.addMethod("postalcodeNL",function(e,t){return this.optional(t)||/^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(e)},"Please specify a valid postal code"),jQuery.validator.addMethod("bankaccountNL",function(e,t){if(this.optional(t))return!0;if(!/^[0-9]{9}|([0-9]{2} ){3}[0-9]{3}$/.test(e))return!1;for(var n=e.replace(/ /g,""),i=0,r=n.length,s=0;s<r;s++)i+=(r-s)*n.substring(s,s+1);return 0==i%11},"Please specify a valid bank account number"),jQuery.validator.addMethod("giroaccountNL",function(e,t){return this.optional(t)||/^[0-9]{1,7}$/.test(e)},"Please specify a valid giro account number"),jQuery.validator.addMethod("bankorgiroaccountNL",function(e,t){return this.optional(t)||$.validator.methods.bankaccountNL.call(this,e,t)||$.validator.methods.giroaccountNL.call(this,e,t)},"Please specify a valid bank or giro account number"),jQuery.validator.addMethod("time",function(e,t){return this.optional(t)||/^([01]\d|2[0-3])(:[0-5]\d){1,2}$/.test(e)},"Please enter a valid time, between 00:00 and 23:59"),jQuery.validator.addMethod("time12h",function(e,t){return this.optional(t)||/^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(e)},"Please enter a valid time in 12-hour am/pm format"),jQuery.validator.addMethod("phoneUS",function(e,t){return e=e.replace(/\s+/g,""),this.optional(t)||9<e.length&&e.match(/^(\+?1-?)?(\([2-9]\d{2}\)|[2-9]\d{2})-?[2-9]\d{2}-?\d{4}$/)},"Please specify a valid phone number"),jQuery.validator.addMethod("phoneUK",function(e,t){return e=e.replace(/\(|\)|\s+|-/g,""),this.optional(t)||9<e.length&&e.match(/^(?:(?:(?:00\s?|\+)44\s?)|(?:\(?0))(?:\d{2}\)?\s?\d{4}\s?\d{4}|\d{3}\)?\s?\d{3}\s?\d{3,4}|\d{4}\)?\s?(?:\d{5}|\d{3}\s?\d{3})|\d{5}\)?\s?\d{4,5})$/)},"Please specify a valid phone number"),jQuery.validator.addMethod("mobileUK",function(e,t){return e=e.replace(/\(|\)|\s+|-/g,""),this.optional(t)||9<e.length&&e.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[45789]\d{2}|624)\s?\d{3}\s?\d{3})$/)},"Please specify a valid mobile number"),jQuery.validator.addMethod("phonesUK",function(e,t){return e=e.replace(/\(|\)|\s+|-/g,""),this.optional(t)||9<e.length&&e.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[45789]\d{8}|624\d{6})))$/)},"Please specify a valid uk phone number"),jQuery.validator.addMethod("postcodeUK",function(e,t){return this.optional(t)||/^((([A-PR-UWYZ][0-9])|([A-PR-UWYZ][0-9][0-9])|([A-PR-UWYZ][A-HK-Y][0-9])|([A-PR-UWYZ][A-HK-Y][0-9][0-9])|([A-PR-UWYZ][0-9][A-HJKSTUW])|([A-PR-UWYZ][A-HK-Y][0-9][ABEHMNPRVWXY]))\s?([0-9][ABD-HJLNP-UW-Z]{2})|(GIR)\s?(0AA))$/i.test(e)},"Please specify a valid UK postcode"),jQuery.validator.addMethod("strippedminlength",function(e,t,n){return jQuery(e).text().length>=n},jQuery.validator.format("Please enter at least {0} characters")),jQuery.validator.addMethod("email2",function(e,t){return this.optional(t)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(e)},jQuery.validator.messages.email),jQuery.validator.addMethod("url2",function(e,t){return this.optional(t)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)*(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(e)},jQuery.validator.messages.url),jQuery.validator.addMethod("creditcardtypes",function(e,t,n){if(/[^0-9\-]+/.test(e))return!1;e=e.replace(/\D/g,"");var i=0;return n.mastercard&&(i|=1),n.visa&&(i|=2),n.amex&&(i|=4),n.dinersclub&&(i|=8),n.enroute&&(i|=16),n.discover&&(i|=32),n.jcb&&(i|=64),n.unknown&&(i|=128),1&(i=n.all?255:i)&&/^(5[12345])/.test(e)||2&i&&/^(4)/.test(e)?16===e.length:4&i&&/^(3[47])/.test(e)?15===e.length:8&i&&/^(3(0[012345]|[68]))/.test(e)?14===e.length:16&i&&/^(2(014|149))/.test(e)?15===e.length:32&i&&/^(6011)/.test(e)||64&i&&/^(3)/.test(e)?16===e.length:64&i&&/^(2131|1800)/.test(e)?15===e.length:!!(128&i)},"Please enter a valid credit card number."),jQuery.validator.addMethod("ipv4",function(e,t){return this.optional(t)||/^(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)\.(25[0-5]|2[0-4]\d|[01]?\d\d?)$/i.test(e)},"Please enter a valid IP v4 address."),jQuery.validator.addMethod("ipv6",function(e,t){return this.optional(t)||/^((([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$/i.test(e)},"Please enter a valid IP v6 address."),jQuery.validator.addMethod("pattern",function(e,t,n){return!!this.optional(t)||(n="string"==typeof n?RegExp("^(?:"+n+")$"):n).test(e)},"Invalid format."),jQuery.validator.addMethod("require_from_group",function(e,t,n){var i=this,r=n[1],n=$(r,t.form).filter(function(){return i.elementValue(this)}).length>=n[0];return $(t).data("being_validated")||((r=$(r,t.form)).data("being_validated",!0),r.valid(),r.data("being_validated",!1)),n},jQuery.validator.format("Please fill at least {0} of these fields.")),jQuery.validator.addMethod("skip_or_fill_minimum",function(e,t,n){var i=this,r=n[0],n=n[1],s=$(n,t.form).filter(function(){return i.elementValue(this)}).length,r=r<=s||0===s;return $(t).data("being_validated")||((s=$(n,t.form)).data("being_validated",!0),s.valid(),s.data("being_validated",!1)),r},jQuery.validator.format("Please either skip these fields or fill at least {0} of them.")),jQuery.validator.addMethod("accept",function(e,t,n){var i,r="string"==typeof n?n.replace(/\s/g,"").replace(/,/g,"|"):"image/*",n=this.optional(t);if(n)return n;if("file"===$(t).attr("type")&&(r=r.replace(/\*/g,".*"),t.files)&&t.files.length)for(i=0;t.files.length>i;i++)if(!t.files[i].type.match(RegExp(".?("+r+")$","i")))return!1;return!0},jQuery.validator.format("Please enter a value with a valid mimetype.")),jQuery.validator.addMethod("extension",function(e,t,n){return n="string"==typeof n?n.replace(/,/g,"|"):"png|jpe?g|gif",this.optional(t)||e.match(RegExp(".("+n+")$","i"))},jQuery.validator.format("Please enter a value with a valid extension.")),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],t):t(e.jQuery)}(this,function(p){"use strict";p=p&&"default"in p?p.default:p;function P(e){return(e||"")+ ++t}var t,o,a,r={isArray:function(e){return Array.isArray(e)},isFunction:function(e){return"[object Function]"===Object.prototype.toString.call(e)},isEmptyObject:function(e){return 0===Object.keys(e).length&&e.constructor===Object},isPlainObject:function(e){return!(void 0===e||"object"!=typeof e||null===e||e.nodeType||e===e.window||e.constructor&&!Object.prototype.hasOwnProperty.call(e.constructor.prototype,"isPrototypeOf"))}},l={compact:function(e){return e.filter(function(e){return!!e})},each:function(n,i){Array.isArray(n)?n.some(function(e,t){return!1===i(e,t)}):Object.keys(n).some(function(e){var t=n[e];return!1===i(t,e)})},intersect:function(e,t){return Array.isArray(e)&&Array.isArray(t)?e.filter(function(e){return-1!==t.indexOf(e)}):[]},minus:function(e,t){return t&&0!==t.length?e.filter(function(e){return-1===t.indexOf(e)}):e},makeArray:function(e){return r.isArray(e)?Array.prototype.slice.call(e):[e]},minusWithPartialMatching:function(e,n){return n&&0!==n.length?e.filter(function(t){return!n.some(function(e){return 0===e.indexOf(t)})}):e},slice:function(e,t){return Array.prototype.slice.call(e,t)}},e={delay:function(e,t){return setTimeout(e,t||0)}},i={areSame:function n(e,i){var r=!0;return typeof e==typeof i&&("object"==typeof e&&null!=e&&null!=i?(l.each(e,function(e,t){return r=n(e,i[t])}),r):e===i)},clone:function(e){return JSON.parse(JSON.stringify(e))},compact:function(e){var n=i.clone(e);return l.each(n,function(e,t){null!=e&&""!==e||delete n[t]}),n},getDeepValue:function e(t,n){var n=n.split("."),i=n.shift();return t&&(n.length?e(t[i],n.join(".")):t[i])}},n=13,R=27,O=9,I=32,s=38,u=40,c={hint:"suggestions-hint",mobile:"suggestions-mobile",nowrap:"suggestions-nowrap",promo:"suggestions-promo",selected:"suggestions-selected",suggestion:"suggestions-suggestion",subtext:"suggestions-subtext",subtext_inline:"suggestions-subtext suggestions-subtext_inline",subtext_delimiter:"suggestions-subtext-delimiter",subtext_label:"suggestions-subtext suggestions-subtext_label",removeConstraint:"suggestions-remove",value:"suggestions-value"},d=".suggestions",h="suggestions",f="\\s\"'~\\*\\.,:\\|\\[\\]\\(\\)\\{\\}<>№",g="\\-\\+\\/\\\\\\?!@#$%^&",H=new RegExp("["+f+"]+","g"),z=new RegExp("["+g+"]+","g"),m={escapeHtml:function(n){return n&&l.each({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;"},function(e,t){n=n.replace(new RegExp(t,"g"),e)}),n},escapeRegExChars:function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},formatToken:function(e){return e&&e.toLowerCase().replace(/[ёЁ]/g,"е")},getWordExtractorRegExp:function(){return new RegExp("([^"+f+"]*)(["+f+"]*)","g")},normalize:function(e,t){return m.split(e,t).join(" ")},split:function(e,t){e=e.replace(/(\d+)([а-яА-ЯёЁ]{2,})/g,"$1 $2").replace(/([а-яА-ЯёЁ]+)(\d+)/g,"$1 $2");var e=l.compact(e.split(H)),n=e.pop(),e=l.minus(e,t);return e.push(n),e},stringEncloses:function(e,t){return e.length>t.length&&-1!==e.indexOf(t)},tokenize:function(e,t){e=l.compact(m.formatToken(e).split(H)),t=l.minus(e,t),e=l.minus(e,t);return m.withSubTokens(t.concat(e))},withSubTokens:function(e){var i=[];return l.each(e,function(e,t){var n=e.split(z);i.push(e),1<n.length&&(i=i.concat(l.compact(n)))}),i}},q=function(){return p.Deferred()},W=function(e){return p.ajax(e)},v=function(){return p.extend.apply(null,arguments)},$=function(e){return p.param(e)},y=function(e,t){return p.proxy(e,t)},b=function(){return p.support.cors},x={getDefaultType:function(){return b()?"POST":"GET"},getDefaultContentType:function(){return b()?"application/json":"application/x-www-form-urlencoded"},fixURLProtocol:function(e){return b()?e:e.replace(/^https?:/,location.protocol)},addUrlParams:function(e,t){return e+(/\?/.test(e)?"&":"?")+$(t)},serialize:function(e){return b()?JSON.stringify(e,function(e,t){return null===t?void 0:t}):(e=i.compact(e),$(e,!0))}},_=(t=0,{escapeRegExChars:m.escapeRegExChars,escapeHtml:m.escapeHtml,formatToken:m.formatToken,getTokens:m.tokenize,getWords:m.split,normalize:m.normalize,reWordExtractor:m.getWordExtractorRegExp,stringEncloses:m.stringEncloses,withSubTokens:m.withSubTokens,addUrlParams:x.addUrlParams,getDefaultContentType:x.getDefaultContentType,getDefaultType:x.getDefaultType,fixURLProtocol:x.fixURLProtocol,serialize:x.serialize,arrayMinus:l.minus,arrayMinusWithPartialMatching:l.minusWithPartialMatching,arraysIntersection:l.intersect,compact:l.compact,each:l.each,makeArray:l.makeArray,slice:l.slice,delay:e.delay,areSame:i.areSame,compactObject:i.compact,getDeepValue:i.getDeepValue,isArray:r.isArray,isEmptyObject:r.isEmptyObject,isFunction:r.isFunction,isPlainObject:r.isPlainObject,uniqueId:P,fieldsNotEmpty:function(n,e){var i;return!!r.isPlainObject(n)&&(i=!0,l.each(e,function(e,t){return i=!!n[e]}),i)},indexBy:function(e,r,s){var o={};return l.each(e,function(e,t){var n=e[r],i={};s&&(i[s]=t),o[n]=v(!0,i,e)}),o}}),w={autoSelectFirst:!1,serviceUrl:"https://suggestions.dadata.ru/suggestions/api/4_1/rs",url:null,onSearchStart:p.noop,onSearchComplete:p.noop,onSearchError:p.noop,onSuggestionsFetch:null,onSelect:null,onSelectNothing:null,onInvalidateSelection:null,minChars:1,deferRequestBy:100,enrichmentEnabled:!0,params:{},paramName:"query",timeout:3e3,formatResult:null,formatSelected:null,noCache:!1,containerClass:"suggestions-suggestions",tabDisabled:!1,triggerSelectOnSpace:!1,triggerSelectOnEnter:!0,triggerSelectOnBlur:!0,preventBadQueries:!1,hint:"Выберите вариант или продолжите ввод",noSuggestionsHint:null,type:null,requestMode:"suggest",count:5,$helpers:null,headers:null,scrollOnFocus:!0,mobileWidth:980,initializeInterval:100},x=(o=V(function(e){return e}),a=V(function(e){return e.replace(/, (?:д|вл|двлд|к) .+$/,"")}),{matchByNormalizedQuery:function(e,t){var n=e.toLowerCase(),i=this&&this.stopwords,r=_.normalize(n,i),s=[];return p.each(t,function(e,t){t=t.value.toLowerCase();return!(_.stringEncloses(n,t)||0<t.indexOf(r))&&void(r===_.normalize(t,i)&&s.push(e))}),1===s.length?s[0]:-1},matchByWords:function(e,t){var n,i=this&&this.stopwords,r=e.toLowerCase(),s=[];return o(t)&&(n=_.withSubTokens(_.getWords(r,i)),p.each(t,function(e,t){t=t.value.toLowerCase();if(_.stringEncloses(r,t))return!1;t=_.withSubTokens(_.getWords(t,i));0===_.arrayMinus(n,t).length&&s.push(e)})),1===s.length?s[0]:-1},matchByWordsAddress:function(e,t){var n,i=this&&this.stopwords,r=e.toLowerCase(),s=-1;return a(t)&&(n=_.withSubTokens(_.getWords(r,i)),p.each(t,function(e,t){var t=t.value.toLowerCase();return!_.stringEncloses(r,t)&&(t=_.withSubTokens(_.getWords(t,i)),0===_.arrayMinus(n,t).length?(s=e,!1):void 0)})),s},matchByFields:function(e,n){var t=this&&this.stopwords,i=this&&this.fieldsStopwords,e=_.withSubTokens(_.getWords(e.toLowerCase(),t)),r=[];return 1===n.length&&(i&&p.each(i,function(e,t){e=_.getDeepValue(n[0],e),e=e&&_.withSubTokens(_.getWords(e.toLowerCase(),t));e&&e.length&&(r=r.concat(e))}),0===_.arrayMinusWithPartialMatching(e,r).length)?0:-1}});function V(n){return function(e){var t;return 0!==e.length&&(1===e.length||(t=n(e[0].value),0===p.grep(e,function(e){return 0===n(e.value).indexOf(t)},!0).length))}}var C=["ао","аобл","дом","респ","а/я","аал","автодорога","аллея","арбан","аул","б-р","берег","бугор","вал","вл","волость","въезд","высел","г","городок","гск","д","двлд","днп","дор","дп","ж/д_будка","ж/д_казарм","ж/д_оп","ж/д_платф","ж/д_пост","ж/д_рзд","ж/д_ст","жилзона","жилрайон","жт","заезд","заимка","зона","к","казарма","канал","кв","кв-л","км","кольцо","комн","кордон","коса","кп","край","линия","лпх","м","массив","местность","мкр","мост","н/п","наб","нп","обл","округ","остров","оф","п","п/о","п/р","п/ст","парк","пгт","пер","переезд","пл","пл-ка","платф","погост","полустанок","починок","пр-кт","проезд","промзона","просек","просека","проселок","проток","протока","проулок","р-н","рзд","россия","рп","ряды","с","с/а","с/мо","с/о","с/п","с/с","сад","сквер","сл","снт","спуск","ст","ст-ца","стр","тер","тракт","туп","у","ул","уч-к","ф/х","ферма","х","ш","бульвар","владение","выселки","гаражно-строительный","город","деревня","домовладение","дорога","квартал","километр","комната","корпус","литер","леспромхоз","местечко","микрорайон","набережная","область","переулок","платформа","площадка","площадь","поселение","поселок","проспект","разъезд","район","республика","село","сельсовет","слобода","сооружение","станица","станция","строение","территория","тупик","улица","улус","участок","хутор","шоссе"],e=[{id:"kladr_id",fields:["kladr_id"],forBounds:!1,forLocations:!0},{id:"postal_code",fields:["postal_code"],forBounds:!1,forLocations:!0},{id:"country",fields:["country"],forBounds:!1,forLocations:!0},{id:"region_fias_id",fields:["region_fias_id"],forBounds:!1,forLocations:!0},{id:"region_type_full",fields:["region_type_full"],forBounds:!1,forLocations:!0,kladrFormat:{digits:2,zeros:11},fiasType:"region_fias_id"},{id:"region",fields:["region","region_type","region_type_full","region_with_type"],forBounds:!0,forLocations:!0,kladrFormat:{digits:2,zeros:11},fiasType:"region_fias_id"},{id:"area_fias_id",fields:["area_fias_id"],forBounds:!1,forLocations:!0},{id:"area_type_full",fields:["area_type_full"],forBounds:!1,forLocations:!0,kladrFormat:{digits:5,zeros:8},fiasType:"area_fias_id"},{id:"area",fields:["area","area_type","area_type_full","area_with_type"],forBounds:!0,forLocations:!0,kladrFormat:{digits:5,zeros:8},fiasType:"area_fias_id"},{id:"city_fias_id",fields:["city_fias_id"],forBounds:!1,forLocations:!0},{id:"city_type_full",fields:["city_type_full"],forBounds:!1,forLocations:!0,kladrFormat:{digits:8,zeros:5},fiasType:"city_fias_id"},{id:"city",fields:["city","city_type","city_type_full","city_with_type"],forBounds:!0,forLocations:!0,kladrFormat:{digits:8,zeros:5},fiasType:"city_fias_id"},{id:"city_district_fias_id",fields:["city_district_fias_id"],forBounds:!1,forLocations:!0},{id:"city_district_type_full",fields:["city_district_type_full"],forBounds:!1,forLocations:!0,kladrFormat:{digits:11,zeros:2},fiasType:"city_district_fias_id"},{id:"city_district",fields:["city_district","city_district_type","city_district_type_full","city_district_with_type"],forBounds:!0,forLocations:!0,kladrFormat:{digits:11,zeros:2},fiasType:"city_district_fias_id"},{id:"settlement_fias_id",fields:["settlement_fias_id"],forBounds:!1,forLocations:!0},{id:"settlement_type_full",fields:["settlement_type_full"],forBounds:!1,forLocations:!0,kladrFormat:{digits:11,zeros:2},fiasType:"settlement_fias_id"},{id:"settlement",fields:["settlement","settlement_type","settlement_type_full","settlement_with_type"],forBounds:!0,forLocations:!0,kladrFormat:{digits:11,zeros:2},fiasType:"settlement_fias_id"},{id:"street_fias_id",fields:["street_fias_id"],forBounds:!1,forLocations:!0},{id:"street_type_full",fields:["street_type_full"],forBounds:!1,forLocations:!0,kladrFormat:{digits:15,zeros:2},fiasType:"street_fias_id"},{id:"street",fields:["street","street_type","street_type_full","street_with_type"],forBounds:!0,forLocations:!0,kladrFormat:{digits:15,zeros:2},fiasType:"street_fias_id"},{id:"house",fields:["house","house_type","house_type_full","block","block_type"],forBounds:!0,forLocations:!1,kladrFormat:{digits:19}}],U=/<strong>/,Z={LEGAL:[2,2,5,1],INDIVIDUAL:[2,2,6,2]};function S(e,t){return U.test(t)&&!U.test(e)?t:e}var T,k,F={},A=(F.NAME={urlSuffix:"fio",noSuggestionsHint:!1,matchers:[x.matchByNormalizedQuery,x.matchByWords],fieldNames:{surname:"фамилия",name:"имя",patronymic:"отчество"},isDataComplete:function(e){var t,n=this.options.params,i=e.data;return(n=_.isFunction(n)?n.call(this.element,e.value):n)&&n.parts?t=n.parts.map(function(e){return e.toLowerCase()}):(t=["surname","name"],n="surname",(n=(e=e).data&&e.data[n])&&new RegExp("^"+_.escapeRegExChars(n)+"(["+f+"]|$)","i").test(e.value)&&t.push("patronymic")),_.fieldsNotEmpty(i,t)},composeValue:function(e){return _.compact([e.surname,e.name,e.patronymic]).join(" ")}},F.ADDRESS={urlSuffix:"address",noSuggestionsHint:"Неизвестный адрес",matchers:[y(x.matchByNormalizedQuery,{stopwords:C}),y(x.matchByWordsAddress,{stopwords:C})],dataComponents:e,dataComponentsById:_.indexBy(e,"id","index"),unformattableTokens:C,enrichmentEnabled:!0,enrichmentMethod:"suggest",enrichmentParams:{count:1,locations:null,locations_boost:null,from_bound:null,to_bound:null},getEnrichmentQuery:function(e){return e.unrestricted_value},geoEnabled:!0,isDataComplete:function(e){var t=[this.bounds.to||"flat"],e=e.data;return!_.isPlainObject(e)||_.fieldsNotEmpty(e,t)},composeValue:function(e,t){var n=e.region_with_type||_.compact([e.region,e.region_type]).join(" ")||e.region_type_full,i=e.area_with_type||_.compact([e.area_type,e.area]).join(" ")||e.area_type_full,r=e.city_with_type||_.compact([e.city_type,e.city]).join(" ")||e.city_type_full,s=e.settlement_with_type||_.compact([e.settlement_type,e.settlement]).join(" ")||e.settlement_type_full,o=e.city_district_with_type||_.compact([e.city_district_type,e.city_district]).join(" ")||e.city_district_type_full,a=e.street_with_type||_.compact([e.street_type,e.street]).join(" ")||e.street_type_full,l=_.compact([e.house_type,e.house,e.block_type,e.block]).join(" "),u=_.compact([e.flat_type,e.flat]).join(" "),c=e.postal_box&&"а/я "+e.postal_box;return t&&t.saveCityDistrict||(t&&t.excludeCityDistrict||o&&!e.city_district_fias_id)&&(o=""),_.compact([n=n===r?"":n,i,r,o,s,a,l,u,c]).join(", ")},formatResult:(k=!(T=[]),e.forEach(function(e){k&&T.push(e.id),"city_district"===e.id&&(k=!0)}),function(e,t,n,i){var r=n.data&&n.data.city_district_with_type,s=i&&i.unformattableTokens,o=n.data&&n.data.history_values;return o&&0<o.length&&(s=_.getTokens(t,s),s=this.type.findUnusedTokens(s,e),s=this.type.getFormattedHistoryValues(s,o))&&(e+=s),e=this.highlightMatches(e,t,n,i),e=this.wrapFormattedValue(e,n),r&&(!this.bounds.own.length||0<=this.bounds.own.indexOf("street"))&&!_.isEmptyObject(this.copyDataComponents(n.data,T))&&(e+='<div class="'+this.classes.subtext+'">'+this.highlightMatches(r,t,n)+"</div>"),e}),findUnusedTokens:function(e,t){var n,i,r=[];for(n in e)i=e[n],-1===t.indexOf(i)&&r.push(i);return r},getFormattedHistoryValues:function(e,t){var n,i,r=[],s="";for(i in t)for(n in t[i],e)e[n];return s=0<r.length?" (бывш. "+r.join(", ")+")":s},getSuggestionValue:function(e,t){var n=null;return t.hasSameValues?n=e.options.restrict_value?this.getValueWithinConstraints(e,t.suggestion):e.bounds.own.length?this.getValueWithinBounds(e,t.suggestion):t.suggestion.unrestricted_value:t.hasBeenEnriched&&e.options.restrict_value&&(n=this.getValueWithinConstraints(e,t.suggestion,{excludeCityDistrict:!0})),n},getValueWithinConstraints:function(e,t,n){return this.composeValue(e.getUnrestrictedData(t.data),n)},getValueWithinBounds:function(e,t,n){t=e.copyDataComponents(t.data,e.bounds.own.concat(["city_district_fias_id"]));return this.composeValue(t,n)}},F.PARTY={urlSuffix:"party",noSuggestionsHint:"Неизвестная организация",matchers:[y(x.matchByFields,{fieldsStopwords:{value:null,"data.address.value":C,"data.inn":null,"data.ogrn":null}})],dataComponents:e,enrichmentEnabled:!0,enrichmentMethod:"findById",enrichmentParams:{count:1,locations_boost:null},getEnrichmentQuery:function(e){return e.data.hid},geoEnabled:!0,formatResult:function(e,t,n,i){var r=this,s=S(r.type.formatResultInn.call(r,n,t),r.highlightMatches(_.getDeepValue(n.data,"ogrn"),t,n)),o=r.highlightMatches(_.getDeepValue(n.data,"management.name"),t,n),a=_.getDeepValue(n.data,"address.value")||"";return r.isMobile&&((i=i||{}).maxLength=50),e=function(e,t,n,i,r){return S(this.highlightMatches(e,n,i,r),this.highlightMatches(t,n,i,r))}.call(r,e,_.getDeepValue(n.data,"name.latin"),t,n,i),e=r.wrapFormattedValue(e,n),a&&(a=a.replace(/^(\d{6}?\s+|Россия,\s+)/i,""),a=r.isMobile?a.replace(new RegExp("^([^"+f+"]+["+f+"]+[^"+f+"]+).*"),"$1"):r.highlightMatches(a,t,n,{unformattableTokens:C})),(s||a||o)&&(e+='<div class="'+r.classes.subtext+'"><span class="'+r.classes.subtext_inline+'">'+(s||"")+"</span>"+(S(a,o)||"")+"</div>"),e},formatResultInn:function(e,t){var i,n=e.data&&e.data.inn,r=Z[e.data&&e.data.type],s=/\d/;if(n)return i=this.highlightMatches(n,t,e),r&&(i=i.split(""),i=r.map(function(e){for(var t,n="";e&&(t=i.shift());)n+=t,s.test(t)&&e--;return n}).join('<span class="'+this.classes.subtext_delimiter+'"></span>')+i.join("")),i}},F.EMAIL={urlSuffix:"email",noSuggestionsHint:!1,matchers:[x.matchByNormalizedQuery],isQueryRequestable:function(e){return this.options.suggest_local||0<=e.indexOf("@")}},F.BANK={urlSuffix:"bank",noSuggestionsHint:"Неизвестный банк",matchers:[y(x.matchByFields,{fieldsStopwords:{value:null,"data.bic":null,"data.swift":null}})],dataComponents:e,geoEnabled:!0,formatResult:function(e,t,n,i){var r=this.highlightMatches(_.getDeepValue(n.data,"bic"),t,n),s=_.getDeepValue(n.data,"address.value")||"";return e=this.highlightMatches(e,t,n,i),e=this.wrapFormattedValue(e,n),s&&(s=s.replace(/^\d{6}( РОССИЯ)?, /i,""),s=this.isMobile?s.replace(new RegExp("^([^"+f+"]+["+f+"]+[^"+f+"]+).*"),"$1"):this.highlightMatches(s,t,n,{unformattableTokens:C})),(r||s)&&(e+='<div class="'+this.classes.subtext+'"><span class="'+this.classes.subtext_inline+'">'+r+"</span>"+s+"</div>"),e},formatSelected:function(e){return _.getDeepValue(e,"data.name.payment")||null}},v(w,{suggest_local:!0}),{chains:{},on:function(e,t){return this.get(e).push(t),this},get:function(e){var t=this.chains;return t[e]||(t[e]=[])}}),Q={suggest:{defaultParams:{type:_.getDefaultType(),dataType:"json",contentType:_.getDefaultContentType()},addTypeInUrl:!0},detectAddressByIp:{defaultParams:{type:"GET",dataType:"json"},addTypeInUrl:!1},status:{defaultParams:{type:"GET",dataType:"json"},addTypeInUrl:!0},findById:{defaultParams:{type:_.getDefaultType(),dataType:"json",contentType:_.getDefaultContentType()},addTypeInUrl:!0}},Y={suggest:{method:"suggest",userSelect:!0,updateValue:!0,enrichmentEnabled:!0},findById:{method:"findById",userSelect:!1,updateValue:!1,enrichmentEnabled:!1}};function D(e,t){var n=this;n.element=e,n.el=p(e),n.suggestions=[],n.badQueries=[],n.selectedIndex=-1,n.currentValue=n.element.value,n.intervalId=0,n.cachedResponse={},n.enrichmentCache={},n.currentRequest=null,n.inputPhase=p.Deferred(),n.fetchPhase=p.Deferred(),n.enrichPhase=p.Deferred(),n.onChangeTimeout=null,n.triggering={},n.$wrapper=null,n.options=p.extend({},w,t),n.classes=c,n.disabled=!1,n.selection=null,n.$viewport=p(window),n.$body=p(document.body),n.type=null,n.status={},n.setupElement(),n.initializer=p.Deferred(),n.el.is(":visible")?n.initializer.resolve():n.deferInitialization(),n.initializer.done(p.proxy(n.initialize,n))}var y={setupElement:function(){this.el.attr("autocomplete","off").attr("autocorrect","off").attr("autocapitalize","off").attr("spellcheck","false").addClass("suggestions-input").css("box-sizing","border-box")},bindElementEvents:function(){this.el.on("keydown"+d,p.proxy(this.onElementKeyDown,this)),this.el.on(["keyup"+d,"cut"+d,"paste"+d,"input"+d].join(" "),p.proxy(this.onElementKeyUp,this)),this.el.on("blur"+d,p.proxy(this.onElementBlur,this))},unbindElementEvents:function(){this.el.off(d)},onElementBlur:function(){var e=this;e.cancelBlur?e.cancelBlur=!1:(e.options.triggerSelectOnBlur?e.isUnavailable()||e.selectCurrentValue({noSpace:!0}).always(function(){e.hide()}):e.hide(),e.fetchPhase.abort&&e.fetchPhase.abort())},onElementFocus:function(){this.cancelFocus||_.delay(p.proxy(this.completeOnFocus,this)),this.cancelFocus=!1},onElementKeyDown:function(e){var t=this;if(!t.isUnavailable())if(t.visible){switch(e.which){case R:t.el.val(t.currentValue),t.hide(),t.abortRequest();break;case O:if(!1===t.options.tabDisabled)return;break;case n:t.options.triggerSelectOnEnter&&t.selectCurrentValue();break;case I:return void(t.options.triggerSelectOnSpace&&t.isCursorAtEnd()&&(e.preventDefault(),t.selectCurrentValue({continueSelecting:!0,dontEnrich:!0}).fail(function(){t.currentValue+=" ",t.el.val(t.currentValue),t.proceedChangedValue()})));case s:t.moveUp();break;case u:t.moveDown();break;default:return}e.stopImmediatePropagation(),e.preventDefault()}else switch(e.which){case u:t.suggest();break;case n:t.options.triggerSelectOnEnter&&t.triggerOnSelectNothing()}},onElementKeyUp:function(e){if(!this.isUnavailable()){switch(e.which){case s:case u:case n:return}clearTimeout(this.onChangeTimeout),this.inputPhase.reject(),this.currentValue!==this.el.val()&&this.proceedChangedValue()}},proceedChangedValue:function(){var e=this;e.abortRequest(),e.inputPhase=p.Deferred().done(p.proxy(e.onValueChange,e)),0<e.options.deferRequestBy?e.onChangeTimeout=_.delay(function(){e.inputPhase.resolve()},e.options.deferRequestBy):e.inputPhase.resolve()},onValueChange:function(){var e;this.selection&&(e=this.selection,this.selection=null,this.trigger("InvalidateSelection",e)),this.selectedIndex=-1,this.update(),this.notify("valueChange")},completeOnFocus:function(){this.isUnavailable()||this.isElementFocused()&&(this.fixPosition(),this.update(),this.isMobile)&&(this.setCursorAtEnd(),this.scrollToTop())},isElementFocused:function(){return document.activeElement===this.element},isCursorAtEnd:function(){var e,t=this.el.val().length;try{if("number"==typeof(e=this.element.selectionStart))return e===t}catch(e){}return!document.selection||((e=document.selection.createRange()).moveStart("character",-t),t===e.text.length)},setCursorAtEnd:function(){var t=this.element;try{t.selectionEnd=t.selectionStart=t.value.length,t.scrollLeft=t.scrollWidth}catch(e){t.value=t.value}}},E=(p.extend(D.prototype={initialize:function(){this.uniqueId=_.uniqueId("i"),this.createWrapper(),this.notify("initialize"),this.bindWindowEvents(),this.setOptions(),this.fixPosition()},deferInitialization:function(){function e(){n.initializer.resolve(),n.enable()}var t,n=this,i="mouseover focus keydown";n.initializer.always(function(){n.el.off(i,e),clearInterval(t)}),n.disabled=!0,n.el.on(i,e),t=setInterval(function(){n.el.is(":visible")&&e()},n.options.initializeInterval)},isInitialized:function(){return"resolved"===this.initializer.state()},dispose:function(){},notify:function(e){var t=this,n=_.slice(arguments,1);return p.map(A.get(e),function(e){return e.apply(t,n)})},createWrapper:function(){this.$wrapper=p('<div class="suggestions-wrapper"/>'),this.el.after(this.$wrapper),this.$wrapper.on("mousedown"+d,p.proxy(this.onMousedown,this))},removeWrapper:function(){this.$wrapper&&this.$wrapper.remove(),p(this.options.$helpers).off(d)},onMousedown:function(e){var n=this;e.preventDefault(),n.cancelBlur=!0,_.delay(function(){delete n.cancelBlur}),0==p(e.target).closest(".ui-menu-item").length&&_.delay(function(){p(document).one("mousedown",function(e){var t=n.el.add(n.$wrapper).add(n.options.$helpers);(t=(t=n.options.floating?t.add(n.$container):t).filter(function(){return this===e.target||p.contains(this,e.target)})).length||n.hide()})})},bindWindowEvents:function(){var e=p.proxy(this.fixPosition,this);this.$viewport.on("resize"+d+this.uniqueId,e).on("scroll"+d+this.uniqueId,e)},unbindWindowEvents:function(){this.$viewport.off("resize"+d+this.uniqueId).off("scroll"+d+this.uniqueId)},scrollToTop:function(){var e=this.options.scrollOnFocus;(e=!0===e?this.el:e)instanceof p&&0<e.length&&p("body,html").animate({scrollTop:e.offset().top},"fast")},setOptions:function(e){var n=this;p.extend(n.options,e),p.each({type:F,requestMode:Y},function(e,t){if(n[e]=t[n.options[e]],!n[e])throw n.disable(),"`"+e+"` option is incorrect! Must be one of: "+p.map(t,function(e,t){return'"'+t+'"'}).join(", ")}),p(n.options.$helpers).off(d).on("mousedown"+d,p.proxy(n.onMousedown,n)),n.isInitialized()&&n.notify("setOptions")},fixPosition:function(e){var t=this,n={};t.isMobile=t.$viewport.width()<=t.options.mobileWidth,t.isInitialized()&&(!e||"scroll"!=e.type||t.options.floating||t.isMobile)&&(t.$container.appendTo(t.options.floating?t.$body:t.$wrapper),t.notify("resetPosition"),t.el.css("paddingLeft",""),t.el.css("paddingRight",""),n.paddingLeft=parseFloat(t.el.css("paddingLeft")),n.paddingRight=parseFloat(t.el.css("paddingRight")),p.extend(n,t.el.offset()),n.borderTop="none"==t.el.css("border-top-style")?0:parseFloat(t.el.css("border-top-width")),n.borderLeft="none"==t.el.css("border-left-style")?0:parseFloat(t.el.css("border-left-width")),n.innerHeight=t.el.innerHeight(),n.innerWidth=t.el.innerWidth(),n.outerHeight=t.el.outerHeight(),n.componentsLeft=0,n.componentsRight=0,e=t.$wrapper.offset(),e={top:n.top-e.top,left:n.left-e.left},t.notify("fixPosition",e,n),n.paddingLeft<n.componentsLeft&&t.el.css("paddingLeft",n.componentsLeft+"px"),n.paddingRight<n.componentsRight)&&t.el.css("paddingRight",n.componentsRight+"px")},clearCache:function(){this.cachedResponse={},this.enrichmentCache={},this.badQueries=[]},clear:function(){var e=this,t=e.selection;e.isInitialized()&&(e.clearCache(),e.currentValue="",e.selection=null,e.hide(),e.suggestions=[],e.el.val(""),e.el.trigger("suggestions-clear"),e.notify("clear"),e.trigger("InvalidateSelection",t))},disable:function(){this.disabled=!0,this.abortRequest(),this.visible&&this.hide()},enable:function(){this.disabled=!1},isUnavailable:function(){return this.disabled},update:function(){var e=this.el.val();this.isInitialized()&&(this.currentValue=e,this.isQueryRequestable(e)?this.updateSuggestions(e):this.hide())},setSuggestion:function(e){var t,n=this;p.isPlainObject(e)&&p.isPlainObject(e.data)&&(e=p.extend(!0,{},e),n.isUnavailable()&&n.initializer&&"pending"===n.initializer.state()&&(n.initializer.resolve(),n.enable()),n.bounds.own.length&&(n.checkValueBounds(e),t=n.copyDataComponents(e.data,n.bounds.all),e.data.kladr_id&&(t.kladr_id=n.getBoundedKladrId(e.data.kladr_id,n.bounds.all)),e.data=t),n.selection=e,n.suggestions=[e],t=n.getSuggestionValue(e)||"",n.currentValue=t,n.el.val(t),n.abortRequest(),n.el.trigger("suggestions-set"))},fixData:function(){var t=this,e=t.extendedCurrentValue(),n=t.el.val(),i=p.Deferred();i.done(function(e){t.selectSuggestion(e,0,n,{hasBeenEnriched:!0}),t.el.trigger("suggestions-fixdata",e)}).fail(function(){t.selection=null,t.el.trigger("suggestions-fixdata")}),t.isQueryRequestable(e)?(t.currentValue=e,t.getSuggestions(e,{count:1,from_bound:null,to_bound:null}).done(function(e){e=e[0];e?i.resolve(e):i.reject()}).fail(function(){i.reject()})):i.reject()},extendedCurrentValue:function(){var e=this.getParentInstance(),e=e&&e.extendedCurrentValue(),t=p.trim(this.el.val());return _.compact([e,t]).join(" ")},getAjaxParams:function(e,t){var n=p.trim(this.options.token),i=p.trim(this.options.partner),r=this.options.serviceUrl,s=this.options.url,o=Q[e],a=p.extend({timeout:this.options.timeout},o.defaultParams),l={};return s?r=s:(/\/$/.test(r)||(r+="/"),r+=e,o.addTypeInUrl&&(r+="/"+this.type.urlSuffix)),r=_.fixURLProtocol(r),p.support.cors?(n&&(l.Authorization="Token "+n),i&&(l["X-Partner"]=i),l["X-Version"]=D.version,a.headers||(a.headers={}),a.xhrFields||(a.xhrFields={}),p.extend(a.headers,this.options.headers,l),a.xhrFields.withCredentials=!1):(n&&(l.token=n),i&&(l.partner=i),l.version=D.version,r=_.addUrlParams(r,l)),a.url=r,p.extend(a,t)},isQueryRequestable:function(e){var t=e.length>=this.options.minChars;return t=t&&this.type.isQueryRequestable?this.type.isQueryRequestable.call(this,e):t},constructRequestParams:function(e,t){var n=this.options,i=p.isFunction(n.params)?n.params.call(this.element,e):p.extend({},n.params);return this.type.constructRequestParams&&p.extend(i,this.type.constructRequestParams.call(this)),p.each(this.notify("requestParams"),function(e,t){p.extend(i,t)}),i[n.paramName]=e,p.isNumeric(n.count)&&0<n.count&&(i.count=n.count),p.extend(i,t)},updateSuggestions:function(t){var n=this;n.fetchPhase=n.getSuggestions(t).done(function(e){n.assignSuggestions(e,t)})},getSuggestions:function(i,e,t){var r=this,s=r.options,o=t&&t.noCallbacks,n=t&&t.useEnrichmentCache,t=t&&t.method||r.requestMode.method,e=r.constructRequestParams(i,e),a=p.param(e||{}),l=p.Deferred(),u=r.cachedResponse[a];return u&&p.isArray(u.suggestions)?l.resolve(u.suggestions):!r.isBadQuery(i)&&(o||!1!==s.onSearchStart.call(r.element,e))?r.doGetSuggestions(e,t).done(function(e){r.processResponse(e)&&i==r.currentValue?(s.noCache||(n?r.enrichmentCache[i]=e.suggestions[0]:(r.enrichResponse(e,i),r.cachedResponse[a]=e,s.preventBadQueries&&0===e.suggestions.length&&r.badQueries.push(i))),l.resolve(e.suggestions)):l.reject(),o||s.onSearchComplete.call(r.element,i,e.suggestions)}).fail(function(e,t,n){l.reject(),o||"abort"===t||s.onSearchError.call(r.element,i,e,t,n)}):l.reject(),l},doGetSuggestions:function(e,t){var n=this,t=p.ajax(n.getAjaxParams(t,{data:_.serialize(e)}));return n.abortRequest(),n.currentRequest=t,n.notify("request"),t.always(function(){n.currentRequest=null,n.notify("request")}),t},isBadQuery:function(n){var i;return!!this.options.preventBadQueries&&(i=!1,p.each(this.badQueries,function(e,t){return!(i=0===n.indexOf(t))}),i)},abortRequest:function(){this.currentRequest&&this.currentRequest.abort()},processResponse:function(e){var t;return!(!e||!p.isArray(e.suggestions)||(this.verifySuggestionsFormat(e.suggestions),this.setUnrestrictedValues(e.suggestions),p.isFunction(this.options.onSuggestionsFetch)&&(t=this.options.onSuggestionsFetch.call(this.element,e.suggestions),p.isArray(t))&&(e.suggestions=t),0))},verifySuggestionsFormat:function(n){"string"==typeof n[0]&&p.each(n,function(e,t){n[e]={value:t,data:null}})},getSuggestionValue:function(e,t){var n,i=this.options.formatSelected||this.type.formatSelected,r=t&&t.hasSameValues,t=t&&t.hasBeenEnriched;return n="string"!=typeof(n=p.isFunction(i)?i.call(this,e):n)&&(n=e.value,this.type.getSuggestionValue)&&null!==(i=this.type.getSuggestionValue(this,{suggestion:e,hasSameValues:r,hasBeenEnriched:t}))?i:n},hasSameValues:function(n){var i=!1;return p.each(this.suggestions,function(e,t){if(t.value===n.value&&t!==n)return!(i=!0)}),i},assignSuggestions:function(e,t){this.suggestions=e,this.notify("assignSuggestions",t)},shouldRestrictValues:function(){return this.options.restrict_value&&this.constraints&&1==Object.keys(this.constraints).length},setUnrestrictedValues:function(e){var n=this.shouldRestrictValues(),i=this.getFirstConstraintLabel();p.each(e,function(e,t){t.unrestricted_value||(t.unrestricted_value=n?i+", "+t.value:t.value)})},areSuggestionsSame:function(e,t){return e&&t&&e.value===t.value&&_.areSame(e.data,t.data)},getNoSuggestionsHint:function(){return!1!==this.options.noSuggestionsHint&&(this.options.noSuggestionsHint||this.type.noSuggestionsHint)}},y),A.on("initialize",y.bindElementEvents).on("dispose",y.unbindElementEvents),{});function X(){_.each(E,function(e){e.abort()}),E={}}X();var L,x={checkStatus:function(){var t=this,e=t.options.token&&t.options.token.trim()||"",e=t.options.type+e,n=E[e];function i(e){_.isFunction(t.options.onSearchError)&&t.options.onSearchError.call(t.element,null,n,"error",e)}(n=n||(E[e]=W(t.getAjaxParams("status")))).done(function(e){e.search?v(t.status,e):i("Service Unavailable")}).fail(function(){i(n.statusText)})}};D.resetTokens=X,v(D.prototype,x),A.on("setOptions",x.checkStatus);e={checkLocation:function(){var t=this,e=t.options.geoLocation;t.type.geoEnabled&&e&&(t.geoLocation=p.Deferred(),p.isPlainObject(e)||p.isArray(e)?t.geoLocation.resolve(e):(L=L||p.ajax(t.getAjaxParams("detectAddressByIp"))).done(function(e){e=e&&e.location&&e.location.data;e&&e.kladr_id?t.geoLocation.resolve(e):t.geoLocation.reject()}).fail(function(){t.geoLocation.reject()}))},getGeoLocation:function(){return this.geoLocation},constructParams:function(){var t={};return this.geoLocation&&p.isFunction(this.geoLocation.promise)&&"resolved"==this.geoLocation.state()&&this.geoLocation.done(function(e){t.locations_boost=p.makeArray(e)}),t}},"GET"!=_.getDefaultType()&&(p.extend(w,{geoLocation:!0}),p.extend(D,{resetLocation:function(){L=null,w.geoLocation=!0}}),p.extend(D.prototype,{getGeoLocation:e.getGeoLocation}),A.on("setOptions",e.checkLocation).on("requestParams",e.constructParams)),y={enrichSuggestion:function(t,e){var n=this,i=p.Deferred();if(!n.options.enrichmentEnabled||!n.type.enrichmentEnabled||!n.requestMode.enrichmentEnabled||e&&e.dontEnrich)return i.resolve(t);if(t.data&&null!=t.data.qc)return i.resolve(t);n.disableDropdown();var e=n.type.getEnrichmentQuery(t),r=n.type.enrichmentParams,s={noCallbacks:!0,useEnrichmentCache:!0,method:n.type.enrichmentMethod};return n.currentValue=e,n.enrichPhase=n.getSuggestions(e,r,s).always(function(){n.enableDropdown()}).done(function(e){e=e&&e[0];i.resolve(e||t,!!e)}).fail(function(){i.resolve(t)}),i},enrichResponse:function(n,i){var r=this.enrichmentCache[i];r&&p.each(n.suggestions,function(e,t){if(t.value===i)return n.suggestions[e]=r,!1})}};p.extend(D.prototype,y);function K(e){var t=p('<span class="suggestions-addon"/>');this.owner=e,this.$el=t,this.type=M.NONE,this.visible=!1,this.initialPadding=null,t.on("click",p.proxy(this,"onClick"))}var x={createContainer:function(){var e="."+this.classes.suggestion,t=this.options,t=p("<div/>").addClass(t.containerClass).css({position:"absolute",display:"none"});(this.$container=t).on("click"+d,e,p.proxy(this.onSuggestionClick,this))},getContainer:function(){return this.$container.get(0)},removeContainer:function(){},setContainerOptions:function(){var e="mousedown"+d;this.$container.off(e),this.options.floating&&this.$container.on(e,p.proxy(this.onMousedown,this))},onSuggestionClick:function(e){var t,n=p(e.target);if(!this.dropdownDisabled){for(this.cancelFocus=!0,this.el.focus();n.length&&!(t=n.attr("data-index"));)n=n.closest("."+this.classes.suggestion);t&&!isNaN(t)&&this.select(+t)}},setDropdownPosition:function(e,t){var n,i=this,r=i.$viewport.scrollLeft();i.isMobile?(n=i.options.floating?{left:t.left+"px",top:t.top+t.borderTop+t.innerHeight+"px"}:{left:e.left+"px",top:e.top+t.borderTop+t.innerHeight+"px"}).width=i.el.outerWidth()+"px":(n=i.options.floating?{left:t.left+"px",top:t.top+t.borderTop+t.innerHeight+"px"}:{left:e.left+"px",top:e.top+t.borderTop+t.innerHeight+"px"},_.delay(function(){var e=i.options.width;"auto"===e&&(e=i.el.outerWidth()),i.$container.outerWidth(e)})),i.$container.toggleClass(i.classes.mobile,i.isMobile).css(n),i.containerItemsPadding=t.left+t.borderLeft+t.paddingLeft-r},setItemsPositions:function(){this.getSuggestionsItems()},getSuggestionsItems:function(){return this.$container.children("."+this.classes.suggestion)},toggleDropdownEnabling:function(e){this.dropdownDisabled=!e,this.$container.attr("disabled",!e)},disableDropdown:function(){this.toggleDropdownEnabling(!1)},enableDropdown:function(){this.toggleDropdownEnabling(!0)},hasSuggestionsToChoose:function(){return 1<this.suggestions.length||1===this.suggestions.length&&(!this.selection||p.trim(this.suggestions[0].value)!==p.trim(this.selection.value))},suggest:function(){var n=this,e=n.options,i=[];if(n.requestMode.userSelect){if(n.hasSuggestionsToChoose())!n.isMobile&&e.hint&&n.suggestions.length&&i.push('<div class="'+n.classes.hint+'">'+e.hint+"</div>"),n.selectedIndex=-1,n.suggestions.forEach(function(e,t){e==n.selection&&(n.selectedIndex=t),n.buildSuggestionHtml(e,t,i)});else{if(n.suggestions.length)return void n.hide();var t=n.getNoSuggestionsHint();if(!t)return void n.hide();i.push('<div class="'+n.classes.hint+'">'+t+"</div>")}i.push('<div class="'+c.promo+'"></div>'),i.push("</div>"),n.$container.html(i.join("")),e.autoSelectFirst&&-1===n.selectedIndex&&(n.selectedIndex=0),-1!==n.selectedIndex&&n.getSuggestionsItems().eq(n.selectedIndex).addClass(n.classes.selected),p.isFunction(e.beforeRender)&&e.beforeRender.call(n.element,n.$container),n.$container.show(),n.visible=!0,n.fixPosition(),n.setItemsPositions()}},buildSuggestionHtml:function(e,t,n){n.push('<div class="'+this.classes.suggestion+'" data-index="'+t+'">');t=this.options.formatResult||this.type.formatResult||this.formatResult,n.push(t.call(this,e.value,this.currentValue,e,{unformattableTokens:this.type.unformattableTokens})),t=this.makeSuggestionLabel(this.suggestions,e);t&&n.push('<span class="'+this.classes.subtext_label+'">'+_.escapeHtml(t)+"</span>"),n.push("</div>")},wrapFormattedValue:function(e,t){t=_.getDeepValue(t.data,"state.status");return'<span class="'+this.classes.value+'"'+(t?' data-suggestion-status="'+t+'"':"")+">"+e+"</span>"},formatResult:function(e,t,n,i){return e=this.highlightMatches(e,t,n,i),this.wrapFormattedValue(e,n)},highlightMatches:function(e,t,n,i){var r,s,o,a,l,u,c=[],d=i&&i.unformattableTokens,h=i&&i.maxLength,f=_.reWordExtractor();if(!e)return"";for(i=_.getTokens(t,d),r=p.map(i,function(e){return new RegExp("^((.*)(["+g+"]+))?("+_.escapeRegExChars(e)+")([^"+g+"]*["+g+"]*)","i")});(s=f.exec(e))&&s[0];)o=s[1],c.push({text:o,hasUpperCase:o.toLowerCase()!==o,formatted:_.formatToken(o),matchable:!0}),s[2]&&c.push({text:s[2]});for(a=0;a<c.length;a++)!(l=c[a]).matchable||l.matched||-1!==p.inArray(l.formatted,d)&&!l.hasUpperCase||p.each(r,function(e,t){var n,t=t.exec(l.formatted),i=a+1;if(t)return(t={before:t[1]||"",beforeText:t[2]||"",beforeDelimiter:t[3]||"",text:t[4]||"",after:t[5]||""}).before&&(c.splice(a,0,{text:l.text.substr(0,t.beforeText.length),formatted:t.beforeText,matchable:!0},{text:t.beforeDelimiter}),i+=2,n=t.before.length,l.text=l.text.substr(n),l.formatted=l.formatted.substr(n),a--),n=t.text.length+t.after.length,l.formatted.length>n&&(c.splice(i,0,{text:l.text.substr(n),formatted:l.formatted.substr(n),matchable:!0}),l.text=l.text.substr(0,n),l.formatted=l.formatted.substr(0,n)),t.after&&(n=t.text.length,c.splice(i,0,{text:l.text.substr(n),formatted:l.formatted.substr(n)}),l.text=l.text.substr(0,n),l.formatted=l.formatted.substr(0,n)),!(l.matched=!0)});if(h){for(a=0;a<c.length&&0<=h;a++)(h-=(l=c[a]).text.length)<0&&(l.text=l.text.substr(0,l.text.length+h)+"...");c.length=a}return t=p.map(c,function(e){var t=_.escapeHtml(e.text);return t=t&&e.matched?"<strong>"+t+"</strong>":t}).join(""),i=t,u=this.classes.nowrap,1===(t=i.split(", ")).length?i:p.map(t,function(e){return'<span class="'+u+'">'+e+"</span>"}).join(", ")},makeSuggestionLabel:function(e,n){var t,i,r,s,o=this.type.fieldNames,a={},l=_.reWordExtractor(),u=[];if(o&&(r=n,s=!1,p.each(e,function(e,t){if(s=t.value==r.value&&t!=r)return!1}),s)&&n.data&&(p.each(o,function(e){var t=n.data[e];t&&(a[e]=_.formatToken(t))}),!p.isEmptyObject(a))){for(;(t=l.exec(_.formatToken(n.value)))&&(i=t[1]);)p.each(a,function(e,t){if(t==i)return u.push(o[e]),delete a[e],!1});if(u.length)return u.join(", ")}},hide:function(){this.visible=!1,this.selectedIndex=-1,this.$container.hide().empty()},activate:function(e){var t,n=this.classes.selected;return!this.dropdownDisabled&&((t=this.getSuggestionsItems()).removeClass(n),this.selectedIndex=e,-1!==this.selectedIndex)&&t.length>this.selectedIndex?((e=t.eq(this.selectedIndex)).addClass(n),e):null},deactivate:function(e){this.dropdownDisabled||(this.selectedIndex=-1,this.getSuggestionsItems().removeClass(this.classes.selected),e&&this.el.val(this.currentValue))},moveUp:function(){this.dropdownDisabled||(-1===this.selectedIndex?this.suggestions.length&&this.adjustScroll(this.suggestions.length-1):0===this.selectedIndex?this.deactivate(!0):this.adjustScroll(this.selectedIndex-1))},moveDown:function(){this.dropdownDisabled||(this.selectedIndex===this.suggestions.length-1?this.deactivate(!0):this.adjustScroll(this.selectedIndex+1))},adjustScroll:function(e){var t,n=this.activate(e),i=this.$container.scrollTop();n&&n.length&&((t=n.position().top)<0?this.$container.scrollTop(i+t):(t=t+n.outerHeight(),(n=this.$container.innerHeight())<t&&this.$container.scrollTop(i-n+t)),this.el.val(this.suggestions[e].value))}},B=(p.extend(w,{width:"auto",floating:!1}),p.extend(D.prototype,x),A.on("initialize",x.createContainer).on("dispose",x.removeContainer).on("setOptions",x.setContainerOptions).on("fixPosition",x.setDropdownPosition).on("fixPosition",x.setItemsPositions).on("assignSuggestions",x.suggest),"addon"),M={NONE:"none",SPINNER:"spinner",CLEAR:"clear"};K.prototype={checkType:function(){var n=this.owner.options.addon,i=!1;p.each(M,function(e,t){if(i=t==n)return!1}),(n=i?n:this.owner.isMobile?M.CLEAR:M.SPINNER)!=this.type&&(this.type=n,this.$el.attr("data-addon-type",n),this.toggle(!0))},toggle:function(e){var t;switch(this.type){case M.CLEAR:t=!!this.owner.currentValue;break;case M.SPINNER:t=!!this.owner.currentRequest;break;default:t=!1}t!=this.visible&&((this.visible=t)?this.show(e):this.hide(e))},show:function(e){var t=this,n={opacity:1};e?(t.$el.show().css(n),t.showBackground(!0)):t.$el.stop(!0,!0).delay(50).queue(function(){t.$el.show(),t.showBackground(),t.$el.dequeue()}).animate(n,"fast")},hide:function(e){var t=this,n={opacity:0};e&&t.$el.hide().css(n),t.$el.stop(!0).animate(n,{duration:"fast",complete:function(){t.$el.hide(),t.hideBackground()}})},fixPosition:function(e,t){var n=t.innerHeight;this.checkType(),this.$el.css({left:e.left+t.borderLeft+t.innerWidth-n+"px",top:e.top+t.borderTop+"px",height:n,width:n}),this.initialPadding=t.paddingRight,this.width=n,this.visible&&(t.componentsRight+=n)},showBackground:function(e){var t=this.owner.el,n={paddingRight:this.width};this.width>this.initialPadding&&(this.stopBackground(),e?t.css(n):t.animate(n,{duration:"fast",queue:B}).dequeue(B))},hideBackground:function(e){var t=this.owner.el,n={paddingRight:this.initialPadding};this.width>this.initialPadding&&(this.stopBackground(!0),e?t.css(n):t.delay(1e3,B).animate(n,{duration:"fast",queue:B}).dequeue(B))},stopBackground:function(e){this.owner.el.stop(B,!0,e)},onClick:function(e){this.type==M.CLEAR&&this.owner.clear()}};var e=function(){var e=new K(this);this.$wrapper.append(e.$el),this.addon=e},y=function(e,t){this.addon.fixPosition(e,t)},x=function(){this.addon.checkType()},N=function(){this.addon.toggle()},G=function(){this.addon.stopBackground()},J=(p.extend(w,{addon:null}),A.on("initialize",e).on("setOptions",x).on("fixPosition",y).on("clear",N).on("valueChange",N).on("request",N).on("resetPosition",G),["region_fias_id","area_fias_id","city_fias_id","city_district_fias_id","settlement_fias_id","street_fias_id"]);function j(i,e){var r=this,n={};r.instance=e,r.fields={},r.specificity=-1,p.isPlainObject(i)&&e.type.dataComponents&&p.each(e.type.dataComponents,function(e,t){var n=t.id;t.forLocations&&i[n]&&(r.fields[n]=i[n],r.specificity=e)}),e=Object.keys(r.fields),(e=_.arraysIntersection(e,J)).length?(p.each(e,function(e,t){n[t]=r.fields[t]}),r.fields=n,r.specificity=r.getFiasSpecificity(e)):r.fields.kladr_id&&(r.fields={kladr_id:r.fields.kladr_id},r.specificity=r.getKladrSpecificity(r.fields.kladr_id))}function ee(e,t){this.id=_.uniqueId("c"),this.deletable=!!e.deletable,this.instance=t,this.locations=p.map(p.makeArray(e&&(e.locations||e.restrictions)),function(e){return new j(e,t)}),this.locations=p.grep(this.locations,function(e){return e.isValid()}),this.label=e.label,null==this.label&&t.type.composeValue&&(this.label=p.map(this.locations,function(e){return e.getLabel()}).join(", ")),this.label&&this.isValid()&&(this.$el=p(document.createElement("li")).append(p(document.createElement("span")).text(this.label)).attr("data-constraint-id",this.id),this.deletable)&&this.$el.append(p(document.createElement("span")).addClass(t.classes.removeConstraint))}p.extend(j.prototype,{getLabel:function(){return this.instance.type.composeValue(this.fields,{saveCityDistrict:!0})},getFields:function(){return this.fields},isValid:function(){return!p.isEmptyObject(this.fields)},getKladrSpecificity:function(e){var n,i=-1;return this.significantKladr=e.replace(/^(\d{2})(\d*?)(0+)$/g,"$1$2"),n=this.significantKladr.length,p.each(this.instance.type.dataComponents,function(e,t){t.kladrFormat&&n===t.kladrFormat.digits&&(i=e)}),i},getFiasSpecificity:function(n){var i=-1;return p.each(this.instance.type.dataComponents,function(e,t){t.fiasType&&-1<p.inArray(t.fiasType,n)&&i<e&&(i=e)}),i},containsData:function(n){var i=!0;return this.fields.kladr_id?!!n.kladr_id&&0===n.kladr_id.indexOf(this.significantKladr):(p.each(this.fields,function(e,t){return i=!!n[e]&&n[e].toLowerCase()===t.toLowerCase()}),i)}}),D.ConstraintLocation=j;p.extend(ee.prototype,{isValid:function(){return 0<this.locations.length},getFields:function(){return p.map(this.locations,function(e){return e.getFields()})}});e={createConstraints:function(){this.constraints={},this.$constraints=p('<ul class="suggestions-constraints"/>'),this.$wrapper.append(this.$constraints),this.$constraints.on("click","."+this.classes.removeConstraint,p.proxy(this.onConstraintRemoveClick,this))},setConstraintsPosition:function(e,t){this.$constraints.css({left:e.left+t.borderLeft+t.paddingLeft+"px",top:e.top+t.borderTop+Math.round((t.innerHeight-this.$constraints.height())/2)+"px"}),t.componentsLeft+=this.$constraints.outerWidth(!0)+t.paddingLeft},onConstraintRemoveClick:function(e){var t=this,e=p(e.target).closest("li"),n=e.attr("data-constraint-id");delete t.constraints[n],t.update(),e.fadeOut("fast",function(){t.removeConstraint(n)})},setupConstraints:function(){var e,n=this,t=n.options.constraints;t?t instanceof p||"string"==typeof t||"number"==typeof t.nodeType?(e=p(t)).is(n.constraints)||(n.unbindFromParent(),e.is(n.el))||(n.constraints=e,n.bindToParent()):(n._constraintsUpdating=!0,p.each(n.constraints,p.proxy(n.removeConstraint,n)),p.each(p.makeArray(t),function(e,t){n.addConstraint(t)}),n._constraintsUpdating=!1,n.fixPosition()):n.unbindFromParent()},filteredLocation:function(e){var n=[],i={};if(p.each(this.type.dataComponents,function(){this.forLocations&&n.push(this.id)}),p.isPlainObject(e)&&p.each(e,function(e,t){t&&0<=n.indexOf(e)&&(i[e]=t)}),!p.isEmptyObject(i))return i.kladr_id?{kladr_id:i.kladr_id}:i},addConstraint:function(e){(e=new ee(e,this)).isValid()&&(this.constraints[e.id]=e).$el&&(this.$constraints.append(e.$el),this._constraintsUpdating||this.fixPosition())},removeConstraint:function(e){},constructConstraintsParams:function(){for(var e,t,n=[],i=this.constraints,r={};i instanceof p&&(e=i.suggestions())&&!(t=_.getDeepValue(e,"selection.data"));)i=e.constraints;return i instanceof p?(t=new j(t,e).getFields())&&(-1<this.bounds.own.indexOf("city")&&delete t.city_fias_id,r.locations=[t],r.restrict_value=!0):i&&(p.each(i,function(e,t){n=n.concat(t.getFields())}),n.length)&&(r.locations=n,r.restrict_value=this.options.restrict_value),r},getFirstConstraintLabel:function(){var e=p.isPlainObject(this.constraints)&&Object.keys(this.constraints)[0];return e?this.constraints[e].label:""},bindToParent:function(){this.constraints.on(["suggestions-select."+this.uniqueId,"suggestions-invalidateselection."+this.uniqueId,"suggestions-clear."+this.uniqueId].join(" "),p.proxy(this.onParentSelectionChanged,this)).on("suggestions-dispose."+this.uniqueId,p.proxy(this.onParentDispose,this))},unbindFromParent:function(){var e=this.constraints;e instanceof p&&e.off("."+this.uniqueId)},onParentSelectionChanged:function(e,t,n){"suggestions-select"===e.type&&!n||this.clear()},onParentDispose:function(e){this.unbindFromParent()},getParentInstance:function(){return this.constraints instanceof p&&this.constraints.suggestions()},shareWithParent:function(e){var n,t,i,r,s=this.getParentInstance();s&&s.type===this.type&&(n=e,i=(t=s).selection,(r=i&&i.data&&t.bounds)&&p.each(t.bounds.all,function(e,t){return r=i.data[t]===n.data[t]}),!r)&&(s.shareWithParent(e),s.setSuggestion(e))},getUnrestrictedData:function(n){var i=[],r={},s=-1;return p.each(this.constraints,function(e,t){p.each(t.locations,function(e,t){t.containsData(n)&&t.specificity>s&&(s=t.specificity)})}),0<=s?(n.region_kladr_id&&n.region_kladr_id===n.city_kladr_id&&i.push.apply(i,this.type.dataComponentsById.city.fields),p.each(this.type.dataComponents.slice(0,s+1),function(e,t){i.push.apply(i,t.fields)}),p.each(n,function(e,t){-1===i.indexOf(e)&&(r[e]=t)})):r=n,r}},p.extend(w,{constraints:null,restrict_value:!1}),p.extend(D.prototype,e),"GET"!=_.getDefaultType()&&A.on("initialize",e.createConstraints).on("setOptions",e.setupConstraints).on("fixPosition",e.setConstraintsPosition).on("requestParams",e.constructConstraintsParams).on("dispose",e.unbindFromParent),x={proceedQuery:function(e){e.length>=this.options.minChars?this.updateSuggestions(e):this.hide()},selectCurrentValue:function(t){var n=this,i=q();return n.inputPhase.resolve(),n.fetchPhase.done(function(){var e;n.selection&&!n.visible||(e=n.findSuggestionIndex(),n.select(e,t),-1===e)?i.reject():i.resolve(e)}).fail(function(){i.reject()}),i},selectFoundSuggestion:function(){this.requestMode.userSelect||this.select(0)},findSuggestionIndex:function(){var t,n=this,i=n.selectedIndex;return-1===i&&(t=n.el.val().trim())&&n.type.matchers.some(function(e){return-1!==(i=e(t,n.suggestions))}),i},select:function(n,i){var r,s=this,e=s.suggestions[n],t=i&&i.continueSelecting,o=s.currentValue;s.triggering.Select||(e?(r=s.hasSameValues(e),s.enrichSuggestion(e,i).done(function(e,t){t=v({hasBeenEnriched:t,hasSameValues:r},i);s.selectSuggestion(e,n,o,t)})):(t||s.selection||s.triggerOnSelectNothing(),s.onSelectComplete(t)))},selectSuggestion:function(e,t,n,i){var r=this,s=i.continueSelecting,o=!r.type.isDataComplete||r.type.isDataComplete.call(r,e),a=r.selection;r.triggering.Select||(r.type.alwaysContinueSelecting&&(s=!0),o&&(s=!1),i.hasBeenEnriched&&r.suggestions[t]&&(r.suggestions[t].data=e.data),r.requestMode.updateValue&&(r.checkValueBounds(e),r.currentValue=r.getSuggestionValue(e,i),!r.currentValue||i.noSpace||o||(r.currentValue+=" "),r.el.val(r.currentValue)),r.currentValue?(r.selection=e,r.areSuggestionsSame(e,a)||r.trigger("Select",e,r.currentValue!=n),r.requestMode.userSelect&&r.onSelectComplete(s)):(r.selection=null,r.triggerOnSelectNothing()),r.shareWithParent(e))},onSelectComplete:function(e){e?(this.selectedIndex=-1,this.updateSuggestions(this.currentValue)):this.hide()},triggerOnSelectNothing:function(){this.triggering.SelectNothing||this.trigger("SelectNothing",this.currentValue)},trigger:function(e){var t=_.slice(arguments,1),n=this.options["on"+e];this.triggering[e]=!0,_.isFunction(n)&&n.apply(this.element,t),this.el.trigger.call(this.el,"suggestions-"+e.toLowerCase(),t),this.triggering[e]=!1}},v(D.prototype,x),A.on("assignSuggestions",x.selectFoundSuggestion),y={setupBounds:function(){this.bounds={from:null,to:null}},setBoundsOptions:function(){var n,e=[],t=p.trim(this.options.bounds).split("-"),i=t[0],r=t[t.length-1],s=[],o=[];this.type.dataComponents&&p.each(this.type.dataComponents,function(){this.forBounds&&e.push(this.id)}),-1===p.inArray(i,e)&&(i=null),-1!==(t=p.inArray(r,e))&&t!==e.length-1||(r=null),(i||r)&&(n=!i,p.each(e,function(e,t){if(t==i&&(n=!0),o.push(t),n&&s.push(t),t==r)return!1})),this.bounds.from=i,this.bounds.to=r,this.bounds.all=o,this.bounds.own=s},constructBoundsParams:function(){var e={};return this.bounds.from&&(e.from_bound={value:this.bounds.from}),this.bounds.to&&(e.to_bound={value:this.bounds.to}),e},checkValueBounds:function(e){var t;this.bounds.own.length&&this.type.composeValue&&(1===(t=this.bounds.own.slice(0)).length&&"city_district"===t[0]&&t.push("city_district_fias_id"),t=this.copyDataComponents(e.data,t),e.value=this.type.composeValue(t))},copyDataComponents:function(n,e){var i={},r=this.type.dataComponentsById;return r&&p.each(e,function(e,t){p.each(r[t].fields,function(e,t){null!=n[t]&&(i[t]=n[t])})}),i},getBoundedKladrId:function(e,t){var n,i=t[t.length-1];return p.each(this.type.dataComponents,function(e,t){if(t.id===i)return n=t.kladrFormat,!1}),e.substr(0,n.digits)+new Array((n.zeros||0)+1).join("0")}};p.extend(w,{bounds:null}),p.extend(D.prototype,y),A.on("initialize",y.setupBounds).on("setOptions",y.setBoundsOptions).on("requestParams",y.constructBoundsParams),D.defaultOptions=w,D.version="18.3.1",p.Suggestions=D,p.fn.suggestions=function(n,i){return 0===arguments.length?this.first().data(h):this.each(function(){var e=p(this),t=e.data(h);"string"==typeof n?t&&"function"==typeof t[n]&&t[n](i):(t&&t.dispose&&t.dispose(),t=new D(this,n),e.data(h,t))})}}),function(he){"use strict";he.Zebra_DatePicker=function(e,ne){function t(e){if(!e)for(var t in Q.settings=he.extend({},ae,ne),Y.data())0===t.indexOf("zdp_")&&(t=t.replace(/^zdp\_/,""),void 0!==ae[t])&&(Q.settings[t]="pair"==t?he(Y.data("zdp_"+t)):Y.data("zdp_"+t));Q.settings.readonly_element&&Y.attr("readonly","readonly");var n={days:["d","j","D"],months:["F","m","M","n","t"],years:["o","Y","y"]},i=!1,r=!1,s=!1,o=null;for(o in n)he.each(n[o],function(e,t){-1<Q.settings.format.indexOf(t)&&("days"==o?i=!0:"months"==o?r=!0:"years"==o&&(s=!0))});U=i&&r&&s?["years","months","days"]:!i&&r&&s?["years","months"]:i&&r&&!s?["months","days"]:i||r||!s?i||!r||s?["years","months","days"]:["months"]:["years"],-1==he.inArray(Q.settings.view,U)&&(Q.settings.view=U[U.length-1]),z=[],H=[];for(var a,l=0;l<2;l++)a=0===l?Q.settings.disabled_dates:Q.settings.enabled_dates,he.isArray(a)&&0<a.length&&he.each(a,function(){for(var e=this.split(" "),t=0;t<4;t++){e[t]||(e[t]="*"),e[t]=-1<e[t].indexOf(",")?e[t].split(","):new Array(e[t]);for(var n=0;n<e[t].length;n++)if(-1<e[t][n].indexOf("-")){var i=e[t][n].match(/^([0-9]+)\-([0-9]+)/);if(null!==i){for(var r=ee(i[1]);r<=ee(i[2]);r++)-1==he.inArray(r,e[t])&&e[t].push(r+"");e[t].splice(n,1)}}for(n=0;n<e[t].length;n++)e[t][n]=isNaN(ee(e[t][n]))?e[t][n]:ee(e[t][n])}(0===l?z:H).push(e)});var u,c,d,h,f,p,g,m=new Date,v=Q.settings.reference_date||(Y.data("zdp_reference_date")&&void 0!==Y.data("zdp_reference_date")?Y.data("zdp_reference_date"):m);if(W=q=void 0,B=v.getMonth(),D=m.getMonth(),M=v.getFullYear(),E=m.getFullYear(),N=v.getDate(),L=m.getDate(),!0===Q.settings.direction)q=v;else if(!1===Q.settings.direction)V=(W=v).getMonth(),$=W.getFullYear(),ie=W.getDate();else if(!he.isArray(Q.settings.direction)&&K(Q.settings.direction)&&0<ee(Q.settings.direction)||he.isArray(Q.settings.direction)&&((u=le(Q.settings.direction[0]))||!0===Q.settings.direction[0]||K(Q.settings.direction[0])&&0<Q.settings.direction[0])&&((c=le(Q.settings.direction[1]))||!1===Q.settings.direction[1]||K(Q.settings.direction[1])&&0<=Q.settings.direction[1]))q=u||new Date(M,B,N+(he.isArray(Q.settings.direction)?ee(!0===Q.settings.direction[0]?0:Q.settings.direction[0]):ee(Q.settings.direction))),B=q.getMonth(),M=q.getFullYear(),N=q.getDate(),c&&+q<=+c?W=c:!c&&!1!==Q.settings.direction[1]&&he.isArray(Q.settings.direction)&&(W=new Date(M,B,N+ee(Q.settings.direction[1]))),W&&(V=W.getMonth(),$=W.getFullYear(),ie=W.getDate());else if(!he.isArray(Q.settings.direction)&&K(Q.settings.direction)&&ee(Q.settings.direction)<0||he.isArray(Q.settings.direction)&&(!1===Q.settings.direction[0]||K(Q.settings.direction[0])&&Q.settings.direction[0]<0)&&((u=le(Q.settings.direction[1]))||K(Q.settings.direction[1])&&0<=Q.settings.direction[1]))W=new Date(M,B,N+(he.isArray(Q.settings.direction)?ee(!1===Q.settings.direction[0]?0:Q.settings.direction[0]):ee(Q.settings.direction))),V=W.getMonth(),$=W.getFullYear(),ie=W.getDate(),u&&+u<+W?q=u:!u&&he.isArray(Q.settings.direction)&&(q=new Date($,V,ie-ee(Q.settings.direction[1]))),q&&(B=q.getMonth(),M=q.getFullYear(),N=q.getDate());else if(he.isArray(Q.settings.disabled_dates)&&0<Q.settings.disabled_dates.length)for(var y in z)if("*"==z[y][0]&&"*"==z[y][1]&&"*"==z[y][2]&&"*"==z[y][3]){var b,x=[];he.each(H,function(){"*"!=this[2][0]&&x.push(parseInt(this[2][0]+("*"==this[1][0]?"12":J(this[1][0],2))+("*"==this[0][0]?"*"==this[1][0]?"31":new Date(this[2][0],this[1][0],0).getDate():J(this[0][0],2)),10))}),x.sort(),0<x.length&&(b=(x[0]+"").match(/([0-9]{4})([0-9]{2})([0-9]{2})/),M=parseInt(b[1],10),B=parseInt(b[2],10)-1,N=parseInt(b[3],10));break}if(X(M,B,N)){for(;X(M);)B=q?(M++,0):(M--,11);for(;X(M,B);)N=q?(B++,1):(B--,new Date(M,B+1,0).getDate()),11<B?(M++,B=0,N=1):B<0&&(M--,B=11,N=new Date(M,B+1,0).getDate());for(;X(M,B,N);)q?N++:N--,m=new Date(M,B,N),M=m.getFullYear(),B=m.getMonth(),N=m.getDate();m=new Date(M,B,N),M=m.getFullYear(),B=m.getMonth(),N=m.getDate()}(v=le(Y.val()||Q.settings.start_date||""))&&Q.settings.strict&&X(v.getFullYear(),v.getMonth(),v.getDate())&&Y.val(""),e||de(q),Q.settings.always_visible||(e||((Q.settings.show_icon?("firefox"==te.name&&Y.is('input[type="text"]')&&"inline"==Y.css("display")&&Y.css("display","inline-block"),c=he('<span class="Zebra_DatePicker_Icon_Wrapper"></span>').css({display:Y.css("display"),position:"static"==Y.css("position")?"relative":Y.css("position"),float:Y.css("float"),top:Y.css("top"),right:Y.css("right"),bottom:Y.css("bottom"),left:Y.css("left")}),Y.wrap(c).css({position:"relative",top:"auto",right:"auto",bottom:"auto",left:"auto"}),C=he('<button type="button" class="Zebra_DatePicker_Icon'+("disabled"==Y.attr("disabled")?" Zebra_DatePicker_Icon_Disabled":"")+'">Pick a date</button>'),(Q.icon=C).add(Y)):Y).bind("click",function(e){e.preventDefault(),Y.attr("disabled")||("none"!=w.css("display")?Q.hide():Q.show())}),void 0!==C&&C.insertAfter(Y)),void 0!==C&&(C.attr("style",""),Q.settings.inside&&C.addClass("Zebra_DatePicker_Icon_Inside"),u=Y.outerWidth(),v=Y.outerHeight(),c=parseInt(Y.css("marginLeft"),10)||0,d=parseInt(Y.css("marginTop"),10)||0,g=C.outerWidth(),h=C.outerHeight(),f=parseInt(C.css("marginLeft"),10)||0,p=parseInt(C.css("marginRight"),10)||0,Q.settings.inside?C.css({top:d+(v-h)/2,left:c+(u-g-p)}):C.css({top:d+(v-h)/2,left:c+u+f}))),se=!1!==Q.settings.show_select_today&&-1<he.inArray("days",U)&&!X(E,D,L)&&Q.settings.show_select_today,e||(he(window).bind("resize.Zebra_DatePicker",function(){Q.hide(),void 0!==C&&(clearTimeout(oe),oe=setTimeout(function(){Q.update()},100))}),g='<div class="Zebra_DatePicker"><table class="dp_header"><tr><td class="dp_previous">'+Q.settings.header_navigation[0]+'</td><td class="dp_caption">&#032;</td><td class="dp_next">'+Q.settings.header_navigation[1]+'</td></tr></table><table class="dp_daypicker"></table><table class="dp_monthpicker"></table><table class="dp_yearpicker"></table><table class="dp_footer"><tr><td class="dp_today"'+(!1!==Q.settings.show_clear_date?' style="width:50%"':"")+">"+se+'</td><td class="dp_clear"'+(!1!==se?' style="width:50%"':"")+">"+Q.settings.lang_clear_date+"</td></tr></table></div>",w=he(g),Q.datepicker=w,S=he("table.dp_header",w),T=he("table.dp_daypicker",w),k=he("table.dp_monthpicker",w),F=he("table.dp_yearpicker",w),Z=he("table.dp_footer",w),re=he("td.dp_today",Z),A=he("td.dp_clear",Z),Q.settings.always_visible?Y.attr("disabled")||(Q.settings.always_visible.append(w),Q.show()):he("body").append(w),w.delegate("td:not(.dp_disabled, .dp_weekend_disabled, .dp_not_in_month, .dp_week_number)","mouseover",function(){he(this).addClass("dp_hover")}).delegate("td:not(.dp_disabled, .dp_weekend_disabled, .dp_not_in_month, .dp_week_number)","mouseout",function(){he(this).removeClass("dp_hover")}),ue(he("td",S)),he(".dp_previous",S).bind("click",function(){"months"==_?P--:"years"==_?P-=12:--j<0&&(j=11,P--),G()}),he(".dp_caption",S).bind("click",function(){_="days"==_?-1<he.inArray("months",U)?"months":-1<he.inArray("years",U)?"years":"days":"months"==_?-1<he.inArray("years",U)?"years":-1<he.inArray("days",U)?"days":"months":-1<he.inArray("days",U)?"days":-1<he.inArray("months",U)?"months":"years",G()}),he(".dp_next",S).bind("click",function(){"months"==_?P++:"years"==_?P+=12:12==++j&&(j=0,P++),G()}),T.delegate("td:not(.dp_disabled, .dp_weekend_disabled, .dp_not_in_month, .dp_week_number)","click",function(){Q.settings.select_other_months&&null!==(b=he(this).attr("class").match(/date\_([0-9]{4})(0[1-9]|1[012])(0[1-9]|[12][0-9]|3[01])/))?ce(b[1],b[2]-1,b[3],"days",he(this)):ce(P,j,ee(he(this).html()),"days",he(this))}),k.delegate("td:not(.dp_disabled)","click",function(){var e=he(this).attr("class").match(/dp\_month\_([0-9]+)/);j=ee(e[1]),-1==he.inArray("days",U)?ce(P,j,1,"months",he(this)):(_="days",Q.settings.always_visible&&Y.val(""),G())}),F.delegate("td:not(.dp_disabled)","click",function(){P=ee(he(this).html()),-1==he.inArray("months",U)?ce(P,1,1,"years",he(this)):(_="months",Q.settings.always_visible&&Y.val(""),G())}),he(re).bind("click",function(e){e.preventDefault(),ce(E,D,L,"days",he(".dp_current",T)),Q.settings.always_visible&&Q.show(),Q.hide()}),he(A).bind("click",function(e){e.preventDefault(),Y.val(""),Q.settings.always_visible?(I=O=R=null,he("td.dp_selected",w).removeClass("dp_selected")):P=j=I=O=R=null,Q.hide(),Q.settings.onClear&&"function"==typeof Q.settings.onClear&&Q.settings.onClear.call(Y,Y)}),Q.settings.always_visible||he(document).bind({"mousedown.Zebra_DatePicker":function(e){if("block"==w.css("display")){if(Q.settings.show_icon&&he(e.target).get(0)===C.get(0))return!0;0===he(e.target).parents().filter(".Zebra_DatePicker").length&&Q.hide()}},"keyup.Zebra_DatePicker":function(e){"block"==w.css("display")&&27==e.which&&Q.hide()}}),G())}var _,w,C,S,T,k,F,A,D,E,L,B,M,N,j,P,R,O,I,H,z,n,q,W,ie,$,V,f,l,u,U,re,Z,se,oe,ae={always_visible:!1,days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],days_abbr:!1,direction:0,disabled_dates:!1,enabled_dates:!1,first_day_of_week:1,format:"Y-m-d",header_captions:{days:"F, Y",months:"Y",years:"Y1 - Y2"},header_navigation:["&#171;","&#187;"],inside:!0,lang_clear_date:"Clear date",months:["January","February","March","April","May","June","July","August","September","October","November","December"],months_abbr:!1,offset:[5,-5],pair:!1,readonly_element:!0,select_other_months:!1,show_clear_date:0,show_icon:!0,show_other_months:!0,show_select_today:"Today",show_week_number:!1,start_date:!1,strict:!1,view:"days",weekend_days:[0,6],zero_pad:!1,onChange:null,onClear:null,onOpen:null,onSelect:null},Q=this,Y=(Q.settings={},he(e)),le=(Q.destroy=function(){void 0!==Q.icon&&Q.icon.remove(),Q.datepicker.remove(),he(document).unbind("keyup.Zebra_DatePicker"),he(document).unbind("mousedown.Zebra_DatePicker"),he(window).unbind("resize.Zebra_DatePicker"),Y.removeData("Zebra_DatePicker")},Q.hide=function(){Q.settings.always_visible||(d("hide"),w.hide())},Q.show=function(){_=Q.settings.view;var e,t,n,i,r,s,o,a=le(Y.val()||Q.settings.start_date||"");a?(O=a.getMonth(),j=a.getMonth(),I=a.getFullYear(),P=a.getFullYear(),R=a.getDate(),X(I,O,R)&&(Q.settings.strict&&Y.val(""),j=B,P=M)):(j=B,P=M),G(),Q.settings.always_visible?w.show():(a=w.outerWidth(),e=w.outerHeight(),t=(void 0!==C?C.offset().left+C.outerWidth(!0):Y.offset().left+Y.outerWidth(!0))+Q.settings.offset[0],n=(void 0!==C?C:Y).offset().top-e+Q.settings.offset[1],i=he(window).width(),r=he(window).height(),s=he(window).scrollTop(),o=he(window).scrollLeft(),w.css({left:t=(t=o+i<t+a?o+i-a:t)<o?o:t,top:n=(n=s+r<n+e?s+r-e:n)<s?s:n}),w.fadeIn("explorer"==te.name&&te.version<9?0:150,"linear"),d()),Q.settings.onOpen&&"function"==typeof Q.settings.onOpen&&Q.settings.onOpen.call(Y,Y)},Q.update=function(e){Q.original_direction&&(Q.original_direction=Q.direction),Q.settings=he.extend(Q.settings,e),t(!0)},function(e){if(""!==he.trim(e+="")){for(var t,n=g(Q.settings.format),i=["d","D","j","l","N","S","w","F","m","M","n","Y","y"],r=[],s=[],o=null,a=0;a<i.length;a++)-1<(t=n.indexOf(i[a]))&&r.push({character:i[a],position:t});if(r.sort(function(e,t){return e.position-t.position}),he.each(r,function(e,t){switch(t.character){case"d":s.push("0[1-9]|[12][0-9]|3[01]");break;case"D":s.push("[a-z]{3}");break;case"j":s.push("[1-9]|[12][0-9]|3[01]");break;case"l":s.push("[a-z]+");break;case"N":s.push("[1-7]");break;case"S":s.push("st|nd|rd|th");break;case"w":s.push("[0-6]");break;case"F":s.push("[a-z]+");break;case"m":s.push("0[1-9]|1[012]+");break;case"M":s.push("[a-z]{3}");break;case"n":s.push("[1-9]|1[012]");break;case"Y":s.push("[0-9]{4}");break;case"y":s.push("[0-9]{2}")}}),s.length&&(r.reverse(),he.each(r,function(e,t){n=n.replace(t.character,"("+s[s.length-e-1]+")")}),s=new RegExp("^"+n+"$","ig"),o=s.exec(e))){var l,e=new Date,u=e.getDate(),c=e.getMonth()+1,d=e.getFullYear(),h=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],f=["January","February","March","April","May","June","July","August","September","October","November","December"],p=!0;if(r.reverse(),he.each(r,function(n,i){if(!p)return!0;switch(i.character){case"m":case"n":c=ee(o[n+1]);break;case"d":case"j":u=ee(o[n+1]);break;case"D":case"l":case"F":case"M":l="D"==i.character||"l"==i.character?Q.settings.days:Q.settings.months,p=!1,he.each(l,function(e,t){if(p)return!0;if(o[n+1].toLowerCase()==t.substring(0,"D"==i.character||"M"==i.character?3:t.length).toLowerCase()){switch(i.character){case"D":o[n+1]=h[e].substring(0,3);break;case"l":o[n+1]=h[e];break;case"F":o[n+1]=f[e],c=e+1;break;case"M":o[n+1]=f[e].substring(0,3),c=e+1}p=!0}});break;case"Y":d=ee(o[n+1]);break;case"y":d="19"+ee(o[n+1])}}),p){e=new Date(d,(c||1)-1,u||1);if(e.getFullYear()==d&&e.getDate()==(u||1)&&e.getMonth()==(c||1)-1)return e}}return!1}}),ue=function(e){"firefox"==te.name?e.css("MozUserSelect","none"):"explorer"==te.name?e.bind("selectstart",function(){return!1}):e.mousedown(function(){return!1})},g=function(e){return e.replace(/([-.,*+?^${}()|[\]\/\\])/g,"\\$1")},c=function(e){for(var t="",n=e.getDate(),i=e.getDay(),r=Q.settings.days[i],s=e.getMonth()+1,o=Q.settings.months[s-1],a=e.getFullYear()+"",l=0;l<Q.settings.format.length;l++){var u=Q.settings.format.charAt(l);switch(u){case"y":a=a.substr(2);case"Y":t+=a;break;case"m":s=J(s,2);case"n":t+=s;break;case"M":o=he.isArray(Q.settings.months_abbr)&&void 0!==Q.settings.months_abbr[s-1]?Q.settings.months_abbr[s-1]:Q.settings.months[s-1].substr(0,3);case"F":t+=o;break;case"d":n=J(n,2);case"j":t+=n;break;case"D":r=he.isArray(Q.settings.days_abbr)&&void 0!==Q.settings.days_abbr[i]?Q.settings.days_abbr[i]:Q.settings.days[i].substr(0,3);case"l":t+=r;break;case"N":i++;case"w":t+=i;break;case"S":t+=n%10==1&&"11"!=n?"st":n%10==2&&"12"!=n?"nd":n%10==3&&"13"!=n?"rd":"th";break;default:t+=u}}return t},i=function(){var e=new Date(P,j+1,0).getDate(),t=new Date(P,j,1).getDay(),n=new Date(P,j,0).getDate(),i=(i=t-Q.settings.first_day_of_week)<0?7+i:i,r=(p(Q.settings.header_captions.days),"<tr>");Q.settings.show_week_number&&(r+="<th>"+Q.settings.show_week_number+"</th>");for(var s=0;s<7;s++)r+="<th>"+(he.isArray(Q.settings.days_abbr)&&void 0!==Q.settings.days_abbr[(Q.settings.first_day_of_week+s)%7]?Q.settings.days_abbr[(Q.settings.first_day_of_week+s)%7]:Q.settings.days[(Q.settings.first_day_of_week+s)%7].substr(0,2))+"</th>";for(r+="</tr><tr>",s=0;s<42;s++){0<s&&s%7==0&&(r+="</tr><tr>"),s%7==0&&Q.settings.show_week_number&&(r+='<td class="dp_week_number">'+m(new Date(P,j,s-i+1))+"</td>");var o,a,l,u,c,d,h=s-i+1;Q.settings.select_other_months&&(s<i||e<h)&&(o=(u=new Date(P,j,h)).getFullYear(),a=u.getMonth(),l=u.getDate(),u=o+J(a+1,2)+J(l,2)),s<i?r+='<td class="'+(Q.settings.select_other_months&&!X(o,a,l)?"dp_not_in_month_selectable date_"+u:"dp_not_in_month")+'">'+(Q.settings.select_other_months||Q.settings.show_other_months?J(n-i+s+1,Q.settings.zero_pad?2:0):"&nbsp;")+"</td>":e<h?r+='<td class="'+(Q.settings.select_other_months&&!X(o,a,l)?"dp_not_in_month_selectable date_"+u:"dp_not_in_month")+'">'+(Q.settings.select_other_months||Q.settings.show_other_months?J(h-e,Q.settings.zero_pad?2:0):"&nbsp;")+"</td>":(c=(Q.settings.first_day_of_week+s)%7,d="",X(P,j,h)?(-1<he.inArray(c,Q.settings.weekend_days)?d="dp_weekend_disabled":d+=" dp_disabled",j==D&&P==E&&L==h&&(d+=" dp_disabled_current")):(-1<he.inArray(c,Q.settings.weekend_days)&&(d="dp_weekend"),j==O&&P==I&&R==h&&(d+=" dp_selected"),j==D&&P==E&&L==h&&(d+=" dp_current")),r+="<td"+(""!==d?' class="'+he.trim(d)+'"':"")+">"+(Q.settings.zero_pad?J(h,2):h)+"</td>")}T.html(he(r+="</tr>")),Q.settings.always_visible&&(f=he("td:not(.dp_disabled, .dp_weekend_disabled, .dp_not_in_month, .dp_week_number)",T)),T.show()},r=function(){p(Q.settings.header_captions.months);for(var e="<tr>",t=0;t<12;t++){0<t&&t%3==0&&(e+="</tr><tr>");var n="dp_month_"+t;X(P,t)?n+=" dp_disabled":!1!==O&&O==t&&P==I?n+=" dp_selected":D==t&&E==P&&(n+=" dp_current"),e+='<td class="'+he.trim(n)+'">'+(he.isArray(Q.settings.months_abbr)&&void 0!==Q.settings.months_abbr[t]?Q.settings.months_abbr[t]:Q.settings.months[t].substr(0,3))+"</td>"}k.html(he(e+="</tr>")),Q.settings.always_visible&&(l=he("td:not(.dp_disabled)",k)),k.show()},s=function(){p(Q.settings.header_captions.years);for(var e="<tr>",t=0;t<12;t++){0<t&&t%3==0&&(e+="</tr><tr>");var n="";X(P-7+t)?n+=" dp_disabled":I&&I==P-7+t?n+=" dp_selected":E==P-7+t&&(n+=" dp_current"),e+="<td"+(""!==he.trim(n)?' class="'+he.trim(n)+'"':"")+">"+(P-7+t)+"</td>"}F.html(he(e+="</tr>")),Q.settings.always_visible&&(u=he("td:not(.dp_disabled)",F)),F.show()},d=function(e){var t;"explorer"==te.name&&6==te.version&&(n||(t=ee(w.css("zIndex"))-1,n=he("<iframe>",{src:'javascript:document.write("")',scrolling:"no",frameborder:0,css:{zIndex:t,position:"absolute",top:-1e3,left:-1e3,width:w.outerWidth(),height:w.outerHeight(),filter:"progid:DXImageTransform.Microsoft.Alpha(opacity=0)",display:"none"}}),he("body").append(n)),"hide"===e?n.hide():(t=w.offset(),n.css({top:t.top,left:t.left,display:"block"})))},X=function(t,n,i){if((void 0===t||isNaN(t))&&(void 0===n||isNaN(n))&&(void 0===i||isNaN(i)))return!1;if(he.isArray(Q.settings.direction)||0!==ee(Q.settings.direction)){var e=ee(a(t,void 0!==n?J(n,2):"",void 0!==i?J(i,2):"")),r=(e+"").length;if(8==r&&(void 0!==q&&e<ee(a(M,J(B,2),J(N,2)))||void 0!==W&&e>ee(a($,J(V,2),J(ie,2)))))return!0;if(6==r&&(void 0!==q&&e<ee(a(M,J(B,2)))||void 0!==W&&e>ee(a($,J(V,2)))))return!0;if(4==r&&(void 0!==q&&e<M||void 0!==W&&$<e))return!0}void 0!==n&&(n+=1);var s=!1,o=!1;return z&&he.each(z,function(){var e;return!s&&(-1<he.inArray(t,this[2])||-1<he.inArray("*",this[2]))&&(void 0!==n&&-1<he.inArray(n,this[1])||-1<he.inArray("*",this[1]))&&(void 0!==i&&-1<he.inArray(i,this[0])||-1<he.inArray("*",this[0]))&&("*"==this[3]||(e=new Date(t,n-1,i).getDay(),-1<he.inArray(e,this[3])))?s=!0:void 0}),H&&he.each(H,function(){if(!o){var e;if((-1<he.inArray(t,this[2])||-1<he.inArray("*",this[2]))&&(o=!0,void 0!==n))if(o=!0,-1<he.inArray(n,this[1])||-1<he.inArray("*",this[1])){if(void 0!==i){if(o=!0,-1<he.inArray(i,this[0])||-1<he.inArray("*",this[0]))return"*"==this[3]||(e=new Date(t,n-1,i).getDay(),-1<he.inArray(e,this[3]))?o=!0:void(o=!1);o=!1}}else o=!1}}),!(H&&o||!z||!s)},K=function(e){return!!(e+"").match(/^\-?[0-9]+$/)},p=function(e){!isNaN(parseFloat(j))&&isFinite(j)&&(e=e.replace(/\bm\b|\bn\b|\bF\b|\bM\b/,function(e){switch(e){case"m":return J(j+1,2);case"n":return j+1;case"F":return Q.settings.months[j];case"M":return he.isArray(Q.settings.months_abbr)&&void 0!==Q.settings.months_abbr[j]?Q.settings.months_abbr[j]:Q.settings.months[j].substr(0,3);default:return e}})),!isNaN(parseFloat(P))&&isFinite(P)&&(e=e.replace(/\bY\b/,P).replace(/\by\b/,(P+"").substr(2)).replace(/\bY1\b/i,P-7).replace(/\bY2\b/i,P+4)),he(".dp_caption",S).html(e)},G=function(){var e,t;""===T.text()||"days"==_?(""===T.text()?(Q.settings.always_visible||w.css("left",-1e3),w.show(),i(),e=T.outerWidth(),t=T.outerHeight(),k.css({width:e,height:t}),F.css({width:e,height:t}),S.css("width",e),Z.css("width",e),w.hide()):i(),k.hide(),F.hide()):"months"==_?(r(),T.hide(),F.hide()):"years"==_&&(s(),T.hide(),k.hide()),Q.settings.onChange&&"function"==typeof Q.settings.onChange&&void 0!==_&&((t=("days"==_?T:"months"==_?k:F).find("td:not(.dp_disabled, .dp_weekend_disabled, .dp_not_in_month)")).each(function(){var e;"days"==_?he(this).hasClass("dp_not_in_month_selectable")?(e=he(this).attr("class").match(/date\_([0-9]{4})(0[1-9]|1[012])(0[1-9]|[12][0-9]|3[01])/),he(this).data("date",e[1]+"-"+e[2]+"-"+e[3])):he(this).data("date",P+"-"+J(j+1,2)+"-"+J(ee(he(this).text()),2)):"months"==_?(e=he(this).attr("class").match(/dp\_month\_([0-9]+)/),he(this).data("date",P+"-"+J(ee(e[1])+1,2))):he(this).data("date",ee(he(this).text()))}),Q.settings.onChange.call(Y,_,t,Y)),Z.show(),!0===Q.settings.show_clear_date||0===Q.settings.show_clear_date&&""!==Y.val()||Q.settings.always_visible&&!1!==Q.settings.show_clear_date?(A.show(),se?(re.css("width","50%"),A.css("width","50%")):(re.hide(),A.css("width","100%"))):(A.hide(),se?re.show().css("width","100%"):Z.hide())},ce=function(e,t,n,i,r){var s=new Date(e,t,n,12,0,0),o="days"==i?f:"months"==i?l:u,a=c(s);Y.val(a),Q.settings.always_visible&&(O=s.getMonth(),j=s.getMonth(),I=s.getFullYear(),P=s.getFullYear(),R=s.getDate(),o.removeClass("dp_selected"),r.addClass("dp_selected"),"days"==i)&&r.hasClass("dp_not_in_month_selectable")&&Q.show(),Q.hide(),de(s),Q.settings.onSelect&&"function"==typeof Q.settings.onSelect&&Q.settings.onSelect.call(Y,a,e+"-"+J(t+1,2)+"-"+J(n,2),s,Y,m(s)),Y.focus()},a=function(){for(var e="",t=0;t<arguments.length;t++)e+=arguments[t]+"";return e},J=function(e,t){for(e+="";e.length<t;)e="0"+e;return e},ee=function(e){return parseInt(e,10)},de=function(n){Q.settings.pair&&he.each(Q.settings.pair,function(){var e,t=he(this);t.data&&t.data("Zebra_DatePicker")?((e=t.data("Zebra_DatePicker")).update({reference_date:n,direction:0===e.settings.direction?1:e.settings.direction}),e.settings.always_visible&&e.show()):t.data("zdp_reference_date",n)})},m=function(e){var t,n,i,r,s=e.getFullYear(),o=e.getMonth()+1,e=e.getDate(),s=o<3?(i=(n=((t=s-1)/4|0)-(t/100|0)+(t/400|0))-(((t-1)/4|0)-((t-1)/100|0)+((t-1)/400|0)),r=0,e-1+31*(o-1)):(r=(i=(n=((t=s)/4|0)-(t/100|0)+(t/400|0))-(((t-1)/4|0)-((t-1)/100|0)+((t-1)/400|0)))+1,e+((153*(o-3)+2)/5|0)+58+i),e=(t+n)%7,o=s+3-(s+e-r)%7;return o<0?53-((e-i)/5|0):364+i<o?1:1+(o/7|0)},te={init:function(){this.name=this.searchString(this.dataBrowser)||"",this.version=this.searchVersion(navigator.userAgent)||this.searchVersion(navigator.appVersion)||""},searchString:function(e){for(var t=0;t<e.length;t++){var n=e[t].string,i=e[t].prop;if(this.versionSearchString=e[t].versionSearch||e[t].identity,n){if(-1!=n.indexOf(e[t].subString))return e[t].identity}else if(i)return e[t].identity}},searchVersion:function(e){var t=e.indexOf(this.versionSearchString);if(-1!=t)return parseFloat(e.substring(t+this.versionSearchString.length+1))},dataBrowser:[{string:navigator.userAgent,subString:"Firefox",identity:"firefox"},{string:navigator.userAgent,subString:"MSIE",identity:"explorer",versionSearch:"MSIE"}]};te.init(),t()},he.fn.Zebra_DatePicker=function(t){return this.each(function(){void 0!==he(this).data("Zebra_DatePicker")&&he(this).data("Zebra_DatePicker").destroy();var e=new he.Zebra_DatePicker(this,t);he(this).data("Zebra_DatePicker",e)})}}(jQuery);