promise comparisons

JavaScript performance comparison

Revision 4 of this test case created by Marcus Stade

Info

This is a comparison of different promise libraries, performing the most basic tasks of creating a promise, adding a then handler and then resolving the promise.

Preparation code

<script> // Q
(function(e){if(typeof bootstrap==="function"){bootstrap("promise",e)}else if(typeof exports==="object"){module.exports=e()}else if(typeof define==="function"){define(e)}else if(typeof ses!=="undefined"){if(!ses.ok()){return}else{ses.makeQ=e}}else{Q=e()}})(function(){"use strict";function g(e){return m(e)==="[object StopIteration]"||e instanceof y}function w(e,t){if(t.stack&&typeof e==="object"&&e!==null&&e.stack&&e.stack.indexOf(b)===-1){e.stack=E(e.stack)+"\n"+b+"\n"+E(t.stack)}}function E(e){var t=e.split("\n");var n=[];for(var r=0;r<t.length;++r){var i=t[r];if(!x(i)&&!S(i)){n.push(i)}}return n.join("\n")}function S(e){return e.indexOf("(module.js:")!==-1||e.indexOf("(node.js:")!==-1}function x(n){var r=/at .+ \((.*):(\d+):\d+\)/.exec(n);if(!r){return false}var i=r[1];var s=r[2];return i===t&&s>=e&&s<=gt}function T(){if(Error.captureStackTrace){var e,n;var r=Error.prepareStackTrace;Error.prepareStackTrace=function(t,r){e=r[1].getFileName();n=r[1].getLineNumber()};(new Error).stack;Error.prepareStackTrace=r;t=e;return n}}function N(e,t,n){return function(){if(typeof console!=="undefined"&&typeof console.warn==="function"){console.warn(t+" is deprecated, use "+n+" instead.",(new Error("")).stack)}return e.apply(e,arguments)}}function C(e){return U(e)}function k(){function u(r){if(!e){return}n=U(r);c(e,function(e,t){i(function(){n.promiseDispatch.apply(n,t)})},void 0);e=void 0;t=void 0}var e=[],t=[],n;var s=d(k.prototype);var o=d(A.prototype);o.promiseDispatch=function(r,s,o){var u=l(arguments);if(e){e.push(u);if(s==="when"&&o[1]){t.push(o[1])}}else{i(function(){n.promiseDispatch.apply(n,u)})}};o.valueOf=function(){if(e){return o}n=O(n);return n};if(Error.captureStackTrace){Error.captureStackTrace(o,k);o.stack=o.stack.substring(o.stack.indexOf("\n")+1)}r(o);s.promise=o;s.resolve=u;s.fulfill=function(e){u(R(e))};s.reject=function(e){u(q(e))};s.notify=function(n){if(e){c(t,function(e,t){i(function(){t(n)})},void 0)}};return s}function L(e){var t=k();tt(e,t.resolve,t.reject,t.notify).fail(t.reject);return t.promise}function A(e,t,n,i){if(t===void 0){t=function(e){return q(new Error("Promise does not support operation: "+e))}}var s=d(A.prototype);s.promiseDispatch=function(n,r,i){var o;try{if(e[r]){o=e[r].apply(s,i)}else{o=t.call(s,r,i)}}catch(u){o=q(u)}if(n){n(o)}};if(n){s.valueOf=n}if(i){s.exception=i}r(s);return s}function O(e){if(M(e)){return e.valueOf()}return e}function M(e){return e&&typeof e.promiseDispatch==="function"}function _(e){return e&&typeof e.then==="function"}function D(e){return!P(e)&&!H(e)}function P(e){return!_(O(e))}function H(e){e=O(e);return M(e)&&"exception"in e}function I(){if(!F&&typeof window!=="undefined"&&!window.Touch&&window.console){console.log("Should be empty:",j)}F=true}function q(e){var t=A({when:function(t){if(t){var n=h(B,this);if(n!==-1){j.splice(n,1);B.splice(n,1)}}return t?t(e):q(e)}},function(){return q(e)},function n(){return this},e);I();B.push(t);j.push(e);return t}function R(e){return A({when:function(){return e},get:function(t){return e[t]},set:function(t,n){e[t]=n},"delete":function(t){delete e[t];return e},post:function(t,n){if(t==null){return e.apply(void 0,n)}else{return e[t].apply(e,n)}},apply:function(t){return e.apply(void 0,t)},keys:function(){return v(e)}},void 0,function t(){return e})}function U(e){if(M(e)){return e}e=O(e);if(_(e)){return z(e)}else{return R(e)}}function z(e){var t=k();e.then(t.resolve,t.reject,t.notify);return t.promise}function W(e){return A({isDef:function(){}},function(n,r){return Q(e,n,r)},function(){return O(e)})}function X(e,t,n,r){function u(e){try{return typeof t==="function"?t(e):e}catch(n){return q(n)}}function a(e){if(typeof n==="function"){w(e,l);try{return n(e)}catch(t){return q(t)}}return q(e)}function f(e){return typeof r==="function"?r(e):e}var s=k();var o=false;var l=U(e);i(function(){l.promiseDispatch(function(e){if(o){return}o=true;s.resolve(u(e))},"when",[function(e){if(o){return}o=true;s.resolve(a(e))}])});l.promiseDispatch(void 0,"when",[void 0,function(e){var t;var n=false;try{t=f(e)}catch(r){n=true;if(C.onerror){C.onerror(r)}else{throw r}}if(!n){s.notify(t)}}]);return s.promise}function V(e,t,n){return X(e,function(e){return rt(e).then(function(e){return t.apply(void 0,e)},n)},n)}function $(e){return function(){function t(e,t){var s;try{s=n[e](t)}catch(o){if(g(o)){return o.value}else{return q(o)}}return X(s,r,i)}var n=e.apply(this,arguments);var r=t.bind(t,"send");var i=t.bind(t,"throw");return r()}}function J(e){throw new y(e)}function K(e){return function(){return V([this,rt(arguments)],function(t,n){return e.apply(t,n)})}}function Q(e,t,n){var r=k();i(function(){U(e).promiseDispatch(r.resolve,t,n)});return r.promise}function G(e){return function(t){var n=l(arguments,1);return Q(t,e,n)}}function Z(e,t){var n=l(arguments,2);return Y(e,t,n)}function tt(e){var t=l(arguments,1);return et(e,t)}function nt(e){var t=l(arguments,1);return function(){var r=t.concat(l(arguments));return et(e,r)}}function rt(e){return X(e,function(e){var t=e.length;if(t===0){return U(e)}var n=k();c(e,function(r,i,s){if(P(i)){e[s]=O(i);if(--t===0){n.resolve(e)}}else{X(i,function(r){e[s]=r;if(--t===0){n.resolve(e)}}).fail(n.reject)}},void 0);return n.promise})}function it(e){return X(e,function(e){return X(rt(p(e,function(e){return X(e,n,n)})),function(){return p(e,U)})})}function st(e,t){return X(e,void 0,t)}function ot(e,t){return X(e,void 0,void 0,t)}function ut(e,t){return X(e,function(e){return X(t(),function(){return e})},function(e){return X(t(),function(){return q(e)})})}function at(e,t,n,r){var s=function(t){i(function(){w(t,e);if(C.onerror){C.onerror(t)}else{throw t}})};var o=t||n||r?X(e,t,n,r):e;if(typeof process==="object"&&process&&process.domain){s=process.domain.bind(s)}st(o,s)}function ft(e,t){var n=k();var r=setTimeout(function(){n.reject(new Error("Timed out after "+t+" ms"))},t);X(e,function(e){clearTimeout(r);n.resolve(e)},function(e){clearTimeout(r);n.reject(e)});return n.promise}function lt(e,t){if(t===void 0){t=e;e=void 0}var n=k();setTimeout(function(){n.resolve(e)},t);return n.promise}function ct(e,t){var n=l(t);var r=k();n.push(r.makeNodeResolver());et(e,n).fail(r.reject);return r.promise}function ht(e){var t=l(arguments,1);var n=k();t.push(n.makeNodeResolver());et(e,t).fail(n.reject);return n.promise}function pt(e){var t=l(arguments,1);return function(){var n=t.concat(l(arguments));var r=k();n.push(r.makeNodeResolver());et(e,n).fail(r.reject);return r.promise}}function dt(e,t,n){var r=l(n);var i=k();r.push(i.makeNodeResolver());Y(e,t,r).fail(i.reject);return i.promise}function vt(e,t){var n=l(arguments,2);var r=k();n.push(r.makeNodeResolver());Y(e,t,n).fail(r.reject);return r.promise}function mt(e,t){if(t){e.then(function(e){i(function(){t(null,e)})},function(e){i(function(){t(e)})})}else{return e}}var e=T();var t;var n=function(){};var r=Object.freeze||n;if(typeof cajaVM!=="undefined"){r=cajaVM.def}var i;if(typeof process!=="undefined"){i=process.nextTick}else if(typeof setImmediate==="function"){i=setImmediate}else if(typeof MessageChannel!=="undefined"){var s=new MessageChannel;var o={},u=o;s.port1.onmessage=function(){o=o.next;var e=o.task;delete o.task;e()};i=function(e){u=u.next={task:e};s.port2.postMessage(0)}}else{i=function(e){setTimeout(e,0)}}var a;if(Function.prototype.bind){var f=Function.prototype.bind;a=f.bind(f.call)}else{a=function(e){return function(){return e.call.apply(e,arguments)}}}var l=a(Array.prototype.slice);var c=a(Array.prototype.reduce||function(e,t){var n=0,r=this.length;if(arguments.length===1){do{if(n in this){t=this[n++];break}if(++n>=r){throw new TypeError}}while(1)}for(;n<r;n++){if(n in this){t=e(t,this[n],n)}}return t});var h=a(Array.prototype.indexOf||function(e){for(var t=0;t<this.length;t++){if(this[t]===e){return t}}return-1});var p=a(Array.prototype.map||function(e,t){var n=this;var r=[];c(n,function(i,s,o){r.push(e.call(t,s,o,n))},void 0);return r});var d=Object.create||function(e){function t(){}t.prototype=e;return new t};var v=Object.keys||function(e){var t=[];for(var n in e){t.push(n)}return t};var m=Object.prototype.toString;var y;if(typeof ReturnValue!=="undefined"){y=ReturnValue}else{y=function(e){this.value=e}}var b="From previous event:";C.nextTick=i;C.defer=k;k.prototype.makeNodeResolver=function(){var e=this;return function(t,n){if(t){e.reject(t)}else if(arguments.length>2){e.resolve(l(arguments,1))}else{e.resolve(n)}}};C.promise=L;C.makePromise=A;A.prototype.then=function(e,t,n){return X(this,e,t,n)};A.prototype.thenResolve=function(e){return X(this,function(){return e})};c(["isFulfilled","isRejected","isPending","dispatch","when","spread","get","put","set","del","delete","post","send","invoke","keys","fapply","fcall","fbind","all","allResolved","timeout","delay","catch","finally","fail","fin","progress","done","nfcall","nfapply","nfbind","ncall","napply","nbind","npost","nsend","ninvoke","nodeify"],function(e,t){A.prototype[t]=function(){return C[t].apply(C,[this].concat(l(arguments)))}},void 0);A.prototype.toSource=function(){return this.toString()};A.prototype.toString=function(){return"[object Promise]"};r(A.prototype);C.nearer=O;C.isPromise=M;C.isPromiseAlike=_;C.isPending=D;C.isFulfilled=P;C.isRejected=H;var B=[];var j=[];var F;C.reject=q;C.fulfill=R;C.resolve=U;C.master=W;C.when=X;C.spread=V;C.async=$;C["return"]=J;C.promised=K;C.dispatch=Q;C.dispatcher=G;C.get=G("get");C.set=G("set");C["delete"]=C.del=G("delete");var Y=C.post=G("post");C.send=Z;C.invoke=Z;var et=C.fapply=G("apply");C["try"]=tt;C.fcall=tt;C.fbind=nt;C.keys=G("keys");C.all=rt;C.allResolved=it;C["catch"]=C.fail=st;C.progress=ot;C["finally"]=C.fin=ut;C.done=at;C.timeout=ft;C.delay=lt;C.nfapply=ct;C.nfcall=ht;C.nfbind=pt;C.npost=dt;C.nsend=vt;C.ninvoke=C.nsend;C.nodeify=mt;var gt=T();return C})
</script>
<script> // when
(function(e){"use strict";e(function(){function r(e,t,n,r){return i(e).then(t,n,r)}function i(e){var t,n;if(e instanceof o){t=e}else{if(l(e)){n=f();e.then(function(e){n.resolve(e)},function(e){n.reject(e)},function(e){n.progress(e)});t=n.promise}else{t=u(e)}}return t}function s(e){return r(e,a)}function o(e){this.then=e}function u(e){var t=new o(function(t){try{return i(t?t(e):e)}catch(n){return a(n)}});return t}function a(e){var t=new o(function(t,n){try{return n?i(n(e)):a(e)}catch(r){return a(r)}});return t}function f(){function h(e,t,n){return u(e,t,n)}function p(e){return c(e)}function d(e){return c(a(e))}function v(e){return l(e)}var e,t,r,s,u,l,c;t=new o(h);e={then:h,resolve:p,reject:d,progress:v,promise:t,resolver:{resolve:p,reject:d,progress:v}};r=[];s=[];u=function(e,t,n){var i,o;i=f();o=typeof n==="function"?function(e){try{i.progress(n(e))}catch(t){i.progress(t)}}:function(e){i.progress(e)};r.push(function(n){n.then(e,t).then(i.resolve,i.reject,o)});s.push(o);return i.promise};l=function(e){y(s,e);return e};c=function(e){e=i(e);u=e.then;c=i;l=w;y(r,e);s=r=n;return e};return e}function l(e){return e&&typeof e.then==="function"}function c(e,t,n,i,s){b(2,arguments);return r(e,function(e){function g(e){p(e)}function y(e){h(e)}var o,u,a,l,c,h,p,d,v,m;v=e.length>>>0;o=Math.max(0,Math.min(t,v));a=[];u=v-o+1;l=[];c=f();if(!o){c.resolve(a)}else{d=c.progress;p=function(e){l.push(e);if(!--u){h=p=w;c.reject(l)}};h=function(e){a.push(e);if(!--o){h=p=w;c.resolve(a)}};for(m=0;m<v;++m){if(m in e){r(e[m],y,g,d)}}}return c.then(n,i,s)})}function h(e,t,n,r){function i(e){return t?t(e[0]):e[0]}return c(e,1,i,n,r)}function p(e,t,n,r){b(1,arguments);return v(e,E).then(t,n,r)}function d(){return v(arguments,E)}function v(e,t){return r(e,function(e){var n,i,s,o,u,a;s=i=e.length>>>0;n=[];a=f();if(!s){a.resolve(n)}else{o=function(i,o){r(i,t).then(function(e){n[o]=e;if(!--s){a.resolve(n)}},a.reject)};for(u=0;u<i;u++){if(u in e){o(e[u],u)}else{--s}}}return a.promise})}function m(n,i){var s=t.call(arguments,1);return r(n,function(t){var n;n=t.length;s[0]=function(e,t,s){return r(e,function(e){return r(t,function(t){return i(e,t,s,n)})})};return e.apply(t,s)})}function g(e,t,n){var i=arguments.length>2;return r(e,function(e){e=i?n:e;t.resolve(e);return e},function(e){t.reject(e);return a(e)},t.progress)}function y(e,t){var n,r=0;while(n=e[r++]){n(t)}}function b(e,t){var n,r=t.length;while(r>e){n=t[--r];if(n!=null&&typeof n!="function"){throw new Error("arg "+r+" must be a function")}}}function w(){}function E(e){return e}var e,t,n;r.defer=f;r.resolve=i;r.reject=s;r.join=d;r.all=p;r.map=v;r.reduce=m;r.any=h;r.some=c;r.chain=g;r.isPromise=l;o.prototype={always:function(e,t){return this.then(e,e,t)},otherwise:function(e){return this.then(n,e)},yield:function(e){return this.then(function(){return e})},spread:function(e){return this.then(function(t){return p(t,function(t){return e.apply(n,t)})})}};t=[].slice;e=[].reduce||function(e){var t,n,r,i,s;s=0;t=Object(this);i=t.length>>>0;n=arguments;if(n.length<=1){for(;;){if(s in t){r=t[s++];break}if(++s>=i){throw new TypeError}}}else{r=n[1]}for(;s<i;++s){if(s in t){r=e(r,t[s],s,t)}}return r};return r})})(typeof define=="function"&&define.amd?define:function(e){typeof exports==="object"?module.exports=e():this.when=e()})
</script>
<script> // jQuery
(function(e,t){"use strict";function n(e){var t=e.length,n=ut.type(e);return ut.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}function r(e){var t=Et[e]={};return ut.each(e.match(ft)||[],function(e,n){t[n]=!0}),t}function i(e,n,r,i){if(ut.acceptData(e)){var s,o,u=ut.expando,a="string"==typeof n,f=e.nodeType,l=f?ut.cache:e,c=f?e[u]:e[u]&&u;if(c&&l[c]&&(i||l[c].data)||!a||r!==t)return c||(f?e[u]=c=Y.pop()||ut.guid++:c=u),l[c]||(l[c]={},f||(l[c].toJSON=ut.noop)),("object"==typeof n||"function"==typeof n)&&(i?l[c]=ut.extend(l[c],n):l[c].data=ut.extend(l[c].data,n)),s=l[c],i||(s.data||(s.data={}),s=s.data),r!==t&&(s[ut.camelCase(n)]=r),a?(o=s[n],null==o&&(o=s[ut.camelCase(n)])):o=s,o}}function s(e,t,n){if(ut.acceptData(e)){var r,i,s,o=e.nodeType,a=o?ut.cache:e,f=o?e[ut.expando]:ut.expando;if(a[f]){if(t&&(r=n?a[f]:a[f].data)){ut.isArray(t)?t=t.concat(ut.map(t,ut.camelCase)):t in r?t=[t]:(t=ut.camelCase(t),t=t in r?[t]:t.split(" "));for(i=0,s=t.length;s>i;i++)delete r[t[i]];if(!(n?u:ut.isEmptyObject)(r))return}(n||(delete a[f].data,u(a[f])))&&(o?ut.cleanData([e],!0):ut.support.deleteExpando||a!=a.window?delete a[f]:a[f]=null)}}}function o(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(xt,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:St.test(r)?ut.parseJSON(r):r}catch(s){}ut.data(e,n,r)}else r=t}return r}function u(e){var t;for(t in e)if(("data"!==t||!ut.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function a(){return!0}function f(){return!1}function l(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function c(e,t,n){if(t=t||0,ut.isFunction(t))return ut.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return ut.grep(e,function(e){return e===t===n});if("string"==typeof t){var r=ut.grep(e,function(e){return 1===e.nodeType});if(Rt.test(t))return ut.filter(t,r,!n);t=ut.filter(t,r)}return ut.grep(e,function(e){return ut.inArray(e,t)>=0===n})}function h(e){var t=Wt.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function p(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function d(e){var t=e.getAttributeNode("type");return e.type=(t&&t.specified)+"/"+e.type,e}function v(e){var t=nn.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function m(e,t){for(var n,r=0;null!=(n=e[r]);r++)ut._data(n,"globalEval",!t||ut._data(t[r],"globalEval"))}function g(e,t){if(1===t.nodeType&&ut.hasData(e)){var n,r,i,s=ut._data(e),o=ut._data(t,s),u=s.events;if(u){delete o.handle,o.events={};for(n in u)for(r=0,i=u[n].length;i>r;r++)ut.event.add(t,n,u[n][r])}o.data&&(o.data=ut.extend({},o.data))}}function y(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!ut.support.noCloneEvent&&t[ut.expando]){r=ut._data(t);for(i in r.events)ut.removeEvent(t,i,r.handle);t.removeAttribute(ut.expando)}"script"===n&&t.text!==e.text?(d(t).text=e.text,v(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),ut.support.html5Clone&&e.innerHTML&&!ut.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Zt.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}function b(e,n){var r,i,s=0,o=e.getElementsByTagName!==t?e.getElementsByTagName(n||"*"):e.querySelectorAll!==t?e.querySelectorAll(n||"*"):t;if(!o)for(o=[],r=e.childNodes||e;null!=(i=r[s]);s++)!n||ut.nodeName(i,n)?o.push(i):ut.merge(o,b(i,n));return n===t||n&&ut.nodeName(e,n)?ut.merge([e],o):o}function w(e){Zt.test(e.type)&&(e.defaultChecked=e.checked)}function E(e,t){if(t in e)return t;for(var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=xn.length;i--;)if(t=xn[i]+n,t in e)return t;return r}function S(e,t){return e=t||e,"none"===ut.css(e,"display")||!ut.contains(e.ownerDocument,e)}function x(e,t){for(var n,r=[],i=0,s=e.length;s>i;i++)n=e[i],n.style&&(r[i]=ut._data(n,"olddisplay"),t?(r[i]||"none"!==n.style.display||(n.style.display=""),""===n.style.display&&S(n)&&(r[i]=ut._data(n,"olddisplay",k(n.nodeName)))):r[i]||S(n)||ut._data(n,"olddisplay",ut.css(n,"display")));for(i=0;s>i;i++)n=e[i],n.style&&(t&&"none"!==n.style.display&&""!==n.style.display||(n.style.display=t?r[i]||"":"none"));return e}function T(e,t,n){var r=mn.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function N(e,t,n,r,i){for(var s=n===(r?"border":"content")?4:"width"===t?1:0,o=0;4>s;s+=2)"margin"===n&&(o+=ut.css(e,n+Sn[s],!0,i)),r?("content"===n&&(o-=ut.css(e,"padding"+Sn[s],!0,i)),"margin"!==n&&(o-=ut.css(e,"border"+Sn[s]+"Width",!0,i))):(o+=ut.css(e,"padding"+Sn[s],!0,i),"padding"!==n&&(o+=ut.css(e,"border"+Sn[s]+"Width",!0,i)));return o}function C(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,s=fn(e),o=ut.support.boxSizing&&"border-box"===ut.css(e,"boxSizing",!1,s);if(0>=i||null==i){if(i=an(e,t,s),(0>i||null==i)&&(i=e.style[t]),gn.test(i))return i;r=o&&(ut.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+N(e,t,n||(o?"border":"content"),r,s)+"px"}function k(e){var t=$,n=bn[e];return n||(n=L(e,t),"none"!==n&&n||(ln=(ln||ut("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(ln[0].contentWindow||ln[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=L(e,t),ln.detach()),bn[e]=n),n}function L(e,t){var n=ut(t.createElement(e)).appendTo(t.body),r=ut.css(n[0],"display");return n.remove(),r}function A(e,t,n,r){var i;if(ut.isArray(t))ut.each(t,function(t,i){n||Nn.test(e)?r(e,i):A(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==ut.type(t))r(e,t);else for(i in t)A(e+"["+i+"]",t[i],n,r)}function O(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,s=t.toLowerCase().match(ft)||[];if(ut.isFunction(n))for(;r=s[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function M(e,n,r,i){function s(a){var f;return o[a]=!0,ut.each(e[a]||[],function(e,a){var l=a(n,r,i);return"string"!=typeof l||u||o[l]?u?!(f=l):t:(n.dataTypes.unshift(l),s(l),!1)}),f}var o={},u=e===Un;return s(n.dataTypes[0])||!o["*"]&&s("*")}function _(e,n){var r,i,s=ut.ajaxSettings.flatOptions||{};for(r in n)n[r]!==t&&((s[r]?e:i||(i={}))[r]=n[r]);return i&&ut.extend(!0,e,i),e}function D(e,n,r){var i,s,o,u,a=e.contents,f=e.dataTypes,l=e.responseFields;for(s in l)s in r&&(n[l[s]]=r[s]);for(;"*"===f[0];)f.shift(),i===t&&(i=e.mimeType||n.getResponseHeader("Content-Type"));if(i)for(s in a)if(a[s]&&a[s].test(i)){f.unshift(s);break}if(f[0]in r)o=f[0];else{for(s in r){if(!f[0]||e.converters[s+" "+f[0]]){o=s;break}u||(u=s)}o=o||u}return o?(o!==f[0]&&f.unshift(o),r[o]):t}function P(e,t){var n,r,i,s,o={},u=0,a=e.dataTypes.slice(),f=a[0];if(e.dataFilter&&(t=e.dataFilter(t,e.dataType)),a[1])for(n in e.converters)o[n.toLowerCase()]=e.converters[n];for(;i=a[++u];)if("*"!==i){if("*"!==f&&f!==i){if(n=o[f+" "+i]||o["* "+i],!n)for(r in o)if(s=r.split(" "),s[1]===i&&(n=o[f+" "+s[0]]||o["* "+s[0]])){n===!0?n=o[r]:o[r]!==!0&&(i=s[0],a.splice(u--,0,i));break}if(n!==!0)if(n&&e["throws"])t=n(t);else try{t=n(t)}catch(l){return{state:"parsererror",error:n?l:"No conversion from "+f+" to "+i}}}f=i}return{state:"success",data:t}}function H(){try{return new e.XMLHttpRequest}catch(t){}}function B(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function j(){return setTimeout(function(){Gn=t}),Gn=ut.now()}function F(e,t){ut.each(t,function(t,n){for(var r=(rr[t]||[]).concat(rr["*"]),i=0,s=r.length;s>i;i++)if(r[i].call(e,t,n))return})}function I(e,t,n){var r,i,s=0,o=nr.length,u=ut.Deferred().always(function(){delete a.elem}),a=function(){if(i)return!1;for(var t=Gn||j(),n=Math.max(0,f.startTime+f.duration-t),r=n/f.duration||0,s=1-r,o=0,a=f.tweens.length;a>o;o++)f.tweens[o].run(s);return u.notifyWith(e,[f,s,n]),1>s&&a?n:(u.resolveWith(e,[f]),!1)},f=u.promise({elem:e,props:ut.extend({},t),opts:ut.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Gn||j(),duration:n.duration,tweens:[],createTween:function(t,n){var r=ut.Tween(e,f.opts,t,n,f.opts.specialEasing[t]||f.opts.easing);return f.tweens.push(r),r},stop:function(t){var n=0,r=t?f.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)f.tweens[n].run(1);return t?u.resolveWith(e,[f,t]):u.rejectWith(e,[f,t]),this}}),l=f.props;for(q(l,f.opts.specialEasing);o>s;s++)if(r=nr[s].call(f,e,l,f.opts))return r;return F(f,l),ut.isFunction(f.opts.start)&&f.opts.start.call(e,f),ut.fx.timer(ut.extend(a,{elem:e,anim:f,queue:f.opts.queue})),f.progress(f.opts.progress).done(f.opts.done,f.opts.complete).fail(f.opts.fail).always(f.opts.always)}function q(e,t){var n,r,i,s,o;for(n in e)if(r=ut.camelCase(n),i=t[r],s=e[n],ut.isArray(s)&&(i=s[1],s=e[n]=s[0]),n!==r&&(e[r]=s,delete e[n]),o=ut.cssHooks[r],o&&"expand"in o){s=o.expand(s),delete e[r];for(n in s)n in e||(e[n]=s[n],t[n]=i)}else t[r]=i}function R(e,t,n){var r,i,s,o,u,a,f,l,c,h=this,p=e.style,d={},v=[],m=e.nodeType&&S(e);n.queue||(l=ut._queueHooks(e,"fx"),null==l.unqueued&&(l.unqueued=0,c=l.empty.fire,l.empty.fire=function(){l.unqueued||c()}),l.unqueued++,h.always(function(){h.always(function(){l.unqueued--,ut.queue(e,"fx").length||l.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],"inline"===ut.css(e,"display")&&"none"===ut.css(e,"float")&&(ut.support.inlineBlockNeedsLayout&&"inline"!==k(e.nodeName)?p.zoom=1:p.display="inline-block")),n.overflow&&(p.overflow="hidden",ut.support.shrinkWrapBlocks||h.done(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t)if(s=t[r],Zn.exec(s)){if(delete t[r],a=a||"toggle"===s,s===(m?"hide":"show"))continue;v.push(r)}if(o=v.length){u=ut._data(e,"fxshow")||ut._data(e,"fxshow",{}),"hidden"in u&&(m=u.hidden),a&&(u.hidden=!m),m?ut(e).show():h.done(function(){ut(e).hide()}),h.done(function(){var t;ut._removeData(e,"fxshow");for(t in d)ut.style(e,t,d[t])});for(r=0;o>r;r++)i=v[r],f=h.createTween(i,m?u[i]:0),d[i]=u[i]||ut.style(e,i),i in u||(u[i]=f.start,m&&(f.end=f.start,f.start="width"===i||"height"===i?1:0))}}function U(e,t,n,r,i){return new U.prototype.init(e,t,n,r,i)}function z(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=Sn[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function W(e){return ut.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}var X,V,$=e.document,J=e.location,K=e.jQuery,Q=e.$,G={},Y=[],Z="1.9.0",et=Y.concat,tt=Y.push,nt=Y.slice,rt=Y.indexOf,it=G.toString,st=G.hasOwnProperty,ot=Z.trim,ut=function(e,t){return new ut.fn.init(e,t,X)},at=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ft=/\S+/g,lt=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,ct=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,ht=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,pt=/^[\],:{}\s]*$/,dt=/(?:^|:|,)(?:\s*\[)+/g,vt=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,mt=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,gt=/^-ms-/,yt=/-([\da-z])/gi,bt=function(e,t){return t.toUpperCase()},wt=function(){$.addEventListener?($.removeEventListener("DOMContentLoaded",wt,!1),ut.ready()):"complete"===$.readyState&&($.detachEvent("onreadystatechange",wt),ut.ready())};ut.fn=ut.prototype={jquery:Z,constructor:ut,init:function(e,n,r){var i,s;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:ct.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof ut?n[0]:n,ut.merge(this,ut.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:$,!0)),ht.test(i[1])&&ut.isPlainObject(n))for(i in n)ut.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(s=$.getElementById(i[2]),s&&s.parentNode){if(s.id!==i[2])return r.find(e);this.length=1,this[0]=s}return this.context=$,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):ut.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),ut.makeArray(e,this))},selector:"",length:0,size:function(){return this.length},toArray:function(){return nt.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=ut.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return ut.each(this,e,t)},ready:function(e){return ut.ready.promise().done(e),this},slice:function(){return this.pushStack(nt.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(ut.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:tt,sort:[].sort,splice:[].splice},ut.fn.init.prototype=ut.fn,ut.extend=ut.fn.extend=function(){var e,n,r,i,s,o,u=arguments[0]||{},a=1,f=arguments.length,l=!1;for("boolean"==typeof u&&(l=u,u=arguments[1]||{},a=2),"object"==typeof u||ut.isFunction(u)||(u={}),f===a&&(u=this,--a);f>a;a++)if(null!=(e=arguments[a]))for(n in e)r=u[n],i=e[n],u!==i&&(l&&i&&(ut.isPlainObject(i)||(s=ut.isArray(i)))?(s?(s=!1,o=r&&ut.isArray(r)?r:[]):o=r&&ut.isPlainObject(r)?r:{},u[n]=ut.extend(l,o,i)):i!==t&&(u[n]=i));return u},ut.extend({noConflict:function(t){return e.$===ut&&(e.$=Q),t&&e.jQuery===ut&&(e.jQuery=K),ut},isReady:!1,readyWait:1,holdReady:function(e){e?ut.readyWait++:ut.ready(!0)},ready:function(e){if(e===!0?!--ut.readyWait:!ut.isReady){if(!$.body)return setTimeout(ut.ready);ut.isReady=!0,e!==!0&&--ut.readyWait>0||(V.resolveWith($,[ut]),ut.fn.trigger&&ut($).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===ut.type(e)},isArray:Array.isArray||function(e){return"array"===ut.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?G[it.call(e)]||"object":typeof e},isPlainObject:function(e){if(!e||"object"!==ut.type(e)||e.nodeType||ut.isWindow(e))return!1;try{if(e.constructor&&!st.call(e,"constructor")&&!st.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||st.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||$;var r=ht.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=ut.buildFragment([e],t,i),i&&ut(i).remove(),ut.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=ut.trim(n),n&&pt.test(n.replace(vt,"@").replace(mt,"]").replace(dt,"")))?Function("return "+n)():(ut.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(s){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||ut.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&ut.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(gt,"ms-").replace(yt,bt)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,r){var i,s=0,o=e.length,u=n(e);if(r){if(u)for(;o>s&&(i=t.apply(e[s],r),i!==!1);s++);else for(s in e)if(i=t.apply(e[s],r),i===!1)break}else if(u)for(;o>s&&(i=t.call(e[s],s,e[s]),i!==!1);s++);else for(s in e)if(i=t.call(e[s],s,e[s]),i===!1)break;return e},trim:ot&&!ot.call(" ")?function(e){return null==e?"":ot.call(e)}:function(e){return null==e?"":(e+"").replace(lt,"")},makeArray:function(e,t){var r=t||[];return null!=e&&(n(Object(e))?ut.merge(r,"string"==typeof e?[e]:e):tt.call(r,e)),r},inArray:function(e,t,n){var r;if(t){if(rt)return rt.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,s=0;if("number"==typeof r)for(;r>s;s++)e[i++]=n[s];else for(;n[s]!==t;)e[i++]=n[s++];return e.length=i,e},grep:function(e,t,n){var r,i=[],s=0,o=e.length;for(n=!!n;o>s;s++)r=!!t(e[s],s),n!==r&&i.push(e[s]);return i},map:function(e,t,r){var i,s=0,o=e.length,u=n(e),a=[];if(u)for(;o>s;s++)i=t(e[s],s,r),null!=i&&(a[a.length]=i);else for(s in e)i=t(e[s],s,r),null!=i&&(a[a.length]=i);return et.apply([],a)},guid:1,proxy:function(e,n){var r,i,s;return"string"==typeof n&&(r=e[n],n=e,e=r),ut.isFunction(e)?(i=nt.call(arguments,2),s=function(){return e.apply(n||this,i.concat(nt.call(arguments)))},s.guid=e.guid=e.guid||ut.guid++,s):t},access:function(e,n,r,i,s,o,u){var a=0,f=e.length,l=null==r;if("object"===ut.type(r)){s=!0;for(a in r)ut.access(e,n,a,r[a],!0,o,u)}else if(i!==t&&(s=!0,ut.isFunction(i)||(u=!0),l&&(u?(n.call(e,i),n=null):(l=n,n=function(e,t,n){return l.call(ut(e),n)})),n))for(;f>a;a++)n(e[a],r,u?i:i.call(e[a],a,n(e[a],r)));return s?e:l?n.call(e):f?n(e[0],r):o},now:function(){return(new Date).getTime()}}),ut.ready.promise=function(t){if(!V)if(V=ut.Deferred(),"complete"===$.readyState)setTimeout(ut.ready);else if($.addEventListener)$.addEventListener("DOMContentLoaded",wt,!1),e.addEventListener("load",ut.ready,!1);else{$.attachEvent("onreadystatechange",wt),e.attachEvent("onload",ut.ready);var n=!1;try{n=null==e.frameElement&&$.documentElement}catch(r){}n&&n.doScroll&&function i(){if(!ut.isReady){try{n.doScroll("left")}catch(e){return setTimeout(i,50)}ut.ready()}}()}return V.promise(t)},ut.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){G["[object "+t+"]"]=t.toLowerCase()}),X=ut($);var Et={};ut.Callbacks=function(e){e="string"==typeof e?Et[e]||r(e):ut.extend({},e);var n,i,s,o,u,a,f=[],l=!e.once&&[],c=function(t){for(n=e.memory&&t,i=!0,a=o||0,o=0,u=f.length,s=!0;f&&u>a;a++)if(f[a].apply(t[0],t[1])===!1&&e.stopOnFalse){n=!1;break}s=!1,f&&(l?l.length&&c(l.shift()):n?f=[]:h.disable())},h={add:function(){if(f){var t=f.length;(function r(t){ut.each(t,function(t,n){var i=ut.type(n);"function"===i?e.unique&&h.has(n)||f.push(n):n&&n.length&&"string"!==i&&r(n)})})(arguments),s?u=f.length:n&&(o=t,c(n))}return this},remove:function(){return f&&ut.each(arguments,function(e,t){for(var n;(n=ut.inArray(t,f,n))>-1;)f.splice(n,1),s&&(u>=n&&u--,a>=n&&a--)}),this},has:function(e){return ut.inArray(e,f)>-1},empty:function(){return f=[],this},disable:function(){return f=l=n=t,this},disabled:function(){return!f},lock:function(){return l=t,n||h.disable(),this},locked:function(){return!l},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],!f||i&&!l||(s?l.push(t):c(t)),this},fire:function(){return h.fireWith(this,arguments),this},fired:function(){return!!i}};return h},ut.extend({Deferred:function(e){var t=[["resolve","done",ut.Callbacks("once memory"),"resolved"],["reject","fail",ut.Callbacks("once memory"),"rejected"],["notify","progress",ut.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return ut.Deferred(function(n){ut.each(t,function(t,s){var o=s[0],u=ut.isFunction(e[t])&&e[t];i[s[1]](function(){var e=u&&u.apply(this,arguments);e&&ut.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[o+"With"](this===r?n.promise():this,u?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?ut.extend(e,r):r}},i={};return r.pipe=r.then,ut.each(t,function(e,s){var o=s[2],u=s[3];r[s[1]]=o.add,u&&o.add(function(){n=u},t[1^e][2].disable,t[2][2].lock),i[s[0]]=function(){return i[s[0]+"With"](this===i?r:this,arguments),this},i[s[0]+"With"]=o.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t,n,r,i=0,s=nt.call(arguments),o=s.length,u=1!==o||e&&ut.isFunction(e.promise)?o:0,a=1===u?e:ut.Deferred(),f=function(e,n,r){return function(i){n[e]=this,r[e]=arguments.length>1?nt.call(arguments):i,r===t?a.notifyWith(n,r):--u||a.resolveWith(n,r)}};if(o>1)for(t=Array(o),n=Array(o),r=Array(o);o>i;i++)s[i]&&ut.isFunction(s[i].promise)?s[i].promise().done(f(i,r,s)).fail(a.reject).progress(f(i,n,t)):--u;return u||a.resolveWith(r,s),a.promise()}}),ut.support=function(){var n,r,i,s,o,u,a,f,l,c,h=$.createElement("div");if(h.setAttribute("className","t"),h.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",r=h.getElementsByTagName("*"),i=h.getElementsByTagName("a")[0],!r||!i||!r.length)return{};s=$.createElement("select"),o=s.appendChild($.createElement("option")),u=h.getElementsByTagName("input")[0],i.style.cssText="top:1px;float:left;opacity:.5",n={getSetAttribute:"t"!==h.className,leadingWhitespace:3===h.firstChild.nodeType,tbody:!h.getElementsByTagName("tbody").length,htmlSerialize:!!h.getElementsByTagName("link").length,style:/top/.test(i.getAttribute("style")),hrefNormalized:"/a"===i.getAttribute("href"),opacity:/^0.5/.test(i.style.opacity),cssFloat:!!i.style.cssFloat,checkOn:!!u.value,optSelected:o.selected,enctype:!!$.createElement("form").enctype,html5Clone:"<:nav></:nav>"!==$.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===$.compatMode,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},u.checked=!0,n.noCloneChecked=u.cloneNode(!0).checked,s.disabled=!0,n.optDisabled=!o.disabled;try{delete h.test}catch(p){n.deleteExpando=!1}u=$.createElement("input"),u.setAttribute("value",""),n.input=""===u.getAttribute("value"),u.value="t",u.setAttribute("type","radio"),n.radioValue="t"===u.value,u.setAttribute("checked","t"),u.setAttribute("name","t"),a=$.createDocumentFragment(),a.appendChild(u),n.appendChecked=u.checked,n.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,h.attachEvent&&(h.attachEvent("onclick",function(){n.noCloneEvent=!1}),h.cloneNode(!0).click());for(c in{submit:!0,change:!0,focusin:!0})h.setAttribute(f="on"+c,"t"),n[c+"Bubbles"]=f in e||h.attributes[f].expando===!1;return h.style.backgroundClip="content-box",h.cloneNode(!0).style.backgroundClip="",n.clearCloneStyle="content-box"===h.style.backgroundClip,ut(function(){var r,i,s,o="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",u=$.getElementsByTagName("body")[0];u&&(r=$.createElement("div"),r.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",u.appendChild(r).appendChild(h),h.innerHTML="<table><tr><td></td><td>t</td></tr></table>",s=h.getElementsByTagName("td"),s[0].style.cssText="padding:0;margin:0;border:0;display:none",l=0===s[0].offsetHeight,s[0].style.display="",s[1].style.display="none",n.reliableHiddenOffsets=l&&0===s[0].offsetHeight,h.innerHTML="",h.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",n.boxSizing=4===h.offsetWidth,n.doesNotIncludeMarginInBodyOffset=1!==u.offsetTop,e.getComputedStyle&&(n.pixelPosition="1%"!==(e.getComputedStyle(h,null)||{}).top,n.boxSizingReliable="4px"===(e.getComputedStyle(h,null)||{width:"4px"}).width,i=h.appendChild($.createElement("div")),i.style.cssText=h.style.cssText=o,i.style.marginRight=i.style.width="0",h.style.width="1px",n.reliableMarginRight=!parseFloat((e.getComputedStyle(i,null)||{}).marginRight)),h.style.zoom!==t&&(h.innerHTML="",h.style.cssText=o+"width:1px;padding:1px;display:inline;zoom:1",n.inlineBlockNeedsLayout=3===h.offsetWidth,h.style.display="block",h.innerHTML="<div></div>",h.firstChild.style.width="5px",n.shrinkWrapBlocks=3!==h.offsetWidth,u.style.zoom=1),u.removeChild(r),r=h=s=i=null)}),r=s=a=o=i=u=null,n}();var St=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,xt=/([A-Z])/g;ut.extend({cache:{},expando:"jQuery"+(Z+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?ut.cache[e[ut.expando]]:e[ut.expando],!!e&&!u(e)},data:function(e,t,n){return i(e,t,n,!1)},removeData:function(e,t){return s(e,t,!1)},_data:function(e,t,n){return i(e,t,n,!0)},_removeData:function(e,t){return s(e,t,!0)},acceptData:function(e){var t=e.nodeName&&ut.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),ut.fn.extend({data:function(e,n){var r,i,s=this[0],u=0,a=null;if(e===t){if(this.length&&(a=ut.data(s),1===s.nodeType&&!ut._data(s,"parsedAttrs"))){for(r=s.attributes;r.length>u;u++)i=r[u].name,i.indexOf("data-")||(i=ut.camelCase(i.substring(5)),o(s,i,a[i]));ut._data(s,"parsedAttrs",!0)}return a}return"object"==typeof e?this.each(function(){ut.data(this,e)}):ut.access(this,function(n){return n===t?s?o(s,e,ut.data(s,e)):null:(this.each(function(){ut.data(this,e,n)}),t)},null,n,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){ut.removeData(this,e)})}}),ut.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=ut._data(e,n),r&&(!i||ut.isArray(r)?i=ut._data(e,n,ut.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=ut.queue(e,t),r=n.length,i=n.shift(),s=ut._queueHooks(e,t),o=function(){ut.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),s.cur=i,i&&("fx"===t&&n.unshift("inprogress"),delete s.stop,i.call(e,o,s)),!r&&s&&s.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return ut._data(e,n)||ut._data(e,n,{empty:ut.Callbacks("once memory").add(function(){ut._removeData(e,t+"queue"),ut._removeData(e,n)})})}}),ut.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?ut.queue(this[0],e):n===t?this:this.each(function(){var t=ut.queue(this,e,n);ut._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&ut.dequeue(this,e)})},dequeue:function(e){return this.each(function(){ut.dequeue(this,e)})},delay:function(e,t){return e=ut.fx?ut.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,s=ut.Deferred(),o=this,u=this.length,a=function(){--i||s.resolveWith(o,[o])};for("string"!=typeof e&&(n=e,e=t),e=e||"fx";u--;)r=ut._data(o[u],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(a));return a(),s.promise(n)}});var Tt,Nt,Ct=/[\t\r\n]/g,kt=/\r/g,Lt=/^(?:input|select|textarea|button|object)$/i,At=/^(?:a|area)$/i,Ot=/^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,Mt=/^(?:checked|selected)$/i,_t=ut.support.getSetAttribute,Dt=ut.support.input;ut.fn.extend({attr:function(e,t){return ut.access(this,ut.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){ut.removeAttr(this,e)})},prop:function(e,t){return ut.access(this,ut.prop,e,t,arguments.length>1)},removeProp:function(e){return e=ut.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,s,o=0,u=this.length,a="string"==typeof e&&e;if(ut.isFunction(e))return this.each(function(t){ut(this).addClass(e.call(this,t,this.className))});if(a)for(t=(e||"").match(ft)||[];u>o;o++)if(n=this[o],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(Ct," "):" ")){for(s=0;i=t[s++];)0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=ut.trim(r)}return this},removeClass:function(e){var t,n,r,i,s,o=0,u=this.length,a=0===arguments.length||"string"==typeof e&&e;if(ut.isFunction(e))return this.each(function(t){ut(this).removeClass(e.call(this,t,this.className))});if(a)for(t=(e||"").match(ft)||[];u>o;o++)if(n=this[o],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(Ct," "):"")){for(s=0;i=t[s++];)for(;r.indexOf(" "+i+" ")>=0;)r=r.replace(" "+i+" "," ");n.className=e?ut.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e,r="boolean"==typeof t;return ut.isFunction(e)?this.each(function(n){ut(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n)for(var i,s=0,o=ut(this),u=t,a=e.match(ft)||[];i=a[s++];)u=r?u:!o.hasClass(i),o[u?"addClass":"removeClass"](i);else("undefined"===n||"boolean"===n)&&(this.className&&ut._data(this,"__className__",this.className),this.className=this.className||e===!1?"":ut._data(this,"__className__")||"")})},hasClass:function(e){for(var t=" "+e+" ",n=0,r=this.length;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(Ct," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,s=this[0];{if(arguments.length)return i=ut.isFunction(e),this.each(function(r){var s,o=ut(this);1===this.nodeType&&(s=i?e.call(this,r,o.val()):e,null==s?s="":"number"==typeof s?s+="":ut.isArray(s)&&(s=ut.map(s,function(e){return null==e?"":e+""})),n=ut.valHooks[this.type]||ut.valHooks[this.nodeName.toLowerCase()],n&&"set"in n&&n.set(this,s,"value")!==t||(this.value=s))});if(s)return n=ut.valHooks[s.type]||ut.valHooks[s.nodeName.toLowerCase()],n&&"get"in n&&(r=n.get(s,"value"))!==t?r:(r=s.value,"string"==typeof r?r.replace(kt,""):null==r?"":r)}}}),ut.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){for(var t,n,r=e.options,i=e.selectedIndex,s="select-one"===e.type||0>i,o=s?null:[],u=s?i+1:r.length,a=0>i?u:s?i:0;u>a;a++)if(n=r[a],!(!n.selected&&a!==i||(ut.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&ut.nodeName(n.parentNode,"optgroup"))){if(t=ut(n).val(),s)return t;o.push(t)}return o},set:function(e,t){var n=ut.makeArray(t);return ut(e).find("option").each(function(){this.selected=ut.inArray(ut(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attr:function(e,n,r){var i,s,o,u=e.nodeType;if(e&&3!==u&&8!==u&&2!==u)return e.getAttribute===t?ut.prop(e,n,r):(o=1!==u||!ut.isXMLDoc(e),o&&(n=n.toLowerCase(),s=ut.attrHooks[n]||(Ot.test(n)?Nt:Tt)),r===t?s&&o&&"get"in s&&null!==(i=s.get(e,n))?i:(e.getAttribute!==t&&(i=e.getAttribute(n)),null==i?t:i):null!==r?s&&o&&"set"in s&&(i=s.set(e,r,n))!==t?i:(e.setAttribute(n,r+""),r):(ut.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,s=t&&t.match(ft);if(s&&1===e.nodeType)for(;n=s[i++];)r=ut.propFix[n]||n,Ot.test(n)?!_t&&Mt.test(n)?e[ut.camelCase("default-"+n)]=e[r]=!1:e[r]=!1:ut.attr(e,n,""),e.removeAttribute(_t?n:r)},attrHooks:{type:{set:function(e,t){if(!ut.support.radioValue&&"radio"===t&&ut.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,r){var i,s,o,u=e.nodeType;if(e&&3!==u&&8!==u&&2!==u)return o=1!==u||!ut.isXMLDoc(e),o&&(n=ut.propFix[n]||n,s=ut.propHooks[n]),r!==t?s&&"set"in s&&(i=s.set(e,r,n))!==t?i:e[n]=r:s&&"get"in s&&null!==(i=s.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):Lt.test(e.nodeName)||At.test(e.nodeName)&&e.href?0:t}}}}),Nt={get:function(e,n){var r=ut.prop(e,n),i="boolean"==typeof r&&e.getAttribute(n),s="boolean"==typeof r?Dt&&_t?null!=i:Mt.test(n)?e[ut.camelCase("default-"+n)]:!!i:e.getAttributeNode(n);return s&&s.value!==!1?n.toLowerCase():t},set:function(e,t,n){return t===!1?ut.removeAttr(e,n):Dt&&_t||!Mt.test(n)?e.setAttribute(!_t&&ut.propFix[n]||n,n):e[ut.camelCase("default-"+n)]=e[n]=!0,n}},Dt&&_t||(ut.attrHooks.value={get:function(e,n){var r=e.getAttributeNode(n);return ut.nodeName(e,"input")?e.defaultValue:r&&r.specified?r.value:t},set:function(e,n,r){return ut.nodeName(e,"input")?(e.defaultValue=n,t):Tt&&Tt.set(e,n,r)}}),_t||(Tt=ut.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&("id"===n||"name"===n||"coords"===n?""!==r.value:r.specified)?r.value:t},set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},ut.attrHooks.contenteditable={get:Tt.get,set:function(e,t,n){Tt.set(e,""===t?!1:t,n)}},ut.each(["width","height"],function(e,n){ut.attrHooks[n]=ut.extend(ut.attrHooks[n],{set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}})})),ut.support.hrefNormalized||(ut.each(["href","src","width","height"],function(e,n){ut.attrHooks[n]=ut.extend(ut.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return null==r?t:r}})}),ut.each(["href","src"],function(e,t){ut.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}})),ut.support.style||(ut.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),ut.support.optSelected||(ut.propHooks.selected=ut.extend(ut.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),ut.support.enctype||(ut.propFix.enctype="encoding"),ut.support.checkOn||ut.each(["radio","checkbox"],function(){ut.valHooks[this]={get:function(e){return null===e.getAttribute("value")?"on":e.value}}}),ut.each(["radio","checkbox"],function(){ut.valHooks[this]=ut.extend(ut.valHooks[this],{set:function(e,n){return ut.isArray(n)?e.checked=ut.inArray(ut(e).val(),n)>=0:t}})});var Pt=/^(?:input|select|textarea)$/i,Ht=/^key/,Bt=/^(?:mouse|contextmenu)|click/,jt=/^(?:focusinfocus|focusoutblur)$/,Ft=/^([^.]*)(?:\.(.+)|)$/;ut.event={global:{},add:function(e,n,r,i,s){var o,u,a,f,l,c,h,p,d,v,m,g=3!==e.nodeType&&8!==e.nodeType&&ut._data(e);if(g){for(r.handler&&(o=r,r=o.handler,s=o.selector),r.guid||(r.guid=ut.guid++),(f=g.events)||(f=g.events={}),(u=g.handle)||(u=g.handle=function(e){return ut===t||e&&ut.event.triggered===e.type?t:ut.event.dispatch.apply(u.elem,arguments)},u.elem=e),n=(n||"").match(ft)||[""],l=n.length;l--;)a=Ft.exec(n[l])||[],d=m=a[1],v=(a[2]||"").split(".").sort(),h=ut.event.special[d]||{},d=(s?h.delegateType:h.bindType)||d,h=ut.event.special[d]||{},c=ut.extend({type:d,origType:m,data:i,handler:r,guid:r.guid,selector:s,needsContext:s&&ut.expr.match.needsContext.test(s),namespace:v.join(".")},o),(p=f[d])||(p=f[d]=[],p.delegateCount=0,h.setup&&h.setup.call(e,i,v,u)!==!1||(e.addEventListener?e.addEventListener(d,u,!1):e.attachEvent&&e.attachEvent("on"+d,u))),h.add&&(h.add.call(e,c),c.handler.guid||(c.handler.guid=r.guid)),s?p.splice(p.delegateCount++,0,c):p.push(c),ut.event.global[d]=!0;e=null}},remove:function(e,t,n,r,i){var s,o,u,a,f,l,c,h,p,d,v,m=ut.hasData(e)&&ut._data(e);if(m&&(a=m.events)){for(t=(t||"").match(ft)||[""],f=t.length;f--;)if(u=Ft.exec(t[f])||[],p=v=u[1],d=(u[2]||"").split(".").sort(),p){for(c=ut.event.special[p]||{},p=(r?c.delegateType:c.bindType)||p,h=a[p]||[],u=u[2]&&RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"),o=s=h.length;s--;)l=h[s],!i&&v!==l.origType||n&&n.guid!==l.guid||u&&!u.test(l.namespace)||r&&r!==l.selector&&("**"!==r||!l.selector)||(h.splice(s,1),l.selector&&h.delegateCount--,c.remove&&c.remove.call(e,l));o&&!h.length&&(c.teardown&&c.teardown.call(e,d,m.handle)!==!1||ut.removeEvent(e,p,m.handle),delete a[p])}else for(p in a)ut.event.remove(e,p+t[f],n,r,!0);ut.isEmptyObject(a)&&(delete m.handle,ut._removeData(e,"events"))}},trigger:function(n,r,i,s){var o,u,a,f,l,c,h,p=[i||$],d=n.type||n,v=n.namespace?n.namespace.split("."):[];if(u=a=i=i||$,3!==i.nodeType&&8!==i.nodeType&&!jt.test(d+ut.event.triggered)&&(d.indexOf(".")>=0&&(v=d.split("."),d=v.shift(),v.sort()),l=0>d.indexOf(":")&&"on"+d,n=n[ut.expando]?n:new ut.Event(d,"object"==typeof n&&n),n.isTrigger=!0,n.namespace=v.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+v.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:ut.makeArray(r,[n]),h=ut.event.special[d]||{},s||!h.trigger||h.trigger.apply(i,r)!==!1)){if(!s&&!h.noBubble&&!ut.isWindow(i)){for(f=h.delegateType||d,jt.test(f+d)||(u=u.parentNode);u;u=u.parentNode)p.push(u),a=u;a===(i.ownerDocument||$)&&p.push(a.defaultView||a.parentWindow||e)}for(o=0;(u=p[o++])&&!n.isPropagationStopped();)n.type=o>1?f:h.bindType||d,c=(ut._data(u,"events")||{})[n.type]&&ut._data(u,"handle"),c&&c.apply(u,r),c=l&&u[l],c&&ut.acceptData(u)&&c.apply&&c.apply(u,r)===!1&&n.preventDefault();if(n.type=d,!(s||n.isDefaultPrevented()||h._default&&h._default.apply(i.ownerDocument,r)!==!1||"click"===d&&ut.nodeName(i,"a")||!ut.acceptData(i)||!l||!i[d]||ut.isWindow(i))){a=i[l],a&&(i[l]=null),ut.event.triggered=d;try{i[d]()}catch(m){}ut.event.triggered=t,a&&(i[l]=a)}return n.result}},dispatch:function(e){e=ut.event.fix(e);var n,r,i,s,o,u=[],a=nt.call(arguments),f=(ut._data(this,"events")||{})[e.type]||[],l=ut.event.special[e.type]||{};if(a[0]=e,e.delegateTarget=this,!l.preDispatch||l.preDispatch.call(this,e)!==!1){for(u=ut.event.handlers.call(this,e,f),n=0;(s=u[n++])&&!e.isPropagationStopped();)for(e.currentTarget=s.elem,r=0;(o=s.handlers[r++])&&!e.isImmediatePropagationStopped();)(!e.namespace_re||e.namespace_re.test(o.namespace))&&(e.handleObj=o,e.data=o.data,i=((ut.event.special[o.origType]||{}).handle||o.handler).apply(s.elem,a),i!==t&&(e.result=i)===!1&&(e.preventDefault(),e.stopPropagation()));return l.postDispatch&&l.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,s,o,u=[],a=n.delegateCount,f=e.target;if(a&&f.nodeType&&(!e.button||"click"!==e.type))for(;f!=this;f=f.parentNode||this)if(f.disabled!==!0||"click"!==e.type){for(i=[],r=0;a>r;r++)o=n[r],s=o.selector+" ",i[s]===t&&(i[s]=o.needsContext?ut(s,this).index(f)>=0:ut.find(s,this,null,[f]).length),i[s]&&i.push(o);i.length&&u.push({elem:f,handlers:i})}return n.length>a&&u.push({elem:this,handlers:n.slice(a)}),u},fix:function(e){if(e[ut.expando])return e;var t,n,r=e,i=ut.event.fixHooks[e.type]||{},s=i.props?this.props.concat(i.props):this.props;for(e=new ut.Event(r),t=s.length;t--;)n=s[t],e[n]=r[n];return e.target||(e.target=r.srcElement||$),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,i.filter?i.filter(e,r):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,s,o=n.button,u=n.fromElement;return null==e.pageX&&null!=n.clientX&&(r=e.target.ownerDocument||$,i=r.documentElement,s=r.body,e.pageX=n.clientX+(i&&i.scrollLeft||s&&s.scrollLeft||0)-(i&&i.clientLeft||s&&s.clientLeft||0),e.pageY=n.clientY+(i&&i.scrollTop||s&&s.scrollTop||0)-(i&&i.clientTop||s&&s.clientTop||0)),!e.relatedTarget&&u&&(e.relatedTarget=u===e.target?n.toElement:u),e.which||o===t||(e.which=1&o?1:2&o?3:4&o?2:0),e}},special:{load:{noBubble:!0},click:{trigger:function(){return ut.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t}},focus:{trigger:function(){if(this!==$.activeElement&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===$.activeElement&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=ut.extend(new ut.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?ut.event.trigger(i,null,t):ut.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},ut.removeEvent=$.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,n,r){var i="on"+n;e.detachEvent&&(e[i]===t&&(e[i]=null),e.detachEvent(i,r))},ut.Event=function(e,n){return this instanceof ut.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?a:f):this.type=e,n&&ut.extend(this,n),this.timeStamp=e&&e.timeStamp||ut.now(),this[ut.expando]=!0,t):new ut.Event(e,n)},ut.Event.prototype={isDefaultPrevented:f,isPropagationStopped:f,isImmediatePropagationStopped:f,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=a,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=a,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=a,this.stopPropagation()}},ut.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){ut.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,s=e.handleObj;return(!i||i!==r&&!ut.contains(r,i))&&(e.type=s.origType,n=s.handler.apply(this,arguments),e.type=t),n}}}),ut.support.submitBubbles||(ut.event.special.submit={setup:function(){return ut.nodeName(this,"form")?!1:(ut.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=ut.nodeName(n,"input")||ut.nodeName(n,"button")?n.form:t;r&&!ut._data(r,"submitBubbles")&&(ut.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),ut._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&ut.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return ut.nodeName(this,"form")?!1:(ut.event.remove(this,"._submit"),t)}}),ut.support.changeBubbles||(ut.event.special.change={setup:function(){return Pt.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(ut.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),ut.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),ut.event.simulate("change",this,e,!0)})),!1):(ut.event.add(this,"beforeactivate._change",function(e){var t=e.target;Pt.test(t.nodeName)&&!ut._data(t,"changeBubbles")&&(ut.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||ut.event.simulate("change",this.parentNode,e,!0)}),ut._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return ut.event.remove(this,"._change"),!Pt.test(this.nodeName)}}),ut.support.focusinBubbles||ut.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){ut.event.simulate(t,e.target,ut.event.fix(e),!0)};ut.event.special[t]={setup:function(){0===n++&&$.addEventListener(e,r,!0)},teardown:function(){0===--n&&$.removeEventListener(e,r,!0)}}}),ut.fn.extend({on:function(e,n,r,i,s){var o,u;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(u in e)this.on(u,n,r,e[u],s);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=f;else if(!i)return this;return 1===s&&(o=i,i=function(e){return ut().off(e),o.apply(this,arguments)},i.guid=o.guid||(o.guid=ut.guid++)),this.each(function(){ut.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,s;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,ut(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(s in e)this.off(s,n,e[s]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=f),this.each(function(){ut.event.remove(this,e,r,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},trigger:function(e,t){return this.each(function(){ut.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?ut.event.trigger(e,n,r,!0):t},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),ut.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){ut.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)},Ht.test(t)&&(ut.event.fixHooks[t]=ut.event.keyHooks),Bt.test(t)&&(ut.event.fixHooks[t]=ut.event.mouseHooks)}),function(e,t){function n(e){return dt.test(e+"")}function r(){var e,t=[];return e=function(n,r){return t.push(n+=" ")>T.cacheLength&&delete e[t.shift()],e[n]=r}}function i(e){return e[I]=!0,e}function s(e){var t=M.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}}function o(e,t,n,r){var i,s,o,u,a,f,l,p,d,v;if((t?t.ownerDocument||t:q)!==M&&O(t),t=t||M,n=n||[],!e||"string"!=typeof e)return n;if(1!==(u=t.nodeType)&&9!==u)return[];if(!D&&!r){if(i=vt.exec(e))if(o=i[1]){if(9===u){if(s=t.getElementById(o),!s||!s.parentNode)return n;if(s.id===o)return n.push(s),n}else if(t.ownerDocument&&(s=t.ownerDocument.getElementById(o))&&j(t,s)&&s.id===o)return n.push(s),n}else{if(i[2])return G.apply(n,Y.call(t.getElementsByTagName(e),0)),n;if((o=i[3])&&R.getByClassName&&t.getElementsByClassName)return G.apply(n,Y.call(t.getElementsByClassName(o),0)),n}if(R.qsa&&!P.test(e)){if(l=!0,p=I,d=t,v=9===u&&e,1===u&&"object"!==t.nodeName.toLowerCase()){for(f=c(e),(l=t.getAttribute("id"))?p=l.replace(yt,"\\$&"):t.setAttribute("id",p),p="[id='"+p+"'] ",a=f.length;a--;)f[a]=p+h(f[a]);d=pt.test(e)&&t.parentNode||t,v=f.join(",")}if(v)try{return G.apply(n,Y.call(d.querySelectorAll(v),0)),n}catch(m){}finally{l||t.removeAttribute("id")}}}return w(e.replace(ot,"$1"),t,n,r)}function u(e,t){for(var n=e&&t&&e.nextSibling;n;n=n.nextSibling)if(n===t)return-1;return e?1:-1}function a(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function f(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function l(e){return i(function(t){return t=+t,i(function(n,r){for(var i,s=e([],n.length,t),o=s.length;o--;)n[i=s[o]]&&(n[i]=!(r[i]=n[i]))})})}function c(e,t){var n,r,i,s,u,a,f,l=X[e+" "];if(l)return t?0:l.slice(0);for(u=e,a=[],f=T.preFilter;u;){(!n||(r=at.exec(u)))&&(r&&(u=u.slice(r[0].length)||u),a.push(i=[])),n=!1,(r=ft.exec(u))&&(n=r.shift(),i.push({value:n,type:r[0].replace(ot," ")}),u=u.slice(n.length));for(s in T.filter)!(r=ht[s].exec(u))||f[s]&&!(r=f[s](r))||(n=r.shift(),i.push({value:n,type:s,matches:r}),u=u.slice(n.length));if(!n)break}return t?u.length:u?o.error(e):X(e,a).slice(0)}function h(e){for(var t=0,n=e.length,r="";n>t;t++)r+=e[t].value;return r}function p(e,t,n){var r=t.dir,i=n&&"parentNode"===t.dir,s=z++;return t.first?function(t,n,s){for(;t=t[r];)if(1===t.nodeType||i)return e(t,n,s)}:function(t,n,o){var u,a,f,l=U+" "+s;if(o){for(;t=t[r];)if((1===t.nodeType||i)&&e(t,n,o))return!0}else for(;t=t[r];)if(1===t.nodeType||i)if(f=t[I]||(t[I]={}),(a=f[r])&&a[0]===l){if((u=a[1])===!0||u===x)return u===!0}else if(a=f[r]=[l],a[1]=e(t,n,o)||x,a[1]===!0)return!0}}function d(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function v(e,t,n,r,i){for(var s,o=[],u=0,a=e.length,f=null!=t;a>u;u++)(s=e[u])&&(!n||n(s,r,i))&&(o.push(s),f&&t.push(u));return o}function m(e,t,n,r,s,o){return r&&!r[I]&&(r=m(r)),s&&!s[I]&&(s=m(s,o)),i(function(i,o,u,a){var f,l,c,h=[],p=[],d=o.length,m=i||b(t||"*",u.nodeType?[u]:u,[]),g=!e||!i&&t?m:v(m,h,e,u,a),y=n?s||(i?e:d||r)?[]:o:g;if(n&&n(g,y,u,a),r)for(f=v(y,p),r(f,[],u,a),l=f.length;l--;)(c=f[l])&&(y[p[l]]=!(g[p[l]]=c));if(i){if(s||e){if(s){for(f=[],l=y.length;l--;)(c=y[l])&&f.push(g[l]=c);s(null,y=[],f,a)}for(l=y.length;l--;)(c=y[l])&&(f=s?Z.call(i,c):h[l])>-1&&(i[f]=!(o[f]=c))}}else y=v(y===o?y.splice(d,y.length):y),s?s(null,o,y,a):G.apply(o,y)})}function g(e){for(var t,n,r,i=e.length,s=T.relative[e[0].type],o=s||T.relative[" "],u=s?1:0,a=p(function(e){return e===t},o,!0),f=p(function(e){return Z.call(t,e)>-1},o,!0),l=[function(e,n,r){return!s&&(r||n!==A)||((t=n).nodeType?a(e,n,r):f(e,n,r))}];i>u;u++)if(n=T.relative[e[u].type])l=[p(d(l),n)];else{if(n=T.filter[e[u].type].apply(null,e[u].matches),n[I]){for(r=++u;i>r&&!T.relative[e[r].type];r++);return m(u>1&&d(l),u>1&&h(e.slice(0,u-1)).replace(ot,"$1"),n,r>u&&g(e.slice(u,r)),i>r&&g(e=e.slice(r)),i>r&&h(e))}l.push(n)}return d(l)}function y(e,t){var n=0,r=t.length>0,s=e.length>0,u=function(i,u,a,f,l){var c,h,p,d=[],m=0,g="0",y=i&&[],b=null!=l,w=A,E=i||s&&T.find.TAG("*",l&&u.parentNode||u),S=U+=null==w?1:Math.E;for(b&&(A=u!==M&&u,x=n);null!=(c=E[g]);g++){if(s&&c){for(h=0;p=e[h];h++)if(p(c,u,a)){f.push(c);break}b&&(U=S,x=++n)}r&&((c=!p&&c)&&m--,i&&y.push(c))}if(m+=g,r&&g!==m){for(h=0;p=t[h];h++)p(y,d,u,a);if(i){if(m>0)for(;g--;)y[g]||d[g]||(d[g]=Q.call(f));d=v(d)}G.apply(f,d),b&&!i&&d.length>0&&m+t.length>1&&o.uniqueSort(f)}return b&&(U=S,A=w),y};return r?i(u):u}function b(e,t,n){for(var r=0,i=t.length;i>r;r++)o(e,t[r],n);return n}function w(e,t,n,r){var i,s,o,u,a,f=c(e);if(!r&&1===f.length){if(s=f[0]=f[0].slice(0),s.length>2&&"ID"===(o=s[0]).type&&9===t.nodeType&&!D&&T.relative[s[1].type]){if(t=T.find.ID(o.matches[0].replace(wt,Et),t)[0],!t)return n;e=e.slice(s.shift().value.length)}for(i=ht.needsContext.test(e)?-1:s.length-1;i>=0&&(o=s[i],!T.relative[u=o.type]);i--)if((a=T.find[u])&&(r=a(o.matches[0].replace(wt,Et),pt.test(s[0].type)&&t.parentNode||t))){if(s.splice(i,1),e=r.length&&h(s),!e)return G.apply(n,Y.call(r,0)),n;break}}return k(e,f)(r,t,D,n,pt.test(e)),n}function E(){}var S,x,T,N,C,k,L,A,O,M,_,D,P,H,B,j,F,I="sizzle"+ -(new Date),q=e.document,R={},U=0,z=0,W=r(),X=r(),V=r(),$=typeof t,J=1<<31,K=[],Q=K.pop,G=K.push,Y=K.slice,Z=K.indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(this[t]===e)return t;return-1},et="[\\x20\\t\\r\\n\\f]",tt="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",nt=tt.replace("w","w#"),rt="([*^$|!~]?=)",it="\\["+et+"*("+tt+")"+et+"*(?:"+rt+et+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+nt+")|)|)"+et+"*\\]",st=":("+tt+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+it.replace(3,8)+")*)|.*)\\)|)",ot=RegExp("^"+et+"+|((?:^|[^\\\\])(?:\\\\.)*)"+et+"+$","g"),at=RegExp("^"+et+"*,"+et+"*"),ft=RegExp("^"+et+"*([\\x20\\t\\r\\n\\f>+~])"+et+"*"),lt=RegExp(st),ct=RegExp("^"+nt+"$"),ht={ID:RegExp("^#("+tt+")"),CLASS:RegExp("^\\.("+tt+")"),NAME:RegExp("^\\[name=['\"]?("+tt+")['\"]?\\]"),TAG:RegExp("^("+tt.replace("w","w*")+")"),ATTR:RegExp("^"+it),PSEUDO:RegExp("^"+st),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+et+"*(even|odd|(([+-]|)(\\d*)n|)"+et+"*(?:([+-]|)"+et+"*(\\d+)|))"+et+"*\\)|)","i"),needsContext:RegExp("^"+et+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+et+"*((?:-\\d)?\\d*)"+et+"*\\)|)(?=[^-]|$)","i")},pt=/[\x20\t\r\n\f]*[+~]/,dt=/\{\s*\[native code\]\s*\}/,vt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,mt=/^(?:input|select|textarea|button)$/i,gt=/^h\d$/i,yt=/'|\\/g,bt=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,wt=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,Et=function(e,t){var n="0x"+t-65536;return n!==n?t:0>n?String.fromCharCode(n+65536):String.fromCharCode(55296|n>>10,56320|1023&n)};try{Y.call(_.childNodes,0)[0].nodeType}catch(St){Y=function(e){for(var t,n=[];t=this[e];e++)n.push(t);return n}}C=o.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},O=o.setDocument=function(e){var r=e?e.ownerDocument||e:q;return r!==M&&9===r.nodeType&&r.documentElement?(M=r,_=r.documentElement,D=C(r),R.tagNameNoComments=s(function(e){return e.appendChild(r.createComment("")),!e.getElementsByTagName("*").length}),R.attributes=s(function(e){e.innerHTML="<select></select>";var t=typeof e.lastChild.getAttribute("multiple");return"boolean"!==t&&"string"!==t}),R.getByClassName=s(function(e){return e.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",e.getElementsByClassName&&e.getElementsByClassName("e").length?(e.lastChild.className="e",2===e.getElementsByClassName("e").length):!1}),R.getByName=s(function(e){e.id=I+0,e.innerHTML="<a name='"+I+"'></a><div name='"+I+"'></div>",_.insertBefore(e,_.firstChild);var t=r.getElementsByName&&r.getElementsByName(I).length===2+r.getElementsByName(I+0).length;return R.getIdNotName=!r.getElementById(I),_.removeChild(e),t}),T.attrHandle=s(function(e){return e.innerHTML="<a href='#'></a>",e.firstChild&&typeof e.firstChild.getAttribute!==$&&"#"===e.firstChild.getAttribute("href")})?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},R.getIdNotName?(T.find.ID=function(e,t){if(typeof t.getElementById!==$&&!D){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},T.filter.ID=function(e){var t=e.replace(wt,Et);return function(e){return e.getAttribute("id")===t}}):(T.find.ID=function(e,n){if(typeof n.getElementById!==$&&!D){var r=n.getElementById(e);return r?r.id===e||typeof r.getAttributeNode!==$&&r.getAttributeNode("id").value===e?[r]:t:[]}},T.filter.ID=function(e){var t=e.replace(wt,Et);return function(e){var n=typeof e.getAttributeNode!==$&&e.getAttributeNode("id");return n&&n.value===t}}),T.find.TAG=R.tagNameNoComments?function(e,n){return typeof n.getElementsByTagName!==$?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,s=t.getElementsByTagName(e);if("*"===e){for(;n=s[i];i++)1===n.nodeType&&r.push(n);return r}return s},T.find.NAME=R.getByName&&function(e,n){return typeof n.getElementsByName!==$?n.getElementsByName(name):t},T.find.CLASS=R.getByClassName&&function(e,n){return typeof n.getElementsByClassName===$||D?t:n.getElementsByClassName(e)},H=[],P=[":focus"],(R.qsa=n(r.querySelectorAll))&&(s(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||P.push("\\["+et+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||P.push(":checked")}),s(function(e){e.innerHTML="<input type='hidden' i=''/>",e.querySelectorAll("[i^='']").length&&P.push("[*^$]="+et+"*(?:\"\"|'')"),e.querySelectorAll(":enabled").length||P.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),P.push(",.*:")})),(R.matchesSelector=n(B=_.matchesSelector||_.mozMatchesSelector||_.webkitMatchesSelector||_.oMatchesSelector||_.msMatchesSelector))&&s(function(e){R.disconnectedMatch=B.call(e,"div"),B.call(e,"[s!='']:x"),H.push("!=",st)}),P=RegExp(P.join("|")),H=RegExp(H.join("|")),j=n(_.contains)||_.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},F=_.compareDocumentPosition?function(e,t){var n;return e===t?(L=!0,0):(n=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t))?1&n||e.parentNode&&11===e.parentNode.nodeType?e===r||j(q,e)?-1:t===r||j(q,t)?1:0:4&n?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var n,i=0,s=e.parentNode,o=t.parentNode,a=[e],f=[t];if(e===t)return L=!0,0;if(e.sourceIndex&&t.sourceIndex)return(~t.sourceIndex||J)-(j(q,e)&&~e.sourceIndex||J);if(!s||!o)return e===r?-1:t===r?1:s?-1:o?1:0;if(s===o)return u(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)f.unshift(n);for(;a[i]===f[i];)i++;return i?u(a[i],f[i]):a[i]===q?-1:f[i]===q?1:0},L=!1,[0,0].sort(F),R.detectDuplicates=L,M):M},o.matches=function(e,t){return o(e,null,null,t)},o.matchesSelector=function(e,t){if((e.ownerDocument||e)!==M&&O(e),t=t.replace(bt,"='$1']"),!(!R.matchesSelector||D||H&&H.test(t)||P.test(t)))try{var n=B.call(e,t);if(n||R.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(r){}return o(t,M,null,[e]).length>0},o.contains=function(e,t){return(e.ownerDocument||e)!==M&&O(e),j(e,t)},o.attr=function(e,t){var n;return(e.ownerDocument||e)!==M&&O(e),D||(t=t.toLowerCase()),(n=T.attrHandle[t])?n(e):D||R.attributes?e.getAttribute(t):((n=e.getAttributeNode(t))||e.getAttribute(t))&&e[t]===!0?t:n&&n.specified?n.value:null},o.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},o.uniqueSort=function(e){var t,n=[],r=1,i=0;if(L=!R.detectDuplicates,e.sort(F),L){for(;t=e[r];r++)t===e[r-1]&&(i=n.push(r));for(;i--;)e.splice(n[i],1)}return e},N=o.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=N(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=N(t);return n},T=o.selectors={cacheLength:50,createPseudo:i,match:ht,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(wt,Et),e[3]=(e[4]||e[5]||"").replace(wt,Et),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||o.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&o.error(e[0]),e},PSEUDO:function(e){var t,n=!e[5]&&e[2];return ht.CHILD.test(e[0])?null:(e[4]?e[2]=e[4]:n&&lt.test(n)&&(t=c(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){return"*"===e?function(){return!0}:(e=e.replace(wt,Et).toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=W[e+" "];return t||(t=RegExp("(^|"+et+")"+e+"("+et+"|$)"))&&W(e,function(e){return t.test(e.className||typeof e.getAttribute!==$&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=o.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.substr(i.length-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.substr(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var s="nth"!==e.slice(0,3),o="last"!==e.slice(-4),u="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,a){var f,l,c,h,p,d,v=s!==o?"nextSibling":"previousSibling",m=t.parentNode,g=u&&t.nodeName.toLowerCase(),y=!a&&!u;if(m){if(s){for(;v;){for(c=t;c=c[v];)if(u?c.nodeName.toLowerCase()===g:1===c.nodeType)return!1;d=v="only"===e&&!d&&"nextSibling"}return!0}if(d=[o?m.firstChild:m.lastChild],o&&y){for(l=m[I]||(m[I]={}),f=l[e]||[],p=f[0]===U&&f[1],h=f[0]===U&&f[2],c=p&&m.childNodes[p];c=++p&&c&&c[v]||(h=p=0)||d.pop();)if(1===c.nodeType&&++h&&c===t){l[e]=[U,p,h];break}}else if(y&&(f=(t[I]||(t[I]={}))[e])&&f[0]===U)h=f[1];else for(;(c=++p&&c&&c[v]||(h=p=0)||d.pop())&&((u?c.nodeName.toLowerCase()!==g:1!==c.nodeType)||!++h||(y&&((c[I]||(c[I]={}))[e]=[U,h]),c!==t)););return h-=i,h===r||0===h%r&&h/r>=0}}},PSEUDO:function(e,t){var n,r=T.pseudos[e]||T.setFilters[e.toLowerCase()]||o.error("unsupported pseudo: "+e);return r[I]?r(t):r.length>1?(n=[e,e,"",t],T.setFilters.hasOwnProperty(e.toLowerCase())?i(function(e,n){for(var i,s=r(e,t),o=s.length;o--;)i=Z.call(e,s[o]),e[i]=!(n[i]=s[o])}):function(e){return r(e,0,n)}):r}},pseudos:{not:i(function(e){var t=[],n=[],r=k(e.replace(ot,"$1"));return r[I]?i(function(e,t,n,i){for(var s,o=r(e,null,i,[]),u=e.length;u--;)(s=o[u])&&(e[u]=!(t[u]=s))}):function(e,i,s){return t[0]=e,r(t,null,s,n),!n.pop()}}),has:i(function(e){return function(t){return o(e,t).length>0}}),contains:i(function(e){return function(t){return(t.textContent||t.innerText||N(t)).indexOf(e)>-1}}),lang:i(function(e){return ct.test(e||"")||o.error("unsupported lang: "+e),e=e.replace(wt,Et).toLowerCase(),function(t){var n;do if(n=D?t.getAttribute("xml:lang")||t.getAttribute("lang"):t.lang)return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===_},focus:function(e){return e===M.activeElement&&(!M.hasFocus||M.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!T.pseudos.empty(e)},header:function(e){return gt.test(e.nodeName)},input:function(e){return mt.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:l(function(){return[0]}),last:l(function(e,t){return[t-1]}),eq:l(function(e,t,n){return[0>n?n+t:n]}),even:l(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:l(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:l(function(e,t,n){for(var r=0>n?n+t:n;--r>=0;)e.push(r);return e}),gt:l(function(e,t,n){for(var r=0>n?n+t:n;t>++r;)e.push(r);return e})}};for(S in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})T.pseudos[S]=a(S);for(S in{submit:!0,reset:!0})T.pseudos[S]=f(S);k=o.compile=function(e,t){var n,r=[],i=[],s=V[e+" "];if(!s){for(t||(t=c(e)),n=t.length;n--;)s=g(t[n]),s[I]?r.push(s):i.push(s);s=V(e,y(i,r))}return s},T.pseudos.nth=T.pseudos.eq,T.filters=E.prototype=T.pseudos,T.setFilters=new E,O(),o.attr=ut.attr,ut.find=o,ut.expr=o.selectors,ut.expr[":"]=ut.expr.pseudos,ut.unique=o.uniqueSort,ut.text=o.getText,ut.isXMLDoc=o.isXML,ut.contains=o.contains}(e);var It=/Until$/,qt=/^(?:parents|prev(?:Until|All))/,Rt=/^.[^:#\[\.,]*$/,Ut=ut.expr.match.needsContext,zt={children:!0,contents:!0,next:!0,prev:!0};ut.fn.extend({find:function(e){var t,n,r;if("string"!=typeof e)return r=this,this.pushStack(ut(e).filter(function(){for(t=0;r.length>t;t++)if(ut.contains(r[t],this))return!0}));for(n=[],t=0;this.length>t;t++)ut.find(e,this[t],n);return n=this.pushStack(ut.unique(n)),n.selector=(this.selector?this.selector+" ":"")+e,n},has:function(e){var t,n=ut(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(ut.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(c(this,e,!1))},filter:function(e){return this.pushStack(c(this,e,!0))},is:function(e){return!!e&&("string"==typeof e?Ut.test(e)?ut(e,this.context).index(this[0])>=0:ut.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){for(var n,r=0,i=this.length,s=[],o=Ut.test(e)||"string"!=typeof e?ut(e,t||this.context):0;i>r;r++)for(n=this[r];n&&n.ownerDocument&&n!==t&&11!==n.nodeType;){if(o?o.index(n)>-1:ut.find.matchesSelector(n,e)){s.push(n);break}n=n.parentNode}return this.pushStack(s.length>1?ut.unique(s):s)},index:function(e){return e?"string"==typeof e?ut.inArray(this[0],ut(e)):ut.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?ut(e,t):ut.makeArray(e&&e.nodeType?[e]:e),r=ut.merge(this.get(),n);return this.pushStack(ut.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),ut.fn.andSelf=ut.fn.addBack,ut.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return ut.dir(e,"parentNode")},parentsUntil:function(e,t,n){return ut.dir(e,"parentNode",n)},next:function(e){return l(e,"nextSibling")},prev:function(e){return l(e,"previousSibling")},nextAll:function(e){return ut.dir(e,"nextSibling")},prevAll:function(e){return ut.dir(e,"previousSibling")},nextUntil:function(e,t,n){return ut.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return ut.dir(e,"previousSibling",n)},siblings:function(e){return ut.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return ut.sibling(e.firstChild)},contents:function(e){return ut.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:ut.merge([],e.childNodes)}},function(e,t){ut.fn[e]=function(n,r){var i=ut.map(this,t,n);return It.test(e)||(r=n),r&&"string"==typeof r&&(i=ut.filter(r,i)),i=this.length>1&&!zt[e]?ut.unique(i):i,this.length>1&&qt.test(e)&&(i=i.reverse()),this.pushStack(i)}}),ut.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),1===t.length?ut.find.matchesSelector(t[0],e)?[t[0]]:[]:ut.find.matches(e,t)},dir:function(e,n,r){for(var i=[],s=e[n];s&&9!==s.nodeType&&(r===t||1!==s.nodeType||!ut(s).is(r));)1===s.nodeType&&i.push(s),s=s[n];return i},sibling:function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});var Wt="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",Xt=/ jQuery\d+="(?:null|\d+)"/g,Vt=RegExp("<(?:"+Wt+")[\\s/>]","i"),$t=/^\s+/,Jt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Kt=/<([\w:]+)/,Qt=/<tbody/i,Gt=/<|&#?\w+;/,Yt=/<(?:script|style|link)/i,Zt=/^(?:checkbox|radio)$/i,en=/checked\s*(?:[^=]|=\s*.checked.)/i,tn=/^$|\/(?:java|ecma)script/i,nn=/^true\/(.*)/,rn=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,sn={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:ut.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},on=h($),un=on.appendChild($.createElement("div"));sn.optgroup=sn.option,sn.tbody=sn.tfoot=sn.colgroup=sn.caption=sn.thead,sn.th=sn.td,ut.fn.extend({text:function(e){return ut.access(this,function(e){return e===t?ut.text(this):this.empty().append((this[0]&&this[0].ownerDocument||$).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(ut.isFunction(e))return this.each(function(t){ut(this).wrapAll(e.call(this,t))});if(this[0]){var t=ut(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return ut.isFunction(e)?this.each(function(t){ut(this).wrapInner(e.call(this,t))}):this.each(function(){var t=ut(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=ut.isFunction(e);return this.each(function(n){ut(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){ut.nodeName(this,"body")||ut(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.insertBefore(e,this.firstChild)})},before:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){for(var n,r=0;null!=(n=this[r]);r++)(!e||ut.filter(e,[n]).length>0)&&(t||1!==n.nodeType||ut.cleanData(b(n)),n.parentNode&&(t&&ut.contains(n.ownerDocument,n)&&m(b(n,"script")),n.parentNode.removeChild(n)));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&&ut.cleanData(b(e,!1));e.firstChild;)e.removeChild(e.firstChild);e.options&&ut.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return ut.clone(this,e,t)})},html:function(e){return ut.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(Xt,""):t;if(!("string"!=typeof e||Yt.test(e)||!ut.support.htmlSerialize&&Vt.test(e)||!ut.support.leadingWhitespace&&$t.test(e)||sn[(Kt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(Jt,"<$1></$2>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(ut.cleanData(b(n,!1)),n.innerHTML=e);n=0}catch(s){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){var t=ut.isFunction(e);return t||"string"==typeof e||(e=ut(e).not(this).detach()),this.domManip([e],!0,function(e){var t=this.nextSibling,n=this.parentNode;(n&&1===this.nodeType||11===this.nodeType)&&(ut(this).remove(),t?t.parentNode.insertBefore(e,t):n.appendChild(e))})},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){e=et.apply([],e);var i,s,o,u,a,f,l=0,c=this.length,h=this,m=c-1,g=e[0],y=ut.isFunction(g);if(y||!(1>=c||"string"!=typeof g||ut.support.checkClone)&&en.test(g))return this.each(function(i){var s=h.eq(i);y&&(e[0]=g.call(this,i,n?s.html():t)),s.domManip(e,n,r)});if(c&&(i=ut.buildFragment(e,this[0].ownerDocument,!1,this),s=i.firstChild,1===i.childNodes.length&&(i=s),s)){for(n=n&&ut.nodeName(s,"tr"),o=ut.map(b(i,"script"),d),u=o.length;c>l;l++)a=i,l!==m&&(a=ut.clone(a,!0,!0),u&&ut.merge(o,b(a,"script"))),r.call(n&&ut.nodeName(this[l],"table")?p(this[l],"tbody"):this[l],a,l);if(u)for(f=o[o.length-1].ownerDocument,ut.map(o,v),l=0;u>l;l++)a=o[l],tn.test(a.type||"")&&!ut._data(a,"globalEval")&&ut.contains(f,a)&&(a.src?ut.ajax({url:a.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):ut.globalEval((a.text||a.textContent||a.innerHTML||"").replace(rn,"")));i=s=null}return this}}),ut.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){ut.fn[e]=function(e){for(var n,r=0,i=[],s=ut(e),o=s.length-1;o>=r;r++)n=r===o?this:this.clone(!0),ut(s[r])[t](n),tt.apply(i,n.get());return this.pushStack(i)}}),ut.extend({clone:function(e,t,n){var r,i,s,o,u,a=ut.contains(e.ownerDocument,e);if(ut.support.html5Clone||ut.isXMLDoc(e)||!Vt.test("<"+e.nodeName+">")?u=e.cloneNode(!0):(un.innerHTML=e.outerHTML,un.removeChild(u=un.firstChild)),!(ut.support.noCloneEvent&&ut.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||ut.isXMLDoc(e)))for(r=b(u),i=b(e),o=0;null!=(s=i[o]);++o)r[o]&&y(s,r[o]);if(t)if(n)for(i=i||b(e),r=r||b(u),o=0;null!=(s=i[o]);o++)g(s,r[o]);else g(e,u);return r=b(u,"script"),r.length>0&&m(r,!a&&b(e,"script")),r=i=s=null,u},buildFragment:function(e,t,n,r){for(var i,s,o,u,a,f,l,c=e.length,p=h(t),d=[],v=0;c>v;v++)if(s=e[v],s||0===s)if("object"===ut.type(s))ut.merge(d,s.nodeType?[s]:s);else if(Gt.test(s)){for(u=u||p.appendChild(t.createElement("div")),o=(Kt.exec(s)||["",""])[1].toLowerCase(),a=sn[o]||sn._default,u.innerHTML=a[1]+s.replace(Jt,"<$1></$2>")+a[2],l=a[0];l--;)u=u.lastChild;if(!ut.support.leadingWhitespace&&$t.test(s)&&d.push(t.createTextNode($t.exec(s)[0])),!ut.support.tbody)for(s="table"!==o||Qt.test(s)?"<table>"!==a[1]||Qt.test(s)?0:u:u.firstChild,l=s&&s.childNodes.length;l--;)ut.nodeName(f=s.childNodes[l],"tbody")&&!f.childNodes.length&&s.removeChild(f);for(ut.merge(d,u.childNodes),u.textContent="";u.firstChild;)u.removeChild(u.firstChild);u=p.lastChild}else d.push(t.createTextNode(s));for(u&&p.removeChild(u),ut.support.appendChecked||ut.grep(b(d,"input"),w),v=0;s=d[v++];)if((!r||-1===ut.inArray(s,r))&&(i=ut.contains(s.ownerDocument,s),u=b(p.appendChild(s),"script"),i&&m(u),n))for(l=0;s=u[l++];)tn.test(s.type||"")&&n.push(s);return u=null,p},cleanData:function(e,n){for(var r,i,s,o,u=0,a=ut.expando,f=ut.cache,l=ut.support.deleteExpando,c=ut.event.special;null!=(s=e[u]);u++)if((n||ut.acceptData(s))&&(i=s[a],r=i&&f[i])){if(r.events)for(o in r.events)c[o]?ut.event.remove(s,o):ut.removeEvent(s,o,r.handle);f[i]&&(delete f[i],l?delete s[a]:s.removeAttribute!==t?s.removeAttribute(a):s[a]=null,Y.push(i))}}});var an,fn,ln,cn=/alpha\([^)]*\)/i,hn=/opacity\s*=\s*([^)]*)/,pn=/^(top|right|bottom|left)$/,dn=/^(none|table(?!-c[ea]).+)/,vn=/^margin/,mn=RegExp("^("+at+")(.*)$","i"),gn=RegExp("^("+at+")(?!px)[a-z%]+$","i"),yn=RegExp("^([+-])=("+at+")","i"),bn={BODY:"block"},wn={position:"absolute",visibility:"hidden",display:"block"},En={letterSpacing:0,fontWeight:400},Sn=["Top","Right","Bottom","Left"],xn=["Webkit","O","Moz","ms"];ut.fn.extend({css:function(e,n){return ut.access(this,function(e,n,r){var i,s,o={},u=0;if(ut.isArray(n)){for(i=fn(e),s=n.length;s>u;u++)o[n[u]]=ut.css(e,n[u],!1,i);return o}return r!==t?ut.style(e,n,r):ut.css(e,n)},e,n,arguments.length>1)},show:function(){return x(this,!0)},hide:function(){return x(this)},toggle:function(e){var t="boolean"==typeof e;return this.each(function(){(t?e:S(this))?ut(this).show():ut(this).hide()})}}),ut.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=an(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":ut.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var s,o,u,a=ut.camelCase(n),f=e.style;if(n=ut.cssProps[a]||(ut.cssProps[a]=E(f,a)),u=ut.cssHooks[n]||ut.cssHooks[a],r===t)return u&&"get"in u&&(s=u.get(e,!1,i))!==t?s:f[n];if(o=typeof r,"string"===o&&(s=yn.exec(r))&&(r=(s[1]+1)*s[2]+parseFloat(ut.css(e,n)),o="number"),!(null==r||"number"===o&&isNaN(r)||("number"!==o||ut.cssNumber[a]||(r+="px"),ut.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(f[n]="inherit"),u&&"set"in u&&(r=u.set(e,r,i))===t)))try{f[n]=r}catch(l){}}},css:function(e,n,r,i){var s,o,u,a=ut.camelCase(n);return n=ut.cssProps[a]||(ut.cssProps[a]=E(e.style,a)),u=ut.cssHooks[n]||ut.cssHooks[a],u&&"get"in u&&(s=u.get(e,!0,r)),s===t&&(s=an(e,n,i)),"normal"===s&&n in En&&(s=En[n]),r?(o=parseFloat(s),r===!0||ut.isNumeric(o)?o||0:s):s},swap:function(e,t,n,r){var i,s,o={};for(s in t)o[s]=e.style[s],e.style[s]=t[s];i=n.apply(e,r||[]);for(s in t)e.style[s]=o[s];return i}}),e.getComputedStyle?(fn=function(t){return e.getComputedStyle(t,null)},an=function(e,n,r){var i,s,o,u=r||fn(e),a=u?u.getPropertyValue(n)||u[n]:t,f=e.style;return u&&(""!==a||ut.contains(e.ownerDocument,e)||(a=ut.style(e,n)),gn.test(a)&&vn.test(n)&&(i=f.width,s=f.minWidth,o=f.maxWidth,f.minWidth=f.maxWidth=f.width=a,a=u.width,f.width=i,f.minWidth=s,f.maxWidth=o)),a}):$.documentElement.currentStyle&&(fn=function(e){return e.currentStyle},an=function(e,n,r){var i,s,o,u=r||fn(e),a=u?u[n]:t,f=e.style;return null==a&&f&&f[n]&&(a=f[n]),gn.test(a)&&!pn.test(n)&&(i=f.left,s=e.runtimeStyle,o=s&&s.left,o&&(s.left=e.currentStyle.left),f.left="fontSize"===n?"1em":a,a=f.pixelLeft+"px",f.left=i,o&&(s.left=o)),""===a?"auto":a}),ut.each(["height","width"],function(e,n){ut.cssHooks[n]={get:function(e,r,i){return r?0===e.offsetWidth&&dn.test(ut.css(e,"display"))?ut.swap(e,wn,function(){return C(e,n,i)}):C(e,n,i):t},set:function(e,t,r){var i=r&&fn(e);return T(e,t,r?N(e,n,r,ut.support.boxSizing&&"border-box"===ut.css(e,"boxSizing",!1,i),i):0)}}}),ut.support.opacity||(ut.cssHooks.opacity={get:function(e,t){return hn.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=ut.isNumeric(t)?"alpha(opacity="+100*t+")":"",s=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===ut.trim(s.replace(cn,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=cn.test(s)?s.replace(cn,i):s+" "+i)}}),ut(function(){ut.support.reliableMarginRight||(ut.cssHooks.marginRight={get:function(e,n){return n?ut.swap(e,{display:"inline-block"},an,[e,"marginRight"]):t}}),!ut.support.pixelPosition&&ut.fn.position&&ut.each(["top","left"],function(e,n){ut.cssHooks[n]={get:function(e,r){return r?(r=an(e,n),gn.test(r)?ut(e).position()[n]+"px":r):t}}})}),ut.expr&&ut.expr.filters&&(ut.expr.filters.hidden=function(e){return 0===e.offsetWidth&&0===e.offsetHeight||!ut.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||ut.css(e,"display"))},ut.expr.filters.visible=function(e){return!ut.expr.filters.hidden(e)}),ut.each({margin:"",padding:"",border:"Width"},function(e,t){ut.cssHooks[e+t]={expand:function(n){for(var r=0,i={},s="string"==typeof n?n.split(" "):[n];4>r;r++)i[e+Sn[r]+t]=s[r]||s[r-2]||s[0];return i}},vn.test(e)||(ut.cssHooks[e+t].set=T)});var Tn=/%20/g,Nn=/\[\]$/,Cn=/\r?\n/g,kn=/^(?:submit|button|image|reset)$/i,Ln=/^(?:input|select|textarea|keygen)/i;ut.fn.extend({serialize:function(){return ut.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=ut.prop(this,"elements");return e?ut.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!ut(this).is(":disabled")&&Ln.test(this.nodeName)&&!kn.test(e)&&(this.checked||!Zt.test(e))}).map(function(e,t){var n=ut(this).val();return null==n?null:ut.isArray(n)?ut.map(n,function(e){return{name:t.name,value:e.replace(Cn,"\r\n")}}):{name:t.name,value:n.replace(Cn,"\r\n")}}).get()}}),ut.param=function(e,n){var r,i=[],s=function(e,t){t=ut.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=ut.ajaxSettings&&ut.ajaxSettings.traditional),ut.isArray(e)||e.jquery&&!ut.isPlainObject(e))ut.each(e,function(){s(this.name,this.value)});else for(r in e)A(r,e[r],n,s);return i.join("&").replace(Tn,"+")};var An,On,Mn=ut.now(),_n=/\?/,Dn=/#.*$/,Pn=/([?&])_=[^&]*/,Hn=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Bn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,jn=/^(?:GET|HEAD)$/,Fn=/^\/\//,In=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,qn=ut.fn.load,Rn={},Un={},zn="*/".concat("*");try{On=J.href}catch(Wn){On=$.createElement("a"),On.href="",On=On.href}An=In.exec(On.toLowerCase())||[],ut.fn.load=function(e,n,r){if("string"!=typeof e&&qn)return qn.apply(this,arguments);var i,s,o,u=this,a=e.indexOf(" ");return a>=0&&(i=e.slice(a,e.length),e=e.slice(0,a)),ut.isFunction(n)?(r=n,n=t):n&&"object"==typeof n&&(s="POST"),u.length>0&&ut.ajax({url:e,type:s,dataType:"html",data:n}).done(function(e){o=arguments,u.html(i?ut("<div>").append(ut.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){u.each(r,o||[e.responseText,t,e])}),this},ut.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){ut.fn[t]=function(e){return this.on(t,e)}}),ut.each(["get","post"],function(e,n){ut[n]=function(e,r,i,s){return ut.isFunction(r)&&(s=s||i,i=r,r=t),ut.ajax({url:e,type:n,dataType:s,data:r,success:i})}}),ut.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:On,type:"GET",isLocal:Bn.test(An[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":zn,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"},converters:{"* text":e.String,"text html":!0,"text json":ut.parseJSON,"text xml":ut.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?_(_(e,ut.ajaxSettings),t):_(ut.ajaxSettings,e)},ajaxPrefilter:O(Rn),ajaxTransport:O(Un),ajax:function(e,n){function r(e,n,r,u){var f,c,y,b,E,x=n;2!==w&&(w=2,a&&clearTimeout(a),i=t,o=u||"",S.readyState=e>0?4:0,r&&(b=D(h,S,r)),e>=200&&300>e||304===e?(h.ifModified&&(E=S.getResponseHeader("Last-Modified"),E&&(ut.lastModified[s]=E),E=S.getResponseHeader("etag"),E&&(ut.etag[s]=E)),304===e?(f=!0,x="notmodified"):(f=P(h,b),x=f.state,c=f.data,y=f.error,f=!y)):(y=x,(e||!x)&&(x="error",0>e&&(e=0))),S.status=e,S.statusText=(n||x)+"",f?v.resolveWith(p,[c,x,S]):v.rejectWith(p,[S,x,y]),S.statusCode(g),g=t,l&&d.trigger(f?"ajaxSuccess":"ajaxError",[S,h,f?c:y]),m.fireWith(p,[S,x]),l&&(d.trigger("ajaxComplete",[S,h]),--ut.active||ut.event.trigger("ajaxStop")))}"object"==typeof e&&(n=e,e=t),n=n||{};var i,s,o,u,a,f,l,c,h=ut.ajaxSetup({},n),p=h.context||h,d=h.context&&(p.nodeType||p.jquery)?ut(p):ut.event,v=ut.Deferred(),m=ut.Callbacks("once memory"),g=h.statusCode||{},y={},b={},w=0,E="canceled",S={readyState:0,getResponseHeader:function(e){var t;if(2===w){if(!u)for(u={};t=Hn.exec(o);)u[t[1].toLowerCase()]=t[2];t=u[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===w?o:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return w||(e=b[n]=b[n]||e,y[e]=t),this},overrideMimeType:function(e){return w||(h.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>w)for(t in e)g[t]=[g[t],e[t]];else S.always(e[S.status]);return this},abort:function(e){var t=e||E;return i&&i.abort(t),r(0,t),this}};if(v.promise(S).complete=m.add,S.success=S.done,S.error=S.fail,h.url=((e||h.url||On)+"").replace(Dn,"").replace(Fn,An[1]+"//"),h.type=n.method||n.type||h.method||h.type,h.dataTypes=ut.trim(h.dataType||"*").toLowerCase().match(ft)||[""],null==h.crossDomain&&(f=In.exec(h.url.toLowerCase()),h.crossDomain=!(!f||f[1]===An[1]&&f[2]===An[2]&&(f[3]||("http:"===f[1]?80:443))==(An[3]||("http:"===An[1]?80:443)))),h.data&&h.processData&&"string"!=typeof h.data&&(h.data=ut.param(h.data,h.traditional)),M(Rn,h,n,S),2===w)return S;l=h.global,l&&0===ut.active++&&ut.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!jn.test(h.type),s=h.url,h.hasContent||(h.data&&(s=h.url+=(_n.test(s)?"&":"?")+h.data,delete h.data),h.cache===!1&&(h.url=Pn.test(s)?s.replace(Pn,"$1_="+Mn++):s+(_n.test(s)?"&":"?")+"_="+Mn++)),h.ifModified&&(ut.lastModified[s]&&S.setRequestHeader("If-Modified-Since",ut.lastModified[s]),ut.etag[s]&&S.setRequestHeader("If-None-Match",ut.etag[s])),(h.data&&h.hasContent&&h.contentType!==!1||n.contentType)&&S.setRequestHeader("Content-Type",h.contentType),S.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+zn+"; q=0.01":""):h.accepts["*"]);for(c in h.headers)S.setRequestHeader(c,h.headers[c]);if(h.beforeSend&&(h.beforeSend.call(p,S,h)===!1||2===w))return S.abort();E="abort";for(c in{success:1,error:1,complete:1})S[c](h[c]);if(i=M(Un,h,n,S)){S.readyState=1,l&&d.trigger("ajaxSend",[S,h]),h.async&&h.timeout>0&&(a=setTimeout(function(){S.abort("timeout")},h.timeout));try{w=1,i.send(y,r)}catch(x){if(!(2>w))throw x;r(-1,x)}}else r(-1,"No Transport");return S},getScript:function(e,n){return ut.get(e,t,n,"script")},getJSON:function(e,t,n){return ut.get(e,t,n,"json")}}),ut.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return ut.globalEval(e),e}}}),ut.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),ut.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=$.head||ut("head")[0]||$.documentElement;return{send:function(t,i){n=$.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var Xn=[],Vn=/(=)\?(?=&|$)|\?\?/;ut.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xn.pop()||ut.expando+"_"+Mn++;return this[e]=!0,e}}),ut.ajaxPrefilter("json jsonp",function(n,r,i){var s,o,u,a=n.jsonp!==!1&&(Vn.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vn.test(n.data)&&"data");return a||"jsonp"===n.dataTypes[0]?(s=n.jsonpCallback=ut.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,a?n[a]=n[a].replace(Vn,"$1"+s):n.jsonp!==!1&&(n.url+=(_n.test(n.url)?"&":"?")+n.jsonp+"="+s),n.converters["script json"]=function(){return u||ut.error(s+" was not called"),u[0]},n.dataTypes[0]="json",o=e[s],e[s]=function(){u=arguments},i.always(function(){e[s]=o,n[s]&&(n.jsonpCallback=r.jsonpCallback,Xn.push(s)),u&&ut.isFunction(o)&&o(u[0]),u=o=t}),"script"):t});var $n,Jn,Kn=0,Qn=e.ActiveXObject&&function(){var e;for(e in $n)$n[e](t,!0)};ut.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&H()||B()}:H,Jn=ut.ajaxSettings.xhr(),ut.support.cors=!!Jn&&"withCredentials"in Jn,Jn=ut.support.ajax=!!Jn,Jn&&ut.ajaxTransport(function(n){if(!n.crossDomain||ut.support.cors){var r;return{send:function(i,s){var o,u,a=n.xhr();if(n.username?a.open(n.type,n.url,n.async,n.username,n.password):a.open(n.type,n.url,n.async),n.xhrFields)for(u in n.xhrFields)a[u]=n.xhrFields[u];n.mimeType&&a.overrideMimeType&&a.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(u in i)a.setRequestHeader(u,i[u])}catch(f){}a.send(n.hasContent&&n.data||null),r=function(e,i){var u,f,l,c,h;try{if(r&&(i||4===a.readyState))if(r=t,o&&(a.onreadystatechange=ut.noop,Qn&&delete $n[o]),i)4!==a.readyState&&a.abort();else{c={},u=a.status,h=a.responseXML,l=a.getAllResponseHeaders(),h&&h.documentElement&&(c.xml=h),"string"==typeof a.responseText&&(c.text=a.responseText);try{f=a.statusText}catch(p){f=""}u||!n.isLocal||n.crossDomain?1223===u&&(u=204):u=c.text?200:404}}catch(d){i||s(-1,d)}c&&s(u,f,c,l)},n.async?4===a.readyState?setTimeout(r):(o=++Kn,Qn&&($n||($n={},ut(e).unload(Qn)),$n[o]=r),a.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Gn,Yn,Zn=/^(?:toggle|show|hide)$/,er=RegExp("^(?:([+-])=|)("+at+")([a-z%]*)$","i"),tr=/queueHooks$/,nr=[R],rr={"*":[function(e,t){var n,r,i=this.createTween(e,t),s=er.exec(t),o=i.cur(),u=+o||0,a=1,f=20;if(s){if(n=+s[2],r=s[3]||(ut.cssNumber[e]?"":"px"),"px"!==r&&u){u=ut.css(i.elem,e,!0)||n||1;do a=a||".5",u/=a,ut.style(i.elem,e,u+r);while(a!==(a=i.cur()/o)&&1!==a&&--f)}i.unit=r,i.start=u,i.end=s[1]?u+(s[1]+1)*n:n}return i}]};ut.Animation=ut.extend(I,{tweener:function(e,t){ut.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");for(var n,r=0,i=e.length;i>r;r++)n=e[r],rr[n]=rr[n]||[],rr[n].unshift(t)},prefilter:function(e,t){t?nr.unshift(e):nr.push(e)}}),ut.Tween=U,U.prototype={constructor:U,init:function(e,t,n,r,i,s){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=s||(ut.cssNumber[n]?"":"px")},cur:function(){var e=U.propHooks[this.prop];return e&&e.get?e.get(this):U.propHooks._default.get(this)},run:function(e){var t,n=U.propHooks[this.prop];return this.pos=t=this.options.duration?ut.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):U.propHooks._default.set(this),this}},U.prototype.init.prototype=U.prototype,U.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=ut.css(e.elem,e.prop,"auto"),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){ut.fx.step[e.prop]?ut.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[ut.cssProps[e.prop]]||ut.cssHooks[e.prop])?ut.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},U.propHooks.scrollTop=U.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},ut.each(["toggle","show","hide"],function(e,t){var n=ut.fn[t];ut.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(z(t,!0),e,r,i)}}),ut.fn.extend({fadeTo:function(e,t,n,r){return this.filter(S).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=ut.isEmptyObject(e),s=ut.speed(t,n,r),o=function(){var t=I(this,ut.extend({},e),s);o.finish=function(){t.stop(!0)},(i||ut._data(this,"finish"))&&t.stop(!0)};return o.finish=o,i||s.queue===!1?this.each(o):this.queue(s.queue,o)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",s=ut.timers,o=ut._data(this);if(n)o[n]&&o[n].stop&&i(o[n]);else for(n in o)o[n]&&o[n].stop&&tr.test(n)&&i(o[n]);for(n=s.length;n--;)s[n].elem!==this||null!=e&&s[n].queue!==e||(s[n].anim.stop(r),t=!1,s.splice(n,1));(t||!r)&&ut.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=ut._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],s=ut.timers,o=r?r.length:0;for(n.finish=!0,ut.queue(this,e,[]),i&&i.cur&&i.cur.finish&&i.cur.finish.call(this),t=s.length;t--;)s[t].elem===this&&s[t].queue===e&&(s[t].anim.stop(!0),s.splice(t,1));for(t=0;o>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),ut.each({slideDown:z("show"),slideUp:z("hide"),slideToggle:z("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){ut.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),ut.speed=function(e,t,n){var r=e&&"object"==typeof e?ut.extend({},e):{complete:n||!n&&t||ut.isFunction(e)&&e,duration:e,easing:n&&t||t&&!ut.isFunction(t)&&t};return r.duration=ut.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in ut.fx.speeds?ut.fx.speeds[r.duration]:ut.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){ut.isFunction(r.old)&&r.old.call(this),r.queue&&ut.dequeue(this,r.queue)},r},ut.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},ut.timers=[],ut.fx=U.prototype.init,ut.fx.tick=function(){var e,n=ut.timers,r=0;for(Gn=ut.now();n.length>r;r++)e=n[r],e()||n[r]!==e||n.splice(r--,1);n.length||ut.fx.stop(),Gn=t},ut.fx.timer=function(e){e()&&ut.timers.push(e)&&ut.fx.start()},ut.fx.interval=13,ut.fx.start=function(){Yn||(Yn=setInterval(ut.fx.tick,ut.fx.interval))},ut.fx.stop=function(){clearInterval(Yn),Yn=null},ut.fx.speeds={slow:600,fast:200,_default:400},ut.fx.step={},ut.expr&&ut.expr.filters&&(ut.expr.filters.animated=function(e){return ut.grep(ut.timers,function(t){return e===t.elem}).length}),ut.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){ut.offset.setOffset(this,e,t)});var n,r,i={top:0,left:0},s=this[0],o=s&&s.ownerDocument;if(o)return n=o.documentElement,ut.contains(n,s)?(s.getBoundingClientRect!==t&&(i=s.getBoundingClientRect()),r=W(o),{top:i.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:i.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):i},ut.offset={setOffset:function(e,t,n){var r=ut.css(e,"position");"static"===r&&(e.style.position="relative");var i,s,o=ut(e),u=o.offset(),a=ut.css(e,"top"),f=ut.css(e,"left"),l=("absolute"===r||"fixed"===r)&&ut.inArray("auto",[a,f])>-1,c={},h={};l?(h=o.position(),i=h.top,s=h.left):(i=parseFloat(a)||0,s=parseFloat(f)||0),ut.isFunction(t)&&(t=t.call(e,n,u)),null!=t.top&&(c.top=t.top-u.top+i),null!=t.left&&(c.left=t.left-u.left+s),"using"in t?t.using.call(e,c):o.css(c)}},ut.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===ut.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),ut.nodeName(e[0],"html")||(n=e.offset()),n.top+=ut.css(e[0],"borderTopWidth",!0),n.left+=ut.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-ut.css(r,"marginTop",!0),left:t.left-n.left-ut.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||$.documentElement;e&&!ut.nodeName(e,"html")&&"static"===ut.css(e,"position");)e=e.offsetParent;return e||$.documentElement})}}),ut.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);ut.fn[e]=function(i){return ut.access(this,function(e,i,s){var o=W(e);return s===t?o?n in o?o[n]:o.document.documentElement[i]:e[i]:(o?o.scrollTo(r?ut(o).scrollLeft():s,r?s:ut(o).scrollTop()):e[i]=s,t)},e,i,arguments.length,null)}}),ut.each({Height:"height",Width:"width"},function(e,n){ut.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){ut.fn[i]=function(i,s){var o=arguments.length&&(r||"boolean"!=typeof i),u=r||(i===!0||s===!0?"margin":"border");return ut.access(this,function(n,r,i){var s;return ut.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(s=n.documentElement,Math.max(n.body["scroll"+e],s["scroll"+e],n.body["offset"+e],s["offset"+e],s["client"+e])):i===t?ut.css(n,r,u):ut.style(n,r,i,u)},n,o?i:t,o,null)}})}),e.jQuery=e.$=ut,"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return ut})})(window)
</script>
<script> // RSVP
(function(e){"use strict";function v(e,n){t.async(function(){e.trigger("promise:resolved",{detail:n});e.isResolved=true;e.resolvedValue=n})}function m(e,n){t.async(function(){e.trigger("promise:failed",{detail:n});e.isRejected=true;e.rejectedValue=n})}function g(e){var t,n=[];var r=new h;var i=e.length;if(i===0){r.resolve([])}var s=function(e){return function(t){o(e,t)}};var o=function(e,t){n[e]=t;if(--i===0){r.resolve(n)}};var u=function(e){r.reject(e)};for(t=0;t<i;t++){e[t].then(s(t),u)}return r}function y(e,n){t[e]=n}var t={};var n=typeof window!=="undefined"?window:{};var r=n.MutationObserver||n.WebKitMutationObserver;var i;if(typeof process!=="undefined"&&{}.toString.call(process)==="[object process]"){t.async=function(e,t){process.nextTick(function(){e.call(t)})}}else if(r){var s=[];var o=new r(function(){var e=s.slice();s=[];e.forEach(function(e){var t=e[0],n=e[1];t.call(n)})});var u=document.createElement("div");o.observe(u,{attributes:true});window.addEventListener("unload",function(){o.disconnect();o=null});t.async=function(e,t){s.push([e,t]);u.setAttribute("drainQueue","drainQueue")}}else{t.async=function(e,t){setTimeout(function(){e.call(t)},1)}}var a=function(e,t){this.type=e;for(var n in t){if(!t.hasOwnProperty(n)){continue}this[n]=t[n]}};var f=function(e,t){for(var n=0,r=e.length;n<r;n++){if(e[n][0]===t){return n}}return-1};var l=function(e){var t=e._promiseCallbacks;if(!t){t=e._promiseCallbacks={}}return t};var c={mixin:function(e){e.on=this.on;e.off=this.off;e.trigger=this.trigger;return e},on:function(e,t,n){var r=l(this),i,s;e=e.split(/\s+/);n=n||this;while(s=e.shift()){i=r[s];if(!i){i=r[s]=[]}if(f(i,t)===-1){i.push([t,n])}}},off:function(e,t){var n=l(this),r,i,s;e=e.split(/\s+/);while(i=e.shift()){if(!t){n[i]=[];continue}r=n[i];s=f(r,t);if(s!==-1){r.splice(s,1)}}},trigger:function(e,t){var n=l(this),r,i,s,o,u;if(r=n[e]){for(var f=0,c=r.length;f<c;f++){i=r[f];s=i[0];o=i[1];if(typeof t!=="object"){t={detail:t}}u=new a(e,t);s.call(o,u)}}}};var h=function(){this.on("promise:resolved",function(e){this.trigger("success",{detail:e.detail})},this);this.on("promise:failed",function(e){this.trigger("error",{detail:e.detail})},this)};var p=function(){};var d=function(e,t,n,r){var i=typeof n==="function",s,o,u,a;if(i){try{s=n(r.detail);u=true}catch(f){a=true;o=f}}else{s=r.detail;u=true}if(s&&typeof s.then==="function"){s.then(function(e){t.resolve(e)},function(e){t.reject(e)})}else if(i&&u){t.resolve(s)}else if(a){t.reject(o)}else{t[e](s)}};h.prototype={then:function(e,n){var r=new h;if(this.isResolved){t.async(function(){d("resolve",r,e,{detail:this.resolvedValue})},this)}if(this.isRejected){t.async(function(){d("reject",r,n,{detail:this.rejectedValue})},this)}this.on("promise:resolved",function(t){d("resolve",r,e,t)});this.on("promise:failed",function(e){d("reject",r,n,e)});return r},resolve:function(e){v(this,e);this.resolve=p;this.reject=p},reject:function(e){m(this,e);this.resolve=p;this.reject=p}};c.mixin(h.prototype);e.Promise=h;e.Event=a;e.EventTarget=c;e.all=g;e.configure=y})(window.RSVP={})
</script>
<script> // Laissez-faire
!function(){function e(n){var r=t[n];return"string"==typeof r&&Function("module","exports","require","eval("+JSON.stringify(r+"\n//@ sourceURL=/"+n)+")").call((t[n]=r={exports:{}}).exports,r,r.exports,e),r.exports}var t=['function Promise(){this._len=0}function run(e,t){try{e=e(t)}catch(n){return newRejected(n)}return e&&"function"==typeof e.then?e instanceof Promise?e:extract(e):newFulfilled(e)}function extract(e){var t=new Promise;return e.then(function(e){t.resolve(e)},function(e){t.reject(e)}),t}function thrower(e){throw e}function noop(){}function propagate(e,t,n){try{n=t(n)}catch(r){return e.reject(r)}n&&"function"==typeof n.then?n[n instanceof Promise?"end":"then"](function(t){e.resolve(t)},function(t){e.reject(t)}):e.resolve(n)}function newPending(e){var t=new Promise;return e&&e.call(t,t),t}function newRejected(e){var t=new Promise;return t.reason=e,t.state="rejected",t}function newFulfilled(e){var t=new Promise;return t.value=e,t.state="resolved",t}exports=module.exports=Promise;var proto=Promise.prototype;proto._len=0,proto.value=proto.reason=void 0,proto.state="pending",proto.then=function(e,t){switch(this.state){case"pending":var n=this[this._len++]=new Promise;return n._success=e,n._fail=t,n;case"resolved":return e?run(e,this.value):newFulfilled(this.value);case"rejected":return exports.onCatch&&exports.onCatch(this),t?run(t,this.reason):newRejected(this.reason)}},proto.stub=proto.throw=proto.end=function(e,t){switch(this.state){case"pending":this[this._len++]={resolve:e||noop,reject:t||thrower};break;case"resolved":e&&e(this.value);break;case"rejected":if(exports.onCatch&&exports.onCatch(this),!t)throw this.reason;t(this.reason)}return this},proto.fulfill=proto.resolve=function(e){if("pending"===this.state){this.value=e,this.state="resolved";for(var t,n=0;t=this[n++];)t._success?propagate(t,t._success,e):t.resolve(e)}return this},proto.break=proto.reject=function(e){if("pending"===this.state){this.state="rejected",this.reason=e;var t=0,n=this[t];if(n){do n._fail?propagate(n,n._fail,e):n.reject(e);while(n=this[++t])}else exports.onError&&exports.onError(this,e)}return this},proto.assign=function(e){return this[e instanceof Error?"reject":"resolve"](e)},proto.fail=function(e){return this.end(null,e)},proto.catch=proto.otherwise=function(e){return this.then(null,e)},proto.always=function(e){return this.then(e,e)},proto.finish=function(e){return this.end(e,e)},proto.node=function(e){return this.then(function(t){return e(null,t)},e)},proto.nend=function(e){return this.end(function(t){e(null,t)},e)},proto.cancel=function(){for(this.state="canceled";this._len--;)delete this[this._len];return this},proto.yeild=function(e){return this.then(function(){return e})},proto.wasBroken=function(){return"rejected"===this.state},proto.wasFulfilled=function(){return"resolved"===this.state},proto.wasCanceled=function(){return"canceled"===this.state},proto.isPending=function(){return"pending"===this.state},proto.proxy=function(){var e=this;return Object.create(null,{then:{value:function(t,n){return e.then(t,n)}}})},exports.pending=newPending,exports.broken=exports.rejected=newRejected,exports.resolved=exports.fulfilled=newFulfilled,exports.mixin=function(e){for(var t in proto)e[t]=proto[t];return e},exports.onError=function(e,t){e._throw=setTimeout(function(){if(t instanceof Error)throw t.message+=" (Rethrown from rejected promise)",t;console&&console.warn(t)},1e3)},exports.onCatch=function(e){clearTimeout(e._throw),delete e._throw};'];Promise=e(0)}()
</script>
<script> // avow
(function(e){e(function(){function i(t){function u(e){var t=f();t.fulfill(e);return t.promise}function a(e){var t=f();t.reject(e);return t.promise}function f(){function f(t,n){a=a||typeof n==="function";var r=e();u(t,n,r);return r.promise}function h(e,t){if(!o){return}var n=o;o=r;u=function(n,r,s){i(function(){e(t,n,r,s.fulfill,s.reject)})};i(function(){n.forEach(function(n){n(e,t)})})}var t,n,o,u,a;n=p(f);t={promise:n,fulfill:function(e){h(l,e)},reject:function(e){if(a===false){a=true;s(e,n)}h(c,e)}};o=[];u=function(e,t,n){o.push(function(r,i){r(i,e,t,n.fulfill,n.reject)})};return t}function l(e,t,n,r,i){return h(e,t,r,r,i)}function c(e,t,n,r,i){return h(e,n,i,r,i)}function h(e,t,n,r,i){var s;try{if(typeof t==="function"){s=t(e);if(s&&typeof s.then==="function"){s.then(r,i)}else{r(s)}}else{n(e)}}catch(o){i(o)}}function p(e){return o({then:e})}var i,s,o;i=t.nextTick||n.nextTick;s=t.unhandled||n.unhandled;o=t.protect||n.protect;f.fulfilled=u;f.rejected=a;return f}function s(e){return e}function o(){}var e,t,n,r;t=typeof process==="object"?process.nextTick:typeof setImmediate==="function"?setImmediate:function(e){setTimeout(e,0)};n={nextTick:t,unhandled:o,protect:s};e=i(n);e.construct=i;return e})})(typeof define==="function"&&define.amd?define:function(e){avow=e()})
</script>

Preparation code output

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
q
// async test
var d = Q.defer()
d.promise.then(function done() {
  deferred.resolve()
})
d.resolve()
pending…
when
// async test
var d = when.defer()
d.then(function done() {
  deferred.resolve()
})
d.resolve()
pending…
jquery
// async test
var d = jQuery.Deferred()
d.then(function done() {
  deferred.resolve()
})
d.resolve()
pending…
RSVP
// async test
var p = new RSVP.Promise
p.then(function done() {
  deferred.resolve()
})
p.resolve()
pending…
Laissez-faire
// async test
var p = new Promise
p.then(function done() {
  deferred.resolve()
})
p.resolve()
pending…
avow
// async test
var v = avow()
v.promise.then(function done() {
  deferred.resolve()
})
v.fulfill()
pending…

Compare results of other browsers

Revisions

You can edit these tests or add even more tests to this page by appending /edit to the URL. Here’s a list of current revisions for this page: