mirror of
https://github.com/internetee/registry.git
synced 2025-05-20 11:19:39 +02:00
201 lines
No EOL
317 KiB
JavaScript
201 lines
No EOL
317 KiB
JavaScript
/*!
|
||
* jQuery JavaScript Library v1.11.2
|
||
* http://jquery.com/
|
||
*
|
||
* Includes Sizzle.js
|
||
* http://sizzlejs.com/
|
||
*
|
||
* Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors
|
||
* Released under the MIT license
|
||
* http://jquery.org/license
|
||
*
|
||
* Date: 2014-12-17T15:27Z
|
||
*/
|
||
!function(t,e){"object"==typeof module&&"object"==typeof module.exports?module.exports=t.document?e(t,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return e(t)}:e(t)}("undefined"!=typeof window?window:this,function(t,e){function n(t){var e=t.length,n=re.type(t);return"function"===n||re.isWindow(t)?!1:1===t.nodeType&&e?!0:"array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t}function i(t,e,n){if(re.isFunction(e))return re.grep(t,function(t,i){return!!e.call(t,i,t)!==n});if(e.nodeType)return re.grep(t,function(t){return t===e!==n});if("string"==typeof e){if(he.test(e))return re.filter(e,t,n);e=re.filter(e,t)}return re.grep(t,function(t){return re.inArray(t,e)>=0!==n})}function r(t,e){do t=t[e];while(t&&1!==t.nodeType);return t}function o(t){var e=we[t]={};return re.each(t.match(be)||[],function(t,n){e[n]=!0}),e}function a(){fe.addEventListener?(fe.removeEventListener("DOMContentLoaded",s,!1),t.removeEventListener("load",s,!1)):(fe.detachEvent("onreadystatechange",s),t.detachEvent("onload",s))}function s(){(fe.addEventListener||"load"===event.type||"complete"===fe.readyState)&&(a(),re.ready())}function l(t,e,n){if(void 0===n&&1===t.nodeType){var i="data-"+e.replace(De,"-$1").toLowerCase();if(n=t.getAttribute(i),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:_e.test(n)?re.parseJSON(n):n}catch(r){}re.data(t,e,n)}else n=void 0}return n}function u(t){var e;for(e in t)if(("data"!==e||!re.isEmptyObject(t[e]))&&"toJSON"!==e)return!1;return!0}function c(t,e,n,i){if(re.acceptData(t)){var r,o,a=re.expando,s=t.nodeType,l=s?re.cache:t,u=s?t[a]:t[a]&&a;if(u&&l[u]&&(i||l[u].data)||void 0!==n||"string"!=typeof e)return u||(u=s?t[a]=V.pop()||re.guid++:a),l[u]||(l[u]=s?{}:{toJSON:re.noop}),("object"==typeof e||"function"==typeof e)&&(i?l[u]=re.extend(l[u],e):l[u].data=re.extend(l[u].data,e)),o=l[u],i||(o.data||(o.data={}),o=o.data),void 0!==n&&(o[re.camelCase(e)]=n),"string"==typeof e?(r=o[e],null==r&&(r=o[re.camelCase(e)])):r=o,r}}function d(t,e,n){if(re.acceptData(t)){var i,r,o=t.nodeType,a=o?re.cache:t,s=o?t[re.expando]:re.expando;if(a[s]){if(e&&(i=n?a[s]:a[s].data)){re.isArray(e)?e=e.concat(re.map(e,re.camelCase)):e in i?e=[e]:(e=re.camelCase(e),e=e in i?[e]:e.split(" ")),r=e.length;for(;r--;)delete i[e[r]];if(n?!u(i):!re.isEmptyObject(i))return}(n||(delete a[s].data,u(a[s])))&&(o?re.cleanData([t],!0):ne.deleteExpando||a!=a.window?delete a[s]:a[s]=null)}}}function h(){return!0}function p(){return!1}function f(){try{return fe.activeElement}catch(t){}}function g(t){var e=Le.split("|"),n=t.createDocumentFragment();if(n.createElement)for(;e.length;)n.createElement(e.pop());return n}function m(t,e){var n,i,r=0,o=typeof t.getElementsByTagName!==Ce?t.getElementsByTagName(e||"*"):typeof t.querySelectorAll!==Ce?t.querySelectorAll(e||"*"):void 0;if(!o)for(o=[],n=t.childNodes||t;null!=(i=n[r]);r++)!e||re.nodeName(i,e)?o.push(i):re.merge(o,m(i,e));return void 0===e||e&&re.nodeName(t,e)?re.merge([t],o):o}function v(t){Ee.test(t.type)&&(t.defaultChecked=t.checked)}function y(t,e){return re.nodeName(t,"table")&&re.nodeName(11!==e.nodeType?e:e.firstChild,"tr")?t.getElementsByTagName("tbody")[0]||t.appendChild(t.ownerDocument.createElement("tbody")):t}function b(t){return t.type=(null!==re.find.attr(t,"type"))+"/"+t.type,t}function w(t){var e=Ye.exec(t.type);return e?t.type=e[1]:t.removeAttribute("type"),t}function x(t,e){for(var n,i=0;null!=(n=t[i]);i++)re._data(n,"globalEval",!e||re._data(e[i],"globalEval"))}function k(t,e){if(1===e.nodeType&&re.hasData(t)){var n,i,r,o=re._data(t),a=re._data(e,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(i=0,r=s[n].length;r>i;i++)re.event.add(e,n,s[n][i])}a.data&&(a.data=re.extend({},a.data))}}function C(t,e){var n,i,r;if(1===e.nodeType){if(n=e.nodeName.toLowerCase(),!ne.noCloneEvent&&e[re.expando]){r=re._data(e);for(i in r.events)re.removeEvent(e,i,r.handle);e.removeAttribute(re.expando)}"script"===n&&e.text!==t.text?(b(e).text=t.text,w(e)):"object"===n?(e.parentNode&&(e.outerHTML=t.outerHTML),ne.html5Clone&&t.innerHTML&&!re.trim(e.innerHTML)&&(e.innerHTML=t.innerHTML)):"input"===n&&Ee.test(t.type)?(e.defaultChecked=e.checked=t.checked,e.value!==t.value&&(e.value=t.value)):"option"===n?e.defaultSelected=e.selected=t.defaultSelected:("input"===n||"textarea"===n)&&(e.defaultValue=t.defaultValue)}}function _(e,n){var i,r=re(n.createElement(e)).appendTo(n.body),o=t.getDefaultComputedStyle&&(i=t.getDefaultComputedStyle(r[0]))?i.display:re.css(r[0],"display");return r.detach(),o}function D(t){var e=fe,n=Je[t];return n||(n=_(t,e),"none"!==n&&n||(Ge=(Ge||re("<iframe frameborder='0' width='0' height='0'/>")).appendTo(e.documentElement),e=(Ge[0].contentWindow||Ge[0].contentDocument).document,e.write(),e.close(),n=_(t,e),Ge.detach()),Je[t]=n),n}function T(t,e){return{get:function(){var n=t();if(null!=n)return n?void delete this.get:(this.get=e).apply(this,arguments)}}}function S(t,e){if(e in t)return e;for(var n=e.charAt(0).toUpperCase()+e.slice(1),i=e,r=pn.length;r--;)if(e=pn[r]+n,e in t)return e;return i}function A(t,e){for(var n,i,r,o=[],a=0,s=t.length;s>a;a++)i=t[a],i.style&&(o[a]=re._data(i,"olddisplay"),n=i.style.display,e?(o[a]||"none"!==n||(i.style.display=""),""===i.style.display&&Ae(i)&&(o[a]=re._data(i,"olddisplay",D(i.nodeName)))):(r=Ae(i),(n&&"none"!==n||!r)&&re._data(i,"olddisplay",r?n:re.css(i,"display"))));for(a=0;s>a;a++)i=t[a],i.style&&(e&&"none"!==i.style.display&&""!==i.style.display||(i.style.display=e?o[a]||"":"none"));return t}function F(t,e,n){var i=un.exec(e);return i?Math.max(0,i[1]-(n||0))+(i[2]||"px"):e}function E(t,e,n,i,r){for(var o=n===(i?"border":"content")?4:"width"===e?1:0,a=0;4>o;o+=2)"margin"===n&&(a+=re.css(t,n+Se[o],!0,r)),i?("content"===n&&(a-=re.css(t,"padding"+Se[o],!0,r)),"margin"!==n&&(a-=re.css(t,"border"+Se[o]+"Width",!0,r))):(a+=re.css(t,"padding"+Se[o],!0,r),"padding"!==n&&(a+=re.css(t,"border"+Se[o]+"Width",!0,r)));return a}function $(t,e,n){var i=!0,r="width"===e?t.offsetWidth:t.offsetHeight,o=tn(t),a=ne.boxSizing&&"border-box"===re.css(t,"boxSizing",!1,o);if(0>=r||null==r){if(r=en(t,e,o),(0>r||null==r)&&(r=t.style[e]),rn.test(r))return r;i=a&&(ne.boxSizingReliable()||r===t.style[e]),r=parseFloat(r)||0}return r+E(t,e,n||(a?"border":"content"),i,o)+"px"}function N(t,e,n,i,r){return new N.prototype.init(t,e,n,i,r)}function I(){return setTimeout(function(){fn=void 0}),fn=re.now()}function O(t,e){var n,i={height:t},r=0;for(e=e?1:0;4>r;r+=2-e)n=Se[r],i["margin"+n]=i["padding"+n]=t;return e&&(i.opacity=i.width=t),i}function M(t,e,n){for(var i,r=(wn[e]||[]).concat(wn["*"]),o=0,a=r.length;a>o;o++)if(i=r[o].call(n,e,t))return i}function L(t,e,n){var i,r,o,a,s,l,u,c,d=this,h={},p=t.style,f=t.nodeType&&Ae(t),g=re._data(t,"fxshow");n.queue||(s=re._queueHooks(t,"fx"),null==s.unqueued&&(s.unqueued=0,l=s.empty.fire,s.empty.fire=function(){s.unqueued||l()}),s.unqueued++,d.always(function(){d.always(function(){s.unqueued--,re.queue(t,"fx").length||s.empty.fire()})})),1===t.nodeType&&("height"in e||"width"in e)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],u=re.css(t,"display"),c="none"===u?re._data(t,"olddisplay")||D(t.nodeName):u,"inline"===c&&"none"===re.css(t,"float")&&(ne.inlineBlockNeedsLayout&&"inline"!==D(t.nodeName)?p.zoom=1:p.display="inline-block")),n.overflow&&(p.overflow="hidden",ne.shrinkWrapBlocks()||d.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(i in e)if(r=e[i],mn.exec(r)){if(delete e[i],o=o||"toggle"===r,r===(f?"hide":"show")){if("show"!==r||!g||void 0===g[i])continue;f=!0}h[i]=g&&g[i]||re.style(t,i)}else u=void 0;if(re.isEmptyObject(h))"inline"===("none"===u?D(t.nodeName):u)&&(p.display=u);else{g?"hidden"in g&&(f=g.hidden):g=re._data(t,"fxshow",{}),o&&(g.hidden=!f),f?re(t).show():d.done(function(){re(t).hide()}),d.done(function(){var e;re._removeData(t,"fxshow");for(e in h)re.style(t,e,h[e])});for(i in h)a=M(f?g[i]:0,i,d),i in g||(g[i]=a.start,f&&(a.end=a.start,a.start="width"===i||"height"===i?1:0))}}function j(t,e){var n,i,r,o,a;for(n in t)if(i=re.camelCase(n),r=e[i],o=t[n],re.isArray(o)&&(r=o[1],o=t[n]=o[0]),n!==i&&(t[i]=o,delete t[n]),a=re.cssHooks[i],a&&"expand"in a){o=a.expand(o),delete t[i];for(n in o)n in t||(t[n]=o[n],e[n]=r)}else e[i]=r}function R(t,e,n){var i,r,o=0,a=bn.length,s=re.Deferred().always(function(){delete l.elem}),l=function(){if(r)return!1;for(var e=fn||I(),n=Math.max(0,u.startTime+u.duration-e),i=n/u.duration||0,o=1-i,a=0,l=u.tweens.length;l>a;a++)u.tweens[a].run(o);return s.notifyWith(t,[u,o,n]),1>o&&l?n:(s.resolveWith(t,[u]),!1)},u=s.promise({elem:t,props:re.extend({},e),opts:re.extend(!0,{specialEasing:{}},n),originalProperties:e,originalOptions:n,startTime:fn||I(),duration:n.duration,tweens:[],createTween:function(e,n){var i=re.Tween(t,u.opts,e,n,u.opts.specialEasing[e]||u.opts.easing);return u.tweens.push(i),i},stop:function(e){var n=0,i=e?u.tweens.length:0;if(r)return this;for(r=!0;i>n;n++)u.tweens[n].run(1);return e?s.resolveWith(t,[u,e]):s.rejectWith(t,[u,e]),this}}),c=u.props;for(j(c,u.opts.specialEasing);a>o;o++)if(i=bn[o].call(u,t,c,u.opts))return i;return re.map(c,M,u),re.isFunction(u.opts.start)&&u.opts.start.call(t,u),re.fx.timer(re.extend(l,{elem:t,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function P(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var i,r=0,o=e.toLowerCase().match(be)||[];if(re.isFunction(n))for(;i=o[r++];)"+"===i.charAt(0)?(i=i.slice(1)||"*",(t[i]=t[i]||[]).unshift(n)):(t[i]=t[i]||[]).push(n)}}function H(t,e,n,i){function r(s){var l;return o[s]=!0,re.each(t[s]||[],function(t,s){var u=s(e,n,i);return"string"!=typeof u||a||o[u]?a?!(l=u):void 0:(e.dataTypes.unshift(u),r(u),!1)}),l}var o={},a=t===Wn;return r(e.dataTypes[0])||!o["*"]&&r("*")}function q(t,e){var n,i,r=re.ajaxSettings.flatOptions||{};for(i in e)void 0!==e[i]&&((r[i]?t:n||(n={}))[i]=e[i]);return n&&re.extend(!0,t,n),t}function z(t,e,n){for(var i,r,o,a,s=t.contents,l=t.dataTypes;"*"===l[0];)l.shift(),void 0===r&&(r=t.mimeType||e.getResponseHeader("Content-Type"));if(r)for(a in s)if(s[a]&&s[a].test(r)){l.unshift(a);break}if(l[0]in n)o=l[0];else{for(a in n){if(!l[0]||t.converters[a+" "+l[0]]){o=a;break}i||(i=a)}o=o||i}return o?(o!==l[0]&&l.unshift(o),n[o]):void 0}function B(t,e,n,i){var r,o,a,s,l,u={},c=t.dataTypes.slice();if(c[1])for(a in t.converters)u[a.toLowerCase()]=t.converters[a];for(o=c.shift();o;)if(t.responseFields[o]&&(n[t.responseFields[o]]=e),!l&&i&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(a=u[l+" "+o]||u["* "+o],!a)for(r in u)if(s=r.split(" "),s[1]===o&&(a=u[l+" "+s[0]]||u["* "+s[0]])){a===!0?a=u[r]:u[r]!==!0&&(o=s[0],c.unshift(s[1]));break}if(a!==!0)if(a&&t["throws"])e=a(e);else try{e=a(e)}catch(d){return{state:"parsererror",error:a?d:"No conversion from "+l+" to "+o}}}return{state:"success",data:e}}function W(t,e,n,i){var r;if(re.isArray(e))re.each(e,function(e,r){n||Vn.test(t)?i(t,r):W(t+"["+("object"==typeof r?e:"")+"]",r,n,i)});else if(n||"object"!==re.type(e))i(t,e);else for(r in e)W(t+"["+r+"]",e[r],n,i)}function K(){try{return new t.XMLHttpRequest}catch(e){}}function U(){try{return new t.ActiveXObject("Microsoft.XMLHTTP")}catch(e){}}function Y(t){return re.isWindow(t)?t:9===t.nodeType?t.defaultView||t.parentWindow:!1}var V=[],Z=V.slice,Q=V.concat,X=V.push,G=V.indexOf,J={},te=J.toString,ee=J.hasOwnProperty,ne={},ie="1.11.2",re=function(t,e){return new re.fn.init(t,e)},oe=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,ae=/^-ms-/,se=/-([\da-z])/gi,le=function(t,e){return e.toUpperCase()};re.fn=re.prototype={jquery:ie,constructor:re,selector:"",length:0,toArray:function(){return Z.call(this)},get:function(t){return null!=t?0>t?this[t+this.length]:this[t]:Z.call(this)},pushStack:function(t){var e=re.merge(this.constructor(),t);return e.prevObject=this,e.context=this.context,e},each:function(t,e){return re.each(this,t,e)},map:function(t){return this.pushStack(re.map(this,function(e,n){return t.call(e,n,e)}))},slice:function(){return this.pushStack(Z.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(t){var e=this.length,n=+t+(0>t?e:0);return this.pushStack(n>=0&&e>n?[this[n]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:X,sort:V.sort,splice:V.splice},re.extend=re.fn.extend=function(){var t,e,n,i,r,o,a=arguments[0]||{},s=1,l=arguments.length,u=!1;for("boolean"==typeof a&&(u=a,a=arguments[s]||{},s++),"object"==typeof a||re.isFunction(a)||(a={}),s===l&&(a=this,s--);l>s;s++)if(null!=(r=arguments[s]))for(i in r)t=a[i],n=r[i],a!==n&&(u&&n&&(re.isPlainObject(n)||(e=re.isArray(n)))?(e?(e=!1,o=t&&re.isArray(t)?t:[]):o=t&&re.isPlainObject(t)?t:{},a[i]=re.extend(u,o,n)):void 0!==n&&(a[i]=n));return a},re.extend({expando:"jQuery"+(ie+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isFunction:function(t){return"function"===re.type(t)},isArray:Array.isArray||function(t){return"array"===re.type(t)},isWindow:function(t){return null!=t&&t==t.window},isNumeric:function(t){return!re.isArray(t)&&t-parseFloat(t)+1>=0},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},isPlainObject:function(t){var e;if(!t||"object"!==re.type(t)||t.nodeType||re.isWindow(t))return!1;try{if(t.constructor&&!ee.call(t,"constructor")&&!ee.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}if(ne.ownLast)for(e in t)return ee.call(t,e);for(e in t);return void 0===e||ee.call(t,e)},type:function(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?J[te.call(t)]||"object":typeof t},globalEval:function(e){e&&re.trim(e)&&(t.execScript||function(e){t.eval.call(t,e)})(e)},camelCase:function(t){return t.replace(ae,"ms-").replace(se,le)},nodeName:function(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()},each:function(t,e,i){var r,o=0,a=t.length,s=n(t);if(i){if(s)for(;a>o&&(r=e.apply(t[o],i),r!==!1);o++);else for(o in t)if(r=e.apply(t[o],i),r===!1)break}else if(s)for(;a>o&&(r=e.call(t[o],o,t[o]),r!==!1);o++);else for(o in t)if(r=e.call(t[o],o,t[o]),r===!1)break;return t},trim:function(t){return null==t?"":(t+"").replace(oe,"")},makeArray:function(t,e){var i=e||[];return null!=t&&(n(Object(t))?re.merge(i,"string"==typeof t?[t]:t):X.call(i,t)),i},inArray:function(t,e,n){var i;if(e){if(G)return G.call(e,t,n);for(i=e.length,n=n?0>n?Math.max(0,i+n):n:0;i>n;n++)if(n in e&&e[n]===t)return n}return-1},merge:function(t,e){for(var n=+e.length,i=0,r=t.length;n>i;)t[r++]=e[i++];if(n!==n)for(;void 0!==e[i];)t[r++]=e[i++];return t.length=r,t},grep:function(t,e,n){for(var i,r=[],o=0,a=t.length,s=!n;a>o;o++)i=!e(t[o],o),i!==s&&r.push(t[o]);return r},map:function(t,e,i){var r,o=0,a=t.length,s=n(t),l=[];if(s)for(;a>o;o++)r=e(t[o],o,i),null!=r&&l.push(r);else for(o in t)r=e(t[o],o,i),null!=r&&l.push(r);return Q.apply([],l)},guid:1,proxy:function(t,e){var n,i,r;return"string"==typeof e&&(r=t[e],e=t,t=r),re.isFunction(t)?(n=Z.call(arguments,2),i=function(){return t.apply(e||this,n.concat(Z.call(arguments)))},i.guid=t.guid=t.guid||re.guid++,i):void 0},now:function(){return+new Date},support:ne}),re.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(t,e){J["[object "+e+"]"]=e.toLowerCase()});var ue=/*!
|
||
* Sizzle CSS Selector Engine v2.2.0-pre
|
||
* http://sizzlejs.com/
|
||
*
|
||
* Copyright 2008, 2014 jQuery Foundation, Inc. and other contributors
|
||
* Released under the MIT license
|
||
* http://jquery.org/license
|
||
*
|
||
* Date: 2014-12-16
|
||
*/
|
||
function(t){function e(t,e,n,i){var r,o,a,s,l,u,d,p,f,g;if((e?e.ownerDocument||e:H)!==N&&$(e),e=e||N,n=n||[],s=e.nodeType,"string"!=typeof t||!t||1!==s&&9!==s&&11!==s)return n;if(!i&&O){if(11!==s&&(r=ye.exec(t)))if(a=r[1]){if(9===s){if(o=e.getElementById(a),!o||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(e.ownerDocument&&(o=e.ownerDocument.getElementById(a))&&R(e,o)&&o.id===a)return n.push(o),n}else{if(r[2])return G.apply(n,e.getElementsByTagName(t)),n;if((a=r[3])&&x.getElementsByClassName)return G.apply(n,e.getElementsByClassName(a)),n}if(x.qsa&&(!M||!M.test(t))){if(p=d=P,f=e,g=1!==s&&t,1===s&&"object"!==e.nodeName.toLowerCase()){for(u=D(t),(d=e.getAttribute("id"))?p=d.replace(we,"\\$&"):e.setAttribute("id",p),p="[id='"+p+"'] ",l=u.length;l--;)u[l]=p+h(u[l]);f=be.test(t)&&c(e.parentNode)||e,g=u.join(",")}if(g)try{return G.apply(n,f.querySelectorAll(g)),n}catch(m){}finally{d||e.removeAttribute("id")}}}return S(t.replace(le,"$1"),e,n,i)}function n(){function t(n,i){return e.push(n+" ")>k.cacheLength&&delete t[e.shift()],t[n+" "]=i}var e=[];return t}function i(t){return t[P]=!0,t}function r(t){var e=N.createElement("div");try{return!!t(e)}catch(n){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function o(t,e){for(var n=t.split("|"),i=t.length;i--;)k.attrHandle[n[i]]=e}function a(t,e){var n=e&&t,i=n&&1===t.nodeType&&1===e.nodeType&&(~e.sourceIndex||Y)-(~t.sourceIndex||Y);if(i)return i;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function s(t){return function(e){var n=e.nodeName.toLowerCase();return"input"===n&&e.type===t}}function l(t){return function(e){var n=e.nodeName.toLowerCase();return("input"===n||"button"===n)&&e.type===t}}function u(t){return i(function(e){return e=+e,i(function(n,i){for(var r,o=t([],n.length,e),a=o.length;a--;)n[r=o[a]]&&(n[r]=!(i[r]=n[r]))})})}function c(t){return t&&"undefined"!=typeof t.getElementsByTagName&&t}function d(){}function h(t){for(var e=0,n=t.length,i="";n>e;e++)i+=t[e].value;return i}function p(t,e,n){var i=e.dir,r=n&&"parentNode"===i,o=z++;return e.first?function(e,n,o){for(;e=e[i];)if(1===e.nodeType||r)return t(e,n,o)}:function(e,n,a){var s,l,u=[q,o];if(a){for(;e=e[i];)if((1===e.nodeType||r)&&t(e,n,a))return!0}else for(;e=e[i];)if(1===e.nodeType||r){if(l=e[P]||(e[P]={}),(s=l[i])&&s[0]===q&&s[1]===o)return u[2]=s[2];if(l[i]=u,u[2]=t(e,n,a))return!0}}}function f(t){return t.length>1?function(e,n,i){for(var r=t.length;r--;)if(!t[r](e,n,i))return!1;return!0}:t[0]}function g(t,n,i){for(var r=0,o=n.length;o>r;r++)e(t,n[r],i);return i}function m(t,e,n,i,r){for(var o,a=[],s=0,l=t.length,u=null!=e;l>s;s++)(o=t[s])&&(!n||n(o,i,r))&&(a.push(o),u&&e.push(s));return a}function v(t,e,n,r,o,a){return r&&!r[P]&&(r=v(r)),o&&!o[P]&&(o=v(o,a)),i(function(i,a,s,l){var u,c,d,h=[],p=[],f=a.length,v=i||g(e||"*",s.nodeType?[s]:s,[]),y=!t||!i&&e?v:m(v,h,t,s,l),b=n?o||(i?t:f||r)?[]:a:y;if(n&&n(y,b,s,l),r)for(u=m(b,p),r(u,[],s,l),c=u.length;c--;)(d=u[c])&&(b[p[c]]=!(y[p[c]]=d));if(i){if(o||t){if(o){for(u=[],c=b.length;c--;)(d=b[c])&&u.push(y[c]=d);o(null,b=[],u,l)}for(c=b.length;c--;)(d=b[c])&&(u=o?te(i,d):h[c])>-1&&(i[u]=!(a[u]=d))}}else b=m(b===a?b.splice(f,b.length):b),o?o(null,a,b,l):G.apply(a,b)})}function y(t){for(var e,n,i,r=t.length,o=k.relative[t[0].type],a=o||k.relative[" "],s=o?1:0,l=p(function(t){return t===e},a,!0),u=p(function(t){return te(e,t)>-1},a,!0),c=[function(t,n,i){var r=!o&&(i||n!==A)||((e=n).nodeType?l(t,n,i):u(t,n,i));return e=null,r}];r>s;s++)if(n=k.relative[t[s].type])c=[p(f(c),n)];else{if(n=k.filter[t[s].type].apply(null,t[s].matches),n[P]){for(i=++s;r>i&&!k.relative[t[i].type];i++);return v(s>1&&f(c),s>1&&h(t.slice(0,s-1).concat({value:" "===t[s-2].type?"*":""})).replace(le,"$1"),n,i>s&&y(t.slice(s,i)),r>i&&y(t=t.slice(i)),r>i&&h(t))}c.push(n)}return f(c)}function b(t,n){var r=n.length>0,o=t.length>0,a=function(i,a,s,l,u){var c,d,h,p=0,f="0",g=i&&[],v=[],y=A,b=i||o&&k.find.TAG("*",u),w=q+=null==y?1:Math.random()||.1,x=b.length;for(u&&(A=a!==N&&a);f!==x&&null!=(c=b[f]);f++){if(o&&c){for(d=0;h=t[d++];)if(h(c,a,s)){l.push(c);break}u&&(q=w)}r&&((c=!h&&c)&&p--,i&&g.push(c))}if(p+=f,r&&f!==p){for(d=0;h=n[d++];)h(g,v,a,s);if(i){if(p>0)for(;f--;)g[f]||v[f]||(v[f]=Q.call(l));v=m(v)}G.apply(l,v),u&&!i&&v.length>0&&p+n.length>1&&e.uniqueSort(l)}return u&&(q=w,A=y),g};return r?i(a):a}var w,x,k,C,_,D,T,S,A,F,E,$,N,I,O,M,L,j,R,P="sizzle"+1*new Date,H=t.document,q=0,z=0,B=n(),W=n(),K=n(),U=function(t,e){return t===e&&(E=!0),0},Y=1<<31,V={}.hasOwnProperty,Z=[],Q=Z.pop,X=Z.push,G=Z.push,J=Z.slice,te=function(t,e){for(var n=0,i=t.length;i>n;n++)if(t[n]===e)return n;return-1},ee="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ne="[\\x20\\t\\r\\n\\f]",ie="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",re=ie.replace("w","w#"),oe="\\["+ne+"*("+ie+")(?:"+ne+"*([*^$|!~]?=)"+ne+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+re+"))|)"+ne+"*\\]",ae=":("+ie+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+oe+")*)|.*)\\)|)",se=new RegExp(ne+"+","g"),le=new RegExp("^"+ne+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ne+"+$","g"),ue=new RegExp("^"+ne+"*,"+ne+"*"),ce=new RegExp("^"+ne+"*([>+~]|"+ne+")"+ne+"*"),de=new RegExp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),he=new RegExp(ae),pe=new RegExp("^"+re+"$"),fe={ID:new RegExp("^#("+ie+")"),CLASS:new RegExp("^\\.("+ie+")"),TAG:new RegExp("^("+ie.replace("w","w*")+")"),ATTR:new RegExp("^"+oe),PSEUDO:new RegExp("^"+ae),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ne+"*(even|odd|(([+-]|)(\\d*)n|)"+ne+"*(?:([+-]|)"+ne+"*(\\d+)|))"+ne+"*\\)|)","i"),bool:new RegExp("^(?:"+ee+")$","i"),needsContext:new RegExp("^"+ne+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ne+"*((?:-\\d)?\\d*)"+ne+"*\\)|)(?=[^-]|$)","i")},ge=/^(?:input|select|textarea|button)$/i,me=/^h\d$/i,ve=/^[^{]+\{\s*\[native \w/,ye=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,be=/[+~]/,we=/'|\\/g,xe=new RegExp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),ke=function(t,e,n){var i="0x"+e-65536;return i!==i||n?e:0>i?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)},Ce=function(){$()};try{G.apply(Z=J.call(H.childNodes),H.childNodes),Z[H.childNodes.length].nodeType}catch(_e){G={apply:Z.length?function(t,e){X.apply(t,J.call(e))}:function(t,e){for(var n=t.length,i=0;t[n++]=e[i++];);t.length=n-1}}}x=e.support={},_=e.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return e?"HTML"!==e.nodeName:!1},$=e.setDocument=function(t){var e,n,i=t?t.ownerDocument||t:H;return i!==N&&9===i.nodeType&&i.documentElement?(N=i,I=i.documentElement,n=i.defaultView,n&&n!==n.top&&(n.addEventListener?n.addEventListener("unload",Ce,!1):n.attachEvent&&n.attachEvent("onunload",Ce)),O=!_(i),x.attributes=r(function(t){return t.className="i",!t.getAttribute("className")}),x.getElementsByTagName=r(function(t){return t.appendChild(i.createComment("")),!t.getElementsByTagName("*").length}),x.getElementsByClassName=ve.test(i.getElementsByClassName),x.getById=r(function(t){return I.appendChild(t).id=P,!i.getElementsByName||!i.getElementsByName(P).length}),x.getById?(k.find.ID=function(t,e){if("undefined"!=typeof e.getElementById&&O){var n=e.getElementById(t);return n&&n.parentNode?[n]:[]}},k.filter.ID=function(t){var e=t.replace(xe,ke);return function(t){return t.getAttribute("id")===e}}):(delete k.find.ID,k.filter.ID=function(t){var e=t.replace(xe,ke);return function(t){var n="undefined"!=typeof t.getAttributeNode&&t.getAttributeNode("id");return n&&n.value===e}}),k.find.TAG=x.getElementsByTagName?function(t,e){return"undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t):x.qsa?e.querySelectorAll(t):void 0}:function(t,e){var n,i=[],r=0,o=e.getElementsByTagName(t);if("*"===t){for(;n=o[r++];)1===n.nodeType&&i.push(n);return i}return o},k.find.CLASS=x.getElementsByClassName&&function(t,e){return O?e.getElementsByClassName(t):void 0},L=[],M=[],(x.qsa=ve.test(i.querySelectorAll))&&(r(function(t){I.appendChild(t).innerHTML="<a id='"+P+"'></a><select id='"+P+"-\f]' msallowcapture=''><option selected=''></option></select>",t.querySelectorAll("[msallowcapture^='']").length&&M.push("[*^$]="+ne+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||M.push("\\["+ne+"*(?:value|"+ee+")"),t.querySelectorAll("[id~="+P+"-]").length||M.push("~="),t.querySelectorAll(":checked").length||M.push(":checked"),t.querySelectorAll("a#"+P+"+*").length||M.push(".#.+[+~]")}),r(function(t){var e=i.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&M.push("name"+ne+"*[*^$|!~]?="),t.querySelectorAll(":enabled").length||M.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),M.push(",.*:")})),(x.matchesSelector=ve.test(j=I.matches||I.webkitMatchesSelector||I.mozMatchesSelector||I.oMatchesSelector||I.msMatchesSelector))&&r(function(t){x.disconnectedMatch=j.call(t,"div"),j.call(t,"[s!='']:x"),L.push("!=",ae)}),M=M.length&&new RegExp(M.join("|")),L=L.length&&new RegExp(L.join("|")),e=ve.test(I.compareDocumentPosition),R=e||ve.test(I.contains)?function(t,e){var n=9===t.nodeType?t.documentElement:t,i=e&&e.parentNode;return t===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):t.compareDocumentPosition&&16&t.compareDocumentPosition(i)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},U=e?function(t,e){if(t===e)return E=!0,0;var n=!t.compareDocumentPosition-!e.compareDocumentPosition;return n?n:(n=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1,1&n||!x.sortDetached&&e.compareDocumentPosition(t)===n?t===i||t.ownerDocument===H&&R(H,t)?-1:e===i||e.ownerDocument===H&&R(H,e)?1:F?te(F,t)-te(F,e):0:4&n?-1:1)}:function(t,e){if(t===e)return E=!0,0;var n,r=0,o=t.parentNode,s=e.parentNode,l=[t],u=[e];if(!o||!s)return t===i?-1:e===i?1:o?-1:s?1:F?te(F,t)-te(F,e):0;if(o===s)return a(t,e);for(n=t;n=n.parentNode;)l.unshift(n);for(n=e;n=n.parentNode;)u.unshift(n);for(;l[r]===u[r];)r++;return r?a(l[r],u[r]):l[r]===H?-1:u[r]===H?1:0},i):N},e.matches=function(t,n){return e(t,null,null,n)},e.matchesSelector=function(t,n){if((t.ownerDocument||t)!==N&&$(t),n=n.replace(de,"='$1']"),!(!x.matchesSelector||!O||L&&L.test(n)||M&&M.test(n)))try{var i=j.call(t,n);if(i||x.disconnectedMatch||t.document&&11!==t.document.nodeType)return i}catch(r){}return e(n,N,null,[t]).length>0},e.contains=function(t,e){return(t.ownerDocument||t)!==N&&$(t),R(t,e)},e.attr=function(t,e){(t.ownerDocument||t)!==N&&$(t);var n=k.attrHandle[e.toLowerCase()],i=n&&V.call(k.attrHandle,e.toLowerCase())?n(t,e,!O):void 0;return void 0!==i?i:x.attributes||!O?t.getAttribute(e):(i=t.getAttributeNode(e))&&i.specified?i.value:null},e.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},e.uniqueSort=function(t){var e,n=[],i=0,r=0;if(E=!x.detectDuplicates,F=!x.sortStable&&t.slice(0),t.sort(U),E){for(;e=t[r++];)e===t[r]&&(i=n.push(r));for(;i--;)t.splice(n[i],1)}return F=null,t},C=e.getText=function(t){var e,n="",i=0,r=t.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=C(t)}else if(3===r||4===r)return t.nodeValue}else for(;e=t[i++];)n+=C(e);return n},k=e.selectors={cacheLength:50,createPseudo:i,match:fe,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(xe,ke),t[3]=(t[3]||t[4]||t[5]||"").replace(xe,ke),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||e.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&e.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return fe.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&he.test(n)&&(e=D(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(xe,ke).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=B[t+" "];return e||(e=new RegExp("(^|"+ne+")"+t+"("+ne+"|$)"))&&B(t,function(t){return e.test("string"==typeof t.className&&t.className||"undefined"!=typeof t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(t,n,i){return function(r){var o=e.attr(r,t);return null==o?"!="===n:n?(o+="","="===n?o===i:"!="===n?o!==i:"^="===n?i&&0===o.indexOf(i):"*="===n?i&&o.indexOf(i)>-1:"$="===n?i&&o.slice(-i.length)===i:"~="===n?(" "+o.replace(se," ")+" ").indexOf(i)>-1:"|="===n?o===i||o.slice(0,i.length+1)===i+"-":!1):!0}},CHILD:function(t,e,n,i,r){var o="nth"!==t.slice(0,3),a="last"!==t.slice(-4),s="of-type"===e;return 1===i&&0===r?function(t){return!!t.parentNode}:function(e,n,l){var u,c,d,h,p,f,g=o!==a?"nextSibling":"previousSibling",m=e.parentNode,v=s&&e.nodeName.toLowerCase(),y=!l&&!s;if(m){if(o){for(;g;){for(d=e;d=d[g];)if(s?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;f=g="only"===t&&!f&&"nextSibling"}return!0}if(f=[a?m.firstChild:m.lastChild],a&&y){for(c=m[P]||(m[P]={}),u=c[t]||[],p=u[0]===q&&u[1],h=u[0]===q&&u[2],d=p&&m.childNodes[p];d=++p&&d&&d[g]||(h=p=0)||f.pop();)if(1===d.nodeType&&++h&&d===e){c[t]=[q,p,h];break}}else if(y&&(u=(e[P]||(e[P]={}))[t])&&u[0]===q)h=u[1];else for(;(d=++p&&d&&d[g]||(h=p=0)||f.pop())&&((s?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++h||(y&&((d[P]||(d[P]={}))[t]=[q,h]),d!==e)););return h-=r,h===i||h%i===0&&h/i>=0}}},PSEUDO:function(t,n){var r,o=k.pseudos[t]||k.setFilters[t.toLowerCase()]||e.error("unsupported pseudo: "+t);return o[P]?o(n):o.length>1?(r=[t,t,"",n],k.setFilters.hasOwnProperty(t.toLowerCase())?i(function(t,e){for(var i,r=o(t,n),a=r.length;a--;)i=te(t,r[a]),t[i]=!(e[i]=r[a])}):function(t){return o(t,0,r)}):o}},pseudos:{not:i(function(t){var e=[],n=[],r=T(t.replace(le,"$1"));return r[P]?i(function(t,e,n,i){for(var o,a=r(t,null,i,[]),s=t.length;s--;)(o=a[s])&&(t[s]=!(e[s]=o))}):function(t,i,o){return e[0]=t,r(e,null,o,n),e[0]=null,!n.pop()}}),has:i(function(t){return function(n){return e(t,n).length>0}}),contains:i(function(t){return t=t.replace(xe,ke),function(e){return(e.textContent||e.innerText||C(e)).indexOf(t)>-1}}),lang:i(function(t){return pe.test(t||"")||e.error("unsupported lang: "+t),t=t.replace(xe,ke).toLowerCase(),function(e){var n;do if(n=O?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return n=n.toLowerCase(),n===t||0===n.indexOf(t+"-");while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(t){return t===I},focus:function(t){return t===N.activeElement&&(!N.hasFocus||N.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:function(t){return t.disabled===!1},disabled:function(t){return t.disabled===!0},checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,t.selected===!0},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!k.pseudos.empty(t)},header:function(t){return me.test(t.nodeName)},input:function(t){return ge.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:u(function(){return[0]}),last:u(function(t,e){return[e-1]}),eq:u(function(t,e,n){return[0>n?n+e:n]}),even:u(function(t,e){for(var n=0;e>n;n+=2)t.push(n);return t}),odd:u(function(t,e){for(var n=1;e>n;n+=2)t.push(n);return t}),lt:u(function(t,e,n){for(var i=0>n?n+e:n;--i>=0;)t.push(i);return t}),gt:u(function(t,e,n){for(var i=0>n?n+e:n;++i<e;)t.push(i);return t})}},k.pseudos.nth=k.pseudos.eq;for(w in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})k.pseudos[w]=s(w);for(w in{submit:!0,reset:!0})k.pseudos[w]=l(w);return d.prototype=k.filters=k.pseudos,k.setFilters=new d,D=e.tokenize=function(t,n){var i,r,o,a,s,l,u,c=W[t+" "];if(c)return n?0:c.slice(0);for(s=t,l=[],u=k.preFilter;s;){(!i||(r=ue.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),l.push(o=[])),i=!1,(r=ce.exec(s))&&(i=r.shift(),o.push({value:i,type:r[0].replace(le," ")}),s=s.slice(i.length));for(a in k.filter)!(r=fe[a].exec(s))||u[a]&&!(r=u[a](r))||(i=r.shift(),o.push({value:i,type:a,matches:r}),s=s.slice(i.length));if(!i)break}return n?s.length:s?e.error(t):W(t,l).slice(0)},T=e.compile=function(t,e){var n,i=[],r=[],o=K[t+" "];if(!o){for(e||(e=D(t)),n=e.length;n--;)o=y(e[n]),o[P]?i.push(o):r.push(o);o=K(t,b(r,i)),o.selector=t}return o},S=e.select=function(t,e,n,i){var r,o,a,s,l,u="function"==typeof t&&t,d=!i&&D(t=u.selector||t);if(n=n||[],1===d.length){if(o=d[0]=d[0].slice(0),o.length>2&&"ID"===(a=o[0]).type&&x.getById&&9===e.nodeType&&O&&k.relative[o[1].type]){if(e=(k.find.ID(a.matches[0].replace(xe,ke),e)||[])[0],!e)return n;u&&(e=e.parentNode),t=t.slice(o.shift().value.length)}for(r=fe.needsContext.test(t)?0:o.length;r--&&(a=o[r],!k.relative[s=a.type]);)if((l=k.find[s])&&(i=l(a.matches[0].replace(xe,ke),be.test(o[0].type)&&c(e.parentNode)||e))){if(o.splice(r,1),t=i.length&&h(o),!t)return G.apply(n,i),n;break}}return(u||T(t,d))(i,e,!O,n,be.test(t)&&c(e.parentNode)||e),n},x.sortStable=P.split("").sort(U).join("")===P,x.detectDuplicates=!!E,$(),x.sortDetached=r(function(t){return 1&t.compareDocumentPosition(N.createElement("div"))}),r(function(t){return t.innerHTML="<a href='#'></a>","#"===t.firstChild.getAttribute("href")})||o("type|href|height|width",function(t,e,n){return n?void 0:t.getAttribute(e,"type"===e.toLowerCase()?1:2)}),x.attributes&&r(function(t){return t.innerHTML="<input/>",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||o("value",function(t,e,n){return n||"input"!==t.nodeName.toLowerCase()?void 0:t.defaultValue}),r(function(t){return null==t.getAttribute("disabled")})||o(ee,function(t,e,n){var i;return n?void 0:t[e]===!0?e.toLowerCase():(i=t.getAttributeNode(e))&&i.specified?i.value:null}),e}(t);re.find=ue,re.expr=ue.selectors,re.expr[":"]=re.expr.pseudos,re.unique=ue.uniqueSort,re.text=ue.getText,re.isXMLDoc=ue.isXML,re.contains=ue.contains;var ce=re.expr.match.needsContext,de=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,he=/^.[^:#\[\.,]*$/;re.filter=function(t,e,n){var i=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===i.nodeType?re.find.matchesSelector(i,t)?[i]:[]:re.find.matches(t,re.grep(e,function(t){return 1===t.nodeType}))},re.fn.extend({find:function(t){var e,n=[],i=this,r=i.length;if("string"!=typeof t)return this.pushStack(re(t).filter(function(){for(e=0;r>e;e++)if(re.contains(i[e],this))return!0}));for(e=0;r>e;e++)re.find(t,i[e],n);return n=this.pushStack(r>1?re.unique(n):n),n.selector=this.selector?this.selector+" "+t:t,n},filter:function(t){return this.pushStack(i(this,t||[],!1))},not:function(t){return this.pushStack(i(this,t||[],!0))},is:function(t){return!!i(this,"string"==typeof t&&ce.test(t)?re(t):t||[],!1).length}});var pe,fe=t.document,ge=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,me=re.fn.init=function(t,e){var n,i;if(!t)return this;if("string"==typeof t){if(n="<"===t.charAt(0)&&">"===t.charAt(t.length-1)&&t.length>=3?[null,t,null]:ge.exec(t),!n||!n[1]&&e)return!e||e.jquery?(e||pe).find(t):this.constructor(e).find(t);if(n[1]){if(e=e instanceof re?e[0]:e,re.merge(this,re.parseHTML(n[1],e&&e.nodeType?e.ownerDocument||e:fe,!0)),de.test(n[1])&&re.isPlainObject(e))for(n in e)re.isFunction(this[n])?this[n](e[n]):this.attr(n,e[n]);return this}if(i=fe.getElementById(n[2]),i&&i.parentNode){if(i.id!==n[2])return pe.find(t);this.length=1,this[0]=i}return this.context=fe,this.selector=t,this}return t.nodeType?(this.context=this[0]=t,this.length=1,this):re.isFunction(t)?"undefined"!=typeof pe.ready?pe.ready(t):t(re):(void 0!==t.selector&&(this.selector=t.selector,this.context=t.context),re.makeArray(t,this))};me.prototype=re.fn,pe=re(fe);var ve=/^(?:parents|prev(?:Until|All))/,ye={children:!0,contents:!0,next:!0,prev:!0};re.extend({dir:function(t,e,n){for(var i=[],r=t[e];r&&9!==r.nodeType&&(void 0===n||1!==r.nodeType||!re(r).is(n));)1===r.nodeType&&i.push(r),r=r[e];return i},sibling:function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n}}),re.fn.extend({has:function(t){var e,n=re(t,this),i=n.length;return this.filter(function(){for(e=0;i>e;e++)if(re.contains(this,n[e]))return!0})},closest:function(t,e){for(var n,i=0,r=this.length,o=[],a=ce.test(t)||"string"!=typeof t?re(t,e||this.context):0;r>i;i++)for(n=this[i];n&&n!==e;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&re.find.matchesSelector(n,t))){o.push(n);break}return this.pushStack(o.length>1?re.unique(o):o)},index:function(t){return t?"string"==typeof t?re.inArray(this[0],re(t)):re.inArray(t.jquery?t[0]:t,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(re.unique(re.merge(this.get(),re(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),re.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return re.dir(t,"parentNode")},parentsUntil:function(t,e,n){return re.dir(t,"parentNode",n)},next:function(t){return r(t,"nextSibling")},prev:function(t){return r(t,"previousSibling")},nextAll:function(t){return re.dir(t,"nextSibling")},prevAll:function(t){return re.dir(t,"previousSibling")},nextUntil:function(t,e,n){return re.dir(t,"nextSibling",n)},prevUntil:function(t,e,n){return re.dir(t,"previousSibling",n)},siblings:function(t){return re.sibling((t.parentNode||{}).firstChild,t)},children:function(t){return re.sibling(t.firstChild)},contents:function(t){return re.nodeName(t,"iframe")?t.contentDocument||t.contentWindow.document:re.merge([],t.childNodes)}},function(t,e){re.fn[t]=function(n,i){var r=re.map(this,e,n);return"Until"!==t.slice(-5)&&(i=n),i&&"string"==typeof i&&(r=re.filter(i,r)),this.length>1&&(ye[t]||(r=re.unique(r)),ve.test(t)&&(r=r.reverse())),this.pushStack(r)}});var be=/\S+/g,we={};re.Callbacks=function(t){t="string"==typeof t?we[t]||o(t):re.extend({},t);var e,n,i,r,a,s,l=[],u=!t.once&&[],c=function(o){for(n=t.memory&&o,i=!0,a=s||0,s=0,r=l.length,e=!0;l&&r>a;a++)if(l[a].apply(o[0],o[1])===!1&&t.stopOnFalse){n=!1;break}e=!1,l&&(u?u.length&&c(u.shift()):n?l=[]:d.disable())},d={add:function(){if(l){var i=l.length;!function o(e){re.each(e,function(e,n){var i=re.type(n);"function"===i?t.unique&&d.has(n)||l.push(n):n&&n.length&&"string"!==i&&o(n)})}(arguments),e?r=l.length:n&&(s=i,c(n))}return this},remove:function(){return l&&re.each(arguments,function(t,n){for(var i;(i=re.inArray(n,l,i))>-1;)l.splice(i,1),e&&(r>=i&&r--,a>=i&&a--)}),this},has:function(t){return t?re.inArray(t,l)>-1:!(!l||!l.length)},empty:function(){return l=[],r=0,this},disable:function(){return l=u=n=void 0,this},disabled:function(){return!l},lock:function(){return u=void 0,n||d.disable(),this},locked:function(){return!u},fireWith:function(t,n){return!l||i&&!u||(n=n||[],n=[t,n.slice?n.slice():n],e?u.push(n):c(n)),this},fire:function(){return d.fireWith(this,arguments),this},fired:function(){return!!i}};return d},re.extend({Deferred:function(t){var e=[["resolve","done",re.Callbacks("once memory"),"resolved"],["reject","fail",re.Callbacks("once memory"),"rejected"],["notify","progress",re.Callbacks("memory")]],n="pending",i={state:function(){return n},always:function(){return r.done(arguments).fail(arguments),this},then:function(){var t=arguments;return re.Deferred(function(n){re.each(e,function(e,o){var a=re.isFunction(t[e])&&t[e];r[o[1]](function(){var t=a&&a.apply(this,arguments);t&&re.isFunction(t.promise)?t.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[o[0]+"With"](this===i?n.promise():this,a?[t]:arguments)})}),t=null}).promise()},promise:function(t){return null!=t?re.extend(t,i):i}},r={};return i.pipe=i.then,re.each(e,function(t,o){var a=o[2],s=o[3];i[o[1]]=a.add,s&&a.add(function(){n=s},e[1^t][2].disable,e[2][2].lock),r[o[0]]=function(){return r[o[0]+"With"](this===r?i:this,arguments),this},r[o[0]+"With"]=a.fireWith}),i.promise(r),t&&t.call(r,r),r},when:function(t){var e,n,i,r=0,o=Z.call(arguments),a=o.length,s=1!==a||t&&re.isFunction(t.promise)?a:0,l=1===s?t:re.Deferred(),u=function(t,n,i){return function(r){n[t]=this,i[t]=arguments.length>1?Z.call(arguments):r,i===e?l.notifyWith(n,i):--s||l.resolveWith(n,i)}};if(a>1)for(e=new Array(a),n=new Array(a),i=new Array(a);a>r;r++)o[r]&&re.isFunction(o[r].promise)?o[r].promise().done(u(r,i,o)).fail(l.reject).progress(u(r,n,e)):--s;return s||l.resolveWith(i,o),l.promise()}});var xe;re.fn.ready=function(t){return re.ready.promise().done(t),this},re.extend({isReady:!1,readyWait:1,holdReady:function(t){t?re.readyWait++:re.ready(!0)},ready:function(t){if(t===!0?!--re.readyWait:!re.isReady){if(!fe.body)return setTimeout(re.ready);re.isReady=!0,t!==!0&&--re.readyWait>0||(xe.resolveWith(fe,[re]),re.fn.triggerHandler&&(re(fe).triggerHandler("ready"),re(fe).off("ready")))}}}),re.ready.promise=function(e){if(!xe)if(xe=re.Deferred(),"complete"===fe.readyState)setTimeout(re.ready);else if(fe.addEventListener)fe.addEventListener("DOMContentLoaded",s,!1),t.addEventListener("load",s,!1);else{fe.attachEvent("onreadystatechange",s),t.attachEvent("onload",s);var n=!1;try{n=null==t.frameElement&&fe.documentElement}catch(i){}n&&n.doScroll&&!function r(){if(!re.isReady){try{n.doScroll("left")}catch(t){return setTimeout(r,50)}a(),re.ready()}}()}return xe.promise(e)};var ke,Ce="undefined";for(ke in re(ne))break;ne.ownLast="0"!==ke,ne.inlineBlockNeedsLayout=!1,re(function(){var t,e,n,i;n=fe.getElementsByTagName("body")[0],n&&n.style&&(e=fe.createElement("div"),i=fe.createElement("div"),i.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(i).appendChild(e),typeof e.style.zoom!==Ce&&(e.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",ne.inlineBlockNeedsLayout=t=3===e.offsetWidth,t&&(n.style.zoom=1)),n.removeChild(i))}),function(){var t=fe.createElement("div");if(null==ne.deleteExpando){ne.deleteExpando=!0;try{delete t.test}catch(e){ne.deleteExpando=!1}}t=null}(),re.acceptData=function(t){var e=re.noData[(t.nodeName+" ").toLowerCase()],n=+t.nodeType||1;return 1!==n&&9!==n?!1:!e||e!==!0&&t.getAttribute("classid")===e};var _e=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,De=/([A-Z])/g;re.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(t){return t=t.nodeType?re.cache[t[re.expando]]:t[re.expando],!!t&&!u(t)},data:function(t,e,n){return c(t,e,n)},removeData:function(t,e){return d(t,e)},_data:function(t,e,n){return c(t,e,n,!0)},_removeData:function(t,e){return d(t,e,!0)}}),re.fn.extend({data:function(t,e){var n,i,r,o=this[0],a=o&&o.attributes;if(void 0===t){if(this.length&&(r=re.data(o),1===o.nodeType&&!re._data(o,"parsedAttrs"))){for(n=a.length;n--;)a[n]&&(i=a[n].name,0===i.indexOf("data-")&&(i=re.camelCase(i.slice(5)),l(o,i,r[i])));re._data(o,"parsedAttrs",!0)}return r}return"object"==typeof t?this.each(function(){re.data(this,t)}):arguments.length>1?this.each(function(){re.data(this,t,e)}):o?l(o,t,re.data(o,t)):void 0},removeData:function(t){return this.each(function(){re.removeData(this,t)})}}),re.extend({queue:function(t,e,n){var i;return t?(e=(e||"fx")+"queue",i=re._data(t,e),n&&(!i||re.isArray(n)?i=re._data(t,e,re.makeArray(n)):i.push(n)),i||[]):void 0},dequeue:function(t,e){e=e||"fx";var n=re.queue(t,e),i=n.length,r=n.shift(),o=re._queueHooks(t,e),a=function(){re.dequeue(t,e)};"inprogress"===r&&(r=n.shift(),i--),r&&("fx"===e&&n.unshift("inprogress"),delete o.stop,r.call(t,a,o)),!i&&o&&o.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return re._data(t,n)||re._data(t,n,{empty:re.Callbacks("once memory").add(function(){re._removeData(t,e+"queue"),re._removeData(t,n)})})}}),re.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length<n?re.queue(this[0],t):void 0===e?this:this.each(function(){var n=re.queue(this,t,e);re._queueHooks(this,t),"fx"===t&&"inprogress"!==n[0]&&re.dequeue(this,t)})},dequeue:function(t){return this.each(function(){re.dequeue(this,t)})},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var n,i=1,r=re.Deferred(),o=this,a=this.length,s=function(){--i||r.resolveWith(o,[o])};for("string"!=typeof t&&(e=t,t=void 0),t=t||"fx";a--;)n=re._data(o[a],t+"queueHooks"),n&&n.empty&&(i++,n.empty.add(s));return s(),r.promise(e)}});var Te=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Se=["Top","Right","Bottom","Left"],Ae=function(t,e){return t=e||t,"none"===re.css(t,"display")||!re.contains(t.ownerDocument,t)},Fe=re.access=function(t,e,n,i,r,o,a){var s=0,l=t.length,u=null==n;if("object"===re.type(n)){r=!0;for(s in n)re.access(t,e,s,n[s],!0,o,a)}else if(void 0!==i&&(r=!0,re.isFunction(i)||(a=!0),u&&(a?(e.call(t,i),e=null):(u=e,e=function(t,e,n){return u.call(re(t),n)})),e))for(;l>s;s++)e(t[s],n,a?i:i.call(t[s],s,e(t[s],n)));return r?t:u?e.call(t):l?e(t[0],n):o},Ee=/^(?:checkbox|radio)$/i;!function(){var t=fe.createElement("input"),e=fe.createElement("div"),n=fe.createDocumentFragment();if(e.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",ne.leadingWhitespace=3===e.firstChild.nodeType,ne.tbody=!e.getElementsByTagName("tbody").length,ne.htmlSerialize=!!e.getElementsByTagName("link").length,ne.html5Clone="<:nav></:nav>"!==fe.createElement("nav").cloneNode(!0).outerHTML,t.type="checkbox",t.checked=!0,n.appendChild(t),ne.appendChecked=t.checked,e.innerHTML="<textarea>x</textarea>",ne.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue,n.appendChild(e),e.innerHTML="<input type='radio' checked='checked' name='t'/>",ne.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,ne.noCloneEvent=!0,e.attachEvent&&(e.attachEvent("onclick",function(){ne.noCloneEvent=!1}),e.cloneNode(!0).click()),null==ne.deleteExpando){ne.deleteExpando=!0;try{delete e.test}catch(i){ne.deleteExpando=!1}}}(),function(){var e,n,i=fe.createElement("div");for(e in{submit:!0,change:!0,focusin:!0})n="on"+e,(ne[e+"Bubbles"]=n in t)||(i.setAttribute(n,"t"),ne[e+"Bubbles"]=i.attributes[n].expando===!1);i=null}();var $e=/^(?:input|select|textarea)$/i,Ne=/^key/,Ie=/^(?:mouse|pointer|contextmenu)|click/,Oe=/^(?:focusinfocus|focusoutblur)$/,Me=/^([^.]*)(?:\.(.+)|)$/;re.event={global:{},add:function(t,e,n,i,r){var o,a,s,l,u,c,d,h,p,f,g,m=re._data(t);if(m){for(n.handler&&(l=n,n=l.handler,r=l.selector),n.guid||(n.guid=re.guid++),(a=m.events)||(a=m.events={}),(c=m.handle)||(c=m.handle=function(t){return typeof re===Ce||t&&re.event.triggered===t.type?void 0:re.event.dispatch.apply(c.elem,arguments)},c.elem=t),e=(e||"").match(be)||[""],s=e.length;s--;)o=Me.exec(e[s])||[],p=g=o[1],f=(o[2]||"").split(".").sort(),p&&(u=re.event.special[p]||{},p=(r?u.delegateType:u.bindType)||p,u=re.event.special[p]||{},d=re.extend({type:p,origType:g,data:i,handler:n,guid:n.guid,selector:r,needsContext:r&&re.expr.match.needsContext.test(r),namespace:f.join(".")},l),(h=a[p])||(h=a[p]=[],h.delegateCount=0,u.setup&&u.setup.call(t,i,f,c)!==!1||(t.addEventListener?t.addEventListener(p,c,!1):t.attachEvent&&t.attachEvent("on"+p,c))),u.add&&(u.add.call(t,d),d.handler.guid||(d.handler.guid=n.guid)),r?h.splice(h.delegateCount++,0,d):h.push(d),re.event.global[p]=!0);t=null}},remove:function(t,e,n,i,r){var o,a,s,l,u,c,d,h,p,f,g,m=re.hasData(t)&&re._data(t);if(m&&(c=m.events)){for(e=(e||"").match(be)||[""],u=e.length;u--;)if(s=Me.exec(e[u])||[],p=g=s[1],f=(s[2]||"").split(".").sort(),p){for(d=re.event.special[p]||{},p=(i?d.delegateType:d.bindType)||p,h=c[p]||[],s=s[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=o=h.length;o--;)a=h[o],!r&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||i&&i!==a.selector&&("**"!==i||!a.selector)||(h.splice(o,1),a.selector&&h.delegateCount--,d.remove&&d.remove.call(t,a));l&&!h.length&&(d.teardown&&d.teardown.call(t,f,m.handle)!==!1||re.removeEvent(t,p,m.handle),delete c[p])}else for(p in c)re.event.remove(t,p+e[u],n,i,!0);re.isEmptyObject(c)&&(delete m.handle,re._removeData(t,"events"))}},trigger:function(e,n,i,r){var o,a,s,l,u,c,d,h=[i||fe],p=ee.call(e,"type")?e.type:e,f=ee.call(e,"namespace")?e.namespace.split("."):[];if(s=c=i=i||fe,3!==i.nodeType&&8!==i.nodeType&&!Oe.test(p+re.event.triggered)&&(p.indexOf(".")>=0&&(f=p.split("."),p=f.shift(),f.sort()),a=p.indexOf(":")<0&&"on"+p,e=e[re.expando]?e:new re.Event(p,"object"==typeof e&&e),e.isTrigger=r?2:3,e.namespace=f.join("."),e.namespace_re=e.namespace?new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=i),n=null==n?[e]:re.makeArray(n,[e]),u=re.event.special[p]||{},r||!u.trigger||u.trigger.apply(i,n)!==!1)){if(!r&&!u.noBubble&&!re.isWindow(i)){for(l=u.delegateType||p,Oe.test(l+p)||(s=s.parentNode);s;s=s.parentNode)h.push(s),c=s;
|
||
c===(i.ownerDocument||fe)&&h.push(c.defaultView||c.parentWindow||t)}for(d=0;(s=h[d++])&&!e.isPropagationStopped();)e.type=d>1?l:u.bindType||p,o=(re._data(s,"events")||{})[e.type]&&re._data(s,"handle"),o&&o.apply(s,n),o=a&&s[a],o&&o.apply&&re.acceptData(s)&&(e.result=o.apply(s,n),e.result===!1&&e.preventDefault());if(e.type=p,!r&&!e.isDefaultPrevented()&&(!u._default||u._default.apply(h.pop(),n)===!1)&&re.acceptData(i)&&a&&i[p]&&!re.isWindow(i)){c=i[a],c&&(i[a]=null),re.event.triggered=p;try{i[p]()}catch(g){}re.event.triggered=void 0,c&&(i[a]=c)}return e.result}},dispatch:function(t){t=re.event.fix(t);var e,n,i,r,o,a=[],s=Z.call(arguments),l=(re._data(this,"events")||{})[t.type]||[],u=re.event.special[t.type]||{};if(s[0]=t,t.delegateTarget=this,!u.preDispatch||u.preDispatch.call(this,t)!==!1){for(a=re.event.handlers.call(this,t,l),e=0;(r=a[e++])&&!t.isPropagationStopped();)for(t.currentTarget=r.elem,o=0;(i=r.handlers[o++])&&!t.isImmediatePropagationStopped();)(!t.namespace_re||t.namespace_re.test(i.namespace))&&(t.handleObj=i,t.data=i.data,n=((re.event.special[i.origType]||{}).handle||i.handler).apply(r.elem,s),void 0!==n&&(t.result=n)===!1&&(t.preventDefault(),t.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,t),t.result}},handlers:function(t,e){var n,i,r,o,a=[],s=e.delegateCount,l=t.target;if(s&&l.nodeType&&(!t.button||"click"!==t.type))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(l.disabled!==!0||"click"!==t.type)){for(r=[],o=0;s>o;o++)i=e[o],n=i.selector+" ",void 0===r[n]&&(r[n]=i.needsContext?re(n,this).index(l)>=0:re.find(n,this,null,[l]).length),r[n]&&r.push(i);r.length&&a.push({elem:l,handlers:r})}return s<e.length&&a.push({elem:this,handlers:e.slice(s)}),a},fix:function(t){if(t[re.expando])return t;var e,n,i,r=t.type,o=t,a=this.fixHooks[r];for(a||(this.fixHooks[r]=a=Ie.test(r)?this.mouseHooks:Ne.test(r)?this.keyHooks:{}),i=a.props?this.props.concat(a.props):this.props,t=new re.Event(o),e=i.length;e--;)n=i[e],t[n]=o[n];return t.target||(t.target=o.srcElement||fe),3===t.target.nodeType&&(t.target=t.target.parentNode),t.metaKey=!!t.metaKey,a.filter?a.filter(t,o):t},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(t,e){return null==t.which&&(t.which=null!=e.charCode?e.charCode:e.keyCode),t}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(t,e){var n,i,r,o=e.button,a=e.fromElement;return null==t.pageX&&null!=e.clientX&&(i=t.target.ownerDocument||fe,r=i.documentElement,n=i.body,t.pageX=e.clientX+(r&&r.scrollLeft||n&&n.scrollLeft||0)-(r&&r.clientLeft||n&&n.clientLeft||0),t.pageY=e.clientY+(r&&r.scrollTop||n&&n.scrollTop||0)-(r&&r.clientTop||n&&n.clientTop||0)),!t.relatedTarget&&a&&(t.relatedTarget=a===t.target?e.toElement:a),t.which||void 0===o||(t.which=1&o?1:2&o?3:4&o?2:0),t}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==f()&&this.focus)try{return this.focus(),!1}catch(t){}},delegateType:"focusin"},blur:{trigger:function(){return this===f()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return re.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(t){return re.nodeName(t.target,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}},simulate:function(t,e,n,i){var r=re.extend(new re.Event,n,{type:t,isSimulated:!0,originalEvent:{}});i?re.event.trigger(r,null,e):re.event.dispatch.call(e,r),r.isDefaultPrevented()&&n.preventDefault()}},re.removeEvent=fe.removeEventListener?function(t,e,n){t.removeEventListener&&t.removeEventListener(e,n,!1)}:function(t,e,n){var i="on"+e;t.detachEvent&&(typeof t[i]===Ce&&(t[i]=null),t.detachEvent(i,n))},re.Event=function(t,e){return this instanceof re.Event?(t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&t.returnValue===!1?h:p):this.type=t,e&&re.extend(this,e),this.timeStamp=t&&t.timeStamp||re.now(),void(this[re.expando]=!0)):new re.Event(t,e)},re.Event.prototype={isDefaultPrevented:p,isPropagationStopped:p,isImmediatePropagationStopped:p,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=h,t&&(t.preventDefault?t.preventDefault():t.returnValue=!1)},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=h,t&&(t.stopPropagation&&t.stopPropagation(),t.cancelBubble=!0)},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=h,t&&t.stopImmediatePropagation&&t.stopImmediatePropagation(),this.stopPropagation()}},re.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(t,e){re.event.special[t]={delegateType:e,bindType:e,handle:function(t){var n,i=this,r=t.relatedTarget,o=t.handleObj;return(!r||r!==i&&!re.contains(i,r))&&(t.type=o.origType,n=o.handler.apply(this,arguments),t.type=e),n}}}),ne.submitBubbles||(re.event.special.submit={setup:function(){return re.nodeName(this,"form")?!1:void re.event.add(this,"click._submit keypress._submit",function(t){var e=t.target,n=re.nodeName(e,"input")||re.nodeName(e,"button")?e.form:void 0;n&&!re._data(n,"submitBubbles")&&(re.event.add(n,"submit._submit",function(t){t._submit_bubble=!0}),re._data(n,"submitBubbles",!0))})},postDispatch:function(t){t._submit_bubble&&(delete t._submit_bubble,this.parentNode&&!t.isTrigger&&re.event.simulate("submit",this.parentNode,t,!0))},teardown:function(){return re.nodeName(this,"form")?!1:void re.event.remove(this,"._submit")}}),ne.changeBubbles||(re.event.special.change={setup:function(){return $e.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(re.event.add(this,"propertychange._change",function(t){"checked"===t.originalEvent.propertyName&&(this._just_changed=!0)}),re.event.add(this,"click._change",function(t){this._just_changed&&!t.isTrigger&&(this._just_changed=!1),re.event.simulate("change",this,t,!0)})),!1):void re.event.add(this,"beforeactivate._change",function(t){var e=t.target;$e.test(e.nodeName)&&!re._data(e,"changeBubbles")&&(re.event.add(e,"change._change",function(t){!this.parentNode||t.isSimulated||t.isTrigger||re.event.simulate("change",this.parentNode,t,!0)}),re._data(e,"changeBubbles",!0))})},handle:function(t){var e=t.target;return this!==e||t.isSimulated||t.isTrigger||"radio"!==e.type&&"checkbox"!==e.type?t.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return re.event.remove(this,"._change"),!$e.test(this.nodeName)}}),ne.focusinBubbles||re.each({focus:"focusin",blur:"focusout"},function(t,e){var n=function(t){re.event.simulate(e,t.target,re.event.fix(t),!0)};re.event.special[e]={setup:function(){var i=this.ownerDocument||this,r=re._data(i,e);r||i.addEventListener(t,n,!0),re._data(i,e,(r||0)+1)},teardown:function(){var i=this.ownerDocument||this,r=re._data(i,e)-1;r?re._data(i,e,r):(i.removeEventListener(t,n,!0),re._removeData(i,e))}}}),re.fn.extend({on:function(t,e,n,i,r){var o,a;if("object"==typeof t){"string"!=typeof e&&(n=n||e,e=void 0);for(o in t)this.on(o,e,n,t[o],r);return this}if(null==n&&null==i?(i=e,n=e=void 0):null==i&&("string"==typeof e?(i=n,n=void 0):(i=n,n=e,e=void 0)),i===!1)i=p;else if(!i)return this;return 1===r&&(a=i,i=function(t){return re().off(t),a.apply(this,arguments)},i.guid=a.guid||(a.guid=re.guid++)),this.each(function(){re.event.add(this,t,i,n,e)})},one:function(t,e,n,i){return this.on(t,e,n,i,1)},off:function(t,e,n){var i,r;if(t&&t.preventDefault&&t.handleObj)return i=t.handleObj,re(t.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof t){for(r in t)this.off(r,e,t[r]);return this}return(e===!1||"function"==typeof e)&&(n=e,e=void 0),n===!1&&(n=p),this.each(function(){re.event.remove(this,t,n,e)})},trigger:function(t,e){return this.each(function(){re.event.trigger(t,e,this)})},triggerHandler:function(t,e){var n=this[0];return n?re.event.trigger(t,e,n,!0):void 0}});var Le="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",je=/ jQuery\d+="(?:null|\d+)"/g,Re=new RegExp("<(?:"+Le+")[\\s/>]","i"),Pe=/^\s+/,He=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,qe=/<([\w:]+)/,ze=/<tbody/i,Be=/<|&#?\w+;/,We=/<(?:script|style|link)/i,Ke=/checked\s*(?:[^=]|=\s*.checked.)/i,Ue=/^$|\/(?:java|ecma)script/i,Ye=/^true\/(.*)/,Ve=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,Ze={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:ne.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},Qe=g(fe),Xe=Qe.appendChild(fe.createElement("div"));Ze.optgroup=Ze.option,Ze.tbody=Ze.tfoot=Ze.colgroup=Ze.caption=Ze.thead,Ze.th=Ze.td,re.extend({clone:function(t,e,n){var i,r,o,a,s,l=re.contains(t.ownerDocument,t);if(ne.html5Clone||re.isXMLDoc(t)||!Re.test("<"+t.nodeName+">")?o=t.cloneNode(!0):(Xe.innerHTML=t.outerHTML,Xe.removeChild(o=Xe.firstChild)),!(ne.noCloneEvent&&ne.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||re.isXMLDoc(t)))for(i=m(o),s=m(t),a=0;null!=(r=s[a]);++a)i[a]&&C(r,i[a]);if(e)if(n)for(s=s||m(t),i=i||m(o),a=0;null!=(r=s[a]);a++)k(r,i[a]);else k(t,o);return i=m(o,"script"),i.length>0&&x(i,!l&&m(t,"script")),i=s=r=null,o},buildFragment:function(t,e,n,i){for(var r,o,a,s,l,u,c,d=t.length,h=g(e),p=[],f=0;d>f;f++)if(o=t[f],o||0===o)if("object"===re.type(o))re.merge(p,o.nodeType?[o]:o);else if(Be.test(o)){for(s=s||h.appendChild(e.createElement("div")),l=(qe.exec(o)||["",""])[1].toLowerCase(),c=Ze[l]||Ze._default,s.innerHTML=c[1]+o.replace(He,"<$1></$2>")+c[2],r=c[0];r--;)s=s.lastChild;if(!ne.leadingWhitespace&&Pe.test(o)&&p.push(e.createTextNode(Pe.exec(o)[0])),!ne.tbody)for(o="table"!==l||ze.test(o)?"<table>"!==c[1]||ze.test(o)?0:s:s.firstChild,r=o&&o.childNodes.length;r--;)re.nodeName(u=o.childNodes[r],"tbody")&&!u.childNodes.length&&o.removeChild(u);for(re.merge(p,s.childNodes),s.textContent="";s.firstChild;)s.removeChild(s.firstChild);s=h.lastChild}else p.push(e.createTextNode(o));for(s&&h.removeChild(s),ne.appendChecked||re.grep(m(p,"input"),v),f=0;o=p[f++];)if((!i||-1===re.inArray(o,i))&&(a=re.contains(o.ownerDocument,o),s=m(h.appendChild(o),"script"),a&&x(s),n))for(r=0;o=s[r++];)Ue.test(o.type||"")&&n.push(o);return s=null,h},cleanData:function(t,e){for(var n,i,r,o,a=0,s=re.expando,l=re.cache,u=ne.deleteExpando,c=re.event.special;null!=(n=t[a]);a++)if((e||re.acceptData(n))&&(r=n[s],o=r&&l[r])){if(o.events)for(i in o.events)c[i]?re.event.remove(n,i):re.removeEvent(n,i,o.handle);l[r]&&(delete l[r],u?delete n[s]:typeof n.removeAttribute!==Ce?n.removeAttribute(s):n[s]=null,V.push(r))}}}),re.fn.extend({text:function(t){return Fe(this,function(t){return void 0===t?re.text(this):this.empty().append((this[0]&&this[0].ownerDocument||fe).createTextNode(t))},null,t,arguments.length)},append:function(){return this.domManip(arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=y(this,t);e.appendChild(t)}})},prepend:function(){return this.domManip(arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=y(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return this.domManip(arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return this.domManip(arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},remove:function(t,e){for(var n,i=t?re.filter(t,this):this,r=0;null!=(n=i[r]);r++)e||1!==n.nodeType||re.cleanData(m(n)),n.parentNode&&(e&&re.contains(n.ownerDocument,n)&&x(m(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){for(var t,e=0;null!=(t=this[e]);e++){for(1===t.nodeType&&re.cleanData(m(t,!1));t.firstChild;)t.removeChild(t.firstChild);t.options&&re.nodeName(t,"select")&&(t.options.length=0)}return this},clone:function(t,e){return t=null==t?!1:t,e=null==e?t:e,this.map(function(){return re.clone(this,t,e)})},html:function(t){return Fe(this,function(t){var e=this[0]||{},n=0,i=this.length;if(void 0===t)return 1===e.nodeType?e.innerHTML.replace(je,""):void 0;if(!("string"!=typeof t||We.test(t)||!ne.htmlSerialize&&Re.test(t)||!ne.leadingWhitespace&&Pe.test(t)||Ze[(qe.exec(t)||["",""])[1].toLowerCase()])){t=t.replace(He,"<$1></$2>");try{for(;i>n;n++)e=this[n]||{},1===e.nodeType&&(re.cleanData(m(e,!1)),e.innerHTML=t);e=0}catch(r){}}e&&this.empty().append(t)},null,t,arguments.length)},replaceWith:function(){var t=arguments[0];return this.domManip(arguments,function(e){t=this.parentNode,re.cleanData(m(this)),t&&t.replaceChild(e,this)}),t&&(t.length||t.nodeType)?this:this.remove()},detach:function(t){return this.remove(t,!0)},domManip:function(t,e){t=Q.apply([],t);var n,i,r,o,a,s,l=0,u=this.length,c=this,d=u-1,h=t[0],p=re.isFunction(h);if(p||u>1&&"string"==typeof h&&!ne.checkClone&&Ke.test(h))return this.each(function(n){var i=c.eq(n);p&&(t[0]=h.call(this,n,i.html())),i.domManip(t,e)});if(u&&(s=re.buildFragment(t,this[0].ownerDocument,!1,this),n=s.firstChild,1===s.childNodes.length&&(s=n),n)){for(o=re.map(m(s,"script"),b),r=o.length;u>l;l++)i=s,l!==d&&(i=re.clone(i,!0,!0),r&&re.merge(o,m(i,"script"))),e.call(this[l],i,l);if(r)for(a=o[o.length-1].ownerDocument,re.map(o,w),l=0;r>l;l++)i=o[l],Ue.test(i.type||"")&&!re._data(i,"globalEval")&&re.contains(a,i)&&(i.src?re._evalUrl&&re._evalUrl(i.src):re.globalEval((i.text||i.textContent||i.innerHTML||"").replace(Ve,"")));s=n=null}return this}}),re.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(t,e){re.fn[t]=function(t){for(var n,i=0,r=[],o=re(t),a=o.length-1;a>=i;i++)n=i===a?this:this.clone(!0),re(o[i])[e](n),X.apply(r,n.get());return this.pushStack(r)}});var Ge,Je={};!function(){var t;ne.shrinkWrapBlocks=function(){if(null!=t)return t;t=!1;var e,n,i;return n=fe.getElementsByTagName("body")[0],n&&n.style?(e=fe.createElement("div"),i=fe.createElement("div"),i.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(i).appendChild(e),typeof e.style.zoom!==Ce&&(e.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",e.appendChild(fe.createElement("div")).style.width="5px",t=3!==e.offsetWidth),n.removeChild(i),t):void 0}}();var tn,en,nn=/^margin/,rn=new RegExp("^("+Te+")(?!px)[a-z%]+$","i"),on=/^(top|right|bottom|left)$/;t.getComputedStyle?(tn=function(e){return e.ownerDocument.defaultView.opener?e.ownerDocument.defaultView.getComputedStyle(e,null):t.getComputedStyle(e,null)},en=function(t,e,n){var i,r,o,a,s=t.style;return n=n||tn(t),a=n?n.getPropertyValue(e)||n[e]:void 0,n&&(""!==a||re.contains(t.ownerDocument,t)||(a=re.style(t,e)),rn.test(a)&&nn.test(e)&&(i=s.width,r=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=i,s.minWidth=r,s.maxWidth=o)),void 0===a?a:a+""}):fe.documentElement.currentStyle&&(tn=function(t){return t.currentStyle},en=function(t,e,n){var i,r,o,a,s=t.style;return n=n||tn(t),a=n?n[e]:void 0,null==a&&s&&s[e]&&(a=s[e]),rn.test(a)&&!on.test(e)&&(i=s.left,r=t.runtimeStyle,o=r&&r.left,o&&(r.left=t.currentStyle.left),s.left="fontSize"===e?"1em":a,a=s.pixelLeft+"px",s.left=i,o&&(r.left=o)),void 0===a?a:a+""||"auto"}),function(){function e(){var e,n,i,r;n=fe.getElementsByTagName("body")[0],n&&n.style&&(e=fe.createElement("div"),i=fe.createElement("div"),i.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(i).appendChild(e),e.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",o=a=!1,l=!0,t.getComputedStyle&&(o="1%"!==(t.getComputedStyle(e,null)||{}).top,a="4px"===(t.getComputedStyle(e,null)||{width:"4px"}).width,r=e.appendChild(fe.createElement("div")),r.style.cssText=e.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",r.style.marginRight=r.style.width="0",e.style.width="1px",l=!parseFloat((t.getComputedStyle(r,null)||{}).marginRight),e.removeChild(r)),e.innerHTML="<table><tr><td></td><td>t</td></tr></table>",r=e.getElementsByTagName("td"),r[0].style.cssText="margin:0;border:0;padding:0;display:none",s=0===r[0].offsetHeight,s&&(r[0].style.display="",r[1].style.display="none",s=0===r[0].offsetHeight),n.removeChild(i))}var n,i,r,o,a,s,l;n=fe.createElement("div"),n.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",r=n.getElementsByTagName("a")[0],i=r&&r.style,i&&(i.cssText="float:left;opacity:.5",ne.opacity="0.5"===i.opacity,ne.cssFloat=!!i.cssFloat,n.style.backgroundClip="content-box",n.cloneNode(!0).style.backgroundClip="",ne.clearCloneStyle="content-box"===n.style.backgroundClip,ne.boxSizing=""===i.boxSizing||""===i.MozBoxSizing||""===i.WebkitBoxSizing,re.extend(ne,{reliableHiddenOffsets:function(){return null==s&&e(),s},boxSizingReliable:function(){return null==a&&e(),a},pixelPosition:function(){return null==o&&e(),o},reliableMarginRight:function(){return null==l&&e(),l}}))}(),re.swap=function(t,e,n,i){var r,o,a={};for(o in e)a[o]=t.style[o],t.style[o]=e[o];r=n.apply(t,i||[]);for(o in e)t.style[o]=a[o];return r};var an=/alpha\([^)]*\)/i,sn=/opacity\s*=\s*([^)]*)/,ln=/^(none|table(?!-c[ea]).+)/,un=new RegExp("^("+Te+")(.*)$","i"),cn=new RegExp("^([+-])=("+Te+")","i"),dn={position:"absolute",visibility:"hidden",display:"block"},hn={letterSpacing:"0",fontWeight:"400"},pn=["Webkit","O","Moz","ms"];re.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=en(t,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":ne.cssFloat?"cssFloat":"styleFloat"},style:function(t,e,n,i){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var r,o,a,s=re.camelCase(e),l=t.style;if(e=re.cssProps[s]||(re.cssProps[s]=S(l,s)),a=re.cssHooks[e]||re.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(r=a.get(t,!1,i))?r:l[e];if(o=typeof n,"string"===o&&(r=cn.exec(n))&&(n=(r[1]+1)*r[2]+parseFloat(re.css(t,e)),o="number"),null!=n&&n===n&&("number"!==o||re.cssNumber[s]||(n+="px"),ne.clearCloneStyle||""!==n||0!==e.indexOf("background")||(l[e]="inherit"),!(a&&"set"in a&&void 0===(n=a.set(t,n,i)))))try{l[e]=n}catch(u){}}},css:function(t,e,n,i){var r,o,a,s=re.camelCase(e);return e=re.cssProps[s]||(re.cssProps[s]=S(t.style,s)),a=re.cssHooks[e]||re.cssHooks[s],a&&"get"in a&&(o=a.get(t,!0,n)),void 0===o&&(o=en(t,e,i)),"normal"===o&&e in hn&&(o=hn[e]),""===n||n?(r=parseFloat(o),n===!0||re.isNumeric(r)?r||0:o):o}}),re.each(["height","width"],function(t,e){re.cssHooks[e]={get:function(t,n,i){return n?ln.test(re.css(t,"display"))&&0===t.offsetWidth?re.swap(t,dn,function(){return $(t,e,i)}):$(t,e,i):void 0},set:function(t,n,i){var r=i&&tn(t);return F(t,n,i?E(t,e,i,ne.boxSizing&&"border-box"===re.css(t,"boxSizing",!1,r),r):0)}}}),ne.opacity||(re.cssHooks.opacity={get:function(t,e){return sn.test((e&&t.currentStyle?t.currentStyle.filter:t.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":e?"1":""},set:function(t,e){var n=t.style,i=t.currentStyle,r=re.isNumeric(e)?"alpha(opacity="+100*e+")":"",o=i&&i.filter||n.filter||"";n.zoom=1,(e>=1||""===e)&&""===re.trim(o.replace(an,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===e||i&&!i.filter)||(n.filter=an.test(o)?o.replace(an,r):o+" "+r)}}),re.cssHooks.marginRight=T(ne.reliableMarginRight,function(t,e){return e?re.swap(t,{display:"inline-block"},en,[t,"marginRight"]):void 0}),re.each({margin:"",padding:"",border:"Width"},function(t,e){re.cssHooks[t+e]={expand:function(n){for(var i=0,r={},o="string"==typeof n?n.split(" "):[n];4>i;i++)r[t+Se[i]+e]=o[i]||o[i-2]||o[0];return r}},nn.test(t)||(re.cssHooks[t+e].set=F)}),re.fn.extend({css:function(t,e){return Fe(this,function(t,e,n){var i,r,o={},a=0;if(re.isArray(e)){for(i=tn(t),r=e.length;r>a;a++)o[e[a]]=re.css(t,e[a],!1,i);return o}return void 0!==n?re.style(t,e,n):re.css(t,e)},t,e,arguments.length>1)},show:function(){return A(this,!0)},hide:function(){return A(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each(function(){Ae(this)?re(this).show():re(this).hide()})}}),re.Tween=N,N.prototype={constructor:N,init:function(t,e,n,i,r,o){this.elem=t,this.prop=n,this.easing=r||"swing",this.options=e,this.start=this.now=this.cur(),this.end=i,this.unit=o||(re.cssNumber[n]?"":"px")},cur:function(){var t=N.propHooks[this.prop];return t&&t.get?t.get(this):N.propHooks._default.get(this)},run:function(t){var e,n=N.propHooks[this.prop];return this.pos=e=this.options.duration?re.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):N.propHooks._default.set(this),this}},N.prototype.init.prototype=N.prototype,N.propHooks={_default:{get:function(t){var e;return null==t.elem[t.prop]||t.elem.style&&null!=t.elem.style[t.prop]?(e=re.css(t.elem,t.prop,""),e&&"auto"!==e?e:0):t.elem[t.prop]},set:function(t){re.fx.step[t.prop]?re.fx.step[t.prop](t):t.elem.style&&(null!=t.elem.style[re.cssProps[t.prop]]||re.cssHooks[t.prop])?re.style(t.elem,t.prop,t.now+t.unit):t.elem[t.prop]=t.now}}},N.propHooks.scrollTop=N.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},re.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2}},re.fx=N.prototype.init,re.fx.step={};var fn,gn,mn=/^(?:toggle|show|hide)$/,vn=new RegExp("^(?:([+-])=|)("+Te+")([a-z%]*)$","i"),yn=/queueHooks$/,bn=[L],wn={"*":[function(t,e){var n=this.createTween(t,e),i=n.cur(),r=vn.exec(e),o=r&&r[3]||(re.cssNumber[t]?"":"px"),a=(re.cssNumber[t]||"px"!==o&&+i)&&vn.exec(re.css(n.elem,t)),s=1,l=20;if(a&&a[3]!==o){o=o||a[3],r=r||[],a=+i||1;do s=s||".5",a/=s,re.style(n.elem,t,a+o);while(s!==(s=n.cur()/i)&&1!==s&&--l)}return r&&(a=n.start=+a||+i||0,n.unit=o,n.end=r[1]?a+(r[1]+1)*r[2]:+r[2]),n}]};re.Animation=re.extend(R,{tweener:function(t,e){re.isFunction(t)?(e=t,t=["*"]):t=t.split(" ");for(var n,i=0,r=t.length;r>i;i++)n=t[i],wn[n]=wn[n]||[],wn[n].unshift(e)},prefilter:function(t,e){e?bn.unshift(t):bn.push(t)}}),re.speed=function(t,e,n){var i=t&&"object"==typeof t?re.extend({},t):{complete:n||!n&&e||re.isFunction(t)&&t,duration:t,easing:n&&e||e&&!re.isFunction(e)&&e};return i.duration=re.fx.off?0:"number"==typeof i.duration?i.duration:i.duration in re.fx.speeds?re.fx.speeds[i.duration]:re.fx.speeds._default,(null==i.queue||i.queue===!0)&&(i.queue="fx"),i.old=i.complete,i.complete=function(){re.isFunction(i.old)&&i.old.call(this),i.queue&&re.dequeue(this,i.queue)},i},re.fn.extend({fadeTo:function(t,e,n,i){return this.filter(Ae).css("opacity",0).show().end().animate({opacity:e},t,n,i)},animate:function(t,e,n,i){var r=re.isEmptyObject(t),o=re.speed(e,n,i),a=function(){var e=R(this,re.extend({},t),o);(r||re._data(this,"finish"))&&e.stop(!0)};return a.finish=a,r||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(t,e,n){var i=function(t){var e=t.stop;delete t.stop,e(n)};return"string"!=typeof t&&(n=e,e=t,t=void 0),e&&t!==!1&&this.queue(t||"fx",[]),this.each(function(){var e=!0,r=null!=t&&t+"queueHooks",o=re.timers,a=re._data(this);if(r)a[r]&&a[r].stop&&i(a[r]);else for(r in a)a[r]&&a[r].stop&&yn.test(r)&&i(a[r]);for(r=o.length;r--;)o[r].elem!==this||null!=t&&o[r].queue!==t||(o[r].anim.stop(n),e=!1,o.splice(r,1));(e||!n)&&re.dequeue(this,t)})},finish:function(t){return t!==!1&&(t=t||"fx"),this.each(function(){var e,n=re._data(this),i=n[t+"queue"],r=n[t+"queueHooks"],o=re.timers,a=i?i.length:0;for(n.finish=!0,re.queue(this,t,[]),r&&r.stop&&r.stop.call(this,!0),e=o.length;e--;)o[e].elem===this&&o[e].queue===t&&(o[e].anim.stop(!0),o.splice(e,1));for(e=0;a>e;e++)i[e]&&i[e].finish&&i[e].finish.call(this);delete n.finish})}}),re.each(["toggle","show","hide"],function(t,e){var n=re.fn[e];re.fn[e]=function(t,i,r){return null==t||"boolean"==typeof t?n.apply(this,arguments):this.animate(O(e,!0),t,i,r)}}),re.each({slideDown:O("show"),slideUp:O("hide"),slideToggle:O("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(t,e){re.fn[t]=function(t,n,i){return this.animate(e,t,n,i)}}),re.timers=[],re.fx.tick=function(){var t,e=re.timers,n=0;for(fn=re.now();n<e.length;n++)t=e[n],t()||e[n]!==t||e.splice(n--,1);e.length||re.fx.stop(),fn=void 0},re.fx.timer=function(t){re.timers.push(t),t()?re.fx.start():re.timers.pop()},re.fx.interval=13,re.fx.start=function(){gn||(gn=setInterval(re.fx.tick,re.fx.interval))},re.fx.stop=function(){clearInterval(gn),gn=null},re.fx.speeds={slow:600,fast:200,_default:400},re.fn.delay=function(t,e){return t=re.fx?re.fx.speeds[t]||t:t,e=e||"fx",this.queue(e,function(e,n){var i=setTimeout(e,t);n.stop=function(){clearTimeout(i)}})},function(){var t,e,n,i,r;e=fe.createElement("div"),e.setAttribute("className","t"),e.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",i=e.getElementsByTagName("a")[0],n=fe.createElement("select"),r=n.appendChild(fe.createElement("option")),t=e.getElementsByTagName("input")[0],i.style.cssText="top:1px",ne.getSetAttribute="t"!==e.className,ne.style=/top/.test(i.getAttribute("style")),ne.hrefNormalized="/a"===i.getAttribute("href"),ne.checkOn=!!t.value,ne.optSelected=r.selected,ne.enctype=!!fe.createElement("form").enctype,n.disabled=!0,ne.optDisabled=!r.disabled,t=fe.createElement("input"),t.setAttribute("value",""),ne.input=""===t.getAttribute("value"),t.value="t",t.setAttribute("type","radio"),ne.radioValue="t"===t.value}();var xn=/\r/g;re.fn.extend({val:function(t){var e,n,i,r=this[0];{if(arguments.length)return i=re.isFunction(t),this.each(function(n){var r;1===this.nodeType&&(r=i?t.call(this,n,re(this).val()):t,null==r?r="":"number"==typeof r?r+="":re.isArray(r)&&(r=re.map(r,function(t){return null==t?"":t+""})),e=re.valHooks[this.type]||re.valHooks[this.nodeName.toLowerCase()],e&&"set"in e&&void 0!==e.set(this,r,"value")||(this.value=r))});if(r)return e=re.valHooks[r.type]||re.valHooks[r.nodeName.toLowerCase()],e&&"get"in e&&void 0!==(n=e.get(r,"value"))?n:(n=r.value,"string"==typeof n?n.replace(xn,""):null==n?"":n)}}}),re.extend({valHooks:{option:{get:function(t){var e=re.find.attr(t,"value");return null!=e?e:re.trim(re.text(t))}},select:{get:function(t){for(var e,n,i=t.options,r=t.selectedIndex,o="select-one"===t.type||0>r,a=o?null:[],s=o?r+1:i.length,l=0>r?s:o?r:0;s>l;l++)if(n=i[l],!(!n.selected&&l!==r||(ne.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&re.nodeName(n.parentNode,"optgroup"))){if(e=re(n).val(),o)return e;a.push(e)}return a},set:function(t,e){for(var n,i,r=t.options,o=re.makeArray(e),a=r.length;a--;)if(i=r[a],re.inArray(re.valHooks.option.get(i),o)>=0)try{i.selected=n=!0}catch(s){i.scrollHeight}else i.selected=!1;return n||(t.selectedIndex=-1),r}}}}),re.each(["radio","checkbox"],function(){re.valHooks[this]={set:function(t,e){return re.isArray(e)?t.checked=re.inArray(re(t).val(),e)>=0:void 0}},ne.checkOn||(re.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})});var kn,Cn,_n=re.expr.attrHandle,Dn=/^(?:checked|selected)$/i,Tn=ne.getSetAttribute,Sn=ne.input;re.fn.extend({attr:function(t,e){return Fe(this,re.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each(function(){re.removeAttr(this,t)})}}),re.extend({attr:function(t,e,n){var i,r,o=t.nodeType;if(t&&3!==o&&8!==o&&2!==o)return typeof t.getAttribute===Ce?re.prop(t,e,n):(1===o&&re.isXMLDoc(t)||(e=e.toLowerCase(),i=re.attrHooks[e]||(re.expr.match.bool.test(e)?Cn:kn)),void 0===n?i&&"get"in i&&null!==(r=i.get(t,e))?r:(r=re.find.attr(t,e),null==r?void 0:r):null!==n?i&&"set"in i&&void 0!==(r=i.set(t,n,e))?r:(t.setAttribute(e,n+""),n):void re.removeAttr(t,e))},removeAttr:function(t,e){var n,i,r=0,o=e&&e.match(be);if(o&&1===t.nodeType)for(;n=o[r++];)i=re.propFix[n]||n,re.expr.match.bool.test(n)?Sn&&Tn||!Dn.test(n)?t[i]=!1:t[re.camelCase("default-"+n)]=t[i]=!1:re.attr(t,n,""),t.removeAttribute(Tn?n:i)},attrHooks:{type:{set:function(t,e){if(!ne.radioValue&&"radio"===e&&re.nodeName(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}}}),Cn={set:function(t,e,n){return e===!1?re.removeAttr(t,n):Sn&&Tn||!Dn.test(n)?t.setAttribute(!Tn&&re.propFix[n]||n,n):t[re.camelCase("default-"+n)]=t[n]=!0,n}},re.each(re.expr.match.bool.source.match(/\w+/g),function(t,e){var n=_n[e]||re.find.attr;_n[e]=Sn&&Tn||!Dn.test(e)?function(t,e,i){var r,o;return i||(o=_n[e],_n[e]=r,r=null!=n(t,e,i)?e.toLowerCase():null,_n[e]=o),r}:function(t,e,n){return n?void 0:t[re.camelCase("default-"+e)]?e.toLowerCase():null}}),Sn&&Tn||(re.attrHooks.value={set:function(t,e,n){return re.nodeName(t,"input")?void(t.defaultValue=e):kn&&kn.set(t,e,n)}}),Tn||(kn={set:function(t,e,n){var i=t.getAttributeNode(n);return i||t.setAttributeNode(i=t.ownerDocument.createAttribute(n)),i.value=e+="","value"===n||e===t.getAttribute(n)?e:void 0}},_n.id=_n.name=_n.coords=function(t,e,n){var i;return n?void 0:(i=t.getAttributeNode(e))&&""!==i.value?i.value:null},re.valHooks.button={get:function(t,e){var n=t.getAttributeNode(e);return n&&n.specified?n.value:void 0},set:kn.set},re.attrHooks.contenteditable={set:function(t,e,n){kn.set(t,""===e?!1:e,n)}},re.each(["width","height"],function(t,e){re.attrHooks[e]={set:function(t,n){return""===n?(t.setAttribute(e,"auto"),n):void 0}}})),ne.style||(re.attrHooks.style={get:function(t){return t.style.cssText||void 0},set:function(t,e){return t.style.cssText=e+""}});var An=/^(?:input|select|textarea|button|object)$/i,Fn=/^(?:a|area)$/i;re.fn.extend({prop:function(t,e){return Fe(this,re.prop,t,e,arguments.length>1)},removeProp:function(t){return t=re.propFix[t]||t,this.each(function(){try{this[t]=void 0,delete this[t]}catch(e){}})}}),re.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(t,e,n){var i,r,o,a=t.nodeType;if(t&&3!==a&&8!==a&&2!==a)return o=1!==a||!re.isXMLDoc(t),o&&(e=re.propFix[e]||e,r=re.propHooks[e]),void 0!==n?r&&"set"in r&&void 0!==(i=r.set(t,n,e))?i:t[e]=n:r&&"get"in r&&null!==(i=r.get(t,e))?i:t[e]},propHooks:{tabIndex:{get:function(t){var e=re.find.attr(t,"tabindex");return e?parseInt(e,10):An.test(t.nodeName)||Fn.test(t.nodeName)&&t.href?0:-1}}}}),ne.hrefNormalized||re.each(["href","src"],function(t,e){re.propHooks[e]={get:function(t){return t.getAttribute(e,4)}}}),ne.optSelected||(re.propHooks.selected={get:function(t){var e=t.parentNode;return e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex),null}}),re.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){re.propFix[this.toLowerCase()]=this}),ne.enctype||(re.propFix.enctype="encoding");var En=/[\t\r\n\f]/g;re.fn.extend({addClass:function(t){var e,n,i,r,o,a,s=0,l=this.length,u="string"==typeof t&&t;if(re.isFunction(t))return this.each(function(e){re(this).addClass(t.call(this,e,this.className))});if(u)for(e=(t||"").match(be)||[];l>s;s++)if(n=this[s],i=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(En," "):" ")){for(o=0;r=e[o++];)i.indexOf(" "+r+" ")<0&&(i+=r+" ");a=re.trim(i),n.className!==a&&(n.className=a)}return this},removeClass:function(t){var e,n,i,r,o,a,s=0,l=this.length,u=0===arguments.length||"string"==typeof t&&t;if(re.isFunction(t))return this.each(function(e){re(this).removeClass(t.call(this,e,this.className))});if(u)for(e=(t||"").match(be)||[];l>s;s++)if(n=this[s],i=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(En," "):"")){for(o=0;r=e[o++];)for(;i.indexOf(" "+r+" ")>=0;)i=i.replace(" "+r+" "," ");a=t?re.trim(i):"",n.className!==a&&(n.className=a)}return this},toggleClass:function(t,e){var n=typeof t;return"boolean"==typeof e&&"string"===n?e?this.addClass(t):this.removeClass(t):this.each(re.isFunction(t)?function(n){re(this).toggleClass(t.call(this,n,this.className,e),e)}:function(){if("string"===n)for(var e,i=0,r=re(this),o=t.match(be)||[];e=o[i++];)r.hasClass(e)?r.removeClass(e):r.addClass(e);
|
||
else(n===Ce||"boolean"===n)&&(this.className&&re._data(this,"__className__",this.className),this.className=this.className||t===!1?"":re._data(this,"__className__")||"")})},hasClass:function(t){for(var e=" "+t+" ",n=0,i=this.length;i>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(En," ").indexOf(e)>=0)return!0;return!1}}),re.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(t,e){re.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}}),re.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)},bind:function(t,e,n){return this.on(t,null,e,n)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,n,i){return this.on(e,t,n,i)},undelegate:function(t,e,n){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",n)}});var $n=re.now(),Nn=/\?/,In=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;re.parseJSON=function(e){if(t.JSON&&t.JSON.parse)return t.JSON.parse(e+"");var n,i=null,r=re.trim(e+"");return r&&!re.trim(r.replace(In,function(t,e,r,o){return n&&e&&(i=0),0===i?t:(n=r||e,i+=!o-!r,"")}))?Function("return "+r)():re.error("Invalid JSON: "+e)},re.parseXML=function(e){var n,i;if(!e||"string"!=typeof e)return null;try{t.DOMParser?(i=new DOMParser,n=i.parseFromString(e,"text/xml")):(n=new ActiveXObject("Microsoft.XMLDOM"),n.async="false",n.loadXML(e))}catch(r){n=void 0}return n&&n.documentElement&&!n.getElementsByTagName("parsererror").length||re.error("Invalid XML: "+e),n};var On,Mn,Ln=/#.*$/,jn=/([?&])_=[^&]*/,Rn=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Pn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Hn=/^(?:GET|HEAD)$/,qn=/^\/\//,zn=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Bn={},Wn={},Kn="*/".concat("*");try{Mn=location.href}catch(Un){Mn=fe.createElement("a"),Mn.href="",Mn=Mn.href}On=zn.exec(Mn.toLowerCase())||[],re.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Mn,type:"GET",isLocal:Pn.test(On[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Kn,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":re.parseJSON,"text xml":re.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?q(q(t,re.ajaxSettings),e):q(re.ajaxSettings,t)},ajaxPrefilter:P(Bn),ajaxTransport:P(Wn),ajax:function(t,e){function n(t,e,n,i){var r,c,v,y,w,k=e;2!==b&&(b=2,s&&clearTimeout(s),u=void 0,a=i||"",x.readyState=t>0?4:0,r=t>=200&&300>t||304===t,n&&(y=z(d,x,n)),y=B(d,y,x,r),r?(d.ifModified&&(w=x.getResponseHeader("Last-Modified"),w&&(re.lastModified[o]=w),w=x.getResponseHeader("etag"),w&&(re.etag[o]=w)),204===t||"HEAD"===d.type?k="nocontent":304===t?k="notmodified":(k=y.state,c=y.data,v=y.error,r=!v)):(v=k,(t||!k)&&(k="error",0>t&&(t=0))),x.status=t,x.statusText=(e||k)+"",r?f.resolveWith(h,[c,k,x]):f.rejectWith(h,[x,k,v]),x.statusCode(m),m=void 0,l&&p.trigger(r?"ajaxSuccess":"ajaxError",[x,d,r?c:v]),g.fireWith(h,[x,k]),l&&(p.trigger("ajaxComplete",[x,d]),--re.active||re.event.trigger("ajaxStop")))}"object"==typeof t&&(e=t,t=void 0),e=e||{};var i,r,o,a,s,l,u,c,d=re.ajaxSetup({},e),h=d.context||d,p=d.context&&(h.nodeType||h.jquery)?re(h):re.event,f=re.Deferred(),g=re.Callbacks("once memory"),m=d.statusCode||{},v={},y={},b=0,w="canceled",x={readyState:0,getResponseHeader:function(t){var e;if(2===b){if(!c)for(c={};e=Rn.exec(a);)c[e[1].toLowerCase()]=e[2];e=c[t.toLowerCase()]}return null==e?null:e},getAllResponseHeaders:function(){return 2===b?a:null},setRequestHeader:function(t,e){var n=t.toLowerCase();return b||(t=y[n]=y[n]||t,v[t]=e),this},overrideMimeType:function(t){return b||(d.mimeType=t),this},statusCode:function(t){var e;if(t)if(2>b)for(e in t)m[e]=[m[e],t[e]];else x.always(t[x.status]);return this},abort:function(t){var e=t||w;return u&&u.abort(e),n(0,e),this}};if(f.promise(x).complete=g.add,x.success=x.done,x.error=x.fail,d.url=((t||d.url||Mn)+"").replace(Ln,"").replace(qn,On[1]+"//"),d.type=e.method||e.type||d.method||d.type,d.dataTypes=re.trim(d.dataType||"*").toLowerCase().match(be)||[""],null==d.crossDomain&&(i=zn.exec(d.url.toLowerCase()),d.crossDomain=!(!i||i[1]===On[1]&&i[2]===On[2]&&(i[3]||("http:"===i[1]?"80":"443"))===(On[3]||("http:"===On[1]?"80":"443")))),d.data&&d.processData&&"string"!=typeof d.data&&(d.data=re.param(d.data,d.traditional)),H(Bn,d,e,x),2===b)return x;l=re.event&&d.global,l&&0===re.active++&&re.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!Hn.test(d.type),o=d.url,d.hasContent||(d.data&&(o=d.url+=(Nn.test(o)?"&":"?")+d.data,delete d.data),d.cache===!1&&(d.url=jn.test(o)?o.replace(jn,"$1_="+$n++):o+(Nn.test(o)?"&":"?")+"_="+$n++)),d.ifModified&&(re.lastModified[o]&&x.setRequestHeader("If-Modified-Since",re.lastModified[o]),re.etag[o]&&x.setRequestHeader("If-None-Match",re.etag[o])),(d.data&&d.hasContent&&d.contentType!==!1||e.contentType)&&x.setRequestHeader("Content-Type",d.contentType),x.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+Kn+"; q=0.01":""):d.accepts["*"]);for(r in d.headers)x.setRequestHeader(r,d.headers[r]);if(d.beforeSend&&(d.beforeSend.call(h,x,d)===!1||2===b))return x.abort();w="abort";for(r in{success:1,error:1,complete:1})x[r](d[r]);if(u=H(Wn,d,e,x)){x.readyState=1,l&&p.trigger("ajaxSend",[x,d]),d.async&&d.timeout>0&&(s=setTimeout(function(){x.abort("timeout")},d.timeout));try{b=1,u.send(v,n)}catch(k){if(!(2>b))throw k;n(-1,k)}}else n(-1,"No Transport");return x},getJSON:function(t,e,n){return re.get(t,e,n,"json")},getScript:function(t,e){return re.get(t,void 0,e,"script")}}),re.each(["get","post"],function(t,e){re[e]=function(t,n,i,r){return re.isFunction(n)&&(r=r||i,i=n,n=void 0),re.ajax({url:t,type:e,dataType:r,data:n,success:i})}}),re._evalUrl=function(t){return re.ajax({url:t,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},re.fn.extend({wrapAll:function(t){if(re.isFunction(t))return this.each(function(e){re(this).wrapAll(t.call(this,e))});if(this[0]){var e=re(t,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstChild&&1===t.firstChild.nodeType;)t=t.firstChild;return t}).append(this)}return this},wrapInner:function(t){return this.each(re.isFunction(t)?function(e){re(this).wrapInner(t.call(this,e))}:function(){var e=re(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)})},wrap:function(t){var e=re.isFunction(t);return this.each(function(n){re(this).wrapAll(e?t.call(this,n):t)})},unwrap:function(){return this.parent().each(function(){re.nodeName(this,"body")||re(this).replaceWith(this.childNodes)}).end()}}),re.expr.filters.hidden=function(t){return t.offsetWidth<=0&&t.offsetHeight<=0||!ne.reliableHiddenOffsets()&&"none"===(t.style&&t.style.display||re.css(t,"display"))},re.expr.filters.visible=function(t){return!re.expr.filters.hidden(t)};var Yn=/%20/g,Vn=/\[\]$/,Zn=/\r?\n/g,Qn=/^(?:submit|button|image|reset|file)$/i,Xn=/^(?:input|select|textarea|keygen)/i;re.param=function(t,e){var n,i=[],r=function(t,e){e=re.isFunction(e)?e():null==e?"":e,i[i.length]=encodeURIComponent(t)+"="+encodeURIComponent(e)};if(void 0===e&&(e=re.ajaxSettings&&re.ajaxSettings.traditional),re.isArray(t)||t.jquery&&!re.isPlainObject(t))re.each(t,function(){r(this.name,this.value)});else for(n in t)W(n,t[n],e,r);return i.join("&").replace(Yn,"+")},re.fn.extend({serialize:function(){return re.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=re.prop(this,"elements");return t?re.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!re(this).is(":disabled")&&Xn.test(this.nodeName)&&!Qn.test(t)&&(this.checked||!Ee.test(t))}).map(function(t,e){var n=re(this).val();return null==n?null:re.isArray(n)?re.map(n,function(t){return{name:e.name,value:t.replace(Zn,"\r\n")}}):{name:e.name,value:n.replace(Zn,"\r\n")}}).get()}}),re.ajaxSettings.xhr=void 0!==t.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&K()||U()}:K;var Gn=0,Jn={},ti=re.ajaxSettings.xhr();t.attachEvent&&t.attachEvent("onunload",function(){for(var t in Jn)Jn[t](void 0,!0)}),ne.cors=!!ti&&"withCredentials"in ti,ti=ne.ajax=!!ti,ti&&re.ajaxTransport(function(t){if(!t.crossDomain||ne.cors){var e;return{send:function(n,i){var r,o=t.xhr(),a=++Gn;if(o.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(r in t.xhrFields)o[r]=t.xhrFields[r];t.mimeType&&o.overrideMimeType&&o.overrideMimeType(t.mimeType),t.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest");for(r in n)void 0!==n[r]&&o.setRequestHeader(r,n[r]+"");o.send(t.hasContent&&t.data||null),e=function(n,r){var s,l,u;if(e&&(r||4===o.readyState))if(delete Jn[a],e=void 0,o.onreadystatechange=re.noop,r)4!==o.readyState&&o.abort();else{u={},s=o.status,"string"==typeof o.responseText&&(u.text=o.responseText);try{l=o.statusText}catch(c){l=""}s||!t.isLocal||t.crossDomain?1223===s&&(s=204):s=u.text?200:404}u&&i(s,l,u,o.getAllResponseHeaders())},t.async?4===o.readyState?setTimeout(e):o.onreadystatechange=Jn[a]=e:e()},abort:function(){e&&e(void 0,!0)}}}}),re.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(t){return re.globalEval(t),t}}}),re.ajaxPrefilter("script",function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET",t.global=!1)}),re.ajaxTransport("script",function(t){if(t.crossDomain){var e,n=fe.head||re("head")[0]||fe.documentElement;return{send:function(i,r){e=fe.createElement("script"),e.async=!0,t.scriptCharset&&(e.charset=t.scriptCharset),e.src=t.url,e.onload=e.onreadystatechange=function(t,n){(n||!e.readyState||/loaded|complete/.test(e.readyState))&&(e.onload=e.onreadystatechange=null,e.parentNode&&e.parentNode.removeChild(e),e=null,n||r(200,"success"))},n.insertBefore(e,n.firstChild)},abort:function(){e&&e.onload(void 0,!0)}}}});var ei=[],ni=/(=)\?(?=&|$)|\?\?/;re.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=ei.pop()||re.expando+"_"+$n++;return this[t]=!0,t}}),re.ajaxPrefilter("json jsonp",function(e,n,i){var r,o,a,s=e.jsonp!==!1&&(ni.test(e.url)?"url":"string"==typeof e.data&&!(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&ni.test(e.data)&&"data");return s||"jsonp"===e.dataTypes[0]?(r=e.jsonpCallback=re.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,s?e[s]=e[s].replace(ni,"$1"+r):e.jsonp!==!1&&(e.url+=(Nn.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return a||re.error(r+" was not called"),a[0]},e.dataTypes[0]="json",o=t[r],t[r]=function(){a=arguments},i.always(function(){t[r]=o,e[r]&&(e.jsonpCallback=n.jsonpCallback,ei.push(r)),a&&re.isFunction(o)&&o(a[0]),a=o=void 0}),"script"):void 0}),re.parseHTML=function(t,e,n){if(!t||"string"!=typeof t)return null;"boolean"==typeof e&&(n=e,e=!1),e=e||fe;var i=de.exec(t),r=!n&&[];return i?[e.createElement(i[1])]:(i=re.buildFragment([t],e,r),r&&r.length&&re(r).remove(),re.merge([],i.childNodes))};var ii=re.fn.load;re.fn.load=function(t,e,n){if("string"!=typeof t&&ii)return ii.apply(this,arguments);var i,r,o,a=this,s=t.indexOf(" ");return s>=0&&(i=re.trim(t.slice(s,t.length)),t=t.slice(0,s)),re.isFunction(e)?(n=e,e=void 0):e&&"object"==typeof e&&(o="POST"),a.length>0&&re.ajax({url:t,type:o,dataType:"html",data:e}).done(function(t){r=arguments,a.html(i?re("<div>").append(re.parseHTML(t)).find(i):t)}).complete(n&&function(t,e){a.each(n,r||[t.responseText,e,t])}),this},re.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,e){re.fn[e]=function(t){return this.on(e,t)}}),re.expr.filters.animated=function(t){return re.grep(re.timers,function(e){return t===e.elem}).length};var ri=t.document.documentElement;re.offset={setOffset:function(t,e,n){var i,r,o,a,s,l,u,c=re.css(t,"position"),d=re(t),h={};"static"===c&&(t.style.position="relative"),s=d.offset(),o=re.css(t,"top"),l=re.css(t,"left"),u=("absolute"===c||"fixed"===c)&&re.inArray("auto",[o,l])>-1,u?(i=d.position(),a=i.top,r=i.left):(a=parseFloat(o)||0,r=parseFloat(l)||0),re.isFunction(e)&&(e=e.call(t,n,s)),null!=e.top&&(h.top=e.top-s.top+a),null!=e.left&&(h.left=e.left-s.left+r),"using"in e?e.using.call(t,h):d.css(h)}},re.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){re.offset.setOffset(this,t,e)});var e,n,i={top:0,left:0},r=this[0],o=r&&r.ownerDocument;if(o)return e=o.documentElement,re.contains(e,r)?(typeof r.getBoundingClientRect!==Ce&&(i=r.getBoundingClientRect()),n=Y(o),{top:i.top+(n.pageYOffset||e.scrollTop)-(e.clientTop||0),left:i.left+(n.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}):i},position:function(){if(this[0]){var t,e,n={top:0,left:0},i=this[0];return"fixed"===re.css(i,"position")?e=i.getBoundingClientRect():(t=this.offsetParent(),e=this.offset(),re.nodeName(t[0],"html")||(n=t.offset()),n.top+=re.css(t[0],"borderTopWidth",!0),n.left+=re.css(t[0],"borderLeftWidth",!0)),{top:e.top-n.top-re.css(i,"marginTop",!0),left:e.left-n.left-re.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent||ri;t&&!re.nodeName(t,"html")&&"static"===re.css(t,"position");)t=t.offsetParent;return t||ri})}}),re.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,e){var n=/Y/.test(e);re.fn[t]=function(i){return Fe(this,function(t,i,r){var o=Y(t);return void 0===r?o?e in o?o[e]:o.document.documentElement[i]:t[i]:void(o?o.scrollTo(n?re(o).scrollLeft():r,n?r:re(o).scrollTop()):t[i]=r)},t,i,arguments.length,null)}}),re.each(["top","left"],function(t,e){re.cssHooks[e]=T(ne.pixelPosition,function(t,n){return n?(n=en(t,e),rn.test(n)?re(t).position()[e]+"px":n):void 0})}),re.each({Height:"height",Width:"width"},function(t,e){re.each({padding:"inner"+t,content:e,"":"outer"+t},function(n,i){re.fn[i]=function(i,r){var o=arguments.length&&(n||"boolean"!=typeof i),a=n||(i===!0||r===!0?"margin":"border");return Fe(this,function(e,n,i){var r;return re.isWindow(e)?e.document.documentElement["client"+t]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+t],r["scroll"+t],e.body["offset"+t],r["offset"+t],r["client"+t])):void 0===i?re.css(e,n,a):re.style(e,n,i,a)},e,o?i:void 0,o,null)}})}),re.fn.size=function(){return this.length},re.fn.andSelf=re.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return re});var oi=t.jQuery,ai=t.$;return re.noConflict=function(e){return t.$===re&&(t.$=ai),e&&t.jQuery===re&&(t.jQuery=oi),re},typeof e===Ce&&(t.jQuery=t.$=re),re}),function(t,e){t.rails!==e&&t.error("jquery-ujs has already been loaded!");var n,i=t(document);t.rails=n={linkClickSelector:"a[data-confirm], a[data-method], a[data-remote], a[data-disable-with], a[data-disable]",buttonClickSelector:"button[data-remote]:not(form button), button[data-confirm]:not(form button)",inputChangeSelector:"select[data-remote], input[data-remote], textarea[data-remote]",formSubmitSelector:"form",formInputClickSelector:"form input[type=submit], form input[type=image], form button[type=submit], form button:not([type]), input[type=submit][form], input[type=image][form], button[type=submit][form], button[form]:not([type])",disableSelector:"input[data-disable-with]:enabled, button[data-disable-with]:enabled, textarea[data-disable-with]:enabled, input[data-disable]:enabled, button[data-disable]:enabled, textarea[data-disable]:enabled",enableSelector:"input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled, input[data-disable]:disabled, button[data-disable]:disabled, textarea[data-disable]:disabled",requiredInputSelector:"input[name][required]:not([disabled]),textarea[name][required]:not([disabled])",fileInputSelector:"input[type=file]",linkDisableSelector:"a[data-disable-with], a[data-disable]",buttonDisableSelector:"button[data-remote][data-disable-with], button[data-remote][data-disable]",CSRFProtection:function(e){var n=t('meta[name="csrf-token"]').attr("content");n&&e.setRequestHeader("X-CSRF-Token",n)},refreshCSRFTokens:function(){var e=t("meta[name=csrf-token]").attr("content"),n=t("meta[name=csrf-param]").attr("content");t('form input[name="'+n+'"]').val(e)},fire:function(e,n,i){var r=t.Event(n);return e.trigger(r,i),r.result!==!1},confirm:function(t){return confirm(t)},ajax:function(e){return t.ajax(e)},href:function(t){return t[0].href},handleRemote:function(i){var r,o,a,s,l,u;if(n.fire(i,"ajax:before")){if(s=i.data("with-credentials")||null,l=i.data("type")||t.ajaxSettings&&t.ajaxSettings.dataType,i.is("form")){r=i.attr("method"),o=i.attr("action"),a=i.serializeArray();var c=i.data("ujs:submit-button");c&&(a.push(c),i.data("ujs:submit-button",null))}else i.is(n.inputChangeSelector)?(r=i.data("method"),o=i.data("url"),a=i.serialize(),i.data("params")&&(a=a+"&"+i.data("params"))):i.is(n.buttonClickSelector)?(r=i.data("method")||"get",o=i.data("url"),a=i.serialize(),i.data("params")&&(a=a+"&"+i.data("params"))):(r=i.data("method"),o=n.href(i),a=i.data("params")||null);return u={type:r||"GET",data:a,dataType:l,beforeSend:function(t,r){return r.dataType===e&&t.setRequestHeader("accept","*/*;q=0.5, "+r.accepts.script),n.fire(i,"ajax:beforeSend",[t,r])?void i.trigger("ajax:send",t):!1},success:function(t,e,n){i.trigger("ajax:success",[t,e,n])},complete:function(t,e){i.trigger("ajax:complete",[t,e])},error:function(t,e,n){i.trigger("ajax:error",[t,e,n])},crossDomain:n.isCrossDomain(o)},s&&(u.xhrFields={withCredentials:s}),o&&(u.url=o),n.ajax(u)}return!1},isCrossDomain:function(t){var e=document.createElement("a");e.href=location.href;var n=document.createElement("a");try{return n.href=t,n.href=n.href,!n.protocol||!n.host||e.protocol+"//"+e.host!=n.protocol+"//"+n.host}catch(i){return!0}},handleMethod:function(i){var r=n.href(i),o=i.data("method"),a=i.attr("target"),s=t("meta[name=csrf-token]").attr("content"),l=t("meta[name=csrf-param]").attr("content"),u=t('<form method="post" action="'+r+'"></form>'),c='<input name="_method" value="'+o+'" type="hidden" />';l===e||s===e||n.isCrossDomain(r)||(c+='<input name="'+l+'" value="'+s+'" type="hidden" />'),a&&u.attr("target",a),u.hide().append(c).appendTo("body"),u.submit()},formElements:function(e,n){return e.is("form")?t(e[0].elements).filter(n):e.find(n)},disableFormElements:function(e){n.formElements(e,n.disableSelector).each(function(){n.disableFormElement(t(this))})},disableFormElement:function(t){var n,i;n=t.is("button")?"html":"val",i=t.data("disable-with"),t.data("ujs:enable-with",t[n]()),i!==e&&t[n](i),t.prop("disabled",!0)},enableFormElements:function(e){n.formElements(e,n.enableSelector).each(function(){n.enableFormElement(t(this))})},enableFormElement:function(t){var e=t.is("button")?"html":"val";t.data("ujs:enable-with")&&t[e](t.data("ujs:enable-with")),t.prop("disabled",!1)},allowAction:function(t){var e,i=t.data("confirm"),r=!1;return i?(n.fire(t,"confirm")&&(r=n.confirm(i),e=n.fire(t,"confirm:complete",[r])),r&&e):!0},blankInputs:function(e,n,i){var r,o,a=t(),s=n||"input,textarea",l=e.find(s);return l.each(function(){if(r=t(this),o=r.is("input[type=checkbox],input[type=radio]")?r.is(":checked"):r.val(),!o==!i){if(r.is("input[type=radio]")&&l.filter('input[type=radio]:checked[name="'+r.attr("name")+'"]').length)return!0;a=a.add(r)}}),a.length?a:!1},nonBlankInputs:function(t,e){return n.blankInputs(t,e,!0)},stopEverything:function(e){return t(e.target).trigger("ujs:everythingStopped"),e.stopImmediatePropagation(),!1},disableElement:function(t){var i=t.data("disable-with");t.data("ujs:enable-with",t.html()),i!==e&&t.html(i),t.bind("click.railsDisable",function(t){return n.stopEverything(t)})},enableElement:function(t){t.data("ujs:enable-with")!==e&&(t.html(t.data("ujs:enable-with")),t.removeData("ujs:enable-with")),t.unbind("click.railsDisable")}},n.fire(i,"rails:attachBindings")&&(t.ajaxPrefilter(function(t,e,i){t.crossDomain||n.CSRFProtection(i)}),t(window).on("pageshow.rails",function(){t(t.rails.enableSelector).each(function(){var e=t(this);e.data("ujs:enable-with")&&t.rails.enableFormElement(e)}),t(t.rails.linkDisableSelector).each(function(){var e=t(this);e.data("ujs:enable-with")&&t.rails.enableElement(e)})}),i.delegate(n.linkDisableSelector,"ajax:complete",function(){n.enableElement(t(this))}),i.delegate(n.buttonDisableSelector,"ajax:complete",function(){n.enableFormElement(t(this))}),i.delegate(n.linkClickSelector,"click.rails",function(i){var r=t(this),o=r.data("method"),a=r.data("params"),s=i.metaKey||i.ctrlKey;if(!n.allowAction(r))return n.stopEverything(i);if(!s&&r.is(n.linkDisableSelector)&&n.disableElement(r),r.data("remote")!==e){if(s&&(!o||"GET"===o)&&!a)return!0;var l=n.handleRemote(r);return l===!1?n.enableElement(r):l.fail(function(){n.enableElement(r)}),!1}return o?(n.handleMethod(r),!1):void 0}),i.delegate(n.buttonClickSelector,"click.rails",function(e){var i=t(this);if(!n.allowAction(i))return n.stopEverything(e);i.is(n.buttonDisableSelector)&&n.disableFormElement(i);var r=n.handleRemote(i);return r===!1?n.enableFormElement(i):r.fail(function(){n.enableFormElement(i)}),!1}),i.delegate(n.inputChangeSelector,"change.rails",function(e){var i=t(this);return n.allowAction(i)?(n.handleRemote(i),!1):n.stopEverything(e)}),i.delegate(n.formSubmitSelector,"submit.rails",function(i){var r,o,a=t(this),s=a.data("remote")!==e;if(!n.allowAction(a))return n.stopEverything(i);if(a.attr("novalidate")==e&&(r=n.blankInputs(a,n.requiredInputSelector),r&&n.fire(a,"ajax:aborted:required",[r])))return n.stopEverything(i);if(s){if(o=n.nonBlankInputs(a,n.fileInputSelector)){setTimeout(function(){n.disableFormElements(a)},13);var l=n.fire(a,"ajax:aborted:file",[o]);return l||setTimeout(function(){n.enableFormElements(a)},13),l}return n.handleRemote(a),!1}setTimeout(function(){n.disableFormElements(a)},13)}),i.delegate(n.formInputClickSelector,"click.rails",function(e){var i=t(this);if(!n.allowAction(i))return n.stopEverything(e);var r=i.attr("name"),o=r?{name:r,value:i.val()}:null;i.closest("form").data("ujs:submit-button",o)}),i.delegate(n.formSubmitSelector,"ajax:send.rails",function(e){this==e.target&&n.disableFormElements(t(this))}),i.delegate(n.formSubmitSelector,"ajax:complete.rails",function(e){this==e.target&&n.enableFormElements(t(this))}),t(function(){n.refreshCSRFTokens()}))}(jQuery),function(){var t,e,n,i,r,o,a,s,l,u,c,d,h,p,f,g,m,v,y,b,w,x,k,C,_,D,T,S,A,F,E,$,N,I,O,M,L,j,R,P,H,q,z,B,W,K,U,Y,V,Z,Q,X,G,J,te,ee,ne=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1},ie=function(t,e){function n(){this.constructor=t}for(var i in e)re.call(e,i)&&(t[i]=e[i]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},re={}.hasOwnProperty,oe=[].slice,ae=function(t,e){return function(){return t.apply(e,arguments)}};I={},h=10,X=!1,R=null,y=null,$=null,q=null,ee=null,i={BEFORE_CHANGE:"page:before-change",FETCH:"page:fetch",RECEIVE:"page:receive",CHANGE:"page:change",UPDATE:"page:update",LOAD:"page:load",RESTORE:"page:restore",BEFORE_UNLOAD:"page:before-unload",EXPIRE:"page:expire"},C=function(t){var e;return t=new n(t),U(),d(),null!=R&&R.start(),X&&(e=G(t.absolute))?(_(e),D(t,null,!1)):D(t,Z)},G=function(t){var e;return e=I[t],e&&!e.transitionCacheDisabled?e:void 0},w=function(t){return null==t&&(t=!0),X=t},b=function(t){return null==t&&(t=!0),u?t?null!=R?R:R=new o("html"):(null!=R&&R.uninstall(),R=null):void 0},D=function(t,e,n){return null==n&&(n=!0),J(i.FETCH,{url:t.absolute}),null!=ee&&ee.abort(),ee=new XMLHttpRequest,ee.open("GET",t.withoutHashForIE10compatibility(),!0),ee.setRequestHeader("Accept","text/html, application/xhtml+xml, application/xml"),ee.setRequestHeader("X-XHR-Referer",q),ee.onload=function(){var n;return J(i.RECEIVE,{url:t.absolute}),(n=j())?(z(t),B(),p.apply(null,k(n)),N(),"function"==typeof e&&e(),J(i.LOAD)):document.location.href=v()||t.absolute},R&&n&&(ee.onprogress=function(){return function(t){var e;return e=t.lengthComputable?t.loaded/t.total*100:R.value+(100-R.value)/10,R.advanceTo(e)}}(this)),ee.onloadend=function(){return ee=null},ee.onerror=function(){return document.location.href=t.absolute},ee.send()},_=function(t){return null!=ee&&ee.abort(),p(t.title,t.body),P(t),J(i.RESTORE)},d=function(){var t;return t=new n(y.url),I[t.absolute]={url:t.relative,body:document.body,title:document.title,positionY:window.pageYOffset,positionX:window.pageXOffset,cachedAt:(new Date).getTime(),transitionCacheDisabled:null!=document.querySelector("[data-no-transition-cache]")},g(h)},M=function(t){return null==t&&(t=h),/^[\d]+$/.test(t)?h=parseInt(t):void 0},g=function(t){var e,n,r,o,a,s;for(a=Object.keys(I),e=a.map(function(t){return I[t].cachedAt}).sort(function(t,e){return e-t}),s=[],n=0,o=a.length;o>n;n++)r=a[n],I[r].cachedAt<=e[t]&&(J(i.EXPIRE,I[r]),s.push(delete I[r]));return s},p=function(e,n,r,o){return J(i.BEFORE_UNLOAD),document.title=e,document.documentElement.replaceChild(n,document.body),null!=r&&t.update(r),Q(),o&&x(),y=window.history.state,null!=R&&R.done(),J(i.CHANGE),J(i.UPDATE)},x=function(){var t,e,n,i,r,o,a,s,l,u,c,d;for(d=Array.prototype.slice.call(document.body.querySelectorAll('script:not([data-turbolinks-eval="false"])')),n=0,r=d.length;r>n;n++)if(c=d[n],""===(l=c.type)||"text/javascript"===l){for(e=document.createElement("script"),u=c.attributes,i=0,o=u.length;o>i;i++)t=u[i],e.setAttribute(t.name,t.value);c.hasAttribute("async")||(e.async=!1),e.appendChild(document.createTextNode(c.innerHTML)),s=c.parentNode,a=c.nextSibling,s.removeChild(c),s.insertBefore(e,a)}},Y=function(t){return t.innerHTML=t.innerHTML.replace(/<noscript[\S\s]*?<\/noscript>/gi,""),t},Q=function(){var t,e;return t=(e=document.querySelectorAll("input[autofocus], textarea[autofocus]"))[e.length-1],t&&document.activeElement!==t?t.focus():void 0},z=function(t){return(t=new n(t)).absolute!==q?window.history.pushState({turbolinks:!0,url:t.absolute},"",t.absolute):void 0},B=function(){var t,e;return(t=ee.getResponseHeader("X-XHR-Redirected-To"))?(t=new n(t),e=t.hasNoHash()?document.location.hash:"",window.history.replaceState(window.history.state,"",t.href+e)):void 0},v=function(){var t;return null!=(t=ee.getResponseHeader("Location"))&&new n(t).crossOrigin()?t:void 0},U=function(){return q=document.location.href},K=function(){return window.history.replaceState({turbolinks:!0,url:document.location.href},"",document.location.href)},W=function(){return y=window.history.state},N=function(){var t;return navigator.userAgent.match(/Firefox/)&&!(t=new n).hasNoHash()?(window.history.replaceState(y,"",t.withoutHash()),document.location.hash=t.hash):void 0},P=function(t){return window.scrollTo(t.positionX,t.positionY)},Z=function(){return document.location.hash?document.location.href=document.location.href:window.scrollTo(0,0)},f=function(t){var e,n,i;if(null==t||"object"!=typeof t)return t;e=new t.constructor;for(n in t)i=t[n],e[n]=f(i);return e},L=function(t){var e,n;return n=(null!=(e=document.cookie.match(new RegExp(t+"=(\\w+)")))?e[1].toUpperCase():void 0)||"",document.cookie=t+"=; expires=Thu, 01-Jan-70 00:00:01 GMT; path=/",n},J=function(t,e){var n;return"undefined"!=typeof Prototype&&Event.fire(document,t,e,!0),n=document.createEvent("Events"),e&&(n.data=e),n.initEvent(t,!0,!0),document.dispatchEvent(n)},O=function(t){return!J(i.BEFORE_CHANGE,{url:t})},j=function(){var t,e,n,i,r,o;return e=function(){var t;return 400<=(t=ee.status)&&600>t},o=function(){var t;return null!=(t=ee.getResponseHeader("Content-Type"))&&t.match(/^(?:text\/html|application\/xhtml\+xml|application\/xml)(?:;|$)/)},i=function(t){var e,n,i,r,o;for(r=t.querySelector("head").childNodes,o=[],e=0,n=r.length;n>e;e++)i=r[e],null!=("function"==typeof i.getAttribute?i.getAttribute("data-turbolinks-track"):void 0)&&o.push(i.getAttribute("src")||i.getAttribute("href"));return o},t=function(t){var e;return $||($=i(document)),e=i(t),e.length!==$.length||r(e,$).length!==$.length},r=function(t,e){var n,i,r,o,a;for(t.length>e.length&&(r=[e,t],t=r[0],e=r[1]),o=[],n=0,i=t.length;i>n;n++)a=t[n],ne.call(e,a)>=0&&o.push(a);return o},!e()&&o()&&(n=m(ee.responseText),n&&!t(n))?n:void 0},k=function(e){var n;return n=e.querySelector("title"),[null!=n?n.textContent:void 0,Y(e.querySelector("body")),t.get(e).token,"runScripts"]},t={get:function(t){var e;return null==t&&(t=document),{node:e=t.querySelector('meta[name="csrf-token"]'),token:null!=e&&"function"==typeof e.getAttribute?e.getAttribute("content"):void 0}},update:function(t){var e;return e=this.get(),null!=e.token&&null!=t&&e.token!==t?e.node.setAttribute("content",t):void 0}},m=function(t){var e;return e=document.documentElement.cloneNode(),e.innerHTML=t,e.head=e.querySelector("head"),e.body=e.querySelector("body"),e},n=function(){function t(e){return this.original=null!=e?e:document.location.href,this.original.constructor===t?this.original:void this._parse()}return t.prototype.withoutHash=function(){return this.href.replace(this.hash,"").replace("#","")},t.prototype.withoutHashForIE10compatibility=function(){return this.withoutHash()},t.prototype.hasNoHash=function(){return 0===this.hash.length},t.prototype.crossOrigin=function(){return this.origin!==(new t).origin},t.prototype._parse=function(){var t;return(null!=this.link?this.link:this.link=document.createElement("a")).href=this.original,t=this.link,this.href=t.href,this.protocol=t.protocol,this.host=t.host,this.hostname=t.hostname,this.port=t.port,this.pathname=t.pathname,this.search=t.search,this.hash=t.hash,this.origin=[this.protocol,"//",this.hostname].join(""),0!==this.port.length&&(this.origin+=":"+this.port),this.relative=[this.pathname,this.search,this.hash].join(""),this.absolute=this.href},t}(),r=function(t){function e(t){return this.link=t,this.link.constructor===e?this.link:(this.original=this.link.href,this.originalElement=this.link,this.link=this.link.cloneNode(!1),void e.__super__.constructor.apply(this,arguments))}return ie(e,t),e.HTML_EXTENSIONS=["html"],e.allowExtensions=function(){var t,n,i,r;for(n=1<=arguments.length?oe.call(arguments,0):[],i=0,r=n.length;r>i;i++)t=n[i],e.HTML_EXTENSIONS.push(t);return e.HTML_EXTENSIONS},e.prototype.shouldIgnore=function(){return this.crossOrigin()||this._anchored()||this._nonHtml()||this._optOut()||this._target()},e.prototype._anchored=function(){return(this.hash.length>0||"#"===this.href.charAt(this.href.length-1))&&this.withoutHash()===(new n).withoutHash()},e.prototype._nonHtml=function(){return this.pathname.match(/\.[a-z]+$/g)&&!this.pathname.match(new RegExp("\\.(?:"+e.HTML_EXTENSIONS.join("|")+")?$","g"))},e.prototype._optOut=function(){var t,e;for(e=this.originalElement;!t&&e!==document;)t=null!=e.getAttribute("data-no-turbolink"),e=e.parentNode;return t},e.prototype._target=function(){return 0!==this.link.target.length},e}(n),e=function(){function t(t){this.event=t,this.event.defaultPrevented||(this._extractLink(),this._validForTurbolinks()&&(O(this.link.absolute)||te(this.link.href),this.event.preventDefault()))}return t.installHandlerLast=function(e){return e.defaultPrevented?void 0:(document.removeEventListener("click",t.handle,!1),document.addEventListener("click",t.handle,!1))},t.handle=function(e){return new t(e)},t.prototype._extractLink=function(){var t;for(t=this.event.target;t.parentNode&&"A"!==t.nodeName;)t=t.parentNode;return"A"===t.nodeName&&0!==t.href.length?this.link=new r(t):void 0},t.prototype._validForTurbolinks=function(){return null!=this.link&&!(this.link.shouldIgnore()||this._nonStandardClick())},t.prototype._nonStandardClick=function(){return this.event.which>1||this.event.metaKey||this.event.ctrlKey||this.event.shiftKey||this.event.altKey},t}(),o=function(){function t(t){this.elementSelector=t,this._trickle=ae(this._trickle,this),this.value=0,this.content="",this.speed=300,this.opacity=.99,this.install()}var e;return e="turbolinks-progress-bar",t.prototype.install=function(){return this.element=document.querySelector(this.elementSelector),this.element.classList.add(e),this.styleElement=document.createElement("style"),document.head.appendChild(this.styleElement),this._updateStyle()},t.prototype.uninstall=function(){return this.element.classList.remove(e),document.head.removeChild(this.styleElement)
|
||
},t.prototype.start=function(){return this.advanceTo(5)},t.prototype.advanceTo=function(t){var e;if(t>(e=this.value)&&100>=e){if(this.value=t,this._updateStyle(),100===this.value)return this._stopTrickle();if(this.value>0)return this._startTrickle()}},t.prototype.done=function(){return this.value>0?(this.advanceTo(100),this._reset()):void 0},t.prototype._reset=function(){var t;return t=this.opacity,setTimeout(function(t){return function(){return t.opacity=0,t._updateStyle()}}(this),this.speed/2),setTimeout(function(e){return function(){return e.value=0,e.opacity=t,e._withSpeed(0,function(){return e._updateStyle(!0)})}}(this),this.speed)},t.prototype._startTrickle=function(){return this.trickling?void 0:(this.trickling=!0,setTimeout(this._trickle,this.speed))},t.prototype._stopTrickle=function(){return delete this.trickling},t.prototype._trickle=function(){return this.trickling?(this.advanceTo(this.value+Math.random()/2),setTimeout(this._trickle,this.speed)):void 0},t.prototype._withSpeed=function(t,e){var n,i;return n=this.speed,this.speed=t,i=e(),this.speed=n,i},t.prototype._updateStyle=function(t){return null==t&&(t=!1),t&&this._changeContentToForceRepaint(),this.styleElement.textContent=this._createCSSRule()},t.prototype._changeContentToForceRepaint=function(){return this.content=""===this.content?" ":""},t.prototype._createCSSRule=function(){return this.elementSelector+"."+e+"::before {\n content: '"+this.content+"';\n position: fixed;\n top: 0;\n left: 0;\n z-index: 2000;\n background-color: #0076ff;\n height: 3px;\n opacity: "+this.opacity+";\n width: "+this.value+"%;\n transition: width "+this.speed+"ms ease-out, opacity "+this.speed/2+"ms ease-in;\n transform: translate3d(0,0,0);\n}"},t}(),c=function(t){return setTimeout(t,500)},A=function(){return document.addEventListener("DOMContentLoaded",function(){return J(i.CHANGE),J(i.UPDATE)},!0)},E=function(){return"undefined"!=typeof jQuery?jQuery(document).on("ajaxSuccess",function(t,e){return jQuery.trim(e.responseText)?J(i.UPDATE):void 0}):void 0},F=function(t){var e,i;return(null!=(i=t.state)?i.turbolinks:void 0)?(e=I[new n(t.state.url).absolute])?(d(),_(e)):te(t.target.location.href):void 0},S=function(){return K(),W(),document.addEventListener("click",e.installHandlerLast,!0),window.addEventListener("hashchange",function(){return K(),W()},!1),c(function(){return window.addEventListener("popstate",F,!1)})},T=void 0!==window.history.state||navigator.userAgent.match(/Firefox\/2[6|7]/),l=window.history&&window.history.pushState&&window.history.replaceState&&T,a=!navigator.userAgent.match(/CriOS\//),V="GET"===(H=L("request_method"))||""===H,u=l&&a&&V,s=document.addEventListener&&document.createEvent,s&&(A(),E()),u?(te=C,S()):te=function(t){return document.location.href=t},this.Turbolinks={visit:te,pagesCached:M,enableTransitionCache:w,enableProgressBar:b,allowLinkExtensions:r.allowExtensions,supported:u,EVENTS:f(i)}}.call(this),/* ========================================================================
|
||
* Bootstrap: affix.js v3.3.5
|
||
* http://getbootstrap.com/javascript/#affix
|
||
* ========================================================================
|
||
* Copyright 2011-2015 Twitter, Inc.
|
||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||
* ======================================================================== */
|
||
+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),r=i.data("bs.affix"),o="object"==typeof e&&e;r||i.data("bs.affix",r=new n(this,o)),"string"==typeof e&&r[e]()})}var n=function(e,i){this.options=t.extend({},n.DEFAULTS,i),this.$target=t(this.options.target).on("scroll.bs.affix.data-api",t.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",t.proxy(this.checkPositionWithEventLoop,this)),this.$element=t(e),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};n.VERSION="3.3.5",n.RESET="affix affix-top affix-bottom",n.DEFAULTS={offset:0,target:window},n.prototype.getState=function(t,e,n,i){var r=this.$target.scrollTop(),o=this.$element.offset(),a=this.$target.height();if(null!=n&&"top"==this.affixed)return n>r?"top":!1;if("bottom"==this.affixed)return null!=n?r+this.unpin<=o.top?!1:"bottom":t-i>=r+a?!1:"bottom";var s=null==this.affixed,l=s?r:o.top,u=s?a:e;return null!=n&&n>=r?"top":null!=i&&l+u>=t-i?"bottom":!1},n.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(n.RESET).addClass("affix");var t=this.$target.scrollTop(),e=this.$element.offset();return this.pinnedOffset=e.top-t},n.prototype.checkPositionWithEventLoop=function(){setTimeout(t.proxy(this.checkPosition,this),1)},n.prototype.checkPosition=function(){if(this.$element.is(":visible")){var e=this.$element.height(),i=this.options.offset,r=i.top,o=i.bottom,a=Math.max(t(document).height(),t(document.body).height());"object"!=typeof i&&(o=r=i),"function"==typeof r&&(r=i.top(this.$element)),"function"==typeof o&&(o=i.bottom(this.$element));var s=this.getState(a,e,r,o);if(this.affixed!=s){null!=this.unpin&&this.$element.css("top","");var l="affix"+(s?"-"+s:""),u=t.Event(l+".bs.affix");if(this.$element.trigger(u),u.isDefaultPrevented())return;this.affixed=s,this.unpin="bottom"==s?this.getPinnedOffset():null,this.$element.removeClass(n.RESET).addClass(l).trigger(l.replace("affix","affixed")+".bs.affix")}"bottom"==s&&this.$element.offset({top:a-e-o})}};var i=t.fn.affix;t.fn.affix=e,t.fn.affix.Constructor=n,t.fn.affix.noConflict=function(){return t.fn.affix=i,this},t(window).on("load",function(){t('[data-spy="affix"]').each(function(){var n=t(this),i=n.data();i.offset=i.offset||{},null!=i.offsetBottom&&(i.offset.bottom=i.offsetBottom),null!=i.offsetTop&&(i.offset.top=i.offsetTop),e.call(n,i)})})}(jQuery),/* ========================================================================
|
||
* Bootstrap: alert.js v3.3.5
|
||
* http://getbootstrap.com/javascript/#alerts
|
||
* ========================================================================
|
||
* Copyright 2011-2015 Twitter, Inc.
|
||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||
* ======================================================================== */
|
||
+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),r=n.data("bs.alert");r||n.data("bs.alert",r=new i(this)),"string"==typeof e&&r[e].call(n)})}var n='[data-dismiss="alert"]',i=function(e){t(e).on("click",n,this.close)};i.VERSION="3.3.5",i.TRANSITION_DURATION=150,i.prototype.close=function(e){function n(){a.detach().trigger("closed.bs.alert").remove()}var r=t(this),o=r.attr("data-target");o||(o=r.attr("href"),o=o&&o.replace(/.*(?=#[^\s]*$)/,""));var a=t(o);e&&e.preventDefault(),a.length||(a=r.closest(".alert")),a.trigger(e=t.Event("close.bs.alert")),e.isDefaultPrevented()||(a.removeClass("in"),t.support.transition&&a.hasClass("fade")?a.one("bsTransitionEnd",n).emulateTransitionEnd(i.TRANSITION_DURATION):n())};var r=t.fn.alert;t.fn.alert=e,t.fn.alert.Constructor=i,t.fn.alert.noConflict=function(){return t.fn.alert=r,this},t(document).on("click.bs.alert.data-api",n,i.prototype.close)}(jQuery),/* ========================================================================
|
||
* Bootstrap: button.js v3.3.5
|
||
* http://getbootstrap.com/javascript/#buttons
|
||
* ========================================================================
|
||
* Copyright 2011-2015 Twitter, Inc.
|
||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||
* ======================================================================== */
|
||
+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),r=i.data("bs.button"),o="object"==typeof e&&e;r||i.data("bs.button",r=new n(this,o)),"toggle"==e?r.toggle():e&&r.setState(e)})}var n=function(e,i){this.$element=t(e),this.options=t.extend({},n.DEFAULTS,i),this.isLoading=!1};n.VERSION="3.3.5",n.DEFAULTS={loadingText:"loading..."},n.prototype.setState=function(e){var n="disabled",i=this.$element,r=i.is("input")?"val":"html",o=i.data();e+="Text",null==o.resetText&&i.data("resetText",i[r]()),setTimeout(t.proxy(function(){i[r](null==o[e]?this.options[e]:o[e]),"loadingText"==e?(this.isLoading=!0,i.addClass(n).attr(n,n)):this.isLoading&&(this.isLoading=!1,i.removeClass(n).removeAttr(n))},this),0)},n.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var n=this.$element.find("input");"radio"==n.prop("type")?(n.prop("checked")&&(t=!1),e.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==n.prop("type")&&(n.prop("checked")!==this.$element.hasClass("active")&&(t=!1),this.$element.toggleClass("active")),n.prop("checked",this.$element.hasClass("active")),t&&n.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var i=t.fn.button;t.fn.button=e,t.fn.button.Constructor=n,t.fn.button.noConflict=function(){return t.fn.button=i,this},t(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(n){var i=t(n.target);i.hasClass("btn")||(i=i.closest(".btn")),e.call(i,"toggle"),t(n.target).is('input[type="radio"]')||t(n.target).is('input[type="checkbox"]')||n.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(e){t(e.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(e.type))})}(jQuery),/* ========================================================================
|
||
* Bootstrap: carousel.js v3.3.5
|
||
* http://getbootstrap.com/javascript/#carousel
|
||
* ========================================================================
|
||
* Copyright 2011-2015 Twitter, Inc.
|
||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||
* ======================================================================== */
|
||
+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),r=i.data("bs.carousel"),o=t.extend({},n.DEFAULTS,i.data(),"object"==typeof e&&e),a="string"==typeof e?e:o.slide;r||i.data("bs.carousel",r=new n(this,o)),"number"==typeof e?r.to(e):a?r[a]():o.interval&&r.pause().cycle()})}var n=function(e,n){this.$element=t(e),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",t.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",t.proxy(this.pause,this)).on("mouseleave.bs.carousel",t.proxy(this.cycle,this))};n.VERSION="3.3.5",n.TRANSITION_DURATION=600,n.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},n.prototype.keydown=function(t){if(!/input|textarea/i.test(t.target.tagName)){switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}t.preventDefault()}},n.prototype.cycle=function(e){return e||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(t.proxy(this.next,this),this.options.interval)),this},n.prototype.getItemIndex=function(t){return this.$items=t.parent().children(".item"),this.$items.index(t||this.$active)},n.prototype.getItemForDirection=function(t,e){var n=this.getItemIndex(e),i="prev"==t&&0===n||"next"==t&&n==this.$items.length-1;if(i&&!this.options.wrap)return e;var r="prev"==t?-1:1,o=(n+r)%this.$items.length;return this.$items.eq(o)},n.prototype.to=function(t){var e=this,n=this.getItemIndex(this.$active=this.$element.find(".item.active"));return t>this.$items.length-1||0>t?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){e.to(t)}):n==t?this.pause().cycle():this.slide(t>n?"next":"prev",this.$items.eq(t))},n.prototype.pause=function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&t.support.transition&&(this.$element.trigger(t.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},n.prototype.next=function(){return this.sliding?void 0:this.slide("next")},n.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},n.prototype.slide=function(e,i){var r=this.$element.find(".item.active"),o=i||this.getItemForDirection(e,r),a=this.interval,s="next"==e?"left":"right",l=this;if(o.hasClass("active"))return this.sliding=!1;var u=o[0],c=t.Event("slide.bs.carousel",{relatedTarget:u,direction:s});if(this.$element.trigger(c),!c.isDefaultPrevented()){if(this.sliding=!0,a&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var d=t(this.$indicators.children()[this.getItemIndex(o)]);d&&d.addClass("active")}var h=t.Event("slid.bs.carousel",{relatedTarget:u,direction:s});return t.support.transition&&this.$element.hasClass("slide")?(o.addClass(e),o[0].offsetWidth,r.addClass(s),o.addClass(s),r.one("bsTransitionEnd",function(){o.removeClass([e,s].join(" ")).addClass("active"),r.removeClass(["active",s].join(" ")),l.sliding=!1,setTimeout(function(){l.$element.trigger(h)},0)}).emulateTransitionEnd(n.TRANSITION_DURATION)):(r.removeClass("active"),o.addClass("active"),this.sliding=!1,this.$element.trigger(h)),a&&this.cycle(),this}};var i=t.fn.carousel;t.fn.carousel=e,t.fn.carousel.Constructor=n,t.fn.carousel.noConflict=function(){return t.fn.carousel=i,this};var r=function(n){var i,r=t(this),o=t(r.attr("data-target")||(i=r.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,""));if(o.hasClass("carousel")){var a=t.extend({},o.data(),r.data()),s=r.attr("data-slide-to");s&&(a.interval=!1),e.call(o,a),s&&o.data("bs.carousel").to(s),n.preventDefault()}};t(document).on("click.bs.carousel.data-api","[data-slide]",r).on("click.bs.carousel.data-api","[data-slide-to]",r),t(window).on("load",function(){t('[data-ride="carousel"]').each(function(){var n=t(this);e.call(n,n.data())})})}(jQuery),/* ========================================================================
|
||
* Bootstrap: collapse.js v3.3.5
|
||
* http://getbootstrap.com/javascript/#collapse
|
||
* ========================================================================
|
||
* Copyright 2011-2015 Twitter, Inc.
|
||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||
* ======================================================================== */
|
||
+function(t){"use strict";function e(e){var n,i=e.attr("data-target")||(n=e.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,"");return t(i)}function n(e){return this.each(function(){var n=t(this),r=n.data("bs.collapse"),o=t.extend({},i.DEFAULTS,n.data(),"object"==typeof e&&e);!r&&o.toggle&&/show|hide/.test(e)&&(o.toggle=!1),r||n.data("bs.collapse",r=new i(this,o)),"string"==typeof e&&r[e]()})}var i=function(e,n){this.$element=t(e),this.options=t.extend({},i.DEFAULTS,n),this.$trigger=t('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};i.VERSION="3.3.5",i.TRANSITION_DURATION=350,i.DEFAULTS={toggle:!0},i.prototype.dimension=function(){var t=this.$element.hasClass("width");return t?"width":"height"},i.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var e,r=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(r&&r.length&&(e=r.data("bs.collapse"),e&&e.transitioning))){var o=t.Event("show.bs.collapse");if(this.$element.trigger(o),!o.isDefaultPrevented()){r&&r.length&&(n.call(r,"hide"),e||r.data("bs.collapse",null));var a=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[a](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var s=function(){this.$element.removeClass("collapsing").addClass("collapse in")[a](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!t.support.transition)return s.call(this);var l=t.camelCase(["scroll",a].join("-"));this.$element.one("bsTransitionEnd",t.proxy(s,this)).emulateTransitionEnd(i.TRANSITION_DURATION)[a](this.$element[0][l])}}}},i.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var e=t.Event("hide.bs.collapse");if(this.$element.trigger(e),!e.isDefaultPrevented()){var n=this.dimension();this.$element[n](this.$element[n]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var r=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return t.support.transition?void this.$element[n](0).one("bsTransitionEnd",t.proxy(r,this)).emulateTransitionEnd(i.TRANSITION_DURATION):r.call(this)}}},i.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},i.prototype.getParent=function(){return t(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(t.proxy(function(n,i){var r=t(i);this.addAriaAndCollapsedClass(e(r),r)},this)).end()},i.prototype.addAriaAndCollapsedClass=function(t,e){var n=t.hasClass("in");t.attr("aria-expanded",n),e.toggleClass("collapsed",!n).attr("aria-expanded",n)};var r=t.fn.collapse;t.fn.collapse=n,t.fn.collapse.Constructor=i,t.fn.collapse.noConflict=function(){return t.fn.collapse=r,this},t(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(i){var r=t(this);r.attr("data-target")||i.preventDefault();var o=e(r),a=o.data("bs.collapse"),s=a?"toggle":r.data();n.call(o,s)})}(jQuery),/* ========================================================================
|
||
* Bootstrap: dropdown.js v3.3.5
|
||
* http://getbootstrap.com/javascript/#dropdowns
|
||
* ========================================================================
|
||
* Copyright 2011-2015 Twitter, Inc.
|
||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||
* ======================================================================== */
|
||
+function(t){"use strict";function e(e){var n=e.attr("data-target");n||(n=e.attr("href"),n=n&&/#[A-Za-z]/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var i=n&&t(n);return i&&i.length?i:e.parent()}function n(n){n&&3===n.which||(t(r).remove(),t(o).each(function(){var i=t(this),r=e(i),o={relatedTarget:this};r.hasClass("open")&&(n&&"click"==n.type&&/input|textarea/i.test(n.target.tagName)&&t.contains(r[0],n.target)||(r.trigger(n=t.Event("hide.bs.dropdown",o)),n.isDefaultPrevented()||(i.attr("aria-expanded","false"),r.removeClass("open").trigger("hidden.bs.dropdown",o))))}))}function i(e){return this.each(function(){var n=t(this),i=n.data("bs.dropdown");i||n.data("bs.dropdown",i=new a(this)),"string"==typeof e&&i[e].call(n)})}var r=".dropdown-backdrop",o='[data-toggle="dropdown"]',a=function(e){t(e).on("click.bs.dropdown",this.toggle)};a.VERSION="3.3.5",a.prototype.toggle=function(i){var r=t(this);if(!r.is(".disabled, :disabled")){var o=e(r),a=o.hasClass("open");if(n(),!a){"ontouchstart"in document.documentElement&&!o.closest(".navbar-nav").length&&t(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(t(this)).on("click",n);var s={relatedTarget:this};if(o.trigger(i=t.Event("show.bs.dropdown",s)),i.isDefaultPrevented())return;r.trigger("focus").attr("aria-expanded","true"),o.toggleClass("open").trigger("shown.bs.dropdown",s)}return!1}},a.prototype.keydown=function(n){if(/(38|40|27|32)/.test(n.which)&&!/input|textarea/i.test(n.target.tagName)){var i=t(this);if(n.preventDefault(),n.stopPropagation(),!i.is(".disabled, :disabled")){var r=e(i),a=r.hasClass("open");if(!a&&27!=n.which||a&&27==n.which)return 27==n.which&&r.find(o).trigger("focus"),i.trigger("click");var s=" li:not(.disabled):visible a",l=r.find(".dropdown-menu"+s);if(l.length){var u=l.index(n.target);38==n.which&&u>0&&u--,40==n.which&&u<l.length-1&&u++,~u||(u=0),l.eq(u).trigger("focus")}}}};var s=t.fn.dropdown;t.fn.dropdown=i,t.fn.dropdown.Constructor=a,t.fn.dropdown.noConflict=function(){return t.fn.dropdown=s,this},t(document).on("click.bs.dropdown.data-api",n).on("click.bs.dropdown.data-api",".dropdown form",function(t){t.stopPropagation()}).on("click.bs.dropdown.data-api",o,a.prototype.toggle).on("keydown.bs.dropdown.data-api",o,a.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",a.prototype.keydown)}(jQuery),/* ========================================================================
|
||
* Bootstrap: tab.js v3.3.5
|
||
* http://getbootstrap.com/javascript/#tabs
|
||
* ========================================================================
|
||
* Copyright 2011-2015 Twitter, Inc.
|
||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||
* ======================================================================== */
|
||
+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),r=i.data("bs.tab");r||i.data("bs.tab",r=new n(this)),"string"==typeof e&&r[e]()})}var n=function(e){this.element=t(e)};n.VERSION="3.3.5",n.TRANSITION_DURATION=150,n.prototype.show=function(){var e=this.element,n=e.closest("ul:not(.dropdown-menu)"),i=e.data("target");if(i||(i=e.attr("href"),i=i&&i.replace(/.*(?=#[^\s]*$)/,"")),!e.parent("li").hasClass("active")){var r=n.find(".active:last a"),o=t.Event("hide.bs.tab",{relatedTarget:e[0]}),a=t.Event("show.bs.tab",{relatedTarget:r[0]});if(r.trigger(o),e.trigger(a),!a.isDefaultPrevented()&&!o.isDefaultPrevented()){var s=t(i);this.activate(e.closest("li"),n),this.activate(s,s.parent(),function(){r.trigger({type:"hidden.bs.tab",relatedTarget:e[0]}),e.trigger({type:"shown.bs.tab",relatedTarget:r[0]})})}}},n.prototype.activate=function(e,i,r){function o(){a.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),e.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),s?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu").length&&e.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),r&&r()}var a=i.find("> .active"),s=r&&t.support.transition&&(a.length&&a.hasClass("fade")||!!i.find("> .fade").length);a.length&&s?a.one("bsTransitionEnd",o).emulateTransitionEnd(n.TRANSITION_DURATION):o(),a.removeClass("in")};var i=t.fn.tab;t.fn.tab=e,t.fn.tab.Constructor=n,t.fn.tab.noConflict=function(){return t.fn.tab=i,this};var r=function(n){n.preventDefault(),e.call(t(this),"show")};t(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',r).on("click.bs.tab.data-api",'[data-toggle="pill"]',r)}(jQuery),/* ========================================================================
|
||
* Bootstrap: transition.js v3.3.5
|
||
* http://getbootstrap.com/javascript/#transitions
|
||
* ========================================================================
|
||
* Copyright 2011-2015 Twitter, Inc.
|
||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||
* ======================================================================== */
|
||
+function(t){"use strict";function e(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in e)if(void 0!==t.style[n])return{end:e[n]};return!1}t.fn.emulateTransitionEnd=function(e){var n=!1,i=this;t(this).one("bsTransitionEnd",function(){n=!0});var r=function(){n||t(i).trigger(t.support.transition.end)};return setTimeout(r,e),this},t(function(){t.support.transition=e(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){return t(e.target).is(this)?e.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),/* ========================================================================
|
||
* Bootstrap: scrollspy.js v3.3.5
|
||
* http://getbootstrap.com/javascript/#scrollspy
|
||
* ========================================================================
|
||
* Copyright 2011-2015 Twitter, Inc.
|
||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||
* ======================================================================== */
|
||
+function(t){"use strict";function e(n,i){this.$body=t(document.body),this.$scrollElement=t(t(n).is(document.body)?window:n),this.options=t.extend({},e.DEFAULTS,i),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",t.proxy(this.process,this)),this.refresh(),this.process()}function n(n){return this.each(function(){var i=t(this),r=i.data("bs.scrollspy"),o="object"==typeof n&&n;r||i.data("bs.scrollspy",r=new e(this,o)),"string"==typeof n&&r[n]()})}e.VERSION="3.3.5",e.DEFAULTS={offset:10},e.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},e.prototype.refresh=function(){var e=this,n="offset",i=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),t.isWindow(this.$scrollElement[0])||(n="position",i=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var e=t(this),r=e.data("target")||e.attr("href"),o=/^#./.test(r)&&t(r);return o&&o.length&&o.is(":visible")&&[[o[n]().top+i,r]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){e.offsets.push(this[0]),e.targets.push(this[1])})},e.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,n=this.getScrollHeight(),i=this.options.offset+n-this.$scrollElement.height(),r=this.offsets,o=this.targets,a=this.activeTarget;if(this.scrollHeight!=n&&this.refresh(),e>=i)return a!=(t=o[o.length-1])&&this.activate(t);if(a&&e<r[0])return this.activeTarget=null,this.clear();for(t=r.length;t--;)a!=o[t]&&e>=r[t]&&(void 0===r[t+1]||e<r[t+1])&&this.activate(o[t])},e.prototype.activate=function(e){this.activeTarget=e,this.clear();var n=this.selector+'[data-target="'+e+'"],'+this.selector+'[href="'+e+'"]',i=t(n).parents("li").addClass("active");i.parent(".dropdown-menu").length&&(i=i.closest("li.dropdown").addClass("active")),i.trigger("activate.bs.scrollspy")},e.prototype.clear=function(){t(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var i=t.fn.scrollspy;t.fn.scrollspy=n,t.fn.scrollspy.Constructor=e,t.fn.scrollspy.noConflict=function(){return t.fn.scrollspy=i,this},t(window).on("load.bs.scrollspy.data-api",function(){t('[data-spy="scroll"]').each(function(){var e=t(this);n.call(e,e.data())})})}(jQuery),/* ========================================================================
|
||
* Bootstrap: modal.js v3.3.5
|
||
* http://getbootstrap.com/javascript/#modals
|
||
* ========================================================================
|
||
* Copyright 2011-2015 Twitter, Inc.
|
||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||
* ======================================================================== */
|
||
+function(t){"use strict";function e(e,i){return this.each(function(){var r=t(this),o=r.data("bs.modal"),a=t.extend({},n.DEFAULTS,r.data(),"object"==typeof e&&e);o||r.data("bs.modal",o=new n(this,a)),"string"==typeof e?o[e](i):a.show&&o.show(i)})}var n=function(e,n){this.options=n,this.$body=t(document.body),this.$element=t(e),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,t.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};n.VERSION="3.3.5",n.TRANSITION_DURATION=300,n.BACKDROP_TRANSITION_DURATION=150,n.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},n.prototype.toggle=function(t){return this.isShown?this.hide():this.show(t)},n.prototype.show=function(e){var i=this,r=t.Event("show.bs.modal",{relatedTarget:e});this.$element.trigger(r),this.isShown||r.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',t.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){i.$element.one("mouseup.dismiss.bs.modal",function(e){t(e.target).is(i.$element)&&(i.ignoreBackdropClick=!0)})}),this.backdrop(function(){var r=t.support.transition&&i.$element.hasClass("fade");i.$element.parent().length||i.$element.appendTo(i.$body),i.$element.show().scrollTop(0),i.adjustDialog(),r&&i.$element[0].offsetWidth,i.$element.addClass("in"),i.enforceFocus();var o=t.Event("shown.bs.modal",{relatedTarget:e});r?i.$dialog.one("bsTransitionEnd",function(){i.$element.trigger("focus").trigger(o)}).emulateTransitionEnd(n.TRANSITION_DURATION):i.$element.trigger("focus").trigger(o)}))},n.prototype.hide=function(e){e&&e.preventDefault(),e=t.Event("hide.bs.modal"),this.$element.trigger(e),this.isShown&&!e.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),t(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),t.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",t.proxy(this.hideModal,this)).emulateTransitionEnd(n.TRANSITION_DURATION):this.hideModal())},n.prototype.enforceFocus=function(){t(document).off("focusin.bs.modal").on("focusin.bs.modal",t.proxy(function(t){this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")},this))},n.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",t.proxy(function(t){27==t.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},n.prototype.resize=function(){this.isShown?t(window).on("resize.bs.modal",t.proxy(this.handleUpdate,this)):t(window).off("resize.bs.modal")},n.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop(function(){t.$body.removeClass("modal-open"),t.resetAdjustments(),t.resetScrollbar(),t.$element.trigger("hidden.bs.modal")})},n.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},n.prototype.backdrop=function(e){var i=this,r=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var o=t.support.transition&&r;if(this.$backdrop=t(document.createElement("div")).addClass("modal-backdrop "+r).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",t.proxy(function(t){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(t.target===t.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),o&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!e)return;o?this.$backdrop.one("bsTransitionEnd",e).emulateTransitionEnd(n.BACKDROP_TRANSITION_DURATION):e()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var a=function(){i.removeBackdrop(),e&&e()};t.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",a).emulateTransitionEnd(n.BACKDROP_TRANSITION_DURATION):a()}else e&&e()},n.prototype.handleUpdate=function(){this.adjustDialog()},n.prototype.adjustDialog=function(){var t=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},n.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},n.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth<t,this.scrollbarWidth=this.measureScrollbar()},n.prototype.setScrollbar=function(){var t=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",t+this.scrollbarWidth)},n.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},n.prototype.measureScrollbar=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",this.$body.append(t);var e=t.offsetWidth-t.clientWidth;return this.$body[0].removeChild(t),e};var i=t.fn.modal;t.fn.modal=e,t.fn.modal.Constructor=n,t.fn.modal.noConflict=function(){return t.fn.modal=i,this},t(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(n){var i=t(this),r=i.attr("href"),o=t(i.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),a=o.data("bs.modal")?"toggle":t.extend({remote:!/#/.test(r)&&r},o.data(),i.data());i.is("a")&&n.preventDefault(),o.one("show.bs.modal",function(t){t.isDefaultPrevented()||o.one("hidden.bs.modal",function(){i.is(":visible")&&i.trigger("focus")})}),e.call(o,a,this)})}(jQuery),/* ========================================================================
|
||
* Bootstrap: tooltip.js v3.3.5
|
||
* http://getbootstrap.com/javascript/#tooltip
|
||
* Inspired by the original jQuery.tipsy by Jason Frame
|
||
* ========================================================================
|
||
* Copyright 2011-2015 Twitter, Inc.
|
||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||
* ======================================================================== */
|
||
+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),r=i.data("bs.tooltip"),o="object"==typeof e&&e;(r||!/destroy|hide/.test(e))&&(r||i.data("bs.tooltip",r=new n(this,o)),"string"==typeof e&&r[e]())})}var n=function(t,e){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",t,e)};n.VERSION="3.3.5",n.TRANSITION_DURATION=150,n.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},n.prototype.init=function(e,n,i){if(this.enabled=!0,this.type=e,this.$element=t(n),this.options=this.getOptions(i),this.$viewport=this.options.viewport&&t(t.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var r=this.options.trigger.split(" "),o=r.length;o--;){var a=r[o];if("click"==a)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=a){var s="hover"==a?"mouseenter":"focusin",l="hover"==a?"mouseleave":"focusout";this.$element.on(s+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},n.prototype.getDefaults=function(){return n.DEFAULTS},n.prototype.getOptions=function(e){return e=t.extend({},this.getDefaults(),this.$element.data(),e),e.delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},n.prototype.getDelegateOptions=function(){var e={},n=this.getDefaults();return this._options&&t.each(this._options,function(t,i){n[t]!=i&&(e[t]=i)}),e},n.prototype.enter=function(e){var n=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n)),e instanceof t.Event&&(n.inState["focusin"==e.type?"focus":"hover"]=!0),n.tip().hasClass("in")||"in"==n.hoverState?void(n.hoverState="in"):(clearTimeout(n.timeout),n.hoverState="in",n.options.delay&&n.options.delay.show?void(n.timeout=setTimeout(function(){"in"==n.hoverState&&n.show()},n.options.delay.show)):n.show())},n.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},n.prototype.leave=function(e){var n=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n)),e instanceof t.Event&&(n.inState["focusout"==e.type?"focus":"hover"]=!1),n.isInStateTrue()?void 0:(clearTimeout(n.timeout),n.hoverState="out",n.options.delay&&n.options.delay.hide?void(n.timeout=setTimeout(function(){"out"==n.hoverState&&n.hide()},n.options.delay.hide)):n.hide())},n.prototype.show=function(){var e=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var i=t.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!i)return;var r=this,o=this.tip(),a=this.getUID(this.type);this.setContent(),o.attr("id",a),this.$element.attr("aria-describedby",a),this.options.animation&&o.addClass("fade");var s="function"==typeof this.options.placement?this.options.placement.call(this,o[0],this.$element[0]):this.options.placement,l=/\s?auto?\s?/i,u=l.test(s);u&&(s=s.replace(l,"")||"top"),o.detach().css({top:0,left:0,display:"block"}).addClass(s).data("bs."+this.type,this),this.options.container?o.appendTo(this.options.container):o.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var c=this.getPosition(),d=o[0].offsetWidth,h=o[0].offsetHeight;if(u){var p=s,f=this.getPosition(this.$viewport);s="bottom"==s&&c.bottom+h>f.bottom?"top":"top"==s&&c.top-h<f.top?"bottom":"right"==s&&c.right+d>f.width?"left":"left"==s&&c.left-d<f.left?"right":s,o.removeClass(p).addClass(s)}var g=this.getCalculatedOffset(s,c,d,h);this.applyPlacement(g,s);var m=function(){var t=r.hoverState;r.$element.trigger("shown.bs."+r.type),r.hoverState=null,"out"==t&&r.leave(r)};t.support.transition&&this.$tip.hasClass("fade")?o.one("bsTransitionEnd",m).emulateTransitionEnd(n.TRANSITION_DURATION):m()}},n.prototype.applyPlacement=function(e,n){var i=this.tip(),r=i[0].offsetWidth,o=i[0].offsetHeight,a=parseInt(i.css("margin-top"),10),s=parseInt(i.css("margin-left"),10);isNaN(a)&&(a=0),isNaN(s)&&(s=0),e.top+=a,e.left+=s,t.offset.setOffset(i[0],t.extend({using:function(t){i.css({top:Math.round(t.top),left:Math.round(t.left)})}},e),0),i.addClass("in");var l=i[0].offsetWidth,u=i[0].offsetHeight;"top"==n&&u!=o&&(e.top=e.top+o-u);var c=this.getViewportAdjustedDelta(n,e,l,u);c.left?e.left+=c.left:e.top+=c.top;var d=/top|bottom/.test(n),h=d?2*c.left-r+l:2*c.top-o+u,p=d?"offsetWidth":"offsetHeight";i.offset(e),this.replaceArrow(h,i[0][p],d)},n.prototype.replaceArrow=function(t,e,n){this.arrow().css(n?"left":"top",50*(1-t/e)+"%").css(n?"top":"left","")},n.prototype.setContent=function(){var t=this.tip(),e=this.getTitle();t.find(".tooltip-inner")[this.options.html?"html":"text"](e),t.removeClass("fade in top bottom left right")},n.prototype.hide=function(e){function i(){"in"!=r.hoverState&&o.detach(),r.$element.removeAttr("aria-describedby").trigger("hidden.bs."+r.type),e&&e()}var r=this,o=t(this.$tip),a=t.Event("hide.bs."+this.type);return this.$element.trigger(a),a.isDefaultPrevented()?void 0:(o.removeClass("in"),t.support.transition&&o.hasClass("fade")?o.one("bsTransitionEnd",i).emulateTransitionEnd(n.TRANSITION_DURATION):i(),this.hoverState=null,this)},n.prototype.fixTitle=function(){var t=this.$element;(t.attr("title")||"string"!=typeof t.attr("data-original-title"))&&t.attr("data-original-title",t.attr("title")||"").attr("title","")},n.prototype.hasContent=function(){return this.getTitle()},n.prototype.getPosition=function(e){e=e||this.$element;var n=e[0],i="BODY"==n.tagName,r=n.getBoundingClientRect();null==r.width&&(r=t.extend({},r,{width:r.right-r.left,height:r.bottom-r.top}));var o=i?{top:0,left:0}:e.offset(),a={scroll:i?document.documentElement.scrollTop||document.body.scrollTop:e.scrollTop()},s=i?{width:t(window).width(),height:t(window).height()}:null;return t.extend({},r,a,s,o)},n.prototype.getCalculatedOffset=function(t,e,n,i){return"bottom"==t?{top:e.top+e.height,left:e.left+e.width/2-n/2}:"top"==t?{top:e.top-i,left:e.left+e.width/2-n/2}:"left"==t?{top:e.top+e.height/2-i/2,left:e.left-n}:{top:e.top+e.height/2-i/2,left:e.left+e.width}},n.prototype.getViewportAdjustedDelta=function(t,e,n,i){var r={top:0,left:0};if(!this.$viewport)return r;var o=this.options.viewport&&this.options.viewport.padding||0,a=this.getPosition(this.$viewport);if(/right|left/.test(t)){var s=e.top-o-a.scroll,l=e.top+o-a.scroll+i;s<a.top?r.top=a.top-s:l>a.top+a.height&&(r.top=a.top+a.height-l)}else{var u=e.left-o,c=e.left+o+n;u<a.left?r.left=a.left-u:c>a.right&&(r.left=a.left+a.width-c)}return r},n.prototype.getTitle=function(){var t,e=this.$element,n=this.options;return t=e.attr("data-original-title")||("function"==typeof n.title?n.title.call(e[0]):n.title)},n.prototype.getUID=function(t){do t+=~~(1e6*Math.random());while(document.getElementById(t));return t},n.prototype.tip=function(){if(!this.$tip&&(this.$tip=t(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},n.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},n.prototype.enable=function(){this.enabled=!0},n.prototype.disable=function(){this.enabled=!1},n.prototype.toggleEnabled=function(){this.enabled=!this.enabled},n.prototype.toggle=function(e){var n=this;e&&(n=t(e.currentTarget).data("bs."+this.type),n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n))),e?(n.inState.click=!n.inState.click,n.isInStateTrue()?n.enter(n):n.leave(n)):n.tip().hasClass("in")?n.leave(n):n.enter(n)},n.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide(function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null})};var i=t.fn.tooltip;t.fn.tooltip=e,t.fn.tooltip.Constructor=n,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=i,this}}(jQuery),/* ========================================================================
|
||
* Bootstrap: popover.js v3.3.5
|
||
* http://getbootstrap.com/javascript/#popovers
|
||
* ========================================================================
|
||
* Copyright 2011-2015 Twitter, Inc.
|
||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||
* ======================================================================== */
|
||
+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),r=i.data("bs.popover"),o="object"==typeof e&&e;(r||!/destroy|hide/.test(e))&&(r||i.data("bs.popover",r=new n(this,o)),"string"==typeof e&&r[e]())})}var n=function(t,e){this.init("popover",t,e)};if(!t.fn.tooltip)throw new Error("Popover requires tooltip.js");n.VERSION="3.3.5",n.DEFAULTS=t.extend({},t.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),n.prototype=t.extend({},t.fn.tooltip.Constructor.prototype),n.prototype.constructor=n,n.prototype.getDefaults=function(){return n.DEFAULTS},n.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),n=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](e),t.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof n?"html":"append":"text"](n),t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},n.prototype.hasContent=function(){return this.getTitle()||this.getContent()},n.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},n.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var i=t.fn.popover;t.fn.popover=e,t.fn.popover.Constructor=n,t.fn.popover.noConflict=function(){return t.fn.popover=i,this}}(jQuery),/*!
|
||
* typeahead.js 0.10.5
|
||
* https://github.com/twitter/typeahead.js
|
||
* Copyright 2013-2014 Twitter, Inc. and other contributors; Licensed MIT
|
||
*/
|
||
!function(t){var e=function(){"use strict";return{isMsie:function(){return/(msie|trident)/i.test(navigator.userAgent)?navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2]:!1},isBlankString:function(t){return!t||/^\s*$/.test(t)},escapeRegExChars:function(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isArray:t.isArray,isFunction:t.isFunction,isObject:t.isPlainObject,isUndefined:function(t){return"undefined"==typeof t},toStr:function(t){return e.isUndefined(t)||null===t?"":t+""},bind:t.proxy,each:function(e,n){function i(t,e){return n(e,t)}t.each(e,i)},map:t.map,filter:t.grep,every:function(e,n){var i=!0;return e?(t.each(e,function(t,r){return(i=n.call(null,r,t,e))?void 0:!1}),!!i):i},some:function(e,n){var i=!1;return e?(t.each(e,function(t,r){return(i=n.call(null,r,t,e))?!1:void 0}),!!i):i},mixin:t.extend,getUniqueId:function(){var t=0;return function(){return t++}}(),templatify:function(e){function n(){return String(e)}return t.isFunction(e)?e:n},defer:function(t){setTimeout(t,0)},debounce:function(t,e,n){var i,r;return function(){var o,a,s=this,l=arguments;return o=function(){i=null,n||(r=t.apply(s,l))},a=n&&!i,clearTimeout(i),i=setTimeout(o,e),a&&(r=t.apply(s,l)),r}},throttle:function(t,e){var n,i,r,o,a,s;return a=0,s=function(){a=new Date,r=null,o=t.apply(n,i)},function(){var l=new Date,u=e-(l-a);return n=this,i=arguments,0>=u?(clearTimeout(r),r=null,a=l,o=t.apply(n,i)):r||(r=setTimeout(s,u)),o}},noop:function(){}}}(),n="0.10.5",i=function(){"use strict";function t(t){return t=e.toStr(t),t?t.split(/\s+/):[]}function n(t){return t=e.toStr(t),t?t.split(/\W+/):[]}function i(t){return function(){var n=[].slice.call(arguments,0);return function(i){var r=[];return e.each(n,function(n){r=r.concat(t(e.toStr(i[n])))}),r}}}return{nonword:n,whitespace:t,obj:{nonword:i(n),whitespace:i(t)}}}(),r=function(){"use strict";function n(n){this.maxSize=e.isNumber(n)?n:100,this.reset(),this.maxSize<=0&&(this.set=this.get=t.noop)}function i(){this.head=this.tail=null}function r(t,e){this.key=t,this.val=e,this.prev=this.next=null}return e.mixin(n.prototype,{set:function(t,e){var n,i=this.list.tail;this.size>=this.maxSize&&(this.list.remove(i),delete this.hash[i.key]),(n=this.hash[t])?(n.val=e,this.list.moveToFront(n)):(n=new r(t,e),this.list.add(n),this.hash[t]=n,this.size++)},get:function(t){var e=this.hash[t];return e?(this.list.moveToFront(e),e.val):void 0},reset:function(){this.size=0,this.hash={},this.list=new i}}),e.mixin(i.prototype,{add:function(t){this.head&&(t.next=this.head,this.head.prev=t),this.head=t,this.tail=this.tail||t},remove:function(t){t.prev?t.prev.next=t.next:this.head=t.next,t.next?t.next.prev=t.prev:this.tail=t.prev},moveToFront:function(t){this.remove(t),this.add(t)}}),n}(),o=function(){"use strict";function t(t){this.prefix=["__",t,"__"].join(""),this.ttlKey="__ttl__",this.keyMatcher=new RegExp("^"+e.escapeRegExChars(this.prefix))}function n(){return(new Date).getTime()}function i(t){return JSON.stringify(e.isUndefined(t)?null:t)}function r(t){return JSON.parse(t)}var o,a;try{o=window.localStorage,o.setItem("~~~","!"),o.removeItem("~~~")}catch(s){o=null}return a=o&&window.JSON?{_prefix:function(t){return this.prefix+t},_ttlKey:function(t){return this._prefix(t)+this.ttlKey},get:function(t){return this.isExpired(t)&&this.remove(t),r(o.getItem(this._prefix(t)))},set:function(t,r,a){return e.isNumber(a)?o.setItem(this._ttlKey(t),i(n()+a)):o.removeItem(this._ttlKey(t)),o.setItem(this._prefix(t),i(r))},remove:function(t){return o.removeItem(this._ttlKey(t)),o.removeItem(this._prefix(t)),this},clear:function(){var t,e,n=[],i=o.length;for(t=0;i>t;t++)(e=o.key(t)).match(this.keyMatcher)&&n.push(e.replace(this.keyMatcher,""));for(t=n.length;t--;)this.remove(n[t]);return this},isExpired:function(t){var i=r(o.getItem(this._ttlKey(t)));return e.isNumber(i)&&n()>i?!0:!1}}:{get:e.noop,set:e.noop,remove:e.noop,clear:e.noop,isExpired:e.noop},e.mixin(t.prototype,a),t}(),a=function(){"use strict";function n(e){e=e||{},this.cancelled=!1,this.lastUrl=null,this._send=e.transport?i(e.transport):t.ajax,this._get=e.rateLimiter?e.rateLimiter(this._get):this._get,this._cache=e.cache===!1?new r(0):l}function i(n){return function(i,r){function o(t){e.defer(function(){s.resolve(t)})}function a(t){e.defer(function(){s.reject(t)})}var s=t.Deferred();return n(i,r,o,a),s}}var o=0,a={},s=6,l=new r(10);return n.setMaxPendingRequests=function(t){s=t},n.resetCache=function(){l.reset()},e.mixin(n.prototype,{_get:function(t,e,n){function i(e){n&&n(null,e),c._cache.set(t,e)}function r(){n&&n(!0)}function l(){o--,delete a[t],c.onDeckRequestArgs&&(c._get.apply(c,c.onDeckRequestArgs),c.onDeckRequestArgs=null)}var u,c=this;this.cancelled||t!==this.lastUrl||((u=a[t])?u.done(i).fail(r):s>o?(o++,a[t]=this._send(t,e).done(i).fail(r).always(l)):this.onDeckRequestArgs=[].slice.call(arguments,0))},get:function(t,n,i){var r;return e.isFunction(n)&&(i=n,n={}),this.cancelled=!1,this.lastUrl=t,(r=this._cache.get(t))?e.defer(function(){i&&i(null,r)}):this._get(t,n,i),!!r},cancel:function(){this.cancelled=!0}}),n}(),s=function(){"use strict";function n(e){e=e||{},e.datumTokenizer&&e.queryTokenizer||t.error("datumTokenizer and queryTokenizer are both required"),this.datumTokenizer=e.datumTokenizer,this.queryTokenizer=e.queryTokenizer,this.reset()}function i(t){return t=e.filter(t,function(t){return!!t}),t=e.map(t,function(t){return t.toLowerCase()})}function r(){return{ids:[],children:{}}}function o(t){for(var e={},n=[],i=0,r=t.length;r>i;i++)e[t[i]]||(e[t[i]]=!0,n.push(t[i]));return n}function a(t,e){function n(t,e){return t-e}var i=0,r=0,o=[];t=t.sort(n),e=e.sort(n);for(var a=t.length,s=e.length;a>i&&s>r;)t[i]<e[r]?i++:t[i]>e[r]?r++:(o.push(t[i]),i++,r++);return o}return e.mixin(n.prototype,{bootstrap:function(t){this.datums=t.datums,this.trie=t.trie},add:function(t){var n=this;t=e.isArray(t)?t:[t],e.each(t,function(t){var o,a;o=n.datums.push(t)-1,a=i(n.datumTokenizer(t)),e.each(a,function(t){var e,i,a;for(e=n.trie,i=t.split("");a=i.shift();)e=e.children[a]||(e.children[a]=r()),e.ids.push(o)})})},get:function(t){var n,r,s=this;return n=i(this.queryTokenizer(t)),e.each(n,function(t){var e,n,i,o;if(r&&0===r.length)return!1;for(e=s.trie,n=t.split("");e&&(i=n.shift());)e=e.children[i];return e&&0===n.length?(o=e.ids.slice(0),void(r=r?a(r,o):o)):(r=[],!1)}),r?e.map(o(r),function(t){return s.datums[t]}):[]},reset:function(){this.datums=[],this.trie=r()},serialize:function(){return{datums:this.datums,trie:this.trie}}}),n}(),l=function(){"use strict";function i(t){return t.local||null}function r(i){var r,o;return o={url:null,thumbprint:"",ttl:864e5,filter:null,ajax:{}},(r=i.prefetch||null)&&(r=e.isString(r)?{url:r}:r,r=e.mixin(o,r),r.thumbprint=n+r.thumbprint,r.ajax.type=r.ajax.type||"GET",r.ajax.dataType=r.ajax.dataType||"json",!r.url&&t.error("prefetch requires url to be set")),r}function o(n){function i(t){return function(n){return e.debounce(n,t)}}function r(t){return function(n){return e.throttle(n,t)}}var o,a;return a={url:null,cache:!0,wildcard:"%QUERY",replace:null,rateLimitBy:"debounce",rateLimitWait:300,send:null,filter:null,ajax:{}},(o=n.remote||null)&&(o=e.isString(o)?{url:o}:o,o=e.mixin(a,o),o.rateLimiter=/^throttle$/i.test(o.rateLimitBy)?r(o.rateLimitWait):i(o.rateLimitWait),o.ajax.type=o.ajax.type||"GET",o.ajax.dataType=o.ajax.dataType||"json",delete o.rateLimitBy,delete o.rateLimitWait,!o.url&&t.error("remote requires url to be set")),o}return{local:i,prefetch:r,remote:o}}();!function(n){"use strict";function r(e){e&&(e.local||e.prefetch||e.remote)||t.error("one of local, prefetch, or remote is required"),this.limit=e.limit||5,this.sorter=u(e.sorter),this.dupDetector=e.dupDetector||c,this.local=l.local(e),this.prefetch=l.prefetch(e),this.remote=l.remote(e),this.cacheKey=this.prefetch?this.prefetch.cacheKey||this.prefetch.url:null,this.index=new s({datumTokenizer:e.datumTokenizer,queryTokenizer:e.queryTokenizer}),this.storage=this.cacheKey?new o(this.cacheKey):null}function u(t){function n(e){return e.sort(t)}function i(t){return t}return e.isFunction(t)?n:i}function c(){return!1}var d,h;return d=n.Bloodhound,h={data:"data",protocol:"protocol",thumbprint:"thumbprint"},n.Bloodhound=r,r.noConflict=function(){return n.Bloodhound=d,r},r.tokenizers=i,e.mixin(r.prototype,{_loadPrefetch:function(e){function n(t){o.clear(),o.add(e.filter?e.filter(t):t),o._saveToStorage(o.index.serialize(),e.thumbprint,e.ttl)}var i,r,o=this;return(i=this._readFromStorage(e.thumbprint))?(this.index.bootstrap(i),r=t.Deferred().resolve()):r=t.ajax(e.url,e.ajax).done(n),r},_getFromRemote:function(t,e){function n(t,n){e(t?[]:o.remote.filter?o.remote.filter(n):n)}var i,r,o=this;return this.transport?(t=t||"",r=encodeURIComponent(t),i=this.remote.replace?this.remote.replace(this.remote.url,t):this.remote.url.replace(this.remote.wildcard,r),this.transport.get(i,this.remote.ajax,n)):void 0},_cancelLastRemoteRequest:function(){this.transport&&this.transport.cancel()},_saveToStorage:function(t,e,n){this.storage&&(this.storage.set(h.data,t,n),this.storage.set(h.protocol,location.protocol,n),this.storage.set(h.thumbprint,e,n))},_readFromStorage:function(t){var e,n={};return this.storage&&(n.data=this.storage.get(h.data),n.protocol=this.storage.get(h.protocol),n.thumbprint=this.storage.get(h.thumbprint)),e=n.thumbprint!==t||n.protocol!==location.protocol,n.data&&!e?n.data:null},_initialize:function(){function n(){r.add(e.isFunction(o)?o():o)}var i,r=this,o=this.local;return i=this.prefetch?this._loadPrefetch(this.prefetch):t.Deferred().resolve(),o&&i.done(n),this.transport=this.remote?new a(this.remote):null,this.initPromise=i.promise()},initialize:function(t){return!this.initPromise||t?this._initialize():this.initPromise},add:function(t){this.index.add(t)},get:function(t,n){function i(t){var i=o.slice(0);e.each(t,function(t){var n;return n=e.some(i,function(e){return r.dupDetector(t,e)}),!n&&i.push(t),i.length<r.limit}),n&&n(r.sorter(i))}var r=this,o=[],a=!1;o=this.index.get(t),o=this.sorter(o).slice(0,this.limit),o.length<this.limit?a=this._getFromRemote(t,i):this._cancelLastRemoteRequest(),a||(o.length>0||!this.transport)&&n&&n(o)},clear:function(){this.index.reset()},clearPrefetchCache:function(){this.storage&&this.storage.clear()},clearRemoteCache:function(){this.transport&&a.resetCache()},ttAdapter:function(){return e.bind(this.get,this)}}),r}(this);var u=function(){return{wrapper:'<span class="twitter-typeahead"></span>',dropdown:'<span class="tt-dropdown-menu"></span>',dataset:'<div class="tt-dataset-%CLASS%"></div>',suggestions:'<span class="tt-suggestions"></span>',suggestion:'<div class="tt-suggestion"></div>'}}(),c=function(){"use strict";var t={wrapper:{position:"relative",display:"inline-block"},hint:{position:"absolute",top:"0",left:"0",borderColor:"transparent",boxShadow:"none",opacity:"1"},input:{position:"relative",verticalAlign:"top",backgroundColor:"transparent"},inputWithNoHint:{position:"relative",verticalAlign:"top"},dropdown:{position:"absolute",top:"100%",left:"0",zIndex:"100",display:"none"},suggestions:{display:"block"},suggestion:{whiteSpace:"nowrap",cursor:"pointer"},suggestionChild:{whiteSpace:"normal"},ltr:{left:"0",right:"auto"},rtl:{left:"auto",right:" 0"}};return e.isMsie()&&e.mixin(t.input,{backgroundImage:"url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)"}),e.isMsie()&&e.isMsie()<=7&&e.mixin(t.input,{marginTop:"-1px"}),t}(),d=function(){"use strict";function n(e){e&&e.el||t.error("EventBus initialized without el"),this.$el=t(e.el)}var i="typeahead:";return e.mixin(n.prototype,{trigger:function(t){var e=[].slice.call(arguments,1);this.$el.trigger(i+t,e)}}),n}(),h=function(){"use strict";function t(t,e,n,i){var r;if(!n)return this;for(e=e.split(l),n=i?s(n,i):n,this._callbacks=this._callbacks||{};r=e.shift();)this._callbacks[r]=this._callbacks[r]||{sync:[],async:[]},this._callbacks[r][t].push(n);return this}function e(e,n,i){return t.call(this,"async",e,n,i)}function n(e,n,i){return t.call(this,"sync",e,n,i)}function i(t){var e;if(!this._callbacks)return this;for(t=t.split(l);e=t.shift();)delete this._callbacks[e];return this}function r(t){var e,n,i,r,a;if(!this._callbacks)return this;for(t=t.split(l),i=[].slice.call(arguments,1);(e=t.shift())&&(n=this._callbacks[e]);)r=o(n.sync,this,[e].concat(i)),a=o(n.async,this,[e].concat(i)),r()&&u(a);return this}function o(t,e,n){function i(){for(var i,r=0,o=t.length;!i&&o>r;r+=1)i=t[r].apply(e,n)===!1;return!i}return i}function a(){var t;return t=window.setImmediate?function(t){setImmediate(function(){t()})}:function(t){setTimeout(function(){t()},0)}}function s(t,e){return t.bind?t.bind(e):function(){t.apply(e,[].slice.call(arguments,0))}}var l=/\s+/,u=a();return{onSync:n,onAsync:e,off:i,trigger:r}}(),p=function(t){"use strict";function n(t,n,i){for(var r,o=[],a=0,s=t.length;s>a;a++)o.push(e.escapeRegExChars(t[a]));return r=i?"\\b("+o.join("|")+")\\b":"("+o.join("|")+")",n?new RegExp(r):new RegExp(r,"i")}var i={node:null,pattern:null,tagName:"strong",className:null,wordsOnly:!1,caseSensitive:!1};return function(r){function o(e){var n,i,o;return(n=s.exec(e.data))&&(o=t.createElement(r.tagName),r.className&&(o.className=r.className),i=e.splitText(n.index),i.splitText(n[0].length),o.appendChild(i.cloneNode(!0)),e.parentNode.replaceChild(o,i)),!!n}function a(t,e){for(var n,i=3,r=0;r<t.childNodes.length;r++)n=t.childNodes[r],n.nodeType===i?r+=e(n)?1:0:a(n,e)}var s;r=e.mixin({},i,r),r.node&&r.pattern&&(r.pattern=e.isArray(r.pattern)?r.pattern:[r.pattern],s=n(r.pattern,r.caseSensitive,r.wordsOnly),a(r.node,o))}}(window.document),f=function(){"use strict";function n(n){var r,o,s,l,u=this;n=n||{},n.input||t.error("input is missing"),r=e.bind(this._onBlur,this),o=e.bind(this._onFocus,this),s=e.bind(this._onKeydown,this),l=e.bind(this._onInput,this),this.$hint=t(n.hint),this.$input=t(n.input).on("blur.tt",r).on("focus.tt",o).on("keydown.tt",s),0===this.$hint.length&&(this.setHint=this.getHint=this.clearHint=this.clearHintIfInvalid=e.noop),e.isMsie()?this.$input.on("keydown.tt keypress.tt cut.tt paste.tt",function(t){a[t.which||t.keyCode]||e.defer(e.bind(u._onInput,u,t))}):this.$input.on("input.tt",l),this.query=this.$input.val(),this.$overflowHelper=i(this.$input)}function i(e){return t('<pre aria-hidden="true"></pre>').css({position:"absolute",visibility:"hidden",whiteSpace:"pre",fontFamily:e.css("font-family"),fontSize:e.css("font-size"),fontStyle:e.css("font-style"),fontVariant:e.css("font-variant"),fontWeight:e.css("font-weight"),wordSpacing:e.css("word-spacing"),letterSpacing:e.css("letter-spacing"),textIndent:e.css("text-indent"),textRendering:e.css("text-rendering"),textTransform:e.css("text-transform")}).insertAfter(e)}function r(t,e){return n.normalizeQuery(t)===n.normalizeQuery(e)}function o(t){return t.altKey||t.ctrlKey||t.metaKey||t.shiftKey}var a;return a={9:"tab",27:"esc",37:"left",39:"right",13:"enter",38:"up",40:"down"},n.normalizeQuery=function(t){return(t||"").replace(/^\s*/g,"").replace(/\s{2,}/g," ")},e.mixin(n.prototype,h,{_onBlur:function(){this.resetInputValue(),this.trigger("blurred")},_onFocus:function(){this.trigger("focused")},_onKeydown:function(t){var e=a[t.which||t.keyCode];this._managePreventDefault(e,t),e&&this._shouldTrigger(e,t)&&this.trigger(e+"Keyed",t)},_onInput:function(){this._checkInputValue()},_managePreventDefault:function(t,e){var n,i,r;switch(t){case"tab":i=this.getHint(),r=this.getInputValue(),n=i&&i!==r&&!o(e);break;case"up":case"down":n=!o(e);break;default:n=!1}n&&e.preventDefault()},_shouldTrigger:function(t,e){var n;switch(t){case"tab":n=!o(e);break;default:n=!0}return n},_checkInputValue:function(){var t,e,n;t=this.getInputValue(),e=r(t,this.query),n=e?this.query.length!==t.length:!1,this.query=t,e?n&&this.trigger("whitespaceChanged",this.query):this.trigger("queryChanged",this.query)},focus:function(){this.$input.focus()},blur:function(){this.$input.blur()},getQuery:function(){return this.query},setQuery:function(t){this.query=t},getInputValue:function(){return this.$input.val()},setInputValue:function(t,e){this.$input.val(t),e?this.clearHint():this._checkInputValue()},resetInputValue:function(){this.setInputValue(this.query,!0)},getHint:function(){return this.$hint.val()},setHint:function(t){this.$hint.val(t)},clearHint:function(){this.setHint("")},clearHintIfInvalid:function(){var t,e,n,i;t=this.getInputValue(),e=this.getHint(),n=t!==e&&0===e.indexOf(t),i=""!==t&&n&&!this.hasOverflow(),!i&&this.clearHint()},getLanguageDirection:function(){return(this.$input.css("direction")||"ltr").toLowerCase()},hasOverflow:function(){var t=this.$input.width()-2;return this.$overflowHelper.text(this.getInputValue()),this.$overflowHelper.width()>=t},isCursorAtEnd:function(){var t,n,i;return t=this.$input.val().length,n=this.$input[0].selectionStart,e.isNumber(n)?n===t:document.selection?(i=document.selection.createRange(),i.moveStart("character",-t),t===i.text.length):!0},destroy:function(){this.$hint.off(".tt"),this.$input.off(".tt"),this.$hint=this.$input=this.$overflowHelper=null}}),n}(),g=function(){"use strict";function n(n){n=n||{},n.templates=n.templates||{},n.source||t.error("missing source"),n.name&&!o(n.name)&&t.error("invalid dataset name: "+n.name),this.query=null,this.highlight=!!n.highlight,this.name=n.name||e.getUniqueId(),this.source=n.source,this.displayFn=i(n.display||n.displayKey),this.templates=r(n.templates,this.displayFn),this.$el=t(u.dataset.replace("%CLASS%",this.name))}function i(t){function n(e){return e[t]}return t=t||"value",e.isFunction(t)?t:n}function r(t,n){function i(t){return"<p>"+n(t)+"</p>"}return{empty:t.empty&&e.templatify(t.empty),header:t.header&&e.templatify(t.header),footer:t.footer&&e.templatify(t.footer),suggestion:t.suggestion||i}}function o(t){return/^[_a-zA-Z0-9-]+$/.test(t)}var a="ttDataset",s="ttValue",l="ttDatum";return n.extractDatasetName=function(e){return t(e).data(a)},n.extractValue=function(e){return t(e).data(s)},n.extractDatum=function(e){return t(e).data(l)},e.mixin(n.prototype,h,{_render:function(n,i){function r(){return g.templates.empty({query:n,isEmpty:!0})}function o(){function r(e){var n;return n=t(u.suggestion).append(g.templates.suggestion(e)).data(a,g.name).data(s,g.displayFn(e)).data(l,e),n.children().each(function(){t(this).css(c.suggestionChild)}),n}var o,d;return o=t(u.suggestions).css(c.suggestions),d=e.map(i,r),o.append.apply(o,d),g.highlight&&p({className:"tt-highlight",node:o[0],pattern:n}),o}function d(){return g.templates.header({query:n,isEmpty:!f})}function h(){return g.templates.footer({query:n,isEmpty:!f})}if(this.$el){var f,g=this;this.$el.empty(),f=i&&i.length,!f&&this.templates.empty?this.$el.html(r()).prepend(g.templates.header?d():null).append(g.templates.footer?h():null):f&&this.$el.html(o()).prepend(g.templates.header?d():null).append(g.templates.footer?h():null),this.trigger("rendered")}},getRoot:function(){return this.$el},update:function(t){function e(e){n.canceled||t!==n.query||n._render(t,e)}var n=this;this.query=t,this.canceled=!1,this.source(t,e)},cancel:function(){this.canceled=!0},clear:function(){this.cancel(),this.$el.empty(),this.trigger("rendered")},isEmpty:function(){return this.$el.is(":empty")},destroy:function(){this.$el=null}}),n}(),m=function(){"use strict";function n(n){var r,o,a,s=this;n=n||{},n.menu||t.error("menu is required"),this.isOpen=!1,this.isEmpty=!0,this.datasets=e.map(n.datasets,i),r=e.bind(this._onSuggestionClick,this),o=e.bind(this._onSuggestionMouseEnter,this),a=e.bind(this._onSuggestionMouseLeave,this),this.$menu=t(n.menu).on("click.tt",".tt-suggestion",r).on("mouseenter.tt",".tt-suggestion",o).on("mouseleave.tt",".tt-suggestion",a),e.each(this.datasets,function(t){s.$menu.append(t.getRoot()),t.onSync("rendered",s._onRendered,s)})}function i(t){return new g(t)}return e.mixin(n.prototype,h,{_onSuggestionClick:function(e){this.trigger("suggestionClicked",t(e.currentTarget))},_onSuggestionMouseEnter:function(e){this._removeCursor(),this._setCursor(t(e.currentTarget),!0)},_onSuggestionMouseLeave:function(){this._removeCursor()},_onRendered:function(){function t(t){return t.isEmpty()}this.isEmpty=e.every(this.datasets,t),this.isEmpty?this._hide():this.isOpen&&this._show(),this.trigger("datasetRendered")},_hide:function(){this.$menu.hide()},_show:function(){this.$menu.css("display","block")},_getSuggestions:function(){return this.$menu.find(".tt-suggestion")},_getCursor:function(){return this.$menu.find(".tt-cursor").first()},_setCursor:function(t,e){t.first().addClass("tt-cursor"),!e&&this.trigger("cursorMoved")},_removeCursor:function(){this._getCursor().removeClass("tt-cursor")},_moveCursor:function(t){var e,n,i,r;if(this.isOpen){if(n=this._getCursor(),e=this._getSuggestions(),this._removeCursor(),i=e.index(n)+t,i=(i+1)%(e.length+1)-1,-1===i)return void this.trigger("cursorRemoved");-1>i&&(i=e.length-1),this._setCursor(r=e.eq(i)),this._ensureVisible(r)}},_ensureVisible:function(t){var e,n,i,r;e=t.position().top,n=e+t.outerHeight(!0),i=this.$menu.scrollTop(),r=this.$menu.height()+parseInt(this.$menu.css("paddingTop"),10)+parseInt(this.$menu.css("paddingBottom"),10),0>e?this.$menu.scrollTop(i+e):n>r&&this.$menu.scrollTop(i+(n-r))},close:function(){this.isOpen&&(this.isOpen=!1,this._removeCursor(),this._hide(),this.trigger("closed"))},open:function(){this.isOpen||(this.isOpen=!0,!this.isEmpty&&this._show(),this.trigger("opened"))},setLanguageDirection:function(t){this.$menu.css("ltr"===t?c.ltr:c.rtl)},moveCursorUp:function(){this._moveCursor(-1)},moveCursorDown:function(){this._moveCursor(1)},getDatumForSuggestion:function(t){var e=null;return t.length&&(e={raw:g.extractDatum(t),value:g.extractValue(t),datasetName:g.extractDatasetName(t)}),e},getDatumForCursor:function(){return this.getDatumForSuggestion(this._getCursor().first())},getDatumForTopSuggestion:function(){return this.getDatumForSuggestion(this._getSuggestions().first())},update:function(t){function n(e){e.update(t)}e.each(this.datasets,n)},empty:function(){function t(t){t.clear()}e.each(this.datasets,t),this.isEmpty=!0},isVisible:function(){return this.isOpen&&!this.isEmpty},destroy:function(){function t(t){t.destroy()}this.$menu.off(".tt"),this.$menu=null,e.each(this.datasets,t)}}),n}(),v=function(){"use strict";function n(n){var r,o,a;n=n||{},n.input||t.error("missing input"),this.isActivated=!1,this.autoselect=!!n.autoselect,this.minLength=e.isNumber(n.minLength)?n.minLength:1,this.$node=i(n.input,n.withHint),r=this.$node.find(".tt-dropdown-menu"),o=this.$node.find(".tt-input"),a=this.$node.find(".tt-hint"),o.on("blur.tt",function(t){var n,i,a;n=document.activeElement,i=r.is(n),a=r.has(n).length>0,e.isMsie()&&(i||a)&&(t.preventDefault(),t.stopImmediatePropagation(),e.defer(function(){o.focus()}))}),r.on("mousedown.tt",function(t){t.preventDefault()}),this.eventBus=n.eventBus||new d({el:o}),this.dropdown=new m({menu:r,datasets:n.datasets}).onSync("suggestionClicked",this._onSuggestionClicked,this).onSync("cursorMoved",this._onCursorMoved,this).onSync("cursorRemoved",this._onCursorRemoved,this).onSync("opened",this._onOpened,this).onSync("closed",this._onClosed,this).onAsync("datasetRendered",this._onDatasetRendered,this),this.input=new f({input:o,hint:a}).onSync("focused",this._onFocused,this).onSync("blurred",this._onBlurred,this).onSync("enterKeyed",this._onEnterKeyed,this).onSync("tabKeyed",this._onTabKeyed,this).onSync("escKeyed",this._onEscKeyed,this).onSync("upKeyed",this._onUpKeyed,this).onSync("downKeyed",this._onDownKeyed,this).onSync("leftKeyed",this._onLeftKeyed,this).onSync("rightKeyed",this._onRightKeyed,this).onSync("queryChanged",this._onQueryChanged,this).onSync("whitespaceChanged",this._onWhitespaceChanged,this),this._setLanguageDirection()}function i(e,n){var i,o,s,l;i=t(e),o=t(u.wrapper).css(c.wrapper),s=t(u.dropdown).css(c.dropdown),l=i.clone().css(c.hint).css(r(i)),l.val("").removeData().addClass("tt-hint").removeAttr("id name placeholder required").prop("readonly",!0).attr({autocomplete:"off",spellcheck:"false",tabindex:-1}),i.data(a,{dir:i.attr("dir"),autocomplete:i.attr("autocomplete"),spellcheck:i.attr("spellcheck"),style:i.attr("style")}),i.addClass("tt-input").attr({autocomplete:"off",spellcheck:!1}).css(n?c.input:c.inputWithNoHint);try{!i.attr("dir")&&i.attr("dir","auto")}catch(d){}return i.wrap(o).parent().prepend(n?l:null).append(s)}function r(t){return{backgroundAttachment:t.css("background-attachment"),backgroundClip:t.css("background-clip"),backgroundColor:t.css("background-color"),backgroundImage:t.css("background-image"),backgroundOrigin:t.css("background-origin"),backgroundPosition:t.css("background-position"),backgroundRepeat:t.css("background-repeat"),backgroundSize:t.css("background-size")}}function o(t){var n=t.find(".tt-input");e.each(n.data(a),function(t,i){e.isUndefined(t)?n.removeAttr(i):n.attr(i,t)}),n.detach().removeData(a).removeClass("tt-input").insertAfter(t),t.remove()}var a="ttAttrs";return e.mixin(n.prototype,{_onSuggestionClicked:function(t,e){var n;(n=this.dropdown.getDatumForSuggestion(e))&&this._select(n)},_onCursorMoved:function(){var t=this.dropdown.getDatumForCursor();this.input.setInputValue(t.value,!0),this.eventBus.trigger("cursorchanged",t.raw,t.datasetName)},_onCursorRemoved:function(){this.input.resetInputValue(),this._updateHint()},_onDatasetRendered:function(){this._updateHint()},_onOpened:function(){this._updateHint(),this.eventBus.trigger("opened")},_onClosed:function(){this.input.clearHint(),this.eventBus.trigger("closed")},_onFocused:function(){this.isActivated=!0,this.dropdown.open()},_onBlurred:function(){this.isActivated=!1,this.dropdown.empty(),this.dropdown.close()},_onEnterKeyed:function(t,e){var n,i;n=this.dropdown.getDatumForCursor(),i=this.dropdown.getDatumForTopSuggestion(),n?(this._select(n),e.preventDefault()):this.autoselect&&i&&(this._select(i),e.preventDefault())},_onTabKeyed:function(t,e){var n;(n=this.dropdown.getDatumForCursor())?(this._select(n),e.preventDefault()):this._autocomplete(!0)},_onEscKeyed:function(){this.dropdown.close(),this.input.resetInputValue()},_onUpKeyed:function(){var t=this.input.getQuery();this.dropdown.isEmpty&&t.length>=this.minLength?this.dropdown.update(t):this.dropdown.moveCursorUp(),this.dropdown.open()},_onDownKeyed:function(){var t=this.input.getQuery();this.dropdown.isEmpty&&t.length>=this.minLength?this.dropdown.update(t):this.dropdown.moveCursorDown(),this.dropdown.open()},_onLeftKeyed:function(){"rtl"===this.dir&&this._autocomplete()},_onRightKeyed:function(){"ltr"===this.dir&&this._autocomplete()},_onQueryChanged:function(t,e){this.input.clearHintIfInvalid(),e.length>=this.minLength?this.dropdown.update(e):this.dropdown.empty(),this.dropdown.open(),this._setLanguageDirection()},_onWhitespaceChanged:function(){this._updateHint(),this.dropdown.open()},_setLanguageDirection:function(){var t;this.dir!==(t=this.input.getLanguageDirection())&&(this.dir=t,this.$node.css("direction",t),this.dropdown.setLanguageDirection(t))},_updateHint:function(){var t,n,i,r,o,a;t=this.dropdown.getDatumForTopSuggestion(),t&&this.dropdown.isVisible()&&!this.input.hasOverflow()?(n=this.input.getInputValue(),i=f.normalizeQuery(n),r=e.escapeRegExChars(i),o=new RegExp("^(?:"+r+")(.+$)","i"),a=o.exec(t.value),a?this.input.setHint(n+a[1]):this.input.clearHint()):this.input.clearHint()},_autocomplete:function(t){var e,n,i,r;e=this.input.getHint(),n=this.input.getQuery(),i=t||this.input.isCursorAtEnd(),e&&n!==e&&i&&(r=this.dropdown.getDatumForTopSuggestion(),r&&this.input.setInputValue(r.value),this.eventBus.trigger("autocompleted",r.raw,r.datasetName))},_select:function(t){this.input.setQuery(t.value),this.input.setInputValue(t.value,!0),this._setLanguageDirection(),this.eventBus.trigger("selected",t.raw,t.datasetName),this.dropdown.close(),e.defer(e.bind(this.dropdown.empty,this.dropdown))},open:function(){this.dropdown.open()},close:function(){this.dropdown.close()},setVal:function(t){t=e.toStr(t),this.isActivated?this.input.setInputValue(t):(this.input.setQuery(t),this.input.setInputValue(t,!0)),this._setLanguageDirection()},getVal:function(){return this.input.getQuery()},destroy:function(){this.input.destroy(),this.dropdown.destroy(),o(this.$node),this.$node=null}}),n}();!function(){"use strict";var n,i,r;n=t.fn.typeahead,i="ttTypeahead",r={initialize:function(n,r){function o(){var o,a,s=t(this);e.each(r,function(t){t.highlight=!!n.highlight}),a=new v({input:s,eventBus:o=new d({el:s}),withHint:e.isUndefined(n.hint)?!0:!!n.hint,minLength:n.minLength,autoselect:n.autoselect,datasets:r}),s.data(i,a)}return r=e.isArray(r)?r:[].slice.call(arguments,1),n=n||{},this.each(o)},open:function(){function e(){var e,n=t(this);(e=n.data(i))&&e.open()}return this.each(e)},close:function(){function e(){var e,n=t(this);(e=n.data(i))&&e.close()}return this.each(e)},val:function(e){function n(){var n,r=t(this);(n=r.data(i))&&n.setVal(e)}function r(t){var e,n;return(e=t.data(i))&&(n=e.getVal()),n}return arguments.length?this.each(n):r(this.first())},destroy:function(){function e(){var e,n=t(this);(e=n.data(i))&&(e.destroy(),n.removeData(i))}return this.each(e)}},t.fn.typeahead=function(e){var n;return r[e]&&"initialize"!==e?(n=this.filter(function(){return!!t(this).data(i)}),r[e].apply(n,[].slice.call(arguments,1))):r.initialize.apply(this,arguments)},t.fn.typeahead.noConflict=function(){return t.fn.typeahead=n,this}}()}(window.jQuery),function(){this.Autocomplete=function(){function t(){}return t.bindTypeahead=function(e){return t.toggleOkFeedbacksOnLoad(e),$(e.selector).typeahead({highlight:!0,hint:!1},{displayKey:"display_key",source:t.constructSourceAdapter(e.remote)}).on("typeahead:selected",function(n,i){var r,o;return o=$(n.currentTarget).parents("div.js-typeahead-container"),r=o.find(e.hiddenSelector).val(i.id),t.toggleOkFeedback(r)})},t.constructSourceAdapter=function(t){var e;return e=new Bloodhound({datumTokenizer:function(t){return Bloodhound.tokenizers.whitespace(t.display_key)},queryTokenizer:Bloodhound.tokenizers.whitespace,remote:t+"?q=%QUERY"}),e.initialize(),e.ttAdapter()},t.toggleOkFeedback=function(t){var e,n;return e=t.parents("div.js-typeahead-container").find(".js-typeahead-ok"),n=t.parents("div.js-typeahead-container").find(".js-typeahead-remove"),t.val()?(e.removeClass("hidden"),n.addClass("hidden")):(n.removeClass("hidden"),e.addClass("hidden"))},t.toggleOkFeedbacksOnLoad=function(e){return $.each($(e.hiddenSelector),function(e,n){return t.toggleOkFeedback($(n))})},t.bindAdminContactSearch=function(){return t.bindTypeahead({remote:"/admin/contacts/search",selector:".js-contact-typeahead",hiddenSelector:".js-contact-id"})},t.bindAdminRegistrarSearch=function(){return t.bindTypeahead({remote:"/admin/registrars/search",selector:".js-registrar-typeahead",hiddenSelector:".js-registrar-id"})},t.bindClientContactSearch=function(){return t.bindTypeahead({remote:"/client/contacts/search",selector:".js-contact-typeahead",hiddenSelector:".js-contact-id"})},t.bindClientRegistrarSearch=function(){return t.bindTypeahead({remote:"/client/registrars/search",selector:".js-registrar-typeahead",hiddenSelector:".js-registrar-id"})},t}()}.call(this),function(){var t,e,n,i=function(t,e){return function(){return t.apply(e,arguments)}};t=jQuery,n={init:function(n){var i,r;if(i=t(this),i.length>1)throw"Can't initialize more than one item at a time";if(i.data("nestedAttributes"))throw"Can't initialize on this element more than once";return r=new e(i,n),i.data("nestedAttributes",r),i},add:function(){var e;if(e=t(this),null==e.data("nestedAttributes"))throw"You are trying to call instance methods without initializing first";return e.data("nestedAttributes").addItem(),e}},t.fn.nestedAttributes=function(e){return null!=n[e]?n[e].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof e&&e?t.error("Method "+e+" does not exist on jQuery.nestedAttributes"):n.init.apply(this,arguments)},e=function(){function e(e,n){this.destroyClick=i(this.destroyClick,this),this.addClick=i(this.addClick,this);var r,o,a,s;for(this.$container=e,this.options=t.extend({},this.settings,n),this.options.bindAddTo&&this.options.bindAddTo.click(this.addClick),this.$items=this.$container.children(),this.options.collectionName||this.autodetectCollectionName(),this.$items.each(function(e){return function(n,i){var r;return r=t(i),e.options.collectIdAttributes&&r.is("input")?(r.appendTo(r.prev()),e.$items=e.$items.not(r)):e.bindDestroy(r)}}(this)),s=this.$items,o=0,a=s.length;a>o;o++)r=s[o],this.hideIfAlreadyDestroyed(t(r));this.options.removeOnLoadIf&&this.$items.each(function(n){return function(i,r){return e=t(r),e.call(!0,n.options.removeOnLoadIf,i)?e.remove():void 0
|
||
}}(this))}return e.prototype.RELEVANT_INPUTS_SELECTOR=':input[name][name!=""]',e.prototype.settings={collectionName:!1,bindAddTo:!1,removeOnLoadIf:!1,collectIdAttributes:!0,beforeAdd:!1,afterAdd:!1,beforeMove:!1,afterMove:!1,beforeDestroy:!1,afterDestroy:!1,destroySelector:".destroy",deepClone:!0,$clone:null},e.prototype.autodetectCollectionName=function(){var t,e,n;n=/\[(.[^\]]*)_attributes\]/;try{if(e=n.exec(this.$items.first().find(this.RELEVANT_INPUTS_SELECTOR+":first").attr("name"))[1],null!==e)return this.options.collectionName=e;throw"Regex error"}catch(i){return t=i,console.log("Error detecting collection name",t)}},e.prototype.addClick=function(t){return this.addItem(),t.preventDefault()},e.prototype.addItem=function(){var t,e;return e=this.$items.length,t=this.applyIndexToItem(this.extractClone(),e),this.options.beforeAdd&&!this.options.beforeAdd.call(void 0,t,e)?!1:(this.$container.append(t),this.options.afterAdd&&this.options.afterAdd.call(void 0,t,e),this.refreshItems())},e.prototype.extractClone=function(){var t;return this.$restorableClone?(t=this.$restorableClone,this.$restorableClone=null):(t=this.options.$clone||this.$items.first(),t=t.clone(this.options.deepClone),(this.options.$clone||!this.options.deepClone)&&this.bindDestroy(t),t.find(":text, textarea, select").val(""),t.find(":checkbox, :radio").attr("checked",!1),t.find('input[name$="\\[id\\]"]').remove(),t.find('input[name$="\\[_destroy\\]"]').remove()),t.show()},e.prototype.applyIndexToItem=function(e,n){var i;return i=this.options.collectionName,e.find(this.RELEVANT_INPUTS_SELECTOR).each(function(){return function(e,r){var o,a,s,l,u,c,d;return o=t(r),a=new RegExp("_"+i+"_attributes_\\d+_"),s="_"+i+"_attributes_"+n+"_",l=new RegExp("\\["+i+"_attributes\\]\\[\\d+\\]"),u="["+i+"_attributes]["+n+"]",o.attr("id")&&(c=o.attr("id").replace(a,s)),d=o.attr("name").replace(l,u),o.attr({id:c,name:d})}}(this)),e.find("label[for]").each(function(){return function(e,r){var o,a,s,l,u;o=t(r);try{return s=new RegExp("_"+i+"_attributes_\\d+_"),l="_"+i+"_attributes_"+n+"_",u=o.attr("for").replace(s,l),o.attr("for",u)}catch(c){return a=c,console.log("Error updating label",a)}}}(this)),e},e.prototype.hideIfAlreadyDestroyed=function(t){var e;return e=t.find("[name$='[_destroy]']"),e.length&&"true"===e.val()?this.destroy(t):void 0},e.prototype.destroyClick=function(e){return e.preventDefault(),this.destroy(t(e.target).parentsUntil(this.$container).last())},e.prototype.destroy=function(e){var n,i,r,o,a,s;return this.$items.length-1||(this.$restorableClone=this.extractClone()),o=this.indexForItem(e),a=0===e.find('input[name$="\\[id\\]"]').length,this.options.beforeDestroy&&!this.options.beforeDestroy.call(void 0,e,o,a)?!1:(this.$items.filter(":visible").length-1||this.addItem(),a?e.remove():(e.hide(),s=e.find(":input[name]:first").attr("name"),i=s.lastIndexOf("["),r=s.substring(0,i)+"[_destroy]",n=e.find("input[name='"+r+"']"),0===n.length&&(n=t('<input type="hidden" name="'+r+'" />'),e.append(n)),n.val(!0).change()),this.options.afterDestroy&&this.options.afterDestroy.call(e,o,a),this.refreshItems(),this.resetIndexes())},e.prototype.indexForItem=function(t){var e,n;return n=new RegExp("\\["+this.options.collectionName+"_attributes\\]\\[\\d+\\]"),e=t.find(this.RELEVANT_INPUTS_SELECTOR+":first").attr("name"),parseInt(e.match(n)[0].split("][")[1].slice(0,-1),10)},e.prototype.refreshItems=function(){return this.$items=this.$container.children()},e.prototype.resetIndexes=function(){return this.$items.each(function(e){return function(n,i){var r,o;return r=t(i),o=e.indexForItem(r),n===o?!0:(e.options.beforeMove&&e.options.beforeMove.call(r,n,o),e.applyIndexToItem(r,n),e.options.afterMove?e.options.afterMove.call(r,n,o):void 0)}}(this))},e.prototype.bindDestroy=function(t){return this.options.destroySelector?t.find(this.options.destroySelector).click(this.destroyClick):void 0},e}()}.call(this),/**
|
||
* sifter.js
|
||
* Copyright (c) 2013 Brian Reavis & contributors
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
|
||
* file except in compliance with the License. You may obtain a copy of the License at:
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software distributed under
|
||
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
|
||
* ANY KIND, either express or implied. See the License for the specific language
|
||
* governing permissions and limitations under the License.
|
||
*
|
||
* @author Brian Reavis <brian@thirdroute.com>
|
||
*/
|
||
function(t,e){"function"==typeof define&&define.amd?define("sifter",e):"object"==typeof exports?module.exports=e():t.Sifter=e()}(this,function(){var t=function(t,e){this.items=t,this.settings=e||{diacritics:!0}};t.prototype.tokenize=function(t){if(t=i(String(t||"").toLowerCase()),!t||!t.length)return[];var e,n,o,s,l=[],u=t.split(/ +/);for(e=0,n=u.length;n>e;e++){if(o=r(u[e]),this.settings.diacritics)for(s in a)a.hasOwnProperty(s)&&(o=o.replace(new RegExp(s,"g"),a[s]));l.push({string:u[e],regex:new RegExp(o,"i")})}return l},t.prototype.iterator=function(t,e){var n;n=o(t)?Array.prototype.forEach||function(t){for(var e=0,n=this.length;n>e;e++)t(this[e],e,this)}:function(t){for(var e in this)this.hasOwnProperty(e)&&t(this[e],e,this)},n.apply(t,[e])},t.prototype.getScoreFunction=function(t,e){var n,i,r,o;n=this,t=n.prepareSearch(t,e),r=t.tokens,i=t.options.fields,o=r.length;var a=function(t,e){var n,i;return t?(t=String(t||""),i=t.search(e.regex),-1===i?0:(n=e.string.length/t.length,0===i&&(n+=.5),n)):0},s=function(){var t=i.length;return t?1===t?function(t,e){return a(e[i[0]],t)}:function(e,n){for(var r=0,o=0;t>r;r++)o+=a(n[i[r]],e);return o/t}:function(){return 0}}();return o?1===o?function(t){return s(r[0],t)}:"and"===t.options.conjunction?function(t){for(var e,n=0,i=0;o>n;n++){if(e=s(r[n],t),0>=e)return 0;i+=e}return i/o}:function(t){for(var e=0,n=0;o>e;e++)n+=s(r[e],t);return n/o}:function(){return 0}},t.prototype.getSortFunction=function(t,n){var i,r,o,a,s,l,u,c,d,h,p;if(o=this,t=o.prepareSearch(t,n),p=!t.query&&n.sort_empty||n.sort,d=function(t,e){return"$score"===t?e.score:o.items[e.id][t]},s=[],p)for(i=0,r=p.length;r>i;i++)(t.query||"$score"!==p[i].field)&&s.push(p[i]);if(t.query){for(h=!0,i=0,r=s.length;r>i;i++)if("$score"===s[i].field){h=!1;break}h&&s.unshift({field:"$score",direction:"desc"})}else for(i=0,r=s.length;r>i;i++)if("$score"===s[i].field){s.splice(i,1);break}for(c=[],i=0,r=s.length;r>i;i++)c.push("desc"===s[i].direction?-1:1);return l=s.length,l?1===l?(a=s[0].field,u=c[0],function(t,n){return u*e(d(a,t),d(a,n))}):function(t,n){var i,r,o;for(i=0;l>i;i++)if(o=s[i].field,r=c[i]*e(d(o,t),d(o,n)))return r;return 0}:null},t.prototype.prepareSearch=function(t,e){if("object"==typeof t)return t;e=n({},e);var i=e.fields,r=e.sort,a=e.sort_empty;return i&&!o(i)&&(e.fields=[i]),r&&!o(r)&&(e.sort=[r]),a&&!o(a)&&(e.sort_empty=[a]),{options:e,query:String(t||"").toLowerCase(),tokens:this.tokenize(t),total:0,items:[]}},t.prototype.search=function(t,e){var n,i,r,o,a=this;return i=this.prepareSearch(t,e),e=i.options,t=i.query,o=e.score||a.getScoreFunction(i),t.length?a.iterator(a.items,function(t,r){n=o(t),(e.filter===!1||n>0)&&i.items.push({score:n,id:r})}):a.iterator(a.items,function(t,e){i.items.push({score:1,id:e})}),r=a.getSortFunction(i,e),r&&i.items.sort(r),i.total=i.items.length,"number"==typeof e.limit&&(i.items=i.items.slice(0,e.limit)),i};var e=function(t,e){return"number"==typeof t&&"number"==typeof e?t>e?1:e>t?-1:0:(t=s(String(t||"")),e=s(String(e||"")),t>e?1:e>t?-1:0)},n=function(t){var e,n,i,r;for(e=1,n=arguments.length;n>e;e++)if(r=arguments[e])for(i in r)r.hasOwnProperty(i)&&(t[i]=r[i]);return t},i=function(t){return(t+"").replace(/^\s+|\s+$|/g,"")},r=function(t){return(t+"").replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")},o=Array.isArray||$&&$.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},a={a:"[a\xc0\xc1\xc2\xc3\xc4\xc5\xe0\xe1\xe2\xe3\xe4\xe5\u0100\u0101\u0105\u0104]",c:"[c\xc7\xe7\u0107\u0106\u010d\u010c]",d:"[d\u0111\u0110\u010f\u010e]",e:"[e\xc8\xc9\xca\xcb\xe8\xe9\xea\xeb\u011b\u011a\u0112\u0113\u0119\u0118]",i:"[i\xcc\xcd\xce\xcf\xec\xed\xee\xef\u012a\u012b]",l:"[l\u0142\u0141]",n:"[n\xd1\xf1\u0148\u0147\u0144\u0143]",o:"[o\xd2\xd3\xd4\xd5\xd5\xd6\xd8\xf2\xf3\xf4\xf5\xf6\xf8\u014c\u014d]",r:"[r\u0159\u0158]",s:"[s\u0160\u0161\u015b\u015a]",t:"[t\u0165\u0164]",u:"[u\xd9\xda\xdb\xdc\xf9\xfa\xfb\xfc\u016f\u016e\u016a\u016b]",y:"[y\u0178\xff\xfd\xdd]",z:"[z\u017d\u017e\u017c\u017b\u017a\u0179]"},s=function(){var t,e,n,i,r="",o={};for(n in a)if(a.hasOwnProperty(n))for(i=a[n].substring(2,a[n].length-1),r+=i,t=0,e=i.length;e>t;t++)o[i.charAt(t)]=n;var s=new RegExp("["+r+"]","g");return function(t){return t.replace(s,function(t){return o[t]}).toLowerCase()}}();return t}),/**
|
||
* microplugin.js
|
||
* Copyright (c) 2013 Brian Reavis & contributors
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
|
||
* file except in compliance with the License. You may obtain a copy of the License at:
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software distributed under
|
||
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
|
||
* ANY KIND, either express or implied. See the License for the specific language
|
||
* governing permissions and limitations under the License.
|
||
*
|
||
* @author Brian Reavis <brian@thirdroute.com>
|
||
*/
|
||
function(t,e){"function"==typeof define&&define.amd?define("microplugin",e):"object"==typeof exports?module.exports=e():t.MicroPlugin=e()}(this,function(){var t={};t.mixin=function(t){t.plugins={},t.prototype.initializePlugins=function(t){var n,i,r,o=this,a=[];if(o.plugins={names:[],settings:{},requested:{},loaded:{}},e.isArray(t))for(n=0,i=t.length;i>n;n++)"string"==typeof t[n]?a.push(t[n]):(o.plugins.settings[t[n].name]=t[n].options,a.push(t[n].name));else if(t)for(r in t)t.hasOwnProperty(r)&&(o.plugins.settings[r]=t[r],a.push(r));for(;a.length;)o.require(a.shift())},t.prototype.loadPlugin=function(e){var n=this,i=n.plugins,r=t.plugins[e];if(!t.plugins.hasOwnProperty(e))throw new Error('Unable to find "'+e+'" plugin');i.requested[e]=!0,i.loaded[e]=r.fn.apply(n,[n.plugins.settings[e]||{}]),i.names.push(e)},t.prototype.require=function(t){var e=this,n=e.plugins;if(!e.plugins.loaded.hasOwnProperty(t)){if(n.requested[t])throw new Error('Plugin has circular dependency ("'+t+'")');e.loadPlugin(t)}return n.loaded[t]},t.define=function(e,n){t.plugins[e]={name:e,fn:n}}};var e={isArray:Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}};return t}),/**
|
||
* selectize.js (v0.12.1)
|
||
* Copyright (c) 2013–2015 Brian Reavis & contributors
|
||
*
|
||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
|
||
* file except in compliance with the License. You may obtain a copy of the License at:
|
||
* http://www.apache.org/licenses/LICENSE-2.0
|
||
*
|
||
* Unless required by applicable law or agreed to in writing, software distributed under
|
||
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
|
||
* ANY KIND, either express or implied. See the License for the specific language
|
||
* governing permissions and limitations under the License.
|
||
*
|
||
* @author Brian Reavis <brian@thirdroute.com>
|
||
*/
|
||
function(t,e){"function"==typeof define&&define.amd?define("selectize",["jquery","sifter","microplugin"],e):"object"==typeof exports?module.exports=e(require("jquery"),require("sifter"),require("microplugin")):t.Selectize=e(t.jQuery,t.Sifter,t.MicroPlugin)}(this,function(t,e,n){"use strict";var i=function(t,e){if("string"!=typeof e||e.length){var n="string"==typeof e?new RegExp(e,"i"):e,i=function(t){var e=0;if(3===t.nodeType){var r=t.data.search(n);if(r>=0&&t.data.length>0){var o=t.data.match(n),a=document.createElement("span");a.className="highlight";var s=t.splitText(r),l=(s.splitText(o[0].length),s.cloneNode(!0));a.appendChild(l),s.parentNode.replaceChild(a,s),e=1}}else if(1===t.nodeType&&t.childNodes&&!/(script|style)/i.test(t.tagName))for(var u=0;u<t.childNodes.length;++u)u+=i(t.childNodes[u]);return e};return t.each(function(){i(this)})}},r=function(){};r.prototype={on:function(t,e){this._events=this._events||{},this._events[t]=this._events[t]||[],this._events[t].push(e)},off:function(t,e){var n=arguments.length;return 0===n?delete this._events:1===n?delete this._events[t]:(this._events=this._events||{},void(t in this._events!=!1&&this._events[t].splice(this._events[t].indexOf(e),1)))},trigger:function(t){if(this._events=this._events||{},t in this._events!=!1)for(var e=0;e<this._events[t].length;e++)this._events[t][e].apply(this,Array.prototype.slice.call(arguments,1))}},r.mixin=function(t){for(var e=["on","off","trigger"],n=0;n<e.length;n++)t.prototype[e[n]]=r.prototype[e[n]]};var o=/Mac/.test(navigator.userAgent),a=65,s=13,l=27,u=37,c=38,d=80,h=39,p=40,f=78,g=8,m=46,v=16,y=o?91:17,b=o?18:17,w=9,x=1,k=2,C=!/android/i.test(window.navigator.userAgent)&&!!document.createElement("form").validity,_=function(t){return"undefined"!=typeof t},D=function(t){return"undefined"==typeof t||null===t?null:"boolean"==typeof t?t?"1":"0":t+""},T=function(t){return(t+"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},S=function(t){return(t+"").replace(/\$/g,"$$$$")},A={};A.before=function(t,e,n){var i=t[e];t[e]=function(){return n.apply(t,arguments),i.apply(t,arguments)}},A.after=function(t,e,n){var i=t[e];t[e]=function(){var e=i.apply(t,arguments);return n.apply(t,arguments),e}};var F=function(t){var e=!1;return function(){e||(e=!0,t.apply(this,arguments))}},E=function(t,e){var n;return function(){var i=this,r=arguments;window.clearTimeout(n),n=window.setTimeout(function(){t.apply(i,r)},e)}},$=function(t,e,n){var i,r=t.trigger,o={};t.trigger=function(){var n=arguments[0];return-1===e.indexOf(n)?r.apply(t,arguments):void(o[n]=arguments)},n.apply(t,[]),t.trigger=r;for(i in o)o.hasOwnProperty(i)&&r.apply(t,o[i])},N=function(t,e,n,i){t.on(e,n,function(e){for(var n=e.target;n&&n.parentNode!==t[0];)n=n.parentNode;return e.currentTarget=n,i.apply(this,[e])})},I=function(t){var e={};if("selectionStart"in t)e.start=t.selectionStart,e.length=t.selectionEnd-e.start;else if(document.selection){t.focus();var n=document.selection.createRange(),i=document.selection.createRange().text.length;n.moveStart("character",-t.value.length),e.start=n.text.length-i,e.length=i}return e},O=function(t,e,n){var i,r,o={};if(n)for(i=0,r=n.length;r>i;i++)o[n[i]]=t.css(n[i]);else o=t.css();e.css(o)},M=function(e,n){if(!e)return 0;var i=t("<test>").css({position:"absolute",top:-99999,left:-99999,width:"auto",padding:0,whiteSpace:"pre"}).text(e).appendTo("body");O(n,i,["letterSpacing","fontSize","fontFamily","fontWeight","textTransform"]);var r=i.width();return i.remove(),r},L=function(t){var e=null,n=function(n,i){var r,o,a,s,l,u,c,d;n=n||window.event||{},i=i||{},n.metaKey||n.altKey||(i.force||t.data("grow")!==!1)&&(r=t.val(),n.type&&"keydown"===n.type.toLowerCase()&&(o=n.keyCode,a=o>=97&&122>=o||o>=65&&90>=o||o>=48&&57>=o||32===o,o===m||o===g?(d=I(t[0]),d.length?r=r.substring(0,d.start)+r.substring(d.start+d.length):o===g&&d.start?r=r.substring(0,d.start-1)+r.substring(d.start+1):o===m&&"undefined"!=typeof d.start&&(r=r.substring(0,d.start)+r.substring(d.start+1))):a&&(u=n.shiftKey,c=String.fromCharCode(n.keyCode),c=u?c.toUpperCase():c.toLowerCase(),r+=c)),s=t.attr("placeholder"),!r&&s&&(r=s),l=M(r,t)+4,l!==e&&(e=l,t.width(l),t.triggerHandler("resize")))};t.on("keydown keyup update blur",n),n()},j=function(n,i){var r,o,a,s,l=this;s=n[0],s.selectize=l;var u=window.getComputedStyle&&window.getComputedStyle(s,null);if(a=u?u.getPropertyValue("direction"):s.currentStyle&&s.currentStyle.direction,a=a||n.parents("[dir]:first").attr("dir")||"",t.extend(l,{order:0,settings:i,$input:n,tabIndex:n.attr("tabindex")||"",tagType:"select"===s.tagName.toLowerCase()?x:k,rtl:/rtl/i.test(a),eventNS:".selectize"+ ++j.count,highlightedValue:null,isOpen:!1,isDisabled:!1,isRequired:n.is("[required]"),isInvalid:!1,isLocked:!1,isFocused:!1,isInputHidden:!1,isSetup:!1,isShiftDown:!1,isCmdDown:!1,isCtrlDown:!1,ignoreFocus:!1,ignoreBlur:!1,ignoreHover:!1,hasOptions:!1,currentResults:null,lastValue:"",caretPos:0,loading:0,loadedSearches:{},$activeOption:null,$activeItems:[],optgroups:{},options:{},userOptions:{},items:[],renderCache:{},onSearchChange:null===i.loadThrottle?l.onSearchChange:E(l.onSearchChange,i.loadThrottle)}),l.sifter=new e(this.options,{diacritics:i.diacritics}),l.settings.options){for(r=0,o=l.settings.options.length;o>r;r++)l.registerOption(l.settings.options[r]);delete l.settings.options}if(l.settings.optgroups){for(r=0,o=l.settings.optgroups.length;o>r;r++)l.registerOptionGroup(l.settings.optgroups[r]);delete l.settings.optgroups}l.settings.mode=l.settings.mode||(1===l.settings.maxItems?"single":"multi"),"boolean"!=typeof l.settings.hideSelected&&(l.settings.hideSelected="multi"===l.settings.mode),l.initializePlugins(l.settings.plugins),l.setupCallbacks(),l.setupTemplates(),l.setup()};return r.mixin(j),n.mixin(j),t.extend(j.prototype,{setup:function(){var e,n,i,r,a,s,l,u,c,d=this,h=d.settings,p=d.eventNS,f=t(window),g=t(document),m=d.$input;if(l=d.settings.mode,u=m.attr("class")||"",e=t("<div>").addClass(h.wrapperClass).addClass(u).addClass(l),n=t("<div>").addClass(h.inputClass).addClass("items").appendTo(e),i=t('<input type="text" autocomplete="off" />').appendTo(n).attr("tabindex",m.is(":disabled")?"-1":d.tabIndex),s=t(h.dropdownParent||e),r=t("<div>").addClass(h.dropdownClass).addClass(l).hide().appendTo(s),a=t("<div>").addClass(h.dropdownContentClass).appendTo(r),d.settings.copyClassesToDropdown&&r.addClass(u),e.css({width:m[0].style.width}),d.plugins.names.length&&(c="plugin-"+d.plugins.names.join(" plugin-"),e.addClass(c),r.addClass(c)),(null===h.maxItems||h.maxItems>1)&&d.tagType===x&&m.attr("multiple","multiple"),d.settings.placeholder&&i.attr("placeholder",h.placeholder),!d.settings.splitOn&&d.settings.delimiter){var w=d.settings.delimiter.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&");d.settings.splitOn=new RegExp("\\s*"+w+"+\\s*")}m.attr("autocorrect")&&i.attr("autocorrect",m.attr("autocorrect")),m.attr("autocapitalize")&&i.attr("autocapitalize",m.attr("autocapitalize")),d.$wrapper=e,d.$control=n,d.$control_input=i,d.$dropdown=r,d.$dropdown_content=a,r.on("mouseenter","[data-selectable]",function(){return d.onOptionHover.apply(d,arguments)}),r.on("mousedown click","[data-selectable]",function(){return d.onOptionSelect.apply(d,arguments)}),N(n,"mousedown","*:not(input)",function(){return d.onItemSelect.apply(d,arguments)}),L(i),n.on({mousedown:function(){return d.onMouseDown.apply(d,arguments)},click:function(){return d.onClick.apply(d,arguments)}}),i.on({mousedown:function(t){t.stopPropagation()},keydown:function(){return d.onKeyDown.apply(d,arguments)},keyup:function(){return d.onKeyUp.apply(d,arguments)},keypress:function(){return d.onKeyPress.apply(d,arguments)},resize:function(){d.positionDropdown.apply(d,[])},blur:function(){return d.onBlur.apply(d,arguments)},focus:function(){return d.ignoreBlur=!1,d.onFocus.apply(d,arguments)},paste:function(){return d.onPaste.apply(d,arguments)}}),g.on("keydown"+p,function(t){d.isCmdDown=t[o?"metaKey":"ctrlKey"],d.isCtrlDown=t[o?"altKey":"ctrlKey"],d.isShiftDown=t.shiftKey}),g.on("keyup"+p,function(t){t.keyCode===b&&(d.isCtrlDown=!1),t.keyCode===v&&(d.isShiftDown=!1),t.keyCode===y&&(d.isCmdDown=!1)}),g.on("mousedown"+p,function(t){if(d.isFocused){if(t.target===d.$dropdown[0]||t.target.parentNode===d.$dropdown[0])return!1;d.$control.has(t.target).length||t.target===d.$control[0]||d.blur(t.target)}}),f.on(["scroll"+p,"resize"+p].join(" "),function(){d.isOpen&&d.positionDropdown.apply(d,arguments)}),f.on("mousemove"+p,function(){d.ignoreHover=!1}),this.revertSettings={$children:m.children().detach(),tabindex:m.attr("tabindex")},m.attr("tabindex",-1).hide().after(d.$wrapper),t.isArray(h.items)&&(d.setValue(h.items),delete h.items),C&&m.on("invalid"+p,function(t){t.preventDefault(),d.isInvalid=!0,d.refreshState()}),d.updateOriginalInput(),d.refreshItems(),d.refreshState(),d.updatePlaceholder(),d.isSetup=!0,m.is(":disabled")&&d.disable(),d.on("change",this.onChange),m.data("selectize",d),m.addClass("selectized"),d.trigger("initialize"),h.preload===!0&&d.onSearchChange("")},setupTemplates:function(){var e=this,n=e.settings.labelField,i=e.settings.optgroupLabelField,r={optgroup:function(t){return'<div class="optgroup">'+t.html+"</div>"},optgroup_header:function(t,e){return'<div class="optgroup-header">'+e(t[i])+"</div>"},option:function(t,e){return'<div class="option">'+e(t[n])+"</div>"},item:function(t,e){return'<div class="item">'+e(t[n])+"</div>"},option_create:function(t,e){return'<div class="create">Add <strong>'+e(t.input)+"</strong>…</div>"}};e.settings.render=t.extend({},r,e.settings.render)},setupCallbacks:function(){var t,e,n={initialize:"onInitialize",change:"onChange",item_add:"onItemAdd",item_remove:"onItemRemove",clear:"onClear",option_add:"onOptionAdd",option_remove:"onOptionRemove",option_clear:"onOptionClear",optgroup_add:"onOptionGroupAdd",optgroup_remove:"onOptionGroupRemove",optgroup_clear:"onOptionGroupClear",dropdown_open:"onDropdownOpen",dropdown_close:"onDropdownClose",type:"onType",load:"onLoad",focus:"onFocus",blur:"onBlur"};for(t in n)n.hasOwnProperty(t)&&(e=this.settings[n[t]],e&&this.on(t,e))},onClick:function(t){var e=this;e.isFocused||(e.focus(),t.preventDefault())},onMouseDown:function(e){{var n=this,i=e.isDefaultPrevented();t(e.target)}if(n.isFocused){if(e.target!==n.$control_input[0])return"single"===n.settings.mode?n.isOpen?n.close():n.open():i||n.setActiveItem(null),!1}else i||window.setTimeout(function(){n.focus()},0)},onChange:function(){this.$input.trigger("change")},onPaste:function(e){var n=this;n.isFull()||n.isInputHidden||n.isLocked?e.preventDefault():n.settings.splitOn&&setTimeout(function(){for(var e=t.trim(n.$control_input.val()||"").split(n.settings.splitOn),i=0,r=e.length;r>i;i++)n.createItem(e[i])},0)},onKeyPress:function(t){if(this.isLocked)return t&&t.preventDefault();var e=String.fromCharCode(t.keyCode||t.which);return this.settings.create&&"multi"===this.settings.mode&&e===this.settings.delimiter?(this.createItem(),t.preventDefault(),!1):void 0},onKeyDown:function(t){var e=(t.target===this.$control_input[0],this);if(e.isLocked)return void(t.keyCode!==w&&t.preventDefault());switch(t.keyCode){case a:if(e.isCmdDown)return void e.selectAll();break;case l:return void(e.isOpen&&(t.preventDefault(),t.stopPropagation(),e.close()));case f:if(!t.ctrlKey||t.altKey)break;case p:if(!e.isOpen&&e.hasOptions)e.open();else if(e.$activeOption){e.ignoreHover=!0;var n=e.getAdjacentOption(e.$activeOption,1);n.length&&e.setActiveOption(n,!0,!0)}return void t.preventDefault();case d:if(!t.ctrlKey||t.altKey)break;case c:if(e.$activeOption){e.ignoreHover=!0;var i=e.getAdjacentOption(e.$activeOption,-1);i.length&&e.setActiveOption(i,!0,!0)}return void t.preventDefault();case s:return void(e.isOpen&&e.$activeOption&&(e.onOptionSelect({currentTarget:e.$activeOption}),t.preventDefault()));case u:return void e.advanceSelection(-1,t);case h:return void e.advanceSelection(1,t);case w:return e.settings.selectOnTab&&e.isOpen&&e.$activeOption&&(e.onOptionSelect({currentTarget:e.$activeOption}),e.isFull()||t.preventDefault()),void(e.settings.create&&e.createItem()&&t.preventDefault());case g:case m:return void e.deleteSelection(t)}return!e.isFull()&&!e.isInputHidden||(o?t.metaKey:t.ctrlKey)?void 0:void t.preventDefault()},onKeyUp:function(t){var e=this;if(e.isLocked)return t&&t.preventDefault();var n=e.$control_input.val()||"";e.lastValue!==n&&(e.lastValue=n,e.onSearchChange(n),e.refreshOptions(),e.trigger("type",n))},onSearchChange:function(t){var e=this,n=e.settings.load;n&&(e.loadedSearches.hasOwnProperty(t)||(e.loadedSearches[t]=!0,e.load(function(i){n.apply(e,[t,i])})))},onFocus:function(t){var e=this,n=e.isFocused;return e.isDisabled?(e.blur(),t&&t.preventDefault(),!1):void(e.ignoreFocus||(e.isFocused=!0,"focus"===e.settings.preload&&e.onSearchChange(""),n||e.trigger("focus"),e.$activeItems.length||(e.showInput(),e.setActiveItem(null),e.refreshOptions(!!e.settings.openOnFocus)),e.refreshState()))},onBlur:function(t,e){var n=this;if(n.isFocused&&(n.isFocused=!1,!n.ignoreFocus)){if(!n.ignoreBlur&&document.activeElement===n.$dropdown_content[0])return n.ignoreBlur=!0,void n.onFocus(t);var i=function(){n.close(),n.setTextboxValue(""),n.setActiveItem(null),n.setActiveOption(null),n.setCaret(n.items.length),n.refreshState(),(e||document.body).focus(),n.ignoreFocus=!1,n.trigger("blur")};n.ignoreFocus=!0,n.settings.create&&n.settings.createOnBlur?n.createItem(null,!1,i):i()}},onOptionHover:function(t){this.ignoreHover||this.setActiveOption(t.currentTarget,!1)},onOptionSelect:function(e){var n,i,r=this;e.preventDefault&&(e.preventDefault(),e.stopPropagation()),i=t(e.currentTarget),i.hasClass("create")?r.createItem(null,function(){r.settings.closeAfterSelect&&r.close()}):(n=i.attr("data-value"),"undefined"!=typeof n&&(r.lastQuery=null,r.setTextboxValue(""),r.addItem(n),r.settings.closeAfterSelect?r.close():!r.settings.hideSelected&&e.type&&/mouse/.test(e.type)&&r.setActiveOption(r.getOption(n))))},onItemSelect:function(t){var e=this;e.isLocked||"multi"===e.settings.mode&&(t.preventDefault(),e.setActiveItem(t.currentTarget,t))},load:function(t){var e=this,n=e.$wrapper.addClass(e.settings.loadingClass);e.loading++,t.apply(e,[function(t){e.loading=Math.max(e.loading-1,0),t&&t.length&&(e.addOption(t),e.refreshOptions(e.isFocused&&!e.isInputHidden)),e.loading||n.removeClass(e.settings.loadingClass),e.trigger("load",t)}])},setTextboxValue:function(t){var e=this.$control_input,n=e.val()!==t;n&&(e.val(t).triggerHandler("update"),this.lastValue=t)},getValue:function(){return this.tagType===x&&this.$input.attr("multiple")?this.items:this.items.join(this.settings.delimiter)},setValue:function(t,e){var n=e?[]:["change"];$(this,n,function(){this.clear(e),this.addItems(t,e)})},setActiveItem:function(e,n){var i,r,o,a,s,l,u,c,d=this;if("single"!==d.settings.mode){if(e=t(e),!e.length)return t(d.$activeItems).removeClass("active"),d.$activeItems=[],void(d.isFocused&&d.showInput());if(i=n&&n.type.toLowerCase(),"mousedown"===i&&d.isShiftDown&&d.$activeItems.length){for(c=d.$control.children(".active:last"),a=Array.prototype.indexOf.apply(d.$control[0].childNodes,[c[0]]),s=Array.prototype.indexOf.apply(d.$control[0].childNodes,[e[0]]),a>s&&(u=a,a=s,s=u),r=a;s>=r;r++)l=d.$control[0].childNodes[r],-1===d.$activeItems.indexOf(l)&&(t(l).addClass("active"),d.$activeItems.push(l));n.preventDefault()}else"mousedown"===i&&d.isCtrlDown||"keydown"===i&&this.isShiftDown?e.hasClass("active")?(o=d.$activeItems.indexOf(e[0]),d.$activeItems.splice(o,1),e.removeClass("active")):d.$activeItems.push(e.addClass("active")[0]):(t(d.$activeItems).removeClass("active"),d.$activeItems=[e.addClass("active")[0]]);d.hideInput(),this.isFocused||d.focus()}},setActiveOption:function(e,n,i){var r,o,a,s,l,u=this;u.$activeOption&&u.$activeOption.removeClass("active"),u.$activeOption=null,e=t(e),e.length&&(u.$activeOption=e.addClass("active"),(n||!_(n))&&(r=u.$dropdown_content.height(),o=u.$activeOption.outerHeight(!0),n=u.$dropdown_content.scrollTop()||0,a=u.$activeOption.offset().top-u.$dropdown_content.offset().top+n,s=a,l=a-r+o,a+o>r+n?u.$dropdown_content.stop().animate({scrollTop:l},i?u.settings.scrollDuration:0):n>a&&u.$dropdown_content.stop().animate({scrollTop:s},i?u.settings.scrollDuration:0)))},selectAll:function(){var t=this;"single"!==t.settings.mode&&(t.$activeItems=Array.prototype.slice.apply(t.$control.children(":not(input)").addClass("active")),t.$activeItems.length&&(t.hideInput(),t.close()),t.focus())},hideInput:function(){var t=this;t.setTextboxValue(""),t.$control_input.css({opacity:0,position:"absolute",left:t.rtl?1e4:-1e4}),t.isInputHidden=!0},showInput:function(){this.$control_input.css({opacity:1,position:"relative",left:0}),this.isInputHidden=!1},focus:function(){var t=this;t.isDisabled||(t.ignoreFocus=!0,t.$control_input[0].focus(),window.setTimeout(function(){t.ignoreFocus=!1,t.onFocus()},0))},blur:function(t){this.$control_input[0].blur(),this.onBlur(null,t)},getScoreFunction:function(t){return this.sifter.getScoreFunction(t,this.getSearchOptions())},getSearchOptions:function(){var t=this.settings,e=t.sortField;return"string"==typeof e&&(e=[{field:e}]),{fields:t.searchField,conjunction:t.searchConjunction,sort:e}},search:function(e){var n,i,r,o=this,a=o.settings,s=this.getSearchOptions();if(a.score&&(r=o.settings.score.apply(this,[e]),"function"!=typeof r))throw new Error('Selectize "score" setting must be a function that returns a function');if(e!==o.lastQuery?(o.lastQuery=e,i=o.sifter.search(e,t.extend(s,{score:r})),o.currentResults=i):i=t.extend(!0,{},o.currentResults),a.hideSelected)for(n=i.items.length-1;n>=0;n--)-1!==o.items.indexOf(D(i.items[n].id))&&i.items.splice(n,1);return i},refreshOptions:function(e){var n,r,o,a,s,l,u,c,d,h,p,f,g,m,v,y;"undefined"==typeof e&&(e=!0);var b=this,w=t.trim(b.$control_input.val()),x=b.search(w),k=b.$dropdown_content,C=b.$activeOption&&D(b.$activeOption.attr("data-value"));for(a=x.items.length,"number"==typeof b.settings.maxOptions&&(a=Math.min(a,b.settings.maxOptions)),s={},l=[],n=0;a>n;n++)for(u=b.options[x.items[n].id],c=b.render("option",u),d=u[b.settings.optgroupField]||"",h=t.isArray(d)?d:[d],r=0,o=h&&h.length;o>r;r++)d=h[r],b.optgroups.hasOwnProperty(d)||(d=""),s.hasOwnProperty(d)||(s[d]=[],l.push(d)),s[d].push(c);for(this.settings.lockOptgroupOrder&&l.sort(function(t,e){var n=b.optgroups[t].$order||0,i=b.optgroups[e].$order||0;return n-i}),p=[],n=0,a=l.length;a>n;n++)d=l[n],b.optgroups.hasOwnProperty(d)&&s[d].length?(f=b.render("optgroup_header",b.optgroups[d])||"",f+=s[d].join(""),p.push(b.render("optgroup",t.extend({},b.optgroups[d],{html:f})))):p.push(s[d].join(""));if(k.html(p.join("")),b.settings.highlight&&x.query.length&&x.tokens.length)for(n=0,a=x.tokens.length;a>n;n++)i(k,x.tokens[n].regex);if(!b.settings.hideSelected)for(n=0,a=b.items.length;a>n;n++)b.getOption(b.items[n]).addClass("selected");g=b.canCreate(w),g&&(k.prepend(b.render("option_create",{input:w})),y=t(k[0].childNodes[0])),b.hasOptions=x.items.length>0||g,b.hasOptions?(x.items.length>0?(v=C&&b.getOption(C),v&&v.length?m=v:"single"===b.settings.mode&&b.items.length&&(m=b.getOption(b.items[0])),m&&m.length||(m=y&&!b.settings.addPrecedence?b.getAdjacentOption(y,1):k.find("[data-selectable]:first"))):m=y,b.setActiveOption(m),e&&!b.isOpen&&b.open()):(b.setActiveOption(null),e&&b.isOpen&&b.close())},addOption:function(e){var n,i,r,o=this;if(t.isArray(e))for(n=0,i=e.length;i>n;n++)o.addOption(e[n]);else(r=o.registerOption(e))&&(o.userOptions[r]=!0,o.lastQuery=null,o.trigger("option_add",r,e))},registerOption:function(t){var e=D(t[this.settings.valueField]);return!e||this.options.hasOwnProperty(e)?!1:(t.$order=t.$order||++this.order,this.options[e]=t,e)},registerOptionGroup:function(t){var e=D(t[this.settings.optgroupValueField]);return e?(t.$order=t.$order||++this.order,this.optgroups[e]=t,e):!1},addOptionGroup:function(t,e){e[this.settings.optgroupValueField]=t,(t=this.registerOptionGroup(e))&&this.trigger("optgroup_add",t,e)},removeOptionGroup:function(t){this.optgroups.hasOwnProperty(t)&&(delete this.optgroups[t],this.renderCache={},this.trigger("optgroup_remove",t))},clearOptionGroups:function(){this.optgroups={},this.renderCache={},this.trigger("optgroup_clear")},updateOption:function(e,n){var i,r,o,a,s,l,u,c=this;if(e=D(e),o=D(n[c.settings.valueField]),null!==e&&c.options.hasOwnProperty(e)){if("string"!=typeof o)throw new Error("Value must be set in option data");u=c.options[e].$order,o!==e&&(delete c.options[e],a=c.items.indexOf(e),-1!==a&&c.items.splice(a,1,o)),n.$order=n.$order||u,c.options[o]=n,s=c.renderCache.item,l=c.renderCache.option,s&&(delete s[e],delete s[o]),l&&(delete l[e],delete l[o]),-1!==c.items.indexOf(o)&&(i=c.getItem(e),r=t(c.render("item",n)),i.hasClass("active")&&r.addClass("active"),i.replaceWith(r)),c.lastQuery=null,c.isOpen&&c.refreshOptions(!1)}},removeOption:function(t,e){var n=this;t=D(t);var i=n.renderCache.item,r=n.renderCache.option;i&&delete i[t],r&&delete r[t],delete n.userOptions[t],delete n.options[t],n.lastQuery=null,n.trigger("option_remove",t),n.removeItem(t,e)},clearOptions:function(){var t=this;t.loadedSearches={},t.userOptions={},t.renderCache={},t.options=t.sifter.items={},t.lastQuery=null,t.trigger("option_clear"),t.clear()},getOption:function(t){return this.getElementWithValue(t,this.$dropdown_content.find("[data-selectable]"))},getAdjacentOption:function(e,n){var i=this.$dropdown.find("[data-selectable]"),r=i.index(e)+n;return r>=0&&r<i.length?i.eq(r):t()},getElementWithValue:function(e,n){if(e=D(e),"undefined"!=typeof e&&null!==e)for(var i=0,r=n.length;r>i;i++)if(n[i].getAttribute("data-value")===e)return t(n[i]);return t()},getItem:function(t){return this.getElementWithValue(t,this.$control.children())},addItems:function(e,n){for(var i=t.isArray(e)?e:[e],r=0,o=i.length;o>r;r++)this.isPending=o-1>r,this.addItem(i[r],n)},addItem:function(e,n){var i=n?[]:["change"];$(this,i,function(){var i,r,o,a,s,l=this,u=l.settings.mode;return e=D(e),-1!==l.items.indexOf(e)?void("single"===u&&l.close()):void(l.options.hasOwnProperty(e)&&("single"===u&&l.clear(n),"multi"===u&&l.isFull()||(i=t(l.render("item",l.options[e])),s=l.isFull(),l.items.splice(l.caretPos,0,e),l.insertAtCaret(i),(!l.isPending||!s&&l.isFull())&&l.refreshState(),l.isSetup&&(o=l.$dropdown_content.find("[data-selectable]"),l.isPending||(r=l.getOption(e),a=l.getAdjacentOption(r,1).attr("data-value"),l.refreshOptions(l.isFocused&&"single"!==u),a&&l.setActiveOption(l.getOption(a))),!o.length||l.isFull()?l.close():l.positionDropdown(),l.updatePlaceholder(),l.trigger("item_add",e,i),l.updateOriginalInput({silent:n})))))})},removeItem:function(t,e){var n,i,r,o=this;n="object"==typeof t?t:o.getItem(t),t=D(n.attr("data-value")),i=o.items.indexOf(t),-1!==i&&(n.remove(),n.hasClass("active")&&(r=o.$activeItems.indexOf(n[0]),o.$activeItems.splice(r,1)),o.items.splice(i,1),o.lastQuery=null,!o.settings.persist&&o.userOptions.hasOwnProperty(t)&&o.removeOption(t,e),i<o.caretPos&&o.setCaret(o.caretPos-1),o.refreshState(),o.updatePlaceholder(),o.updateOriginalInput({silent:e}),o.positionDropdown(),o.trigger("item_remove",t,n))},createItem:function(e,n){var i=this,r=i.caretPos;e=e||t.trim(i.$control_input.val()||"");var o=arguments[arguments.length-1];if("function"!=typeof o&&(o=function(){}),"boolean"!=typeof n&&(n=!0),!i.canCreate(e))return o(),!1;i.lock();var a="function"==typeof i.settings.create?this.settings.create:function(t){var e={};return e[i.settings.labelField]=t,e[i.settings.valueField]=t,e},s=F(function(t){if(i.unlock(),!t||"object"!=typeof t)return o();var e=D(t[i.settings.valueField]);return"string"!=typeof e?o():(i.setTextboxValue(""),i.addOption(t),i.setCaret(r),i.addItem(e),i.refreshOptions(n&&"single"!==i.settings.mode),void o(t))}),l=a.apply(this,[e,s]);return"undefined"!=typeof l&&s(l),!0},refreshItems:function(){this.lastQuery=null,this.isSetup&&this.addItem(this.items),this.refreshState(),this.updateOriginalInput()},refreshState:function(){var t,e=this;e.isRequired&&(e.items.length&&(e.isInvalid=!1),e.$control_input.prop("required",t)),e.refreshClasses()},refreshClasses:function(){var e=this,n=e.isFull(),i=e.isLocked;e.$wrapper.toggleClass("rtl",e.rtl),e.$control.toggleClass("focus",e.isFocused).toggleClass("disabled",e.isDisabled).toggleClass("required",e.isRequired).toggleClass("invalid",e.isInvalid).toggleClass("locked",i).toggleClass("full",n).toggleClass("not-full",!n).toggleClass("input-active",e.isFocused&&!e.isInputHidden).toggleClass("dropdown-active",e.isOpen).toggleClass("has-options",!t.isEmptyObject(e.options)).toggleClass("has-items",e.items.length>0),e.$control_input.data("grow",!n&&!i)},isFull:function(){return null!==this.settings.maxItems&&this.items.length>=this.settings.maxItems},updateOriginalInput:function(t){var e,n,i,r,o=this;if(t=t||{},o.tagType===x){for(i=[],e=0,n=o.items.length;n>e;e++)r=o.options[o.items[e]][o.settings.labelField]||"",i.push('<option value="'+T(o.items[e])+'" selected="selected">'+T(r)+"</option>");i.length||this.$input.attr("multiple")||i.push('<option value="" selected="selected"></option>'),o.$input.html(i.join(""))}else o.$input.val(o.getValue()),o.$input.attr("value",o.$input.val());o.isSetup&&(t.silent||o.trigger("change",o.$input.val()))},updatePlaceholder:function(){if(this.settings.placeholder){var t=this.$control_input;this.items.length?t.removeAttr("placeholder"):t.attr("placeholder",this.settings.placeholder),t.triggerHandler("update",{force:!0})}},open:function(){var t=this;t.isLocked||t.isOpen||"multi"===t.settings.mode&&t.isFull()||(t.focus(),t.isOpen=!0,t.refreshState(),t.$dropdown.css({visibility:"hidden",display:"block"}),t.positionDropdown(),t.$dropdown.css({visibility:"visible"}),t.trigger("dropdown_open",t.$dropdown))},close:function(){var t=this,e=t.isOpen;"single"===t.settings.mode&&t.items.length&&t.hideInput(),t.isOpen=!1,t.$dropdown.hide(),t.setActiveOption(null),t.refreshState(),e&&t.trigger("dropdown_close",t.$dropdown)},positionDropdown:function(){var t=this.$control,e="body"===this.settings.dropdownParent?t.offset():t.position();e.top+=t.outerHeight(!0),this.$dropdown.css({width:t.outerWidth(),top:e.top,left:e.left})},clear:function(t){var e=this;e.items.length&&(e.$control.children(":not(input)").remove(),e.items=[],e.lastQuery=null,e.setCaret(0),e.setActiveItem(null),e.updatePlaceholder(),e.updateOriginalInput({silent:t}),e.refreshState(),e.showInput(),e.trigger("clear"))},insertAtCaret:function(e){var n=Math.min(this.caretPos,this.items.length);0===n?this.$control.prepend(e):t(this.$control[0].childNodes[n]).before(e),this.setCaret(n+1)},deleteSelection:function(e){var n,i,r,o,a,s,l,u,c,d=this;if(r=e&&e.keyCode===g?-1:1,o=I(d.$control_input[0]),d.$activeOption&&!d.settings.hideSelected&&(l=d.getAdjacentOption(d.$activeOption,-1).attr("data-value")),a=[],d.$activeItems.length){for(c=d.$control.children(".active:"+(r>0?"last":"first")),s=d.$control.children(":not(input)").index(c),r>0&&s++,n=0,i=d.$activeItems.length;i>n;n++)a.push(t(d.$activeItems[n]).attr("data-value"));e&&(e.preventDefault(),e.stopPropagation())}else(d.isFocused||"single"===d.settings.mode)&&d.items.length&&(0>r&&0===o.start&&0===o.length?a.push(d.items[d.caretPos-1]):r>0&&o.start===d.$control_input.val().length&&a.push(d.items[d.caretPos]));if(!a.length||"function"==typeof d.settings.onDelete&&d.settings.onDelete.apply(d,[a])===!1)return!1;for("undefined"!=typeof s&&d.setCaret(s);a.length;)d.removeItem(a.pop());return d.showInput(),d.positionDropdown(),d.refreshOptions(!0),l&&(u=d.getOption(l),u.length&&d.setActiveOption(u)),!0},advanceSelection:function(t,e){var n,i,r,o,a,s,l=this;0!==t&&(l.rtl&&(t*=-1),n=t>0?"last":"first",i=I(l.$control_input[0]),l.isFocused&&!l.isInputHidden?(o=l.$control_input.val().length,a=0>t?0===i.start&&0===i.length:i.start===o,a&&!o&&l.advanceCaret(t,e)):(s=l.$control.children(".active:"+n),s.length&&(r=l.$control.children(":not(input)").index(s),l.setActiveItem(null),l.setCaret(t>0?r+1:r))))},advanceCaret:function(t,e){var n,i,r=this;0!==t&&(n=t>0?"next":"prev",r.isShiftDown?(i=r.$control_input[n](),i.length&&(r.hideInput(),r.setActiveItem(i),e&&e.preventDefault())):r.setCaret(r.caretPos+t))},setCaret:function(e){var n=this;if(e="single"===n.settings.mode?n.items.length:Math.max(0,Math.min(n.items.length,e)),!n.isPending){var i,r,o,a;for(o=n.$control.children(":not(input)"),i=0,r=o.length;r>i;i++)a=t(o[i]).detach(),e>i?n.$control_input.before(a):n.$control.append(a)}n.caretPos=e},lock:function(){this.close(),this.isLocked=!0,this.refreshState()},unlock:function(){this.isLocked=!1,this.refreshState()},disable:function(){var t=this;t.$input.prop("disabled",!0),t.$control_input.prop("disabled",!0).prop("tabindex",-1),t.isDisabled=!0,t.lock()},enable:function(){var t=this;t.$input.prop("disabled",!1),t.$control_input.prop("disabled",!1).prop("tabindex",t.tabIndex),t.isDisabled=!1,t.unlock()},destroy:function(){var e=this,n=e.eventNS,i=e.revertSettings;e.trigger("destroy"),e.off(),e.$wrapper.remove(),e.$dropdown.remove(),e.$input.html("").append(i.$children).removeAttr("tabindex").removeClass("selectized").attr({tabindex:i.tabindex}).show(),e.$control_input.removeData("grow"),e.$input.removeData("selectize"),t(window).off(n),t(document).off(n),t(document.body).off(n),delete e.$input[0].selectize},render:function(t,e){var n,i,r="",o=!1,a=this,s=/^[\t \r\n]*<([a-z][a-z0-9\-_]*(?:\:[a-z][a-z0-9\-_]*)?)/i;return("option"===t||"item"===t)&&(n=D(e[a.settings.valueField]),o=!!n),o&&(_(a.renderCache[t])||(a.renderCache[t]={}),a.renderCache[t].hasOwnProperty(n))?a.renderCache[t][n]:(r=a.settings.render[t].apply(this,[e,T]),("option"===t||"option_create"===t)&&(r=r.replace(s,"<$1 data-selectable")),"optgroup"===t&&(i=e[a.settings.optgroupValueField]||"",r=r.replace(s,'<$1 data-group="'+S(T(i))+'"')),("option"===t||"item"===t)&&(r=r.replace(s,'<$1 data-value="'+S(T(n||""))+'"')),o&&(a.renderCache[t][n]=r),r)},clearCache:function(t){var e=this;"undefined"==typeof t?e.renderCache={}:delete e.renderCache[t]},canCreate:function(t){var e=this;if(!e.settings.create)return!1;var n=e.settings.createFilter;return!(!t.length||"function"==typeof n&&!n.apply(e,[t])||"string"==typeof n&&!new RegExp(n).test(t)||n instanceof RegExp&&!n.test(t))}}),j.count=0,j.defaults={options:[],optgroups:[],plugins:[],delimiter:",",splitOn:null,persist:!0,diacritics:!0,create:!1,createOnBlur:!1,createFilter:null,highlight:!0,openOnFocus:!0,maxOptions:1e3,maxItems:null,hideSelected:null,addPrecedence:!1,selectOnTab:!1,preload:!1,allowEmptyOption:!1,closeAfterSelect:!1,scrollDuration:60,loadThrottle:300,loadingClass:"loading",dataAttr:"data-data",optgroupField:"optgroup",valueField:"value",labelField:"text",optgroupLabelField:"label",optgroupValueField:"value",lockOptgroupOrder:!1,sortField:"$order",searchField:["text"],searchConjunction:"and",mode:null,wrapperClass:"selectize-control",inputClass:"selectize-input",dropdownClass:"selectize-dropdown",dropdownContentClass:"selectize-dropdown-content",dropdownParent:null,copyClassesToDropdown:!0,render:{}},t.fn.selectize=function(e){var n=t.fn.selectize.defaults,i=t.extend({},n,e),r=i.dataAttr,o=i.labelField,a=i.valueField,s=i.optgroupField,l=i.optgroupLabelField,u=i.optgroupValueField,c=function(e,n){var s,l,u,c,d=e.attr(r);if(d)for(n.options=JSON.parse(d),s=0,l=n.options.length;l>s;s++)n.items.push(n.options[s][a]);else{var h=t.trim(e.val()||"");if(!i.allowEmptyOption&&!h.length)return;for(u=h.split(i.delimiter),s=0,l=u.length;l>s;s++)c={},c[o]=u[s],c[a]=u[s],n.options.push(c);n.items=u}},d=function(e,n){var c,d,h,p,f=n.options,g={},m=function(t){var e=r&&t.attr(r);return"string"==typeof e&&e.length?JSON.parse(e):null},v=function(e,r){e=t(e);var l=D(e.attr("value"));if(l||i.allowEmptyOption)if(g.hasOwnProperty(l)){if(r){var u=g[l][s];u?t.isArray(u)?u.push(r):g[l][s]=[u,r]:g[l][s]=r}}else{var c=m(e)||{};c[o]=c[o]||e.text(),c[a]=c[a]||l,c[s]=c[s]||r,g[l]=c,f.push(c),e.is(":selected")&&n.items.push(l)}},y=function(e){var i,r,o,a,s;for(e=t(e),o=e.attr("label"),o&&(a=m(e)||{},a[l]=o,a[u]=o,n.optgroups.push(a)),s=t("option",e),i=0,r=s.length;r>i;i++)v(s[i],o)};for(n.maxItems=e.attr("multiple")?null:1,p=e.children(),c=0,d=p.length;d>c;c++)h=p[c].tagName.toLowerCase(),"optgroup"===h?y(p[c]):"option"===h&&v(p[c])};return this.each(function(){if(!this.selectize){var r,o=t(this),a=this.tagName.toLowerCase(),s=o.attr("placeholder")||o.attr("data-placeholder");s||i.allowEmptyOption||(s=o.children('option[value=""]').text());var l={placeholder:s,options:[],optgroups:[],items:[]};"select"===a?d(o,l):c(o,l),r=new j(o,t.extend(!0,{},n,l,e))}})},t.fn.selectize.defaults=j.defaults,t.fn.selectize.support={validity:C},j.define("drag_drop",function(){if(!t.fn.sortable)throw new Error('The "drag_drop" plugin requires jQuery UI "sortable".');
|
||
if("multi"===this.settings.mode){var e=this;e.lock=function(){var t=e.lock;return function(){var n=e.$control.data("sortable");return n&&n.disable(),t.apply(e,arguments)}}(),e.unlock=function(){var t=e.unlock;return function(){var n=e.$control.data("sortable");return n&&n.enable(),t.apply(e,arguments)}}(),e.setup=function(){var n=e.setup;return function(){n.apply(this,arguments);var i=e.$control.sortable({items:"[data-value]",forcePlaceholderSize:!0,disabled:e.isLocked,start:function(t,e){e.placeholder.css("width",e.helper.css("width")),i.css({overflow:"visible"})},stop:function(){i.css({overflow:"hidden"});var n=e.$activeItems?e.$activeItems.slice():null,r=[];i.children("[data-value]").each(function(){r.push(t(this).attr("data-value"))}),e.setValue(r),e.setActiveItem(n)}})}}()}}),j.define("dropdown_header",function(e){var n=this;e=t.extend({title:"Untitled",headerClass:"selectize-dropdown-header",titleRowClass:"selectize-dropdown-header-title",labelClass:"selectize-dropdown-header-label",closeClass:"selectize-dropdown-header-close",html:function(t){return'<div class="'+t.headerClass+'"><div class="'+t.titleRowClass+'"><span class="'+t.labelClass+'">'+t.title+'</span><a href="javascript:void(0)" class="'+t.closeClass+'">×</a></div></div>'}},e),n.setup=function(){var i=n.setup;return function(){i.apply(n,arguments),n.$dropdown_header=t(e.html(e)),n.$dropdown.prepend(n.$dropdown_header)}}()}),j.define("optgroup_columns",function(e){var n=this;e=t.extend({equalizeWidth:!0,equalizeHeight:!0},e),this.getAdjacentOption=function(e,n){var i=e.closest("[data-group]").find("[data-selectable]"),r=i.index(e)+n;return r>=0&&r<i.length?i.eq(r):t()},this.onKeyDown=function(){var t=n.onKeyDown;return function(e){var i,r,o,a;return!this.isOpen||e.keyCode!==u&&e.keyCode!==h?t.apply(this,arguments):(n.ignoreHover=!0,a=this.$activeOption.closest("[data-group]"),i=a.find("[data-selectable]").index(this.$activeOption),a=e.keyCode===u?a.prev("[data-group]"):a.next("[data-group]"),o=a.find("[data-selectable]"),r=o.eq(Math.min(o.length-1,i)),void(r.length&&this.setActiveOption(r)))}}();var i=function(){var t,e=i.width,n=document;return"undefined"==typeof e&&(t=n.createElement("div"),t.innerHTML='<div style="width:50px;height:50px;position:absolute;left:-50px;top:-50px;overflow:auto;"><div style="width:1px;height:100px;"></div></div>',t=t.firstChild,n.body.appendChild(t),e=i.width=t.offsetWidth-t.clientWidth,n.body.removeChild(t)),e},r=function(){var r,o,a,s,l,u,c;if(c=t("[data-group]",n.$dropdown_content),o=c.length,o&&n.$dropdown_content.width()){if(e.equalizeHeight){for(a=0,r=0;o>r;r++)a=Math.max(a,c.eq(r).height());c.css({height:a})}e.equalizeWidth&&(u=n.$dropdown_content.innerWidth()-i(),s=Math.round(u/o),c.css({width:s}),o>1&&(l=u-s*(o-1),c.eq(o-1).css({width:l})))}};(e.equalizeHeight||e.equalizeWidth)&&(A.after(this,"positionDropdown",r),A.after(this,"refreshOptions",r))}),j.define("remove_button",function(e){if("single"!==this.settings.mode){e=t.extend({label:"×",title:"Remove",className:"remove",append:!0},e);var n=this,i='<a href="javascript:void(0)" class="'+e.className+'" tabindex="-1" title="'+T(e.title)+'">'+e.label+"</a>",r=function(t,e){var n=t.search(/(<\/[^>]+>\s*)$/);return t.substring(0,n)+e+t.substring(n)};this.setup=function(){var o=n.setup;return function(){if(e.append){var a=n.settings.render.item;n.settings.render.item=function(){return r(a.apply(this,arguments),i)}}o.apply(this,arguments),this.$control.on("click","."+e.className,function(e){if(e.preventDefault(),!n.isLocked){var i=t(e.currentTarget).parent();n.setActiveItem(i),n.deleteSelection()&&n.setCaret(n.items.length)}})}}()}}),j.define("restore_on_backspace",function(t){var e=this;t.text=t.text||function(t){return t[this.settings.labelField]},this.onKeyDown=function(){var n=e.onKeyDown;return function(e){var i,r;return e.keyCode===g&&""===this.$control_input.val()&&!this.$activeItems.length&&(i=this.caretPos-1,i>=0&&i<this.items.length)?(r=this.options[this.items[i]],this.deleteSelection(e)&&(this.setTextboxValue(t.text.apply(this,[r])),this.refreshOptions(!0)),void e.preventDefault()):n.apply(this,arguments)}}()}),j}),/*!
|
||
* jQuery Validation Plugin v1.13.1
|
||
*
|
||
* http://jqueryvalidation.org/
|
||
*
|
||
* Copyright (c) 2014 Jörn Zaefferer
|
||
* Released under the MIT license
|
||
*/
|
||
function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(t){t.extend(t.fn,{validate:function(e){if(!this.length)return void(e&&e.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var n=t.data(this[0],"validator");return n?n:(this.attr("novalidate","novalidate"),n=new t.validator(e,this[0]),t.data(this[0],"validator",n),n.settings.onsubmit&&(this.validateDelegate(":submit","click",function(e){n.settings.submitHandler&&(n.submitButton=e.target),t(e.target).hasClass("cancel")&&(n.cancelSubmit=!0),void 0!==t(e.target).attr("formnovalidate")&&(n.cancelSubmit=!0)}),this.submit(function(e){function i(){var i,r;return n.settings.submitHandler?(n.submitButton&&(i=t("<input type='hidden'/>").attr("name",n.submitButton.name).val(t(n.submitButton).val()).appendTo(n.currentForm)),r=n.settings.submitHandler.call(n,n.currentForm,e),n.submitButton&&i.remove(),void 0!==r?r:!1):!0}return n.settings.debug&&e.preventDefault(),n.cancelSubmit?(n.cancelSubmit=!1,i()):n.form()?n.pendingRequest?(n.formSubmitted=!0,!1):i():(n.focusInvalid(),!1)})),n)},valid:function(){var e,n;return t(this[0]).is("form")?e=this.validate().form():(e=!0,n=t(this[0].form).validate(),this.each(function(){e=n.element(this)&&e})),e},removeAttrs:function(e){var n={},i=this;return t.each(e.split(/\s/),function(t,e){n[e]=i.attr(e),i.removeAttr(e)}),n},rules:function(e,n){var i,r,o,a,s,l,u=this[0];if(e)switch(i=t.data(u.form,"validator").settings,r=i.rules,o=t.validator.staticRules(u),e){case"add":t.extend(o,t.validator.normalizeRule(n)),delete o.messages,r[u.name]=o,n.messages&&(i.messages[u.name]=t.extend(i.messages[u.name],n.messages));break;case"remove":return n?(l={},t.each(n.split(/\s/),function(e,n){l[n]=o[n],delete o[n],"required"===n&&t(u).removeAttr("aria-required")}),l):(delete r[u.name],o)}return a=t.validator.normalizeRules(t.extend({},t.validator.classRules(u),t.validator.attributeRules(u),t.validator.dataRules(u),t.validator.staticRules(u)),u),a.required&&(s=a.required,delete a.required,a=t.extend({required:s},a),t(u).attr("aria-required","true")),a.remote&&(s=a.remote,delete a.remote,a=t.extend(a,{remote:s})),a}}),t.extend(t.expr[":"],{blank:function(e){return!t.trim(""+t(e).val())},filled:function(e){return!!t.trim(""+t(e).val())},unchecked:function(e){return!t(e).prop("checked")}}),t.validator=function(e,n){this.settings=t.extend(!0,{},t.validator.defaults,e),this.currentForm=n,this.init()},t.validator.format=function(e,n){return 1===arguments.length?function(){var n=t.makeArray(arguments);return n.unshift(e),t.validator.format.apply(this,n)}:(arguments.length>2&&n.constructor!==Array&&(n=t.makeArray(arguments).slice(1)),n.constructor!==Array&&(n=[n]),t.each(n,function(t,n){e=e.replace(new RegExp("\\{"+t+"\\}","g"),function(){return n})}),e)},t.extend(t.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:t([]),errorLabelContainer:t([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(t){this.lastActive=t,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,t,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(t)))},onfocusout:function(t){this.checkable(t)||!(t.name in this.submitted)&&this.optional(t)||this.element(t)},onkeyup:function(t,e){(9!==e.which||""!==this.elementValue(t))&&(t.name in this.submitted||t===this.lastElement)&&this.element(t)},onclick:function(t){t.name in this.submitted?this.element(t):t.parentNode.name in this.submitted&&this.element(t.parentNode)},highlight:function(e,n,i){"radio"===e.type?this.findByName(e.name).addClass(n).removeClass(i):t(e).addClass(n).removeClass(i)},unhighlight:function(e,n,i){"radio"===e.type?this.findByName(e.name).removeClass(n).addClass(i):t(e).removeClass(n).addClass(i)}},setDefaults:function(e){t.extend(t.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.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",maxlength:t.validator.format("Please enter no more than {0} characters."),minlength:t.validator.format("Please enter at least {0} characters."),rangelength:t.validator.format("Please enter a value between {0} and {1} characters long."),range:t.validator.format("Please enter a value between {0} and {1}."),max:t.validator.format("Please enter a value less than or equal to {0}."),min:t.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:!1,prototype:{init:function(){function e(e){var n=t.data(this[0].form,"validator"),i="on"+e.type.replace(/^validate/,""),r=n.settings;r[i]&&!this.is(r.ignore)&&r[i].call(n,this[0],e)}this.labelContainer=t(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||t(this.currentForm),this.containers=t(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={};t.each(this.settings.groups,function(e,n){"string"==typeof n&&(n=n.split(/\s/)),t.each(n,function(t,n){i[n]=e})}),n=this.settings.rules,t.each(n,function(e,i){n[e]=t.validator.normalizeRule(i)}),t(this.currentForm).validateDelegate(":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']","focusin focusout keyup",e).validateDelegate("select, option, [type='radio'], [type='checkbox']","click",e),this.settings.invalidHandler&&t(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler),t(this.currentForm).find("[required], [data-rule-required], .required").attr("aria-required","true")},form:function(){return this.checkForm(),t.extend(this.submitted,this.errorMap),this.invalid=t.extend({},this.errorMap),this.valid()||t(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var t=0,e=this.currentElements=this.elements();e[t];t++)this.check(e[t]);return this.valid()},element:function(e){var n=this.clean(e),i=this.validationTargetFor(n),r=!0;return this.lastElement=i,void 0===i?delete this.invalid[n.name]:(this.prepareElement(i),this.currentElements=t(i),r=this.check(i)!==!1,r?delete this.invalid[i.name]:this.invalid[i.name]=!0),t(e).attr("aria-invalid",!r),this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),r},showErrors:function(e){if(e){t.extend(this.errorMap,e),this.errorList=[];for(var n in e)this.errorList.push({message:e[n],element:this.findByName(n)[0]});this.successList=t.grep(this.successList,function(t){return!(t.name in e)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){t.fn.resetForm&&t(this.currentForm).resetForm(),this.submitted={},this.lastElement=null,this.prepareForm(),this.hideErrors(),this.elements().removeClass(this.settings.errorClass).removeData("previousValue").removeAttr("aria-invalid")},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(t){var e,n=0;for(e in t)n++;return n},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(t){t.not(this.containers).text(""),this.addWrapper(t).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{t(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(e){}},findLastActive:function(){var e=this.lastActive;return e&&1===t.grep(this.errorList,function(t){return t.element.name===e.name}).length&&e},elements:function(){var e=this,n={};return t(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled], [readonly]").not(this.settings.ignore).filter(function(){return!this.name&&e.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.name in n||!e.objectLength(t(this).rules())?!1:(n[this.name]=!0,!0)})},clean:function(e){return t(e)[0]},errors:function(){var e=this.settings.errorClass.split(" ").join(".");return t(this.settings.errorElement+"."+e,this.errorContext)},reset:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=t([]),this.toHide=t([]),this.currentElements=t([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(t){this.reset(),this.toHide=this.errorsFor(t)},elementValue:function(e){var n,i=t(e),r=e.type;return"radio"===r||"checkbox"===r?t("input[name='"+e.name+"']:checked").val():"number"===r&&"undefined"!=typeof e.validity?e.validity.badInput?!1:i.val():(n=i.val(),"string"==typeof n?n.replace(/\r/g,""):n)},check:function(e){e=this.validationTargetFor(this.clean(e));var n,i,r,o=t(e).rules(),a=t.map(o,function(t,e){return e}).length,s=!1,l=this.elementValue(e);for(i in o){r={method:i,parameters:o[i]};try{if(n=t.validator.methods[i].call(this,l,e,r.parameters),"dependency-mismatch"===n&&1===a){s=!0;continue}if(s=!1,"pending"===n)return void(this.toHide=this.toHide.not(this.errorsFor(e)));if(!n)return this.formatAndAdd(e,r),!1}catch(u){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+e.id+", check the '"+r.method+"' method.",u),u}}if(!s)return this.objectLength(o)&&this.successList.push(e),!0},customDataMessage:function(e,n){return t(e).data("msg"+n.charAt(0).toUpperCase()+n.substring(1).toLowerCase())||t(e).data("msg")},customMessage:function(t,e){var n=this.settings.messages[t];return n&&(n.constructor===String?n:n[e])},findDefined:function(){for(var t=0;t<arguments.length;t++)if(void 0!==arguments[t])return arguments[t];return void 0},defaultMessage:function(e,n){return this.findDefined(this.customMessage(e.name,n),this.customDataMessage(e,n),!this.settings.ignoreTitle&&e.title||void 0,t.validator.messages[n],"<strong>Warning: No message defined for "+e.name+"</strong>")},formatAndAdd:function(e,n){var i=this.defaultMessage(e,n.method),r=/\$?\{(\d+)\}/g;"function"==typeof i?i=i.call(this,n.parameters,e):r.test(i)&&(i=t.validator.format(i.replace(r,"{$1}"),n.parameters)),this.errorList.push({message:i,element:e,method:n.method}),this.errorMap[e.name]=i,this.submitted[e.name]=i},addWrapper:function(t){return this.settings.wrapper&&(t=t.add(t.parent(this.settings.wrapper))),t},defaultShowErrors:function(){var t,e,n;for(t=0;this.errorList[t];t++)n=this.errorList[t],this.settings.highlight&&this.settings.highlight.call(this,n.element,this.settings.errorClass,this.settings.validClass),this.showLabel(n.element,n.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(t=0;this.successList[t];t++)this.showLabel(this.successList[t]);if(this.settings.unhighlight)for(t=0,e=this.validElements();e[t];t++)this.settings.unhighlight.call(this,e[t],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 t(this.errorList).map(function(){return this.element})},showLabel:function(e,n){var i,r,o,a=this.errorsFor(e),s=this.idOrName(e),l=t(e).attr("aria-describedby");a.length?(a.removeClass(this.settings.validClass).addClass(this.settings.errorClass),a.html(n)):(a=t("<"+this.settings.errorElement+">").attr("id",s+"-error").addClass(this.settings.errorClass).html(n||""),i=a,this.settings.wrapper&&(i=a.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(i):this.settings.errorPlacement?this.settings.errorPlacement(i,t(e)):i.insertAfter(e),a.is("label")?a.attr("for",s):0===a.parents("label[for='"+s+"']").length&&(o=a.attr("id").replace(/(:|\.|\[|\])/g,"\\$1"),l?l.match(new RegExp("\\b"+o+"\\b"))||(l+=" "+o):l=o,t(e).attr("aria-describedby",l),r=this.groups[e.name],r&&t.each(this.groups,function(e,n){n===r&&t("[name='"+e+"']",this.currentForm).attr("aria-describedby",a.attr("id"))}))),!n&&this.settings.success&&(a.text(""),"string"==typeof this.settings.success?a.addClass(this.settings.success):this.settings.success(a,e)),this.toShow=this.toShow.add(a)},errorsFor:function(e){var n=this.idOrName(e),i=t(e).attr("aria-describedby"),r="label[for='"+n+"'], label[for='"+n+"'] *";return i&&(r=r+", #"+i.replace(/\s+/g,", #")),this.errors().filter(r)},idOrName:function(t){return this.groups[t.name]||(this.checkable(t)?t.name:t.id||t.name)},validationTargetFor:function(e){return this.checkable(e)&&(e=this.findByName(e.name)),t(e).not(this.settings.ignore)[0]},checkable:function(t){return/radio|checkbox/i.test(t.type)},findByName:function(e){return t(this.currentForm).find("[name='"+e+"']")},getLength:function(e,n){switch(n.nodeName.toLowerCase()){case"select":return t("option:selected",n).length;case"input":if(this.checkable(n))return this.findByName(n.name).filter(":checked").length}return e.length},depend:function(t,e){return this.dependTypes[typeof t]?this.dependTypes[typeof t](t,e):!0},dependTypes:{"boolean":function(t){return t},string:function(e,n){return!!t(e,n.form).length},"function":function(t,e){return t(e)}},optional:function(e){var n=this.elementValue(e);return!t.validator.methods.required.call(this,n,e)&&"dependency-mismatch"},startRequest:function(t){this.pending[t.name]||(this.pendingRequest++,this.pending[t.name]=!0)},stopRequest:function(e,n){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[e.name],n&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(t(this.currentForm).submit(),this.formSubmitted=!1):!n&&0===this.pendingRequest&&this.formSubmitted&&(t(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(e){return t.data(e,"previousValue")||t.data(e,"previousValue",{old:null,valid:!0,message:this.defaultMessage(e,"remote")})}},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,n){e.constructor===String?this.classRuleSettings[e]=n:t.extend(this.classRuleSettings,e)},classRules:function(e){var n={},i=t(e).attr("class");return i&&t.each(i.split(" "),function(){this in t.validator.classRuleSettings&&t.extend(n,t.validator.classRuleSettings[this])}),n},attributeRules:function(e){var n,i,r={},o=t(e),a=e.getAttribute("type");for(n in t.validator.methods)"required"===n?(i=e.getAttribute(n),""===i&&(i=!0),i=!!i):i=o.attr(n),/min|max/.test(n)&&(null===a||/number|range|text/.test(a))&&(i=Number(i)),i||0===i?r[n]=i:a===n&&"range"!==a&&(r[n]=!0);return r.maxlength&&/-1|2147483647|524288/.test(r.maxlength)&&delete r.maxlength,r},dataRules:function(e){var n,i,r={},o=t(e);for(n in t.validator.methods)i=o.data("rule"+n.charAt(0).toUpperCase()+n.substring(1).toLowerCase()),void 0!==i&&(r[n]=i);return r},staticRules:function(e){var n={},i=t.data(e.form,"validator");return i.settings.rules&&(n=t.validator.normalizeRule(i.settings.rules[e.name])||{}),n},normalizeRules:function(e,n){return t.each(e,function(i,r){if(r===!1)return void delete e[i];if(r.param||r.depends){var o=!0;switch(typeof r.depends){case"string":o=!!t(r.depends,n.form).length;break;case"function":o=r.depends.call(n,n)}o?e[i]=void 0!==r.param?r.param:!0:delete e[i]}}),t.each(e,function(i,r){e[i]=t.isFunction(r)?r(n):r}),t.each(["minlength","maxlength"],function(){e[this]&&(e[this]=Number(e[this]))}),t.each(["rangelength","range"],function(){var n;e[this]&&(t.isArray(e[this])?e[this]=[Number(e[this][0]),Number(e[this][1])]:"string"==typeof e[this]&&(n=e[this].replace(/[\[\]]/g,"").split(/[\s,]+/),e[this]=[Number(n[0]),Number(n[1])]))}),t.validator.autoCreateRanges&&(null!=e.min&&null!=e.max&&(e.range=[e.min,e.max],delete e.min,delete e.max),null!=e.minlength&&null!=e.maxlength&&(e.rangelength=[e.minlength,e.maxlength],delete e.minlength,delete e.maxlength)),e},normalizeRule:function(e){if("string"==typeof e){var n={};t.each(e.split(/\s/),function(){n[this]=!0}),e=n}return e},addMethod:function(e,n,i){t.validator.methods[e]=n,t.validator.messages[e]=void 0!==i?i:t.validator.messages[e],n.length<3&&t.validator.addClassRules(e,t.validator.normalizeRule(e))},methods:{required:function(e,n,i){if(!this.depend(i,n))return"dependency-mismatch";if("select"===n.nodeName.toLowerCase()){var r=t(n).val();return r&&r.length>0}return this.checkable(n)?this.getLength(e,n)>0:t.trim(e).length>0},email:function(t,e){return this.optional(e)||/^[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(t)},url:function(t,e){return this.optional(e)||/^(https?|s?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(t)},date:function(t,e){return this.optional(e)||!/Invalid|NaN/.test(new Date(t).toString())},dateISO:function(t,e){return this.optional(e)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(t)},number:function(t,e){return this.optional(e)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(t)},digits:function(t,e){return this.optional(e)||/^\d+$/.test(t)},creditcard:function(t,e){if(this.optional(e))return"dependency-mismatch";if(/[^0-9 \-]+/.test(t))return!1;var n,i,r=0,o=0,a=!1;if(t=t.replace(/\D/g,""),t.length<13||t.length>19)return!1;for(n=t.length-1;n>=0;n--)i=t.charAt(n),o=parseInt(i,10),a&&(o*=2)>9&&(o-=9),r+=o,a=!a;return r%10===0},minlength:function(e,n,i){var r=t.isArray(e)?e.length:this.getLength(e,n);return this.optional(n)||r>=i},maxlength:function(e,n,i){var r=t.isArray(e)?e.length:this.getLength(e,n);return this.optional(n)||i>=r},rangelength:function(e,n,i){var r=t.isArray(e)?e.length:this.getLength(e,n);return this.optional(n)||r>=i[0]&&r<=i[1]},min:function(t,e,n){return this.optional(e)||t>=n},max:function(t,e,n){return this.optional(e)||n>=t},range:function(t,e,n){return this.optional(e)||t>=n[0]&&t<=n[1]},equalTo:function(e,n,i){var r=t(i);return this.settings.onfocusout&&r.unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){t(n).valid()}),e===r.val()},remote:function(e,n,i){if(this.optional(n))return"dependency-mismatch";var r,o,a=this.previousValue(n);return this.settings.messages[n.name]||(this.settings.messages[n.name]={}),a.originalMessage=this.settings.messages[n.name].remote,this.settings.messages[n.name].remote=a.message,i="string"==typeof i&&{url:i}||i,a.old===e?a.valid:(a.old=e,r=this,this.startRequest(n),o={},o[n.name]=e,t.ajax(t.extend(!0,{url:i,mode:"abort",port:"validate"+n.name,dataType:"json",data:o,context:r.currentForm,success:function(i){var o,s,l,u=i===!0||"true"===i;r.settings.messages[n.name].remote=a.originalMessage,u?(l=r.formSubmitted,r.prepareElement(n),r.formSubmitted=l,r.successList.push(n),delete r.invalid[n.name],r.showErrors()):(o={},s=i||r.defaultMessage(n,"remote"),o[n.name]=a.message=t.isFunction(s)?s(e):s,r.invalid[n.name]=!0,r.showErrors(o)),a.valid=u,r.stopRequest(n,u)}},i)),"pending")}}}),t.format=function(){throw"$.format has been deprecated. Please use $.validator.format instead."};var e,n={};t.ajaxPrefilter?t.ajaxPrefilter(function(t,e,i){var r=t.port;"abort"===t.mode&&(n[r]&&n[r].abort(),n[r]=i)}):(e=t.ajax,t.ajax=function(i){var r=("mode"in i?i:t.ajaxSettings).mode,o=("port"in i?i:t.ajaxSettings).port;return"abort"===r?(n[o]&&n[o].abort(),n[o]=e.apply(this,arguments),n[o]):e.apply(this,arguments)}),t.extend(t.fn,{validateDelegate:function(e,n,i){return this.bind(n,function(n){var r=t(n.target);return r.is(e)?i.apply(r,arguments):void 0})}})}),/*!
|
||
* jQuery Validation Plugin v1.13.1
|
||
*
|
||
* http://jqueryvalidation.org/
|
||
*
|
||
* Copyright (c) 2014 Jörn Zaefferer
|
||
* Released under the MIT license
|
||
*/
|
||
function(t){"function"==typeof define&&define.amd?define(["jquery","./jquery.validate"],t):t(jQuery)}(function(t){!function(){function e(t){return t.replace(/<.[^<>]*?>/g," ").replace(/ | /gi," ").replace(/[.(),;:!?%#$'\"_+=\/\-\u201c\u201d\u2019]*/g,"")}t.validator.addMethod("maxWords",function(t,n,i){return this.optional(n)||e(t).match(/\b\w+\b/g).length<=i},t.validator.format("Please enter {0} words or less.")),t.validator.addMethod("minWords",function(t,n,i){return this.optional(n)||e(t).match(/\b\w+\b/g).length>=i},t.validator.format("Please enter at least {0} words.")),t.validator.addMethod("rangeWords",function(t,n,i){var r=e(t),o=/\b\w+\b/g;return this.optional(n)||r.match(o).length>=i[0]&&r.match(o).length<=i[1]},t.validator.format("Please enter between {0} and {1} words."))}(),t.validator.addMethod("accept",function(e,n,i){var r,o,a="string"==typeof i?i.replace(/\s/g,"").replace(/,/g,"|"):"image/*",s=this.optional(n);if(s)return s;if("file"===t(n).attr("type")&&(a=a.replace(/\*/g,".*"),n.files&&n.files.length))for(r=0;r<n.files.length;r++)if(o=n.files[r],!o.type.match(new RegExp(".?("+a+")$","i")))return!1;return!0},t.validator.format("Please enter a value with a valid mimetype.")),t.validator.addMethod("alphanumeric",function(t,e){return this.optional(e)||/^\w+$/i.test(t)},"Letters, numbers, and underscores only please"),t.validator.addMethod("bankaccountNL",function(t,e){if(this.optional(e))return!0;if(!/^[0-9]{9}|([0-9]{2} ){3}[0-9]{3}$/.test(t))return!1;var n,i,r,o=t.replace(/ /g,""),a=0,s=o.length;for(n=0;s>n;n++)i=s-n,r=o.substring(n,n+1),a+=i*r;return a%11===0},"Please specify a valid bank account number"),t.validator.addMethod("bankorgiroaccountNL",function(e,n){return this.optional(n)||t.validator.methods.bankaccountNL.call(this,e,n)||t.validator.methods.giroaccountNL.call(this,e,n)},"Please specify a valid bank or giro account number"),t.validator.addMethod("bic",function(t,e){return this.optional(e)||/^([A-Z]{6}[A-Z2-9][A-NP-Z1-2])(X{3}|[A-WY-Z0-9][A-Z0-9]{2})?$/.test(t)},"Please specify a valid BIC code"),t.validator.addMethod("cifES",function(t){"use strict";var e,n,i,r,o,a,s=[];if(t=t.toUpperCase(),!t.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)"))return!1;for(i=0;9>i;i++)s[i]=parseInt(t.charAt(i),10);for(n=s[2]+s[4]+s[6],r=1;8>r;r+=2)o=(2*s[r]).toString(),a=o.charAt(1),n+=parseInt(o.charAt(0),10)+(""===a?0:parseInt(a,10));return/^[ABCDEFGHJNPQRSUVW]{1}/.test(t)?(n+="",e=10-parseInt(n.charAt(n.length-1),10),t+=e,s[8].toString()===String.fromCharCode(64+e)||s[8].toString()===t.charAt(t.length-1)):!1},"Please specify a valid CIF number."),t.validator.addMethod("creditcardtypes",function(t,e,n){if(/[^0-9\-]+/.test(t))return!1;t=t.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),n.all&&(i=255),1&i&&/^(5[12345])/.test(t)?16===t.length:2&i&&/^(4)/.test(t)?16===t.length:4&i&&/^(3[47])/.test(t)?15===t.length:8&i&&/^(3(0[012345]|[68]))/.test(t)?14===t.length:16&i&&/^(2(014|149))/.test(t)?15===t.length:32&i&&/^(6011)/.test(t)?16===t.length:64&i&&/^(3)/.test(t)?16===t.length:64&i&&/^(2131|1800)/.test(t)?15===t.length:128&i?!0:!1},"Please enter a valid credit card number."),t.validator.addMethod("currency",function(t,e,n){var i,r="string"==typeof n,o=r?n:n[0],a=r?!0:n[1];return o=o.replace(/,/g,""),o=a?o+"]":o+"]?",i="^["+o+"([1-9]{1}[0-9]{0,2}(\\,[0-9]{3})*(\\.[0-9]{0,2})?|[1-9]{1}[0-9]{0,}(\\.[0-9]{0,2})?|0(\\.[0-9]{0,2})?|(\\.[0-9]{1,2})?)$",i=new RegExp(i),this.optional(e)||i.test(t)},"Please specify a valid currency"),t.validator.addMethod("dateFA",function(t,e){return this.optional(e)||/^[1-4]\d{3}\/((0?[1-6]\/((3[0-1])|([1-2][0-9])|(0?[1-9])))|((1[0-2]|(0?[7-9]))\/(30|([1-2][0-9])|(0?[1-9]))))$/.test(t)},"Please enter a correct date"),t.validator.addMethod("dateITA",function(t,e){var n,i,r,o,a,s=!1,l=/^\d{1,2}\/\d{1,2}\/\d{4}$/;return l.test(t)?(n=t.split("/"),i=parseInt(n[0],10),r=parseInt(n[1],10),o=parseInt(n[2],10),a=new Date(o,r-1,i,12,0,0,0),s=a.getUTCFullYear()===o&&a.getUTCMonth()===r-1&&a.getUTCDate()===i?!0:!1):s=!1,this.optional(e)||s},"Please enter a correct date"),t.validator.addMethod("dateNL",function(t,e){return this.optional(e)||/^(0?[1-9]|[12]\d|3[01])[\.\/\-](0?[1-9]|1[012])[\.\/\-]([12]\d)?(\d\d)$/.test(t)},"Please enter a correct date"),t.validator.addMethod("extension",function(t,e,n){return n="string"==typeof n?n.replace(/,/g,"|"):"png|jpe?g|gif",this.optional(e)||t.match(new RegExp(".("+n+")$","i"))},t.validator.format("Please enter a value with a valid extension.")),t.validator.addMethod("giroaccountNL",function(t,e){return this.optional(e)||/^[0-9]{1,7}$/.test(t)},"Please specify a valid giro account number"),t.validator.addMethod("iban",function(t,e){if(this.optional(e))return!0;var n,i,r,o,a,s,l,u,c,d=t.replace(/ /g,"").toUpperCase(),h="",p=!0,f="",g="";if(!/^([a-zA-Z0-9]{4} ){2,8}[a-zA-Z0-9]{1,4}|[a-zA-Z0-9]{12,34}$/.test(d))return!1;if(n=d.substring(0,2),s={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}"},a=s[n],"undefined"!=typeof a&&(l=new RegExp("^[A-Z]{2}\\d{2}"+a+"$",""),!l.test(d)))return!1;for(i=d.substring(4,d.length)+d.substring(0,4),u=0;u<i.length;u++)r=i.charAt(u),"0"!==r&&(p=!1),p||(h+="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf(r));for(c=0;c<h.length;c++)o=h.charAt(c),g=""+f+o,f=g%97;return 1===f},"Please specify a valid IBAN"),t.validator.addMethod("integer",function(t,e){return this.optional(e)||/^-?\d+$/.test(t)},"A positive or negative non-decimal number please"),t.validator.addMethod("ipv4",function(t,e){return this.optional(e)||/^(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(t)},"Please enter a valid IP v4 address."),t.validator.addMethod("ipv6",function(t,e){return this.optional(e)||/^((([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(t)},"Please enter a valid IP v6 address."),t.validator.addMethod("lettersonly",function(t,e){return this.optional(e)||/^[a-z]+$/i.test(t)},"Letters only please"),t.validator.addMethod("letterswithbasicpunc",function(t,e){return this.optional(e)||/^[a-z\-.,()'"\s]+$/i.test(t)},"Letters or punctuation only please"),t.validator.addMethod("mobileNL",function(t,e){return this.optional(e)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)6((\s|\s?\-\s?)?[0-9]){8}$/.test(t)},"Please specify a valid mobile number"),t.validator.addMethod("mobileUK",function(t,e){return t=t.replace(/\(|\)|\s+|-/g,""),this.optional(e)||t.length>9&&t.match(/^(?:(?:(?:00\s?|\+)44\s?|0)7(?:[1345789]\d{2}|624)\s?\d{3}\s?\d{3})$/)},"Please specify a valid mobile number"),t.validator.addMethod("nieES",function(t){"use strict";return t=t.toUpperCase(),t.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)")?/^[T]{1}/.test(t)?t[8]===/^[T]{1}[A-Z0-9]{8}$/.test(t):/^[XYZ]{1}/.test(t)?t[8]==="TRWAGMYFPDXBNJZSQVHLCKE".charAt(t.replace("X","0").replace("Y","1").replace("Z","2").substring(0,8)%23):!1:!1},"Please specify a valid NIE number."),t.validator.addMethod("nifES",function(t){"use strict";return t=t.toUpperCase(),t.match("((^[A-Z]{1}[0-9]{7}[A-Z0-9]{1}$|^[T]{1}[A-Z0-9]{8}$)|^[0-9]{8}[A-Z]{1}$)")?/^[0-9]{8}[A-Z]{1}$/.test(t)?"TRWAGMYFPDXBNJZSQVHLCKE".charAt(t.substring(8,0)%23)===t.charAt(8):/^[KLM]{1}/.test(t)?t[8]===String.fromCharCode(64):!1:!1},"Please specify a valid NIF number."),t.validator.addMethod("nowhitespace",function(t,e){return this.optional(e)||/^\S+$/i.test(t)},"No white space please"),t.validator.addMethod("pattern",function(t,e,n){return this.optional(e)?!0:("string"==typeof n&&(n=new RegExp("^(?:"+n+")$")),n.test(t))},"Invalid format."),t.validator.addMethod("phoneNL",function(t,e){return this.optional(e)||/^((\+|00(\s|\s?\-\s?)?)31(\s|\s?\-\s?)?(\(0\)[\-\s]?)?|0)[1-9]((\s|\s?\-\s?)?[0-9]){8}$/.test(t)},"Please specify a valid phone number."),t.validator.addMethod("phoneUK",function(t,e){return t=t.replace(/\(|\)|\s+|-/g,""),this.optional(e)||t.length>9&&t.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"),t.validator.addMethod("phoneUS",function(t,e){return t=t.replace(/\s+/g,""),this.optional(e)||t.length>9&&t.match(/^(\+?1-?)?(\([2-9]([02-9]\d|1[02-9])\)|[2-9]([02-9]\d|1[02-9]))-?[2-9]([02-9]\d|1[02-9])-?\d{4}$/)},"Please specify a valid phone number"),t.validator.addMethod("phonesUK",function(t,e){return t=t.replace(/\(|\)|\s+|-/g,""),this.optional(e)||t.length>9&&t.match(/^(?:(?:(?:00\s?|\+)44\s?|0)(?:1\d{8,9}|[23]\d{9}|7(?:[1345789]\d{8}|624\d{6})))$/)},"Please specify a valid uk phone number"),t.validator.addMethod("postalCodeCA",function(t,e){return this.optional(e)||/^[ABCEGHJKLMNPRSTVXY]\d[A-Z] \d[A-Z]\d$/.test(t)},"Please specify a valid postal code"),t.validator.addMethod("postalcodeBR",function(t,e){return this.optional(e)||/^\d{2}.\d{3}-\d{3}?$|^\d{5}-?\d{3}?$/.test(t)},"Informe um CEP v\xe1lido."),t.validator.addMethod("postalcodeIT",function(t,e){return this.optional(e)||/^\d{5}$/.test(t)},"Please specify a valid postal code"),t.validator.addMethod("postalcodeNL",function(t,e){return this.optional(e)||/^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(t)},"Please specify a valid postal code"),t.validator.addMethod("postcodeUK",function(t,e){return this.optional(e)||/^((([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(t)},"Please specify a valid UK postcode"),t.validator.addMethod("require_from_group",function(e,n,i){var r=t(i[1],n.form),o=r.eq(0),a=o.data("valid_req_grp")?o.data("valid_req_grp"):t.extend({},this),s=r.filter(function(){return a.elementValue(this)}).length>=i[0];return o.data("valid_req_grp",a),t(n).data("being_validated")||(r.data("being_validated",!0),r.each(function(){a.element(this)}),r.data("being_validated",!1)),s},t.validator.format("Please fill at least {0} of these fields.")),t.validator.addMethod("skip_or_fill_minimum",function(e,n,i){var r=t(i[1],n.form),o=r.eq(0),a=o.data("valid_skip")?o.data("valid_skip"):t.extend({},this),s=r.filter(function(){return a.elementValue(this)}).length,l=0===s||s>=i[0];return o.data("valid_skip",a),t(n).data("being_validated")||(r.data("being_validated",!0),r.each(function(){a.element(this)}),r.data("being_validated",!1)),l},t.validator.format("Please either skip these fields or fill at least {0} of them.")),jQuery.validator.addMethod("stateUS",function(t,e,n){var i,r="undefined"==typeof n,o=r||"undefined"==typeof n.caseSensitive?!1:n.caseSensitive,a=r||"undefined"==typeof n.includeTerritories?!1:n.includeTerritories,s=r||"undefined"==typeof n.includeMilitary?!1:n.includeMilitary;return i=a||s?a&&s?"^(A[AEKLPRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":a?"^(A[KLRSZ]|C[AOT]|D[CE]|FL|G[AU]|HI|I[ADLN]|K[SY]|LA|M[ADEINOPST]|N[CDEHJMVY]|O[HKR]|P[AR]|RI|S[CD]|T[NX]|UT|V[AIT]|W[AIVY])$":"^(A[AEKLPRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$":"^(A[KLRZ]|C[AOT]|D[CE]|FL|GA|HI|I[ADLN]|K[SY]|LA|M[ADEINOST]|N[CDEHJMVY]|O[HKR]|PA|RI|S[CD]|T[NX]|UT|V[AT]|W[AIVY])$",i=o?new RegExp(i):new RegExp(i,"i"),this.optional(e)||i.test(t)},"Please specify a valid state"),t.validator.addMethod("strippedminlength",function(e,n,i){return t(e).text().length>=i},t.validator.format("Please enter at least {0} characters")),t.validator.addMethod("time",function(t,e){return this.optional(e)||/^([01]\d|2[0-3])(:[0-5]\d){1,2}$/.test(t)},"Please enter a valid time, between 00:00 and 23:59"),t.validator.addMethod("time12h",function(t,e){return this.optional(e)||/^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(t)},"Please enter a valid time in 12-hour am/pm format"),t.validator.addMethod("url2",function(t,e){return this.optional(e)||/^(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(t)},t.validator.messages.url),t.validator.addMethod("vinUS",function(t){if(17!==t.length)return!1;var e,n,i,r,o,a,s=["A","B","C","D","E","F","G","H","J","K","L","M","N","P","R","S","T","U","V","W","X","Y","Z"],l=[1,2,3,4,5,6,7,8,1,2,3,4,5,7,9,2,3,4,5,6,7,8,9],u=[8,7,6,5,4,3,2,10,0,9,8,7,6,5,4,3,2],c=0;for(e=0;17>e;e++){if(r=u[e],i=t.slice(e,e+1),8===e&&(a=i),isNaN(i)){for(n=0;n<s.length;n++)if(i.toUpperCase()===s[n]){i=l[n],i*=r,isNaN(a)&&8===n&&(a=s[n]);break}}else i*=r;c+=i}return o=c%11,10===o&&(o="X"),o===a?!0:!1},"The specified vehicle identification number (VIN) is invalid."),t.validator.addMethod("zipcodeUS",function(t,e){return this.optional(e)||/^\d{5}(-\d{4})?$/.test(t)},"The specified US ZIP Code is invalid"),t.validator.addMethod("ziprange",function(t,e){return this.optional(e)||/^90[2-5]\d\{2\}-\d{4}$/.test(t)},"Your ZIP-code must be in the range 902xx-xxxx to 905xx-xxxx")}),function(){$.validator.setDefaults({highlight:function(t){$(t).closest(".form-group").addClass("has-error")},unhighlight:function(t){$(t).closest(".form-group").removeClass("has-error")},errorElement:"span",errorClass:"help-block",errorPlacement:function(t,e){t.insertAfter(e.parent(".input-group").length?e.parent():e)}})}.call(this),/*!
|
||
* jQuery UI Core 1.11.4
|
||
* http://jqueryui.com
|
||
*
|
||
* Copyright jQuery Foundation and other contributors
|
||
* Released under the MIT license.
|
||
* http://jquery.org/license
|
||
*
|
||
* http://api.jqueryui.com/category/ui-core/
|
||
*/
|
||
function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(t){function e(e,i){var r,o,a,s=e.nodeName.toLowerCase();return"area"===s?(r=e.parentNode,o=r.name,e.href&&o&&"map"===r.nodeName.toLowerCase()?(a=t("img[usemap='#"+o+"']")[0],!!a&&n(a)):!1):(/^(input|select|textarea|button|object)$/.test(s)?!e.disabled:"a"===s?e.href||i:i)&&n(e)}function n(e){return t.expr.filters.visible(e)&&!t(e).parents().addBack().filter(function(){return"hidden"===t.css(this,"visibility")}).length}t.ui=t.ui||{},t.extend(t.ui,{version:"1.11.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),t.fn.extend({scrollParent:function(e){var n=this.css("position"),i="absolute"===n,r=e?/(auto|scroll|hidden)/:/(auto|scroll)/,o=this.parents().filter(function(){var e=t(this);return i&&"static"===e.css("position")?!1:r.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==n&&o.length?o:t(this[0].ownerDocument||document)},uniqueId:function(){var t=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++t)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeAttr("id")})}}),t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(n){return!!t.data(n,e)}}):function(e,n,i){return!!t.data(e,i[3])},focusable:function(n){return e(n,!isNaN(t.attr(n,"tabindex")))},tabbable:function(n){var i=t.attr(n,"tabindex"),r=isNaN(i);return(r||i>=0)&&e(n,!r)}}),t("<a>").outerWidth(1).jquery||t.each(["Width","Height"],function(e,n){function i(e,n,i,o){return t.each(r,function(){n-=parseFloat(t.css(e,"padding"+this))||0,i&&(n-=parseFloat(t.css(e,"border"+this+"Width"))||0),o&&(n-=parseFloat(t.css(e,"margin"+this))||0)}),n}var r="Width"===n?["Left","Right"]:["Top","Bottom"],o=n.toLowerCase(),a={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+n]=function(e){return void 0===e?a["inner"+n].call(this):this.each(function(){t(this).css(o,i(this,e)+"px")})},t.fn["outer"+n]=function(e,r){return"number"!=typeof e?a["outer"+n].call(this,e):this.each(function(){t(this).css(o,i(this,e,!0,r)+"px")})}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(t.fn.removeData=function(e){return function(n){return arguments.length?e.call(this,t.camelCase(n)):e.call(this)}}(t.fn.removeData)),t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),t.fn.extend({focus:function(e){return function(n,i){return"number"==typeof n?this.each(function(){var e=this;setTimeout(function(){t(e).focus(),i&&i.call(e)},n)}):e.apply(this,arguments)}}(t.fn.focus),disableSelection:function(){var t="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.bind(t+".ui-disableSelection",function(t){t.preventDefault()})}}(),enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(e){if(void 0!==e)return this.css("zIndex",e);if(this.length)for(var n,i,r=t(this[0]);r.length&&r[0]!==document;){if(n=r.css("position"),("absolute"===n||"relative"===n||"fixed"===n)&&(i=parseInt(r.css("zIndex"),10),!isNaN(i)&&0!==i))return i;r=r.parent()}return 0}}),t.ui.plugin={add:function(e,n,i){var r,o=t.ui[e].prototype;for(r in i)o.plugins[r]=o.plugins[r]||[],o.plugins[r].push([n,i[r]])},call:function(t,e,n,i){var r,o=t.plugins[e];if(o&&(i||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(r=0;r<o.length;r++)t.options[o[r][0]]&&o[r][1].apply(t.element,n)}}}),/*!
|
||
* jQuery UI Datepicker 1.11.4
|
||
* http://jqueryui.com
|
||
*
|
||
* Copyright jQuery Foundation and other contributors
|
||
* Released under the MIT license.
|
||
* http://jquery.org/license
|
||
*
|
||
* http://api.jqueryui.com/datepicker/
|
||
*/
|
||
function(t){"function"==typeof define&&define.amd?define(["jquery","./core"],t):t(jQuery)}(function(t){function e(t){for(var e,n;t.length&&t[0]!==document;){if(e=t.css("position"),("absolute"===e||"relative"===e||"fixed"===e)&&(n=parseInt(t.css("zIndex"),10),!isNaN(n)&&0!==n))return n;t=t.parent()}return 0}function n(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},t.extend(this._defaults,this.regional[""]),this.regional.en=t.extend(!0,{},this.regional[""]),this.regional["en-US"]=t.extend(!0,{},this.regional.en),this.dpDiv=i(t("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function i(e){var n="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.delegate(n,"mouseout",function(){t(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).removeClass("ui-datepicker-next-hover")}).delegate(n,"mouseover",r)}function r(){t.datepicker._isDisabledDatepicker(a.inline?a.dpDiv.parent()[0]:a.input[0])||(t(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),t(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).addClass("ui-datepicker-next-hover"))}function o(e,n){t.extend(e,n);for(var i in n)null==n[i]&&(e[i]=n[i]);return e}t.extend(t.ui,{datepicker:{version:"1.11.4"}});var a;return t.extend(n.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return o(this._defaults,t||{}),this},_attachDatepicker:function(e,n){var i,r,o;i=e.nodeName.toLowerCase(),r="div"===i||"span"===i,e.id||(this.uuid+=1,e.id="dp"+this.uuid),o=this._newInst(t(e),r),o.settings=t.extend({},n||{}),"input"===i?this._connectDatepicker(e,o):r&&this._inlineDatepicker(e,o)},_newInst:function(e,n){var r=e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:r,input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:n,dpDiv:n?i(t("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(e,n){var i=t(e);n.append=t([]),n.trigger=t([]),i.hasClass(this.markerClassName)||(this._attachments(i,n),i.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(n),t.data(e,"datepicker",n),n.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,n){var i,r,o,a=this._get(n,"appendText"),s=this._get(n,"isRTL");n.append&&n.append.remove(),a&&(n.append=t("<span class='"+this._appendClass+"'>"+a+"</span>"),e[s?"before":"after"](n.append)),e.unbind("focus",this._showDatepicker),n.trigger&&n.trigger.remove(),i=this._get(n,"showOn"),("focus"===i||"both"===i)&&e.focus(this._showDatepicker),("button"===i||"both"===i)&&(r=this._get(n,"buttonText"),o=this._get(n,"buttonImage"),n.trigger=t(this._get(n,"buttonImageOnly")?t("<img/>").addClass(this._triggerClass).attr({src:o,alt:r,title:r}):t("<button type='button'></button>").addClass(this._triggerClass).html(o?t("<img/>").attr({src:o,alt:r,title:r}):r)),e[s?"before":"after"](n.trigger),n.trigger.click(function(){return t.datepicker._datepickerShowing&&t.datepicker._lastInput===e[0]?t.datepicker._hideDatepicker():t.datepicker._datepickerShowing&&t.datepicker._lastInput!==e[0]?(t.datepicker._hideDatepicker(),t.datepicker._showDatepicker(e[0])):t.datepicker._showDatepicker(e[0]),!1}))},_autoSize:function(t){if(this._get(t,"autoSize")&&!t.inline){var e,n,i,r,o=new Date(2009,11,20),a=this._get(t,"dateFormat");a.match(/[DM]/)&&(e=function(t){for(n=0,i=0,r=0;r<t.length;r++)t[r].length>n&&(n=t[r].length,i=r);return i},o.setMonth(e(this._get(t,a.match(/MM/)?"monthNames":"monthNamesShort"))),o.setDate(e(this._get(t,a.match(/DD/)?"dayNames":"dayNamesShort"))+20-o.getDay())),t.input.attr("size",this._formatDate(t,o).length)}},_inlineDatepicker:function(e,n){var i=t(e);i.hasClass(this.markerClassName)||(i.addClass(this.markerClassName).append(n.dpDiv),t.data(e,"datepicker",n),this._setDate(n,this._getDefaultDate(n),!0),this._updateDatepicker(n),this._updateAlternate(n),n.settings.disabled&&this._disableDatepicker(e),n.dpDiv.css("display","block"))},_dialogDatepicker:function(e,n,i,r,a){var s,l,u,c,d,h=this._dialogInst;return h||(this.uuid+=1,s="dp"+this.uuid,this._dialogInput=t("<input type='text' id='"+s+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.keydown(this._doKeyDown),t("body").append(this._dialogInput),h=this._dialogInst=this._newInst(this._dialogInput,!1),h.settings={},t.data(this._dialogInput[0],"datepicker",h)),o(h.settings,r||{}),n=n&&n.constructor===Date?this._formatDate(h,n):n,this._dialogInput.val(n),this._pos=a?a.length?a:[a.pageX,a.pageY]:null,this._pos||(l=document.documentElement.clientWidth,u=document.documentElement.clientHeight,c=document.documentElement.scrollLeft||document.body.scrollLeft,d=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[l/2-100+c,u/2-150+d]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),h.settings.onSelect=i,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),t.blockUI&&t.blockUI(this.dpDiv),t.data(this._dialogInput[0],"datepicker",h),this},_destroyDatepicker:function(e){var n,i=t(e),r=t.data(e,"datepicker");i.hasClass(this.markerClassName)&&(n=e.nodeName.toLowerCase(),t.removeData(e,"datepicker"),"input"===n?(r.append.remove(),r.trigger.remove(),i.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):("div"===n||"span"===n)&&i.removeClass(this.markerClassName).empty(),a===r&&(a=null))},_enableDatepicker:function(e){var n,i,r=t(e),o=t.data(e,"datepicker");r.hasClass(this.markerClassName)&&(n=e.nodeName.toLowerCase(),"input"===n?(e.disabled=!1,o.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===n||"span"===n)&&(i=r.children("."+this._inlineClass),i.children().removeClass("ui-state-disabled"),i.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var n,i,r=t(e),o=t.data(e,"datepicker");r.hasClass(this.markerClassName)&&(n=e.nodeName.toLowerCase(),"input"===n?(e.disabled=!0,o.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===n||"span"===n)&&(i=r.children("."+this._inlineClass),i.children().addClass("ui-state-disabled"),i.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicker:function(t){if(!t)return!1;for(var e=0;e<this._disabledInputs.length;e++)if(this._disabledInputs[e]===t)return!0;return!1},_getInst:function(e){try{return t.data(e,"datepicker")}catch(n){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(e,n,i){var r,a,s,l,u=this._getInst(e);return 2===arguments.length&&"string"==typeof n?"defaults"===n?t.extend({},t.datepicker._defaults):u?"all"===n?t.extend({},u.settings):this._get(u,n):null:(r=n||{},"string"==typeof n&&(r={},r[n]=i),void(u&&(this._curInst===u&&this._hideDatepicker(),a=this._getDateDatepicker(e,!0),s=this._getMinMaxDate(u,"min"),l=this._getMinMaxDate(u,"max"),o(u.settings,r),null!==s&&void 0!==r.dateFormat&&void 0===r.minDate&&(u.settings.minDate=this._formatDate(u,s)),null!==l&&void 0!==r.dateFormat&&void 0===r.maxDate&&(u.settings.maxDate=this._formatDate(u,l)),"disabled"in r&&(r.disabled?this._disableDatepicker(e):this._enableDatepicker(e)),this._attachments(t(e),u),this._autoSize(u),this._setDate(u,a),this._updateAlternate(u),this._updateDatepicker(u))))},_changeDatepicker:function(t,e,n){this._optionDatepicker(t,e,n)},_refreshDatepicker:function(t){var e=this._getInst(t);e&&this._updateDatepicker(e)},_setDateDatepicker:function(t,e){var n=this._getInst(t);n&&(this._setDate(n,e),this._updateDatepicker(n),this._updateAlternate(n))},_getDateDatepicker:function(t,e){var n=this._getInst(t);return n&&!n.inline&&this._setDateFromField(n,e),n?this._getDate(n):null},_doKeyDown:function(e){var n,i,r,o=t.datepicker._getInst(e.target),a=!0,s=o.dpDiv.is(".ui-datepicker-rtl");if(o._keyEvent=!0,t.datepicker._datepickerShowing)switch(e.keyCode){case 9:t.datepicker._hideDatepicker(),a=!1;break;case 13:return r=t("td."+t.datepicker._dayOverClass+":not(."+t.datepicker._currentClass+")",o.dpDiv),r[0]&&t.datepicker._selectDay(e.target,o.selectedMonth,o.selectedYear,r[0]),n=t.datepicker._get(o,"onSelect"),n?(i=t.datepicker._formatDate(o),n.apply(o.input?o.input[0]:null,[i,o])):t.datepicker._hideDatepicker(),!1;case 27:t.datepicker._hideDatepicker();break;case 33:t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 34:t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&t.datepicker._clearDate(e.target),a=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&t.datepicker._gotoToday(e.target),a=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,s?1:-1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,-7,"D"),a=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,s?-1:1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,7,"D"),a=e.ctrlKey||e.metaKey;break;default:a=!1}else 36===e.keyCode&&e.ctrlKey?t.datepicker._showDatepicker(this):a=!1;a&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(e){var n,i,r=t.datepicker._getInst(e.target);return t.datepicker._get(r,"constrainInput")?(n=t.datepicker._possibleChars(t.datepicker._get(r,"dateFormat")),i=String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),e.ctrlKey||e.metaKey||" ">i||!n||n.indexOf(i)>-1):void 0},_doKeyUp:function(e){var n,i=t.datepicker._getInst(e.target);if(i.input.val()!==i.lastVal)try{n=t.datepicker.parseDate(t.datepicker._get(i,"dateFormat"),i.input?i.input.val():null,t.datepicker._getFormatConfig(i)),n&&(t.datepicker._setDateFromField(i),t.datepicker._updateAlternate(i),t.datepicker._updateDatepicker(i))}catch(r){}return!0},_showDatepicker:function(n){if(n=n.target||n,"input"!==n.nodeName.toLowerCase()&&(n=t("input",n.parentNode)[0]),!t.datepicker._isDisabledDatepicker(n)&&t.datepicker._lastInput!==n){var i,r,a,s,l,u,c;i=t.datepicker._getInst(n),t.datepicker._curInst&&t.datepicker._curInst!==i&&(t.datepicker._curInst.dpDiv.stop(!0,!0),i&&t.datepicker._datepickerShowing&&t.datepicker._hideDatepicker(t.datepicker._curInst.input[0])),r=t.datepicker._get(i,"beforeShow"),a=r?r.apply(n,[n,i]):{},a!==!1&&(o(i.settings,a),i.lastVal=null,t.datepicker._lastInput=n,t.datepicker._setDateFromField(i),t.datepicker._inDialog&&(n.value=""),t.datepicker._pos||(t.datepicker._pos=t.datepicker._findPos(n),t.datepicker._pos[1]+=n.offsetHeight),s=!1,t(n).parents().each(function(){return s|="fixed"===t(this).css("position"),!s}),l={left:t.datepicker._pos[0],top:t.datepicker._pos[1]},t.datepicker._pos=null,i.dpDiv.empty(),i.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),t.datepicker._updateDatepicker(i),l=t.datepicker._checkOffset(i,l,s),i.dpDiv.css({position:t.datepicker._inDialog&&t.blockUI?"static":s?"fixed":"absolute",display:"none",left:l.left+"px",top:l.top+"px"}),i.inline||(u=t.datepicker._get(i,"showAnim"),c=t.datepicker._get(i,"duration"),i.dpDiv.css("z-index",e(t(n))+1),t.datepicker._datepickerShowing=!0,t.effects&&t.effects.effect[u]?i.dpDiv.show(u,t.datepicker._get(i,"showOptions"),c):i.dpDiv[u||"show"](u?c:null),t.datepicker._shouldFocusInput(i)&&i.input.focus(),t.datepicker._curInst=i))}},_updateDatepicker:function(e){this.maxRows=4,a=e,e.dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e);var n,i=this._getNumberOfMonths(e),o=i[1],s=17,l=e.dpDiv.find("."+this._dayOverClass+" a");l.length>0&&r.apply(l.get(0)),e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),o>1&&e.dpDiv.addClass("ui-datepicker-multi-"+o).css("width",s*o+"em"),e.dpDiv[(1!==i[0]||1!==i[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e===t.datepicker._curInst&&t.datepicker._datepickerShowing&&t.datepicker._shouldFocusInput(e)&&e.input.focus(),e.yearshtml&&(n=e.yearshtml,setTimeout(function(){n===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml),n=e.yearshtml=null},0))},_shouldFocusInput:function(t){return t.input&&t.input.is(":visible")&&!t.input.is(":disabled")&&!t.input.is(":focus")},_checkOffset:function(e,n,i){var r=e.dpDiv.outerWidth(),o=e.dpDiv.outerHeight(),a=e.input?e.input.outerWidth():0,s=e.input?e.input.outerHeight():0,l=document.documentElement.clientWidth+(i?0:t(document).scrollLeft()),u=document.documentElement.clientHeight+(i?0:t(document).scrollTop());return n.left-=this._get(e,"isRTL")?r-a:0,n.left-=i&&n.left===e.input.offset().left?t(document).scrollLeft():0,n.top-=i&&n.top===e.input.offset().top+s?t(document).scrollTop():0,n.left-=Math.min(n.left,n.left+r>l&&l>r?Math.abs(n.left+r-l):0),n.top-=Math.min(n.top,n.top+o>u&&u>o?Math.abs(o+s):0),n},_findPos:function(e){for(var n,i=this._getInst(e),r=this._get(i,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||t.expr.filters.hidden(e));)e=e[r?"previousSibling":"nextSibling"];return n=t(e).offset(),[n.left,n.top]},_hideDatepicker:function(e){var n,i,r,o,a=this._curInst;!a||e&&a!==t.data(e,"datepicker")||this._datepickerShowing&&(n=this._get(a,"showAnim"),i=this._get(a,"duration"),r=function(){t.datepicker._tidyDialog(a)},t.effects&&(t.effects.effect[n]||t.effects[n])?a.dpDiv.hide(n,t.datepicker._get(a,"showOptions"),i,r):a.dpDiv["slideDown"===n?"slideUp":"fadeIn"===n?"fadeOut":"hide"](n?i:null,r),n||r(),this._datepickerShowing=!1,o=this._get(a,"onClose"),o&&o.apply(a.input?a.input[0]:null,[a.input?a.input.val():"",a]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),t.blockUI&&(t.unblockUI(),t("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(e){if(t.datepicker._curInst){var n=t(e.target),i=t.datepicker._getInst(n[0]);(n[0].id!==t.datepicker._mainDivId&&0===n.parents("#"+t.datepicker._mainDivId).length&&!n.hasClass(t.datepicker.markerClassName)&&!n.closest("."+t.datepicker._triggerClass).length&&t.datepicker._datepickerShowing&&(!t.datepicker._inDialog||!t.blockUI)||n.hasClass(t.datepicker.markerClassName)&&t.datepicker._curInst!==i)&&t.datepicker._hideDatepicker()}},_adjustDate:function(e,n,i){var r=t(e),o=this._getInst(r[0]);this._isDisabledDatepicker(r[0])||(this._adjustInstDate(o,n+("M"===i?this._get(o,"showCurrentAtPos"):0),i),this._updateDatepicker(o))},_gotoToday:function(e){var n,i=t(e),r=this._getInst(i[0]);this._get(r,"gotoCurrent")&&r.currentDay?(r.selectedDay=r.currentDay,r.drawMonth=r.selectedMonth=r.currentMonth,r.drawYear=r.selectedYear=r.currentYear):(n=new Date,r.selectedDay=n.getDate(),r.drawMonth=r.selectedMonth=n.getMonth(),r.drawYear=r.selectedYear=n.getFullYear()),this._notifyChange(r),this._adjustDate(i)},_selectMonthYear:function(e,n,i){var r=t(e),o=this._getInst(r[0]);o["selected"+("M"===i?"Month":"Year")]=o["draw"+("M"===i?"Month":"Year")]=parseInt(n.options[n.selectedIndex].value,10),this._notifyChange(o),this._adjustDate(r)},_selectDay:function(e,n,i,r){var o,a=t(e);t(r).hasClass(this._unselectableClass)||this._isDisabledDatepicker(a[0])||(o=this._getInst(a[0]),o.selectedDay=o.currentDay=t("a",r).html(),o.selectedMonth=o.currentMonth=n,o.selectedYear=o.currentYear=i,this._selectDate(e,this._formatDate(o,o.currentDay,o.currentMonth,o.currentYear)))},_clearDate:function(e){var n=t(e);this._selectDate(n,"")},_selectDate:function(e,n){var i,r=t(e),o=this._getInst(r[0]);n=null!=n?n:this._formatDate(o),o.input&&o.input.val(n),this._updateAlternate(o),i=this._get(o,"onSelect"),i?i.apply(o.input?o.input[0]:null,[n,o]):o.input&&o.input.trigger("change"),o.inline?this._updateDatepicker(o):(this._hideDatepicker(),this._lastInput=o.input[0],"object"!=typeof o.input[0]&&o.input.focus(),this._lastInput=null)},_updateAlternate:function(e){var n,i,r,o=this._get(e,"altField");o&&(n=this._get(e,"altFormat")||this._get(e,"dateFormat"),i=this._getDate(e),r=this.formatDate(n,i,this._getFormatConfig(e)),t(o).each(function(){t(this).val(r)}))},noWeekends:function(t){var e=t.getDay();return[e>0&&6>e,""]},iso8601Week:function(t){var e,n=new Date(t.getTime());return n.setDate(n.getDate()+4-(n.getDay()||7)),e=n.getTime(),n.setMonth(0),n.setDate(1),Math.floor(Math.round((e-n)/864e5)/7)+1},parseDate:function(e,n,i){if(null==e||null==n)throw"Invalid arguments";if(n="object"==typeof n?n.toString():n+"",""===n)return null;var r,o,a,s,l=0,u=(i?i.shortYearCutoff:null)||this._defaults.shortYearCutoff,c="string"!=typeof u?u:(new Date).getFullYear()%100+parseInt(u,10),d=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,h=(i?i.dayNames:null)||this._defaults.dayNames,p=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,f=(i?i.monthNames:null)||this._defaults.monthNames,g=-1,m=-1,v=-1,y=-1,b=!1,w=function(t){var n=r+1<e.length&&e.charAt(r+1)===t;return n&&r++,n},x=function(t){var e=w(t),i="@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2,r="y"===t?i:1,o=new RegExp("^\\d{"+r+","+i+"}"),a=n.substring(l).match(o);if(!a)throw"Missing number at position "+l;return l+=a[0].length,parseInt(a[0],10)},k=function(e,i,r){var o=-1,a=t.map(w(e)?r:i,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)});if(t.each(a,function(t,e){var i=e[1];return n.substr(l,i.length).toLowerCase()===i.toLowerCase()?(o=e[0],l+=i.length,!1):void 0}),-1!==o)return o+1;throw"Unknown name at position "+l},C=function(){if(n.charAt(l)!==e.charAt(r))throw"Unexpected literal at position "+l;l++};for(r=0;r<e.length;r++)if(b)"'"!==e.charAt(r)||w("'")?C():b=!1;else switch(e.charAt(r)){case"d":v=x("d");break;case"D":k("D",d,h);break;case"o":y=x("o");break;case"m":m=x("m");break;case"M":m=k("M",p,f);break;case"y":g=x("y");break;case"@":s=new Date(x("@")),g=s.getFullYear(),m=s.getMonth()+1,v=s.getDate();break;case"!":s=new Date((x("!")-this._ticksTo1970)/1e4),g=s.getFullYear(),m=s.getMonth()+1,v=s.getDate();break;case"'":w("'")?C():b=!0;break;default:C()}if(l<n.length&&(a=n.substr(l),!/^\s+/.test(a)))throw"Extra/unparsed characters found in date: "+a;if(-1===g?g=(new Date).getFullYear():100>g&&(g+=(new Date).getFullYear()-(new Date).getFullYear()%100+(c>=g?0:-100)),y>-1)for(m=1,v=y;;){if(o=this._getDaysInMonth(g,m-1),o>=v)break;m++,v-=o}if(s=this._daylightSavingAdjust(new Date(g,m-1,v)),s.getFullYear()!==g||s.getMonth()+1!==m||s.getDate()!==v)throw"Invalid date";return s},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,formatDate:function(t,e,n){if(!e)return"";var i,r=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort,o=(n?n.dayNames:null)||this._defaults.dayNames,a=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort,s=(n?n.monthNames:null)||this._defaults.monthNames,l=function(e){var n=i+1<t.length&&t.charAt(i+1)===e;return n&&i++,n},u=function(t,e,n){var i=""+e;if(l(t))for(;i.length<n;)i="0"+i;return i},c=function(t,e,n,i){return l(t)?i[e]:n[e]},d="",h=!1;if(e)for(i=0;i<t.length;i++)if(h)"'"!==t.charAt(i)||l("'")?d+=t.charAt(i):h=!1;else switch(t.charAt(i)){case"d":d+=u("d",e.getDate(),2);break;case"D":d+=c("D",e.getDay(),r,o);break;case"o":d+=u("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":d+=u("m",e.getMonth()+1,2);break;case"M":d+=c("M",e.getMonth(),a,s);break;case"y":d+=l("y")?e.getFullYear():(e.getYear()%100<10?"0":"")+e.getYear()%100;break;case"@":d+=e.getTime();break;case"!":d+=1e4*e.getTime()+this._ticksTo1970;break;case"'":l("'")?d+="'":h=!0;break;default:d+=t.charAt(i)}return d},_possibleChars:function(t){var e,n="",i=!1,r=function(n){var i=e+1<t.length&&t.charAt(e+1)===n;return i&&e++,i};for(e=0;e<t.length;e++)if(i)"'"!==t.charAt(e)||r("'")?n+=t.charAt(e):i=!1;else switch(t.charAt(e)){case"d":case"m":case"y":case"@":n+="0123456789";break;case"D":case"M":return null;case"'":r("'")?n+="'":i=!0;break;default:n+=t.charAt(e)}return n},_get:function(t,e){return void 0!==t.settings[e]?t.settings[e]:this._defaults[e]},_setDateFromField:function(t,e){if(t.input.val()!==t.lastVal){var n=this._get(t,"dateFormat"),i=t.lastVal=t.input?t.input.val():null,r=this._getDefaultDate(t),o=r,a=this._getFormatConfig(t);try{o=this.parseDate(n,i,a)||r}catch(s){i=e?"":i}t.selectedDay=o.getDate(),t.drawMonth=t.selectedMonth=o.getMonth(),t.drawYear=t.selectedYear=o.getFullYear(),t.currentDay=i?o.getDate():0,t.currentMonth=i?o.getMonth():0,t.currentYear=i?o.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new Date))},_determineDate:function(e,n,i){var r=function(t){var e=new Date;return e.setDate(e.getDate()+t),e},o=function(n){try{return t.datepicker.parseDate(t.datepicker._get(e,"dateFormat"),n,t.datepicker._getFormatConfig(e))}catch(i){}for(var r=(n.toLowerCase().match(/^c/)?t.datepicker._getDate(e):null)||new Date,o=r.getFullYear(),a=r.getMonth(),s=r.getDate(),l=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,u=l.exec(n);u;){switch(u[2]||"d"){case"d":case"D":s+=parseInt(u[1],10);break;case"w":case"W":s+=7*parseInt(u[1],10);break;case"m":case"M":a+=parseInt(u[1],10),s=Math.min(s,t.datepicker._getDaysInMonth(o,a));break;case"y":case"Y":o+=parseInt(u[1],10),s=Math.min(s,t.datepicker._getDaysInMonth(o,a))}u=l.exec(n)}return new Date(o,a,s)},a=null==n||""===n?i:"string"==typeof n?o(n):"number"==typeof n?isNaN(n)?i:r(n):new Date(n.getTime());return a=a&&"Invalid Date"===a.toString()?i:a,a&&(a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0)),this._daylightSavingAdjust(a)},_daylightSavingAdjust:function(t){return t?(t.setHours(t.getHours()>12?t.getHours()+2:0),t):null},_setDate:function(t,e,n){var i=!e,r=t.selectedMonth,o=t.selectedYear,a=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=a.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=a.getMonth(),t.drawYear=t.selectedYear=t.currentYear=a.getFullYear(),r===t.selectedMonth&&o===t.selectedYear||n||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(i?"":this._formatDate(t))},_getDate:function(t){var e=!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return e},_attachHandlers:function(e){var n=this._get(e,"stepMonths"),i="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){t.datepicker._adjustDate(i,-n,"M")},next:function(){t.datepicker._adjustDate(i,+n,"M")},hide:function(){t.datepicker._hideDatepicker()},today:function(){t.datepicker._gotoToday(i)},selectDay:function(){return t.datepicker._selectDay(i,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return t.datepicker._selectMonthYear(i,this,"M"),!1},selectYear:function(){return t.datepicker._selectMonthYear(i,this,"Y"),!1}};t(this).bind(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,n,i,r,o,a,s,l,u,c,d,h,p,f,g,m,v,y,b,w,x,k,C,_,D,T,S,A,F,E,$,N,I,O,M,L,j,R,P,H=new Date,q=this._daylightSavingAdjust(new Date(H.getFullYear(),H.getMonth(),H.getDate())),z=this._get(t,"isRTL"),B=this._get(t,"showButtonPanel"),W=this._get(t,"hideIfNoPrevNext"),K=this._get(t,"navigationAsDateFormat"),U=this._getNumberOfMonths(t),Y=this._get(t,"showCurrentAtPos"),V=this._get(t,"stepMonths"),Z=1!==U[0]||1!==U[1],Q=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),X=this._getMinMaxDate(t,"min"),G=this._getMinMaxDate(t,"max"),J=t.drawMonth-Y,te=t.drawYear;if(0>J&&(J+=12,te--),G)for(e=this._daylightSavingAdjust(new Date(G.getFullYear(),G.getMonth()-U[0]*U[1]+1,G.getDate())),e=X&&X>e?X:e;this._daylightSavingAdjust(new Date(te,J,1))>e;)J--,0>J&&(J=11,te--);for(t.drawMonth=J,t.drawYear=te,n=this._get(t,"prevText"),n=K?this.formatDate(n,this._daylightSavingAdjust(new Date(te,J-V,1)),this._getFormatConfig(t)):n,i=this._canAdjustMonth(t,-1,te,J)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(z?"e":"w")+"'>"+n+"</span></a>":W?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(z?"e":"w")+"'>"+n+"</span></a>",r=this._get(t,"nextText"),r=K?this.formatDate(r,this._daylightSavingAdjust(new Date(te,J+V,1)),this._getFormatConfig(t)):r,o=this._canAdjustMonth(t,1,te,J)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+r+"'><span class='ui-icon ui-icon-circle-triangle-"+(z?"w":"e")+"'>"+r+"</span></a>":W?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+r+"'><span class='ui-icon ui-icon-circle-triangle-"+(z?"w":"e")+"'>"+r+"</span></a>",a=this._get(t,"currentText"),s=this._get(t,"gotoCurrent")&&t.currentDay?Q:q,a=K?this.formatDate(a,s,this._getFormatConfig(t)):a,l=t.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(t,"closeText")+"</button>",u=B?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(z?l:"")+(this._isInRange(t,s)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+a+"</button>":"")+(z?"":l)+"</div>":"",c=parseInt(this._get(t,"firstDay"),10),c=isNaN(c)?0:c,d=this._get(t,"showWeek"),h=this._get(t,"dayNames"),p=this._get(t,"dayNamesMin"),f=this._get(t,"monthNames"),g=this._get(t,"monthNamesShort"),m=this._get(t,"beforeShowDay"),v=this._get(t,"showOtherMonths"),y=this._get(t,"selectOtherMonths"),b=this._getDefaultDate(t),w="",k=0;k<U[0];k++){for(C="",this.maxRows=4,_=0;_<U[1];_++){if(D=this._daylightSavingAdjust(new Date(te,J,t.selectedDay)),T=" ui-corner-all",S="",Z){if(S+="<div class='ui-datepicker-group",U[1]>1)switch(_){case 0:S+=" ui-datepicker-group-first",T=" ui-corner-"+(z?"right":"left");break;case U[1]-1:S+=" ui-datepicker-group-last",T=" ui-corner-"+(z?"left":"right");break;default:S+=" ui-datepicker-group-middle",T=""}S+="'>"}for(S+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+T+"'>"+(/all|left/.test(T)&&0===k?z?o:i:"")+(/all|right/.test(T)&&0===k?z?i:o:"")+this._generateMonthYearHeader(t,J,te,X,G,k>0||_>0,f,g)+"</div><table class='ui-datepicker-calendar'><thead><tr>",A=d?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",x=0;7>x;x++)F=(x+c)%7,A+="<th scope='col'"+((x+c+6)%7>=5?" class='ui-datepicker-week-end'":"")+"><span title='"+h[F]+"'>"+p[F]+"</span></th>";for(S+=A+"</tr></thead><tbody>",E=this._getDaysInMonth(te,J),te===t.selectedYear&&J===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,E)),$=(this._getFirstDayOfMonth(te,J)-c+7)%7,N=Math.ceil(($+E)/7),I=Z&&this.maxRows>N?this.maxRows:N,this.maxRows=I,O=this._daylightSavingAdjust(new Date(te,J,1-$)),M=0;I>M;M++){for(S+="<tr>",L=d?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(O)+"</td>":"",x=0;7>x;x++)j=m?m.apply(t.input?t.input[0]:null,[O]):[!0,""],R=O.getMonth()!==J,P=R&&!y||!j[0]||X&&X>O||G&&O>G,L+="<td class='"+((x+c+6)%7>=5?" ui-datepicker-week-end":"")+(R?" ui-datepicker-other-month":"")+(O.getTime()===D.getTime()&&J===t.selectedMonth&&t._keyEvent||b.getTime()===O.getTime()&&b.getTime()===D.getTime()?" "+this._dayOverClass:"")+(P?" "+this._unselectableClass+" ui-state-disabled":"")+(R&&!v?"":" "+j[1]+(O.getTime()===Q.getTime()?" "+this._currentClass:"")+(O.getTime()===q.getTime()?" ui-datepicker-today":""))+"'"+(R&&!v||!j[2]?"":" title='"+j[2].replace(/'/g,"'")+"'")+(P?"":" data-handler='selectDay' data-event='click' data-month='"+O.getMonth()+"' data-year='"+O.getFullYear()+"'")+">"+(R&&!v?" ":P?"<span class='ui-state-default'>"+O.getDate()+"</span>":"<a class='ui-state-default"+(O.getTime()===q.getTime()?" ui-state-highlight":"")+(O.getTime()===Q.getTime()?" ui-state-active":"")+(R?" ui-priority-secondary":"")+"' href='#'>"+O.getDate()+"</a>")+"</td>",O.setDate(O.getDate()+1),O=this._daylightSavingAdjust(O);S+=L+"</tr>"}J++,J>11&&(J=0,te++),S+="</tbody></table>"+(Z?"</div>"+(U[0]>0&&_===U[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),C+=S}w+=C}return w+=u,t._keyEvent=!1,w},_generateMonthYearHeader:function(t,e,n,i,r,o,a,s){var l,u,c,d,h,p,f,g,m=this._get(t,"changeMonth"),v=this._get(t,"changeYear"),y=this._get(t,"showMonthAfterYear"),b="<div class='ui-datepicker-title'>",w="";if(o||!m)w+="<span class='ui-datepicker-month'>"+a[e]+"</span>";else{for(l=i&&i.getFullYear()===n,u=r&&r.getFullYear()===n,w+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",c=0;12>c;c++)(!l||c>=i.getMonth())&&(!u||c<=r.getMonth())&&(w+="<option value='"+c+"'"+(c===e?" selected='selected'":"")+">"+s[c]+"</option>");w+="</select>"}if(y||(b+=w+(!o&&m&&v?"":" ")),!t.yearshtml)if(t.yearshtml="",o||!v)b+="<span class='ui-datepicker-year'>"+n+"</span>";else{for(d=this._get(t,"yearRange").split(":"),h=(new Date).getFullYear(),p=function(t){var e=t.match(/c[+\-].*/)?n+parseInt(t.substring(1),10):t.match(/[+\-].*/)?h+parseInt(t,10):parseInt(t,10);return isNaN(e)?h:e},f=p(d[0]),g=Math.max(f,p(d[1]||"")),f=i?Math.max(f,i.getFullYear()):f,g=r?Math.min(g,r.getFullYear()):g,t.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";g>=f;f++)t.yearshtml+="<option value='"+f+"'"+(f===n?" selected='selected'":"")+">"+f+"</option>";
|
||
t.yearshtml+="</select>",b+=t.yearshtml,t.yearshtml=null}return b+=this._get(t,"yearSuffix"),y&&(b+=(!o&&m&&v?"":" ")+w),b+="</div>"},_adjustInstDate:function(t,e,n){var i=t.drawYear+("Y"===n?e:0),r=t.drawMonth+("M"===n?e:0),o=Math.min(t.selectedDay,this._getDaysInMonth(i,r))+("D"===n?e:0),a=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(i,r,o)));t.selectedDay=a.getDate(),t.drawMonth=t.selectedMonth=a.getMonth(),t.drawYear=t.selectedYear=a.getFullYear(),("M"===n||"Y"===n)&&this._notifyChange(t)},_restrictMinMax:function(t,e){var n=this._getMinMaxDate(t,"min"),i=this._getMinMaxDate(t,"max"),r=n&&n>e?n:e;return i&&r>i?i:r},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){var e=this._get(t,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,n,i){var r=this._getNumberOfMonths(t),o=this._daylightSavingAdjust(new Date(n,i+(0>e?e:r[0]*r[1]),1));return 0>e&&o.setDate(this._getDaysInMonth(o.getFullYear(),o.getMonth())),this._isInRange(t,o)},_isInRange:function(t,e){var n,i,r=this._getMinMaxDate(t,"min"),o=this._getMinMaxDate(t,"max"),a=null,s=null,l=this._get(t,"yearRange");return l&&(n=l.split(":"),i=(new Date).getFullYear(),a=parseInt(n[0],10),s=parseInt(n[1],10),n[0].match(/[+\-].*/)&&(a+=i),n[1].match(/[+\-].*/)&&(s+=i)),(!r||e.getTime()>=r.getTime())&&(!o||e.getTime()<=o.getTime())&&(!a||e.getFullYear()>=a)&&(!s||e.getFullYear()<=s)},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),{shortYearCutoff:e,dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,n,i){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);var r=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(i,n,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),r,this._getFormatConfig(t))}}),t.fn.datepicker=function(e){if(!this.length)return this;t.datepicker.initialized||(t(document).mousedown(t.datepicker._checkExternalClick),t.datepicker.initialized=!0),0===t("#"+t.datepicker._mainDivId).length&&t("body").append(t.datepicker.dpDiv);var n=Array.prototype.slice.call(arguments,1);return"string"!=typeof e||"isDisabled"!==e&&"getDate"!==e&&"widget"!==e?"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(n)):this.each(function(){"string"==typeof e?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this].concat(n)):t.datepicker._attachDatepicker(this,e)}):t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(n))},t.datepicker=new n,t.datepicker.initialized=!1,t.datepicker.uuid=(new Date).getTime(),t.datepicker.version="1.11.4",t.datepicker}),function(t,e){"function"==typeof define&&define.amd?define(e):"object"==typeof exports?module.exports=e():t.NProgress=e()}(this,function(){function t(t,e,n){return e>t?e:t>n?n:t}function e(t){return 100*(-1+t)}function n(t,n,i){var r;return r="translate3d"===u.positionUsing?{transform:"translate3d("+e(t)+"%,0,0)"}:"translate"===u.positionUsing?{transform:"translate("+e(t)+"%,0)"}:{"margin-left":e(t)+"%"},r.transition="all "+n+"ms "+i,r}function i(t,e){var n="string"==typeof t?t:a(t);return n.indexOf(" "+e+" ")>=0}function r(t,e){var n=a(t),r=n+e;i(n,e)||(t.className=r.substring(1))}function o(t,e){var n,r=a(t);i(t,e)&&(n=r.replace(" "+e+" "," "),t.className=n.substring(1,n.length-1))}function a(t){return(" "+(t.className||"")+" ").replace(/\s+/gi," ")}function s(t){t&&t.parentNode&&t.parentNode.removeChild(t)}var l={};l.version="0.1.6";var u=l.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'};l.configure=function(t){var e,n;for(e in t)n=t[e],void 0!==n&&t.hasOwnProperty(e)&&(u[e]=n);return this},l.status=null,l.set=function(e){var i=l.isStarted();e=t(e,u.minimum,1),l.status=1===e?null:e;var r=l.render(!i),o=r.querySelector(u.barSelector),a=u.speed,s=u.easing;return r.offsetWidth,c(function(t){""===u.positionUsing&&(u.positionUsing=l.getPositioningCSS()),d(o,n(e,a,s)),1===e?(d(r,{transition:"none",opacity:1}),r.offsetWidth,setTimeout(function(){d(r,{transition:"all "+a+"ms linear",opacity:0}),setTimeout(function(){l.remove(),t()},a)},a)):setTimeout(t,a)}),this},l.isStarted=function(){return"number"==typeof l.status},l.start=function(){l.status||l.set(0);var t=function(){setTimeout(function(){l.status&&(l.trickle(),t())},u.trickleSpeed)};return u.trickle&&t(),this},l.done=function(t){return t||l.status?l.inc(.3+.5*Math.random()).set(1):this},l.inc=function(e){var n=l.status;return n?("number"!=typeof e&&(e=(1-n)*t(Math.random()*n,.1,.95)),n=t(n+e,0,.994),l.set(n)):l.start()},l.trickle=function(){return l.inc(Math.random()*u.trickleRate)},function(){var t=0,e=0;l.promise=function(n){return n&&"resolved"!=n.state()?(0==e&&l.start(),t++,e++,n.always(function(){e--,0==e?(t=0,l.done()):l.set((t-e)/t)}),this):this}}(),l.render=function(t){if(l.isRendered())return document.getElementById("nprogress");r(document.documentElement,"nprogress-busy");var n=document.createElement("div");n.id="nprogress",n.innerHTML=u.template;var i,o=n.querySelector(u.barSelector),a=t?"-100":e(l.status||0),c=document.querySelector(u.parent);return d(o,{transition:"all 0 linear",transform:"translate3d("+a+"%,0,0)"}),u.showSpinner||(i=n.querySelector(u.spinnerSelector),i&&s(i)),c!=document.body&&r(c,"nprogress-custom-parent"),c.appendChild(n),n},l.remove=function(){o(document.documentElement,"nprogress-busy"),o(document.querySelector(u.parent),"nprogress-custom-parent");var t=document.getElementById("nprogress");t&&s(t)},l.isRendered=function(){return!!document.getElementById("nprogress")},l.getPositioningCSS=function(){var t=document.body.style,e="WebkitTransform"in t?"Webkit":"MozTransform"in t?"Moz":"msTransform"in t?"ms":"OTransform"in t?"O":"";return e+"Perspective"in t?"translate3d":e+"Transform"in t?"translate":"margin"};var c=function(){function t(){var n=e.shift();n&&n(t)}var e=[];return function(n){e.push(n),1==e.length&&t()}}(),d=function(){function t(t){return t.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(t,e){return e.toUpperCase()})}function e(t){var e=document.body.style;if(t in e)return t;for(var n,i=r.length,o=t.charAt(0).toUpperCase()+t.slice(1);i--;)if(n=r[i]+o,n in e)return n;return t}function n(n){return n=t(n),o[n]||(o[n]=e(n))}function i(t,e,i){e=n(e),t.style[e]=i}var r=["Webkit","O","Moz","ms"],o={};return function(t,e){var n,r,o=arguments;if(2==o.length)for(n in e)r=e[n],void 0!==r&&e.hasOwnProperty(n)&&i(t,n,r);else i(t,o[1],o[2])}}();return l}),jQuery(function(){jQuery(document).on("page:fetch",function(){NProgress.start()}),jQuery(document).on("page:receive",function(){NProgress.set(.7)}),jQuery(document).on("page:change",function(){NProgress.done()}),jQuery(document).on("page:restore",function(){NProgress.remove()})}),function(){NProgress.configure({showSpinner:!1}),this.flash_notice=function(t){return $("#flash").find("div").removeClass("bg-danger"),$("#flash").find("div").addClass("bg-success"),$("#flash").find("div").html(t),$("#flash").show()},this.flash_alert=function(t){return $("#flash").find("div").removeClass("bg-success"),$("#flash").find("div").addClass("bg-danger"),$("#flash").find("div").html(t),$("#flash").show()},$(document).on("page:change",function(){var t,e;return t=new Date,e=new Date(t),e.setDate(t.getDate()+1),$(".datepicker").datepicker({dateFormat:"yy-mm-dd",maxDate:e}),$(".js-combobox").length?$(".js-combobox").select2({width:"100%",selectOnBlur:!0,dropdownAutoWidth:self===top?!0:!1}):void 0})}.call(this),function(){$(document).on("page:change",function(){return $(".selectize").selectize({allowEmptyOption:!0}),$(".js-datepicker").datepicker({showAnim:"",autoclose:!0,dateFormat:"dd.mm.yy",changeMonth:!0,changeYear:!0}),$("form").each(function(){return $(this).validate()})})}.call(this),function(){}.call(this); |