Last active
February 27, 2019 18:47
-
-
Save acidsound/c877008001810da0298ef289bf017cf7 to your computer and use it in GitHub Desktop.
blaze.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Meteor = {}; | |
!function(){var e,t;(function(){t={}}).call(this),function(){(function(){var e=this,r=e._,n={},o=Array.prototype,a=Object.prototype,c=Function.prototype,s=o.push,i=o.slice,u=o.concat,d=a.toString,p=a.hasOwnProperty,l=o.forEach,h=o.map,f=o.reduce,g=o.reduceRight,m=o.filter,v=o.every,y=o.some,E=o.indexOf,b=o.lastIndexOf,A=Array.isArray,C=Object.keys,w=c.bind,_=function(e){return e instanceof _?e:this instanceof _?void(this._wrapped=e):new _(e)};"undefined"!=typeof t?("undefined"!=typeof module&&module.exports&&(t=module.exports=_),t._=_):e._=_,_.VERSION="1.5.2";var x=function(e){return"[object Arguments]"===d.call(e)};x(arguments)||(x=function(e){return!(!e||!p.call(e,"callee")||"function"!=typeof e.callee)});var D=function(e){return e.length===+e.length&&(x(e)||e.constructor!==Object)},T=_.each=_.forEach=function(e,t,r){if(null!=e)if(l&&e.forEach===l)e.forEach(t,r);else if(D(e)){for(var o=0,a=e.length;a>o;o++)if(t.call(r,e[o],o,e)===n)return}else for(var c=_.keys(e),o=0,a=c.length;a>o;o++)if(t.call(r,e[c[o]],c[o],e)===n)return};_.map=_.collect=function(e,t,r){var n=[];return null==e?n:h&&e.map===h?e.map(t,r):(T(e,function(e,o,a){n.push(t.call(r,e,o,a))}),n)};var k="Reduce of empty array with no initial value";_.reduce=_.foldl=_.inject=function(e,t,r,n){var o=arguments.length>2;if(null==e&&(e=[]),f&&e.reduce===f)return n&&(t=_.bind(t,n)),o?e.reduce(t,r):e.reduce(t);if(T(e,function(e,a,c){o?r=t.call(n,r,e,a,c):(r=e,o=!0)}),!o)throw new TypeError(k);return r},_.reduceRight=_.foldr=function(e,t,r,n){var o=arguments.length>2;if(null==e&&(e=[]),g&&e.reduceRight===g)return n&&(t=_.bind(t,n)),o?e.reduceRight(t,r):e.reduceRight(t);var a=e.length;if(!D(e)){var c=_.keys(e);a=c.length}if(T(e,function(s,i,u){i=c?c[--a]:--a,o?r=t.call(n,r,e[i],i,u):(r=e[i],o=!0)}),!o)throw new TypeError(k);return r},_.find=_.detect=function(e,t,r){var n;return B(e,function(e,o,a){return t.call(r,e,o,a)?(n=e,!0):void 0}),n},_.filter=_.select=function(e,t,r){var n=[];return null==e?n:m&&e.filter===m?e.filter(t,r):(T(e,function(e,o,a){t.call(r,e,o,a)&&n.push(e)}),n)},_.reject=function(e,t,r){return _.filter(e,function(e,n,o){return!t.call(r,e,n,o)},r)},_.every=_.all=function(e,t,r){t||(t=_.identity);var o=!0;return null==e?o:v&&e.every===v?e.every(t,r):(T(e,function(e,a,c){return(o=o&&t.call(r,e,a,c))?void 0:n}),!!o)};var B=_.some=_.any=function(e,t,r){t||(t=_.identity);var o=!1;return null==e?o:y&&e.some===y?e.some(t,r):(T(e,function(e,a,c){return o||(o=t.call(r,e,a,c))?n:void 0}),!!o)};_.contains=_.include=function(e,t){return null==e?!1:E&&e.indexOf===E?-1!=e.indexOf(t):B(e,function(e){return e===t})},_.invoke=function(e,t){var r=i.call(arguments,2),n=_.isFunction(t);return _.map(e,function(e){return(n?t:e[t]).apply(e,r)})},_.pluck=function(e,t){return _.map(e,function(e){return e[t]})},_.where=function(e,t,r){return _.isEmpty(t)?r?void 0:[]:_[r?"find":"filter"](e,function(e){for(var r in t)if(t[r]!==e[r])return!1;return!0})},_.findWhere=function(e,t){return _.where(e,t,!0)},_.max=function(e,t,r){if(!t&&_.isArray(e)&&e[0]===+e[0]&&e.length<65535)return Math.max.apply(Math,e);if(!t&&_.isEmpty(e))return-1/0;var n={computed:-1/0,value:-1/0};return T(e,function(e,o,a){var c=t?t.call(r,e,o,a):e;c>n.computed&&(n={value:e,computed:c})}),n.value},_.min=function(e,t,r){if(!t&&_.isArray(e)&&e[0]===+e[0]&&e.length<65535)return Math.min.apply(Math,e);if(!t&&_.isEmpty(e))return 1/0;var n={computed:1/0,value:1/0};return T(e,function(e,o,a){var c=t?t.call(r,e,o,a):e;c<n.computed&&(n={value:e,computed:c})}),n.value},_.shuffle=function(e){var t,r=0,n=[];return T(e,function(e){t=_.random(r++),n[r-1]=n[t],n[t]=e}),n},_.sample=function(e,t,r){return arguments.length<2||r?e[_.random(e.length-1)]:_.shuffle(e).slice(0,Math.max(0,t))};var F=function(e){return _.isFunction(e)?e:function(t){return t[e]}};_.sortBy=function(e,t,r){var n=F(t);return _.pluck(_.map(e,function(e,t,o){return{value:e,index:t,criteria:n.call(r,e,t,o)}}).sort(function(e,t){var r=e.criteria,n=t.criteria;if(r!==n){if(r>n||void 0===r)return 1;if(n>r||void 0===n)return-1}return e.index-t.index}),"value")};var S=function(e){return function(t,r,n){var o={},a=null==r?_.identity:F(r);return T(t,function(r,c){var s=a.call(n,r,c,t);e(o,s,r)}),o}};_.groupBy=S(function(e,t,r){(_.has(e,t)?e[t]:e[t]=[]).push(r)}),_.indexBy=S(function(e,t,r){e[t]=r}),_.countBy=S(function(e,t){_.has(e,t)?e[t]++:e[t]=1}),_.sortedIndex=function(e,t,r,n){r=null==r?_.identity:F(r);for(var o=r.call(n,t),a=0,c=e.length;c>a;){var s=a+c>>>1;r.call(n,e[s])<o?a=s+1:c=s}return a},_.toArray=function(e){return e?_.isArray(e)?i.call(e):D(e)?_.map(e,_.identity):_.values(e):[]},_.size=function(e){return null==e?0:D(e)?e.length:_.keys(e).length},_.first=_.head=_.take=function(e,t,r){return null==e?void 0:null==t||r?e[0]:i.call(e,0,t)},_.initial=function(e,t,r){return i.call(e,0,e.length-(null==t||r?1:t))},_.last=function(e,t,r){return null==e?void 0:null==t||r?e[e.length-1]:i.call(e,Math.max(e.length-t,0))},_.rest=_.tail=_.drop=function(e,t,r){return i.call(e,null==t||r?1:t)},_.compact=function(e){return _.filter(e,_.identity)};var N=function(e,t,r){return t&&_.every(e,_.isArray)?u.apply(r,e):(T(e,function(e){_.isArray(e)||_.isArguments(e)?t?s.apply(r,e):N(e,t,r):r.push(e)}),r)};_.flatten=function(e,t){return N(e,t,[])},_.without=function(e){return _.difference(e,i.call(arguments,1))},_.uniq=_.unique=function(e,t,r,n){_.isFunction(t)&&(n=r,r=t,t=!1);var o=r?_.map(e,r,n):e,a=[],c=[];return T(o,function(r,n){(t?n&&c[c.length-1]===r:_.contains(c,r))||(c.push(r),a.push(e[n]))}),a},_.union=function(){return _.uniq(_.flatten(arguments,!0))},_.intersection=function(e){var t=i.call(arguments,1);return _.filter(_.uniq(e),function(e){return _.every(t,function(t){return _.indexOf(t,e)>=0})})},_.difference=function(e){var t=u.apply(o,i.call(arguments,1));return _.filter(e,function(e){return!_.contains(t,e)})},_.zip=function(){for(var e=_.max(_.pluck(arguments,"length").concat(0)),t=new Array(e),r=0;e>r;r++)t[r]=_.pluck(arguments,""+r);return t},_.object=function(e,t){if(null==e)return{};for(var r={},n=0,o=e.length;o>n;n++)t?r[e[n]]=t[n]:r[e[n][0]]=e[n][1];return r},_.indexOf=function(e,t,r){if(null==e)return-1;var n=0,o=e.length;if(r){if("number"!=typeof r)return n=_.sortedIndex(e,t),e[n]===t?n:-1;n=0>r?Math.max(0,o+r):r}if(E&&e.indexOf===E)return e.indexOf(t,r);for(;o>n;n++)if(e[n]===t)return n;return-1},_.lastIndexOf=function(e,t,r){if(null==e)return-1;var n=null!=r;if(b&&e.lastIndexOf===b)return n?e.lastIndexOf(t,r):e.lastIndexOf(t);for(var o=n?r:e.length;o--;)if(e[o]===t)return o;return-1},_.range=function(e,t,r){arguments.length<=1&&(t=e||0,e=0),r=arguments[2]||1;for(var n=Math.max(Math.ceil((t-e)/r),0),o=0,a=new Array(n);n>o;)a[o++]=e,e+=r;return a};var O=function(){};_.bind=function(e,t){var r,n;if(w&&e.bind===w)return w.apply(e,i.call(arguments,1));if(!_.isFunction(e))throw new TypeError;return r=i.call(arguments,2),n=function(){if(!(this instanceof n))return e.apply(t,r.concat(i.call(arguments)));O.prototype=e.prototype;var o=new O;O.prototype=null;var a=e.apply(o,r.concat(i.call(arguments)));return Object(a)===a?a:o}},_.partial=function(e){var t=i.call(arguments,1);return function(){return e.apply(this,t.concat(i.call(arguments)))}},_.bindAll=function(e){var t=i.call(arguments,1);if(0===t.length)throw new Error("bindAll must be passed function names");return T(t,function(t){e[t]=_.bind(e[t],e)}),e},_.memoize=function(e,t){var r={};return t||(t=_.identity),function(){var n=t.apply(this,arguments);return _.has(r,n)?r[n]:r[n]=e.apply(this,arguments)}},_.delay=function(e,t){var r=i.call(arguments,2);return setTimeout(function(){return e.apply(null,r)},t)},_.defer=function(e){return _.delay.apply(_,[e,1].concat(i.call(arguments,1)))},_.throttle=function(e,t,r){var n,o,a,c=null,s=0;r||(r={});var i=function(){s=r.leading===!1?0:new Date,c=null,a=e.apply(n,o)};return function(){var u=new Date;s||r.leading!==!1||(s=u);var d=t-(u-s);return n=this,o=arguments,0>=d?(clearTimeout(c),c=null,s=u,a=e.apply(n,o)):c||r.trailing===!1||(c=setTimeout(i,d)),a}},_.debounce=function(e,t,r){var n,o,a,c,s;return function(){a=this,o=arguments,c=new Date;var i=function(){var u=new Date-c;t>u?n=setTimeout(i,t-u):(n=null,r||(s=e.apply(a,o)))},u=r&&!n;return n||(n=setTimeout(i,t)),u&&(s=e.apply(a,o)),s}},_.once=function(e){var t,r=!1;return function(){return r?t:(r=!0,t=e.apply(this,arguments),e=null,t)}},_.wrap=function(e,t){return function(){var r=[e];return s.apply(r,arguments),t.apply(this,r)}},_.compose=function(){var e=arguments;return function(){for(var t=arguments,r=e.length-1;r>=0;r--)t=[e[r].apply(this,t)];return t[0]}},_.after=function(e,t){return function(){return--e<1?t.apply(this,arguments):void 0}},_.keys=C||function(e){if(e!==Object(e))throw new TypeError("Invalid object");var t=[];for(var r in e)_.has(e,r)&&t.push(r);return t},_.values=function(e){for(var t=_.keys(e),r=t.length,n=new Array(r),o=0;r>o;o++)n[o]=e[t[o]];return n},_.pairs=function(e){for(var t=_.keys(e),r=t.length,n=new Array(r),o=0;r>o;o++)n[o]=[t[o],e[t[o]]];return n},_.invert=function(e){for(var t={},r=_.keys(e),n=0,o=r.length;o>n;n++)t[e[r[n]]]=r[n];return t},_.functions=_.methods=function(e){var t=[];for(var r in e)_.isFunction(e[r])&&t.push(r);return t.sort()},_.extend=function(e){return T(i.call(arguments,1),function(t){if(t)for(var r in t)e[r]=t[r]}),e},_.pick=function(e){var t={},r=u.apply(o,i.call(arguments,1));return T(r,function(r){r in e&&(t[r]=e[r])}),t},_.omit=function(e){var t={},r=u.apply(o,i.call(arguments,1));for(var n in e)_.contains(r,n)||(t[n]=e[n]);return t},_.defaults=function(e){return T(i.call(arguments,1),function(t){if(t)for(var r in t)void 0===e[r]&&(e[r]=t[r])}),e},_.clone=function(e){return _.isObject(e)?_.isArray(e)?e.slice():_.extend({},e):e},_.tap=function(e,t){return t(e),e};var I=function(e,t,r,n){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return e===t;e instanceof _&&(e=e._wrapped),t instanceof _&&(t=t._wrapped);var o=d.call(e);if(o!=d.call(t))return!1;switch(o){case"[object String]":return e==String(t);case"[object Number]":return e!=+e?t!=+t:0==e?1/e==1/t:e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object RegExp]":return e.source==t.source&&e.global==t.global&&e.multiline==t.multiline&&e.ignoreCase==t.ignoreCase}if("object"!=typeof e||"object"!=typeof t)return!1;for(var a=r.length;a--;)if(r[a]==e)return n[a]==t;var c=e.constructor,s=t.constructor;if(c!==s&&!(_.isFunction(c)&&c instanceof c&&_.isFunction(s)&&s instanceof s))return!1;r.push(e),n.push(t);var i=0,u=!0;if("[object Array]"==o){if(i=e.length,u=i==t.length)for(;i--&&(u=I(e[i],t[i],r,n)););}else{for(var p in e)if(_.has(e,p)&&(i++,!(u=_.has(t,p)&&I(e[p],t[p],r,n))))break;if(u){for(p in t)if(_.has(t,p)&&!i--)break;u=!i}}return r.pop(),n.pop(),u};_.isEqual=function(e,t){return I(e,t,[],[])},_.isEmpty=function(e){if(null==e)return!0;if(_.isArray(e)||_.isString(e))return 0===e.length;for(var t in e)if(_.has(e,t))return!1;return!0},_.isElement=function(e){return!(!e||1!==e.nodeType)},_.isArray=A||function(e){return"[object Array]"==d.call(e)},_.isObject=function(e){return e===Object(e)},T(["Arguments","Function","String","Number","Date","RegExp"],function(e){_["is"+e]=function(t){return d.call(t)=="[object "+e+"]"}}),_.isArguments(arguments)||(_.isArguments=function(e){return!(!e||!_.has(e,"callee"))}),"function"!=typeof/./&&(_.isFunction=function(e){return"function"==typeof e}),_.isFinite=function(e){return isFinite(e)&&!isNaN(parseFloat(e))},_.isNaN=function(e){return _.isNumber(e)&&e!=+e},_.isBoolean=function(e){return e===!0||e===!1||"[object Boolean]"==d.call(e)},_.isNull=function(e){return null===e},_.isUndefined=function(e){return void 0===e},_.has=function(e,t){return p.call(e,t)},_.noConflict=function(){return e._=r,this},_.identity=function(e){return e},_.times=function(e,t,r){for(var n=Array(Math.max(0,e)),o=0;e>o;o++)n[o]=t.call(r,o);return n},_.random=function(e,t){return null==t&&(t=e,e=0),e+Math.floor(Math.random()*(t-e+1))};var L={escape:{"&":"&","<":"<",">":">",'"':""","'":"'"}};L.unescape=_.invert(L.escape);var q={escape:new RegExp("["+_.keys(L.escape).join("")+"]","g"),unescape:new RegExp("("+_.keys(L.unescape).join("|")+")","g")};_.each(["escape","unescape"],function(e){_[e]=function(t){return null==t?"":(""+t).replace(q[e],function(t){return L[e][t]})}}),_.result=function(e,t){if(null==e)return void 0;var r=e[t];return _.isFunction(r)?r.call(e):r},_.mixin=function(e){T(_.functions(e),function(t){var r=_[t]=e[t];_.prototype[t]=function(){var e=[this._wrapped];return s.apply(e,arguments),$.call(this,r.apply(_,e))}})};var M=0;_.uniqueId=function(e){var t=++M+"";return e?e+t:t},_.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var P=/(.)^/,j={"'":"'","\\":"\\","\r":"r","\n":"n"," ":"t","\u2028":"u2028","\u2029":"u2029"},R=/\\|'|\r|\n|\t|\u2028|\u2029/g;_.template=function(e,t,r){var n;r=_.defaults({},r,_.templateSettings);var o=new RegExp([(r.escape||P).source,(r.interpolate||P).source,(r.evaluate||P).source].join("|")+"|$","g"),a=0,c="__p+='";e.replace(o,function(t,r,n,o,s){return c+=e.slice(a,s).replace(R,function(e){return"\\"+j[e]}),r&&(c+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'"),n&&(c+="'+\n((__t=("+n+"))==null?'':__t)+\n'"),o&&(c+="';\n"+o+"\n__p+='"),a=s+t.length,t}),c+="';\n",r.variable||(c="with(obj||{}){\n"+c+"}\n"),c="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+c+"return __p;\n";try{n=new Function(r.variable||"obj","_",c)}catch(s){throw s.source=c,s}if(t)return n(t,_);var i=function(e){return n.call(this,e,_)};return i.source="function("+(r.variable||"obj")+"){\n"+c+"}",i},_.chain=function(e){return _(e).chain()};var $=function(e){return this._chain?_(e).chain():e};_.mixin(_),T(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=o[e];_.prototype[e]=function(){var r=this._wrapped;return t.apply(r,arguments),"shift"!=e&&"splice"!=e||0!==r.length||delete r[0],$.call(this,r)}}),T(["concat","join","slice"],function(e){var t=o[e];_.prototype[e]=function(){return $.call(this,t.apply(this._wrapped,arguments))}}),_.extend(_.prototype,{chain:function(){return this._chain=!0,this},value:function(){return this._wrapped}})}).call(this)}.call(this),function(){e=t._}.call(this),"undefined"==typeof Package&&(Package={}),Package.underscore={_:e}}(),function(){var e,t=Package.underscore._;(function(){e={isClient:!0,isServer:!1},"object"==typeof __meteor_runtime_config__&&__meteor_runtime_config__.PUBLIC_SETTINGS&&(e.settings={"public":__meteor_runtime_config__.PUBLIC_SETTINGS})}).call(this),function(){if(e.isServer)var r=Npm.require("fibers/future");"object"==typeof __meteor_runtime_config__&&__meteor_runtime_config__.meteorRelease&&(e.release=__meteor_runtime_config__.meteorRelease),t.extend(e,{_get:function(e){for(var t=1;t<arguments.length;t++){if(!(arguments[t]in e))return void 0;e=e[arguments[t]]}return e},_ensure:function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];r in e||(e[r]={}),e=e[r]}return e},_delete:function(e){for(var t=[e],r=!0,n=1;n<arguments.length-1;n++){var o=arguments[n];if(!(o in e)){r=!1;break}if(e=e[o],"object"!=typeof e)break;t.push(e)}for(var n=t.length-1;n>=0;n--){var o=arguments[n+1];if(r)r=!1;else for(var a in t[n][o])return;delete t[n][o]}},_wrapAsync:function(n){return function(){for(var o,a,c=this,s=t.toArray(arguments),i=function(t){return t?e._debug("Exception in callback of async function",t.stack?t.stack:t):void 0};s.length>0&&"undefined"==typeof s[s.length-1];)s.pop();s.length>0&&s[s.length-1]instanceof Function?o=s.pop():e.isClient?o=i:(a=new r,o=a.resolver()),s.push(e.bindEnvironment(o));var u=n.apply(c,s);return a?a.wait():u}},_inherits:function(e,r){t.each(r,function(t,r){e[r]=t});var n=function(){this.constructor=e};return n.prototype=r.prototype,e.prototype=new n,e.__super__=r.prototype,e}})}.call(this),function(){"use strict";function t(){if(o.setImmediate){var e=function(e){o.setImmediate(e)};return e.implementation="setImmediate",e}return null}function r(){function e(e,t){return"string"==typeof e&&e.substring(0,t.length)===t}function t(t){if(t.source===o&&e(t.data,s)){var r=t.data.substring(s.length);try{c[r]&&c[r]()}finally{delete c[r]}}}if(!o.postMessage||o.importScripts)return null;var r=!0,n=o.onmessage;if(o.onmessage=function(){r=!1},o.postMessage("","*"),o.onmessage=n,!r)return null;var a=0,c={},s="Meteor._setImmediate."+Math.random()+".";o.addEventListener?o.addEventListener("message",t,!1):o.attachEvent("onmessage",t);var i=function(e){++a,c[a]=e,o.postMessage(s+a,"*")};return i.implementation="postMessage",i}function n(){var e=function(e){o.setTimeout(e,0)};return e.implementation="setTimeout",e}var o=this;e._setImmediate=t()||r()||n()}.call(this),function(){var r=function(e){if(Package.livedata){var t=Package.livedata.DDP._CurrentInvocation;if(t.get()&&t.get().isSimulation)throw new Error("Can't set timers inside simulations");return function(){t.withValue(null,e)}}return e},n=function(t,n){return e.bindEnvironment(r(n),t)};t.extend(e,{setTimeout:function(e,t){return setTimeout(n("setTimeout callback",e),t)},setInterval:function(e,t){return setInterval(n("setInterval callback",e),t)},clearInterval:function(e){return clearInterval(e)},clearTimeout:function(e){return clearTimeout(e)},defer:function(t){e._setImmediate(n("defer callback",t))}})}.call(this),function(){e.makeErrorType=function(t,r){var n=function(){var e=this;if(Error.captureStackTrace)Error.captureStackTrace(e,n);else{var o=new Error;o.__proto__=n.prototype,o instanceof n&&(e=o)}return r.apply(e,arguments),e.errorType=t,e};return e._inherits(n,Error),n},e.Error=e.makeErrorType("Meteor.Error",function(e,t,r){var n=this;n.error=e,n.reason=t,n.details=r,n.message=n.reason?n.reason+" ["+n.error+"]":"["+n.error+"]"}),e.Error.prototype.clone=function(){var t=this;return new e.Error(t.error,t.reason,t.details)}}.call(this),function(){e._noYieldsAllowed=function(e){return e()},e._SynchronousQueue=function(){var e=this;e._tasks=[],e._running=!1},t.extend(e._SynchronousQueue.prototype,{runTask:function(r){var n=this;if(!n.safeToRunTask())throw new Error("Could not synchronously run a task from a running task");n._tasks.push(r);var o=n._tasks;n._tasks=[],n._running=!0;try{for(;!t.isEmpty(o);){var a=o.shift();try{a()}catch(c){if(t.isEmpty(o))throw c;e._debug("Exception in queued task: "+c.stack)}}}finally{n._running=!1}},queueTask:function(e){var r=this,n=t.isEmpty(r._tasks);r._tasks.push(e),n&&setTimeout(t.bind(r.flush,r),0)},flush:function(){var e=this;e.runTask(function(){})},drain:function(){var e=this;if(e.safeToRunTask())for(;!t.isEmpty(e._tasks);)e.flush()},safeToRunTask:function(){var e=this;return!e._running}})}.call(this),function(){var t=[],r="loaded"===document.readyState||"complete"==document.readyState,n=function(){for(r=!0;t.length;)t.shift()()};document.addEventListener?(document.addEventListener("DOMContentLoaded",n,!1),window.addEventListener("load",n,!1)):(document.attachEvent("onreadystatechange",function(){"complete"===document.readyState&&n()}),window.attachEvent("load",n)),e.startup=function(n){var o=!document.addEventListener&&document.documentElement.doScroll;if(o&&window===top){try{o("left")}catch(a){return void setTimeout(function(){e.startup(n)},50)}n()}else r?n():t.push(n)}}.call(this),function(){var t=0;e._debug=function(){if(t)return void t--;if("undefined"!=typeof console&&"undefined"!=typeof console.log)if(0==arguments.length)console.log("");else if("function"==typeof console.log.apply){for(var e=!0,r=0;r<arguments.length;r++)"string"!=typeof arguments[r]&&(e=!1);e?console.log.apply(console,[Array.prototype.join.call(arguments," ")]):console.log.apply(console,arguments)}else if("function"==typeof Function.prototype.bind){var n=Function.prototype.bind.call(console.log,console);n.apply(console,arguments)}else Function.prototype.call.call(console.log,console,Array.prototype.slice.call(arguments))},e._suppress_log=function(e){t+=e}}.call(this),function(){var r=0,n=[];e.EnvironmentVariable=function(){this.slot=r++},t.extend(e.EnvironmentVariable.prototype,{get:function(){return n[this.slot]},getOrNullIfOutsideFiber:function(){return this.get()},withValue:function(e,t){var r=n[this.slot];try{n[this.slot]=e;var o=t()}finally{n[this.slot]=r}return o}}),e.bindEnvironment=function(r,o,a){var c=t.clone(n);if(!o||"string"==typeof o){var s=o||"callback of async function";o=function(t){e._debug("Exception in "+s+":",t&&t.stack||t)}}return function(){var e=n;try{n=c;var s=r.apply(a,t.toArray(arguments))}catch(i){o(i)}finally{n=e}return s}},e._nodeCodeMustBeInFiber=function(){}}.call(this),function(){e.absoluteUrl=function(r,n){n||"object"!=typeof r||(n=r,r=void 0),n=t.extend({},e.absoluteUrl.defaultOptions,n||{});var o=n.rootUrl;if(!o)throw new Error("Must pass options.rootUrl or set ROOT_URL in the server environment");return/^http[s]?:\/\//i.test(o)||(o="http://"+o),/\/$/.test(o)||(o+="/"),r&&(o+=r),n.secure&&/^http:/.test(o)&&!/http:\/\/localhost[:\/]/.test(o)&&!/http:\/\/127\.0\.0\.1[:\/]/.test(o)&&(o=o.replace(/^http:/,"https:")),n.replaceLocalhost&&(o=o.replace(/^http:\/\/localhost([:\/].*)/,"http://127.0.0.1$1")),o},e.absoluteUrl.defaultOptions={},"object"==typeof __meteor_runtime_config__&&__meteor_runtime_config__.ROOT_URL&&(e.absoluteUrl.defaultOptions.rootUrl=__meteor_runtime_config__.ROOT_URL),e._relativeToSiteRootUrl=function(e){return"object"==typeof __meteor_runtime_config__&&"/"===e.substr(0,1)&&(e=(__meteor_runtime_config__.ROOT_URL_PATH_PREFIX||"")+e),e}}.call(this),"undefined"==typeof Package&&(Package={}),Package.meteor={Meteor:e}}(),function(){Package.meteor.Meteor;"undefined"==typeof Package&&(Package={}),Package.autopublish={}}(),function(){Package.meteor.Meteor;"undefined"==typeof Package&&(Package={}),Package.insecure={}}(),function(){{var e,t;Package.meteor.Meteor}(function(){!function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){function r(e){var t=e.length,r=at.type(e);return"function"===r||at.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===r||0===t||"number"==typeof t&&t>0&&t-1 in e}function n(e,t,r){if(at.isFunction(t))return at.grep(e,function(e,n){return!!t.call(e,n,e)!==r});if(t.nodeType)return at.grep(e,function(e){return e===t!==r});if("string"==typeof t){if(ht.test(t))return at.filter(t,e,r);t=at.filter(t,e)}return at.grep(e,function(e){return at.inArray(e,t)>=0!==r})}function o(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function a(e){var t=At[e]={};return at.each(e.match(bt)||[],function(e,r){t[r]=!0}),t}function c(){gt.addEventListener?(gt.removeEventListener("DOMContentLoaded",s,!1),e.removeEventListener("load",s,!1)):(gt.detachEvent("onreadystatechange",s),e.detachEvent("onload",s))}function s(){(gt.addEventListener||"load"===event.type||"complete"===gt.readyState)&&(c(),at.ready())}function i(e,t,r){if(void 0===r&&1===e.nodeType){var n="data-"+t.replace(Dt,"-$1").toLowerCase();if(r=e.getAttribute(n),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:xt.test(r)?at.parseJSON(r):r}catch(o){}at.data(e,t,r)}else r=void 0}return r}function u(e){var t;for(t in e)if(("data"!==t||!at.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function d(e,t,r,n){if(at.acceptData(e)){var o,a,c=at.expando,s=e.nodeType,i=s?at.cache:e,u=s?e[c]:e[c]&&c;if(u&&i[u]&&(n||i[u].data)||void 0!==r||"string"!=typeof t)return u||(u=s?e[c]=G.pop()||at.guid++:c),i[u]||(i[u]=s?{}:{toJSON:at.noop}),("object"==typeof t||"function"==typeof t)&&(n?i[u]=at.extend(i[u],t):i[u].data=at.extend(i[u].data,t)),a=i[u],n||(a.data||(a.data={}),a=a.data),void 0!==r&&(a[at.camelCase(t)]=r),"string"==typeof t?(o=a[t],null==o&&(o=a[at.camelCase(t)])):o=a,o}}function p(e,t,r){if(at.acceptData(e)){var n,o,a=e.nodeType,c=a?at.cache:e,s=a?e[at.expando]:at.expando;if(c[s]){if(t&&(n=r?c[s]:c[s].data)){at.isArray(t)?t=t.concat(at.map(t,at.camelCase)):t in n?t=[t]:(t=at.camelCase(t),t=t in n?[t]:t.split(" ")),o=t.length;for(;o--;)delete n[t[o]];if(r?!u(n):!at.isEmptyObject(n))return}(r||(delete c[s].data,u(c[s])))&&(a?at.cleanData([e],!0):nt.deleteExpando||c!=c.window?delete c[s]:c[s]=null)}}}function l(){return!0}function h(){return!1}function f(){try{return gt.activeElement}catch(e){}}function g(e){var t=Mt.split("|"),r=e.createDocumentFragment();if(r.createElement)for(;t.length;)r.createElement(t.pop());return r}function m(e,t){var r,n,o=0,a=typeof e.getElementsByTagName!==_t?e.getElementsByTagName(t||"*"):typeof e.querySelectorAll!==_t?e.querySelectorAll(t||"*"):void 0;if(!a)for(a=[],r=e.childNodes||e;null!=(n=r[o]);o++)!t||at.nodeName(n,t)?a.push(n):at.merge(a,m(n,t));return void 0===t||t&&at.nodeName(e,t)?at.merge([e],a):a}function v(e){St.test(e.type)&&(e.defaultChecked=e.checked)}function y(e,t){return at.nodeName(e,"table")&&at.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function E(e){return e.type=(null!==at.find.attr(e,"type"))+"/"+e.type,e}function b(e){var t=Gt.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function A(e,t){for(var r,n=0;null!=(r=e[n]);n++)at._data(r,"globalEval",!t||at._data(t[n],"globalEval"))}function C(e,t){if(1===t.nodeType&&at.hasData(e)){var r,n,o,a=at._data(e),c=at._data(t,a),s=a.events;if(s){delete c.handle,c.events={};for(r in s)for(n=0,o=s[r].length;o>n;n++)at.event.add(t,r,s[r][n])}c.data&&(c.data=at.extend({},c.data))}}function w(e,t){var r,n,o;if(1===t.nodeType){if(r=t.nodeName.toLowerCase(),!nt.noCloneEvent&&t[at.expando]){o=at._data(t);for(n in o.events)at.removeEvent(t,n,o.handle);t.removeAttribute(at.expando)}"script"===r&&t.text!==e.text?(E(t).text=e.text,b(t)):"object"===r?(t.parentNode&&(t.outerHTML=e.outerHTML),nt.html5Clone&&e.innerHTML&&!at.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===r&&St.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===r?t.defaultSelected=t.selected=e.defaultSelected:("input"===r||"textarea"===r)&&(t.defaultValue=e.defaultValue)}}function _(t,r){var n=at(r.createElement(t)).appendTo(r.body),o=e.getDefaultComputedStyle?e.getDefaultComputedStyle(n[0]).display:at.css(n[0],"display");return n.detach(),o}function x(e){var t=gt,r=er[e];return r||(r=_(e,t),"none"!==r&&r||(Zt=(Zt||at("<iframe frameborder='0' width='0' height='0'/>")).appendTo(t.documentElement),t=(Zt[0].contentWindow||Zt[0].contentDocument).document,t.write(),t.close(),r=_(e,t),Zt.detach()),er[e]=r),r}function D(e,t){return{get:function(){var r=e();if(null!=r)return r?void delete this.get:(this.get=t).apply(this,arguments)}}}function T(e,t){if(t in e)return t;for(var r=t.charAt(0).toUpperCase()+t.slice(1),n=t,o=hr.length;o--;)if(t=hr[o]+r,t in e)return t;return n}function k(e,t){for(var r,n,o,a=[],c=0,s=e.length;s>c;c++)n=e[c],n.style&&(a[c]=at._data(n,"olddisplay"),r=n.style.display,t?(a[c]||"none"!==r||(n.style.display=""),""===n.style.display&&Bt(n)&&(a[c]=at._data(n,"olddisplay",x(n.nodeName)))):a[c]||(o=Bt(n),(r&&"none"!==r||!o)&&at._data(n,"olddisplay",o?r:at.css(n,"display"))));for(c=0;s>c;c++)n=e[c],n.style&&(t&&"none"!==n.style.display&&""!==n.style.display||(n.style.display=t?a[c]||"":"none"));return e}function B(e,t,r){var n=ur.exec(t);return n?Math.max(0,n[1]-(r||0))+(n[2]||"px"):t}function F(e,t,r,n,o){for(var a=r===(n?"border":"content")?4:"width"===t?1:0,c=0;4>a;a+=2)"margin"===r&&(c+=at.css(e,r+kt[a],!0,o)),n?("content"===r&&(c-=at.css(e,"padding"+kt[a],!0,o)),"margin"!==r&&(c-=at.css(e,"border"+kt[a]+"Width",!0,o))):(c+=at.css(e,"padding"+kt[a],!0,o),"padding"!==r&&(c+=at.css(e,"border"+kt[a]+"Width",!0,o)));return c}function S(e,t,r){var n=!0,o="width"===t?e.offsetWidth:e.offsetHeight,a=tr(e),c=nt.boxSizing()&&"border-box"===at.css(e,"boxSizing",!1,a);if(0>=o||null==o){if(o=rr(e,t,a),(0>o||null==o)&&(o=e.style[t]),or.test(o))return o;n=c&&(nt.boxSizingReliable()||o===e.style[t]),o=parseFloat(o)||0}return o+F(e,t,r||(c?"border":"content"),n,a)+"px"}function N(e,t,r,n,o){return new N.prototype.init(e,t,r,n,o)}function O(){return setTimeout(function(){fr=void 0}),fr=at.now()}function I(e,t){var r,n={height:e},o=0;for(t=t?1:0;4>o;o+=2-t)r=kt[o],n["margin"+r]=n["padding"+r]=e;return t&&(n.opacity=n.width=e),n}function L(e,t,r){for(var n,o=(br[t]||[]).concat(br["*"]),a=0,c=o.length;c>a;a++)if(n=o[a].call(r,t,e))return n}function q(e,t,r){var n,o,a,c,s,i,u,d,p=this,l={},h=e.style,f=e.nodeType&&Bt(e),g=at._data(e,"fxshow");r.queue||(s=at._queueHooks(e,"fx"),null==s.unqueued&&(s.unqueued=0,i=s.empty.fire,s.empty.fire=function(){s.unqueued||i()}),s.unqueued++,p.always(function(){p.always(function(){s.unqueued--,at.queue(e,"fx").length||s.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(r.overflow=[h.overflow,h.overflowX,h.overflowY],u=at.css(e,"display"),d=x(e.nodeName),"none"===u&&(u=d),"inline"===u&&"none"===at.css(e,"float")&&(nt.inlineBlockNeedsLayout&&"inline"!==d?h.zoom=1:h.display="inline-block")),r.overflow&&(h.overflow="hidden",nt.shrinkWrapBlocks()||p.always(function(){h.overflow=r.overflow[0],h.overflowX=r.overflow[1],h.overflowY=r.overflow[2]}));for(n in t)if(o=t[n],mr.exec(o)){if(delete t[n],a=a||"toggle"===o,o===(f?"hide":"show")){if("show"!==o||!g||void 0===g[n])continue;f=!0}l[n]=g&&g[n]||at.style(e,n)}if(!at.isEmptyObject(l)){g?"hidden"in g&&(f=g.hidden):g=at._data(e,"fxshow",{}),a&&(g.hidden=!f),f?at(e).show():p.done(function(){at(e).hide()}),p.done(function(){var t;at._removeData(e,"fxshow");for(t in l)at.style(e,t,l[t])});for(n in l)c=L(f?g[n]:0,n,p),n in g||(g[n]=c.start,f&&(c.end=c.start,c.start="width"===n||"height"===n?1:0))}}function M(e,t){var r,n,o,a,c;for(r in e)if(n=at.camelCase(r),o=t[n],a=e[r],at.isArray(a)&&(o=a[1],a=e[r]=a[0]),r!==n&&(e[n]=a,delete e[r]),c=at.cssHooks[n],c&&"expand"in c){a=c.expand(a),delete e[n];for(r in a)r in e||(e[r]=a[r],t[r]=o)}else t[n]=o}function P(e,t,r){var n,o,a=0,c=Er.length,s=at.Deferred().always(function(){delete i.elem}),i=function(){if(o)return!1;for(var t=fr||O(),r=Math.max(0,u.startTime+u.duration-t),n=r/u.duration||0,a=1-n,c=0,i=u.tweens.length;i>c;c++)u.tweens[c].run(a);return s.notifyWith(e,[u,a,r]),1>a&&i?r:(s.resolveWith(e,[u]),!1)},u=s.promise({elem:e,props:at.extend({},t),opts:at.extend(!0,{specialEasing:{}},r),originalProperties:t,originalOptions:r,startTime:fr||O(),duration:r.duration,tweens:[],createTween:function(t,r){var n=at.Tween(e,u.opts,t,r,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(n),n},stop:function(t){var r=0,n=t?u.tweens.length:0;if(o)return this;for(o=!0;n>r;r++)u.tweens[r].run(1);return t?s.resolveWith(e,[u,t]):s.rejectWith(e,[u,t]),this}}),d=u.props;for(M(d,u.opts.specialEasing);c>a;a++)if(n=Er[a].call(u,e,d,u.opts))return n;return at.map(d,L,u),at.isFunction(u.opts.start)&&u.opts.start.call(e,u),at.fx.timer(at.extend(i,{elem:e,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function j(e){return function(t,r){"string"!=typeof t&&(r=t,t="*");var n,o=0,a=t.toLowerCase().match(bt)||[];if(at.isFunction(r))for(;n=a[o++];)"+"===n.charAt(0)?(n=n.slice(1)||"*",(e[n]=e[n]||[]).unshift(r)):(e[n]=e[n]||[]).push(r)}}function R(e,t,r,n){function o(s){var i;return a[s]=!0,at.each(e[s]||[],function(e,s){var u=s(t,r,n);return"string"!=typeof u||c||a[u]?c?!(i=u):void 0:(t.dataTypes.unshift(u),o(u),!1)}),i}var a={},c=e===Vr;return o(t.dataTypes[0])||!a["*"]&&o("*")}function $(e,t){var r,n,o=at.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((o[n]?e:r||(r={}))[n]=t[n]);return r&&at.extend(!0,e,r),e}function H(e,t,r){for(var n,o,a,c,s=e.contents,i=e.dataTypes;"*"===i[0];)i.shift(),void 0===o&&(o=e.mimeType||t.getResponseHeader("Content-Type")); | |
if(o)for(c in s)if(s[c]&&s[c].test(o)){i.unshift(c);break}if(i[0]in r)a=i[0];else{for(c in r){if(!i[0]||e.converters[c+" "+i[0]]){a=c;break}n||(n=c)}a=a||n}return a?(a!==i[0]&&i.unshift(a),r[a]):void 0}function U(e,t,r,n){var o,a,c,s,i,u={},d=e.dataTypes.slice();if(d[1])for(c in e.converters)u[c.toLowerCase()]=e.converters[c];for(a=d.shift();a;)if(e.responseFields[a]&&(r[e.responseFields[a]]=t),!i&&n&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),i=a,a=d.shift())if("*"===a)a=i;else if("*"!==i&&i!==a){if(c=u[i+" "+a]||u["* "+a],!c)for(o in u)if(s=o.split(" "),s[1]===a&&(c=u[i+" "+s[0]]||u["* "+s[0]])){c===!0?c=u[o]:u[o]!==!0&&(a=s[0],d.unshift(s[1]));break}if(c!==!0)if(c&&e["throws"])t=c(t);else try{t=c(t)}catch(p){return{state:"parsererror",error:c?p:"No conversion from "+i+" to "+a}}}return{state:"success",data:t}}function V(e,t,r,n){var o;if(at.isArray(t))at.each(t,function(t,o){r||Gr.test(e)?n(e,o):V(e+"["+("object"==typeof o?t:"")+"]",o,r,n)});else if(r||"object"!==at.type(t))n(e,t);else for(o in t)V(e+"["+o+"]",t[o],r,n)}function z(){try{return new e.XMLHttpRequest}catch(t){}}function J(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function W(e){return at.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}var G=[],X=G.slice,K=G.concat,Q=G.push,Y=G.indexOf,Z={},et=Z.toString,tt=Z.hasOwnProperty,rt="".trim,nt={},ot="1.11.0",at=function(e,t){return new at.fn.init(e,t)},ct=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,st=/^-ms-/,it=/-([\da-z])/gi,ut=function(e,t){return t.toUpperCase()};at.fn=at.prototype={jquery:ot,constructor:at,selector:"",length:0,toArray:function(){return X.call(this)},get:function(e){return null!=e?0>e?this[e+this.length]:this[e]:X.call(this)},pushStack:function(e){var t=at.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return at.each(this,e,t)},map:function(e){return this.pushStack(at.map(this,function(t,r){return e.call(t,r,t)}))},slice:function(){return this.pushStack(X.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,r=+e+(0>e?t:0);return this.pushStack(r>=0&&t>r?[this[r]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:Q,sort:G.sort,splice:G.splice},at.extend=at.fn.extend=function(){var e,t,r,n,o,a,c=arguments[0]||{},s=1,i=arguments.length,u=!1;for("boolean"==typeof c&&(u=c,c=arguments[s]||{},s++),"object"==typeof c||at.isFunction(c)||(c={}),s===i&&(c=this,s--);i>s;s++)if(null!=(o=arguments[s]))for(n in o)e=c[n],r=o[n],c!==r&&(u&&r&&(at.isPlainObject(r)||(t=at.isArray(r)))?(t?(t=!1,a=e&&at.isArray(e)?e:[]):a=e&&at.isPlainObject(e)?e:{},c[n]=at.extend(u,a,r)):void 0!==r&&(c[n]=r));return c},at.extend({expando:"jQuery"+(ot+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===at.type(e)},isArray:Array.isArray||function(e){return"array"===at.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return e-parseFloat(e)>=0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},isPlainObject:function(e){var t;if(!e||"object"!==at.type(e)||e.nodeType||at.isWindow(e))return!1;try{if(e.constructor&&!tt.call(e,"constructor")&&!tt.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(r){return!1}if(nt.ownLast)for(t in e)return tt.call(e,t);for(t in e);return void 0===t||tt.call(e,t)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?Z[et.call(e)]||"object":typeof e},globalEval:function(t){t&&at.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(st,"ms-").replace(it,ut)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var o,a=0,c=e.length,s=r(e);if(n){if(s)for(;c>a&&(o=t.apply(e[a],n),o!==!1);a++);else for(a in e)if(o=t.apply(e[a],n),o===!1)break}else if(s)for(;c>a&&(o=t.call(e[a],a,e[a]),o!==!1);a++);else for(a in e)if(o=t.call(e[a],a,e[a]),o===!1)break;return e},trim:rt&&!rt.call(" ")?function(e){return null==e?"":rt.call(e)}:function(e){return null==e?"":(e+"").replace(ct,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(r(Object(e))?at.merge(n,"string"==typeof e?[e]:e):Q.call(n,e)),n},inArray:function(e,t,r){var n;if(t){if(Y)return Y.call(t,e,r);for(n=t.length,r=r?0>r?Math.max(0,n+r):r:0;n>r;r++)if(r in t&&t[r]===e)return r}return-1},merge:function(e,t){for(var r=+t.length,n=0,o=e.length;r>n;)e[o++]=t[n++];if(r!==r)for(;void 0!==t[n];)e[o++]=t[n++];return e.length=o,e},grep:function(e,t,r){for(var n,o=[],a=0,c=e.length,s=!r;c>a;a++)n=!t(e[a],a),n!==s&&o.push(e[a]);return o},map:function(e,t,n){var o,a=0,c=e.length,s=r(e),i=[];if(s)for(;c>a;a++)o=t(e[a],a,n),null!=o&&i.push(o);else for(a in e)o=t(e[a],a,n),null!=o&&i.push(o);return K.apply([],i)},guid:1,proxy:function(e,t){var r,n,o;return"string"==typeof t&&(o=e[t],t=e,e=o),at.isFunction(e)?(r=X.call(arguments,2),n=function(){return e.apply(t||this,r.concat(X.call(arguments)))},n.guid=e.guid=e.guid||at.guid++,n):void 0},now:function(){return+new Date},support:nt}),at.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){Z["[object "+t+"]"]=t.toLowerCase()});var dt=function(e){function t(e,t,r,n){var o,a,c,s,i,u,p,f,g,m;if((t?t.ownerDocument||t:R)!==N&&S(t),t=t||N,r=r||[],!e||"string"!=typeof e)return r;if(1!==(s=t.nodeType)&&9!==s)return[];if(I&&!n){if(o=yt.exec(e))if(c=o[1]){if(9===s){if(a=t.getElementById(c),!a||!a.parentNode)return r;if(a.id===c)return r.push(a),r}else if(t.ownerDocument&&(a=t.ownerDocument.getElementById(c))&&P(t,a)&&a.id===c)return r.push(a),r}else{if(o[2])return Z.apply(r,t.getElementsByTagName(e)),r;if((c=o[3])&&w.getElementsByClassName&&t.getElementsByClassName)return Z.apply(r,t.getElementsByClassName(c)),r}if(w.qsa&&(!L||!L.test(e))){if(f=p=j,g=t,m=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){for(u=l(e),(p=t.getAttribute("id"))?f=p.replace(bt,"\\$&"):t.setAttribute("id",f),f="[id='"+f+"'] ",i=u.length;i--;)u[i]=f+h(u[i]);g=Et.test(e)&&d(t.parentNode)||t,m=u.join(",")}if(m)try{return Z.apply(r,g.querySelectorAll(m)),r}catch(v){}finally{p||t.removeAttribute("id")}}}return A(e.replace(it,"$1"),t,r,n)}function r(){function e(r,n){return t.push(r+" ")>_.cacheLength&&delete e[t.shift()],e[r+" "]=n}var t=[];return e}function n(e){return e[j]=!0,e}function o(e){var t=N.createElement("div");try{return!!e(t)}catch(r){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function a(e,t){for(var r=e.split("|"),n=e.length;n--;)_.attrHandle[r[n]]=t}function c(e,t){var r=t&&e,n=r&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||G)-(~e.sourceIndex||G);if(n)return n;if(r)for(;r=r.nextSibling;)if(r===t)return-1;return e?1:-1}function s(e){return function(t){var r=t.nodeName.toLowerCase();return"input"===r&&t.type===e}}function i(e){return function(t){var r=t.nodeName.toLowerCase();return("input"===r||"button"===r)&&t.type===e}}function u(e){return n(function(t){return t=+t,n(function(r,n){for(var o,a=e([],r.length,t),c=a.length;c--;)r[o=a[c]]&&(r[o]=!(n[o]=r[o]))})})}function d(e){return e&&typeof e.getElementsByTagName!==W&&e}function p(){}function l(e,r){var n,o,a,c,s,i,u,d=V[e+" "];if(d)return r?0:d.slice(0);for(s=e,i=[],u=_.preFilter;s;){(!n||(o=ut.exec(s)))&&(o&&(s=s.slice(o[0].length)||s),i.push(a=[])),n=!1,(o=dt.exec(s))&&(n=o.shift(),a.push({value:n,type:o[0].replace(it," ")}),s=s.slice(n.length));for(c in _.filter)!(o=ft[c].exec(s))||u[c]&&!(o=u[c](o))||(n=o.shift(),a.push({value:n,type:c,matches:o}),s=s.slice(n.length));if(!n)break}return r?s.length:s?t.error(e):V(e,i).slice(0)}function h(e){for(var t=0,r=e.length,n="";r>t;t++)n+=e[t].value;return n}function f(e,t,r){var n=t.dir,o=r&&"parentNode"===n,a=H++;return t.first?function(t,r,a){for(;t=t[n];)if(1===t.nodeType||o)return e(t,r,a)}:function(t,r,c){var s,i,u=[$,a];if(c){for(;t=t[n];)if((1===t.nodeType||o)&&e(t,r,c))return!0}else for(;t=t[n];)if(1===t.nodeType||o){if(i=t[j]||(t[j]={}),(s=i[n])&&s[0]===$&&s[1]===a)return u[2]=s[2];if(i[n]=u,u[2]=e(t,r,c))return!0}}}function g(e){return e.length>1?function(t,r,n){for(var o=e.length;o--;)if(!e[o](t,r,n))return!1;return!0}:e[0]}function m(e,t,r,n,o){for(var a,c=[],s=0,i=e.length,u=null!=t;i>s;s++)(a=e[s])&&(!r||r(a,n,o))&&(c.push(a),u&&t.push(s));return c}function v(e,t,r,o,a,c){return o&&!o[j]&&(o=v(o)),a&&!a[j]&&(a=v(a,c)),n(function(n,c,s,i){var u,d,p,l=[],h=[],f=c.length,g=n||b(t||"*",s.nodeType?[s]:s,[]),v=!e||!n&&t?g:m(g,l,e,s,i),y=r?a||(n?e:f||o)?[]:c:v;if(r&&r(v,y,s,i),o)for(u=m(y,h),o(u,[],s,i),d=u.length;d--;)(p=u[d])&&(y[h[d]]=!(v[h[d]]=p));if(n){if(a||e){if(a){for(u=[],d=y.length;d--;)(p=y[d])&&u.push(v[d]=p);a(null,y=[],u,i)}for(d=y.length;d--;)(p=y[d])&&(u=a?tt.call(n,p):l[d])>-1&&(n[u]=!(c[u]=p))}}else y=m(y===c?y.splice(f,y.length):y),a?a(null,c,y,i):Z.apply(c,y)})}function y(e){for(var t,r,n,o=e.length,a=_.relative[e[0].type],c=a||_.relative[" "],s=a?1:0,i=f(function(e){return e===t},c,!0),u=f(function(e){return tt.call(t,e)>-1},c,!0),d=[function(e,r,n){return!a&&(n||r!==k)||((t=r).nodeType?i(e,r,n):u(e,r,n))}];o>s;s++)if(r=_.relative[e[s].type])d=[f(g(d),r)];else{if(r=_.filter[e[s].type].apply(null,e[s].matches),r[j]){for(n=++s;o>n&&!_.relative[e[n].type];n++);return v(s>1&&g(d),s>1&&h(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(it,"$1"),r,n>s&&y(e.slice(s,n)),o>n&&y(e=e.slice(n)),o>n&&h(e))}d.push(r)}return g(d)}function E(e,r){var o=r.length>0,a=e.length>0,c=function(n,c,s,i,u){var d,p,l,h=0,f="0",g=n&&[],v=[],y=k,E=n||a&&_.find.TAG("*",u),b=$+=null==y?1:Math.random()||.1,A=E.length;for(u&&(k=c!==N&&c);f!==A&&null!=(d=E[f]);f++){if(a&&d){for(p=0;l=e[p++];)if(l(d,c,s)){i.push(d);break}u&&($=b)}o&&((d=!l&&d)&&h--,n&&g.push(d))}if(h+=f,o&&f!==h){for(p=0;l=r[p++];)l(g,v,c,s);if(n){if(h>0)for(;f--;)g[f]||v[f]||(v[f]=Q.call(i));v=m(v)}Z.apply(i,v),u&&!n&&v.length>0&&h+r.length>1&&t.uniqueSort(i)}return u&&($=b,k=y),g};return o?n(c):c}function b(e,r,n){for(var o=0,a=r.length;a>o;o++)t(e,r[o],n);return n}function A(e,t,r,n){var o,a,c,s,i,u=l(e);if(!n&&1===u.length){if(a=u[0]=u[0].slice(0),a.length>2&&"ID"===(c=a[0]).type&&w.getById&&9===t.nodeType&&I&&_.relative[a[1].type]){if(t=(_.find.ID(c.matches[0].replace(At,Ct),t)||[])[0],!t)return r;e=e.slice(a.shift().value.length)}for(o=ft.needsContext.test(e)?0:a.length;o--&&(c=a[o],!_.relative[s=c.type]);)if((i=_.find[s])&&(n=i(c.matches[0].replace(At,Ct),Et.test(a[0].type)&&d(t.parentNode)||t))){if(a.splice(o,1),e=n.length&&h(a),!e)return Z.apply(r,n),r;break}}return T(e,u)(n,t,!I,r,Et.test(e)&&d(t.parentNode)||t),r}var C,w,_,x,D,T,k,B,F,S,N,O,I,L,q,M,P,j="sizzle"+-new Date,R=e.document,$=0,H=0,U=r(),V=r(),z=r(),J=function(e,t){return e===t&&(F=!0),0},W="undefined",G=1<<31,X={}.hasOwnProperty,K=[],Q=K.pop,Y=K.push,Z=K.push,et=K.slice,tt=K.indexOf||function(e){for(var t=0,r=this.length;r>t;t++)if(this[t]===e)return t;return-1},rt="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",nt="[\\x20\\t\\r\\n\\f]",ot="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",at=ot.replace("w","w#"),ct="\\["+nt+"*("+ot+")"+nt+"*(?:([*^$|!~]?=)"+nt+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+at+")|)|)"+nt+"*\\]",st=":("+ot+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+ct.replace(3,8)+")*)|.*)\\)|)",it=new RegExp("^"+nt+"+|((?:^|[^\\\\])(?:\\\\.)*)"+nt+"+$","g"),ut=new RegExp("^"+nt+"*,"+nt+"*"),dt=new RegExp("^"+nt+"*([>+~]|"+nt+")"+nt+"*"),pt=new RegExp("="+nt+"*([^\\]'\"]*?)"+nt+"*\\]","g"),lt=new RegExp(st),ht=new RegExp("^"+at+"$"),ft={ID:new RegExp("^#("+ot+")"),CLASS:new RegExp("^\\.("+ot+")"),TAG:new RegExp("^("+ot.replace("w","w*")+")"),ATTR:new RegExp("^"+ct),PSEUDO:new RegExp("^"+st),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+nt+"*(even|odd|(([+-]|)(\\d*)n|)"+nt+"*(?:([+-]|)"+nt+"*(\\d+)|))"+nt+"*\\)|)","i"),bool:new RegExp("^(?:"+rt+")$","i"),needsContext:new RegExp("^"+nt+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+nt+"*((?:-\\d)?\\d*)"+nt+"*\\)|)(?=[^-]|$)","i")},gt=/^(?:input|select|textarea|button)$/i,mt=/^h\d$/i,vt=/^[^{]+\{\s*\[native \w/,yt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Et=/[+~]/,bt=/'|\\/g,At=new RegExp("\\\\([\\da-f]{1,6}"+nt+"?|("+nt+")|.)","ig"),Ct=function(e,t,r){var n="0x"+t-65536;return n!==n||r?t:0>n?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320)};try{Z.apply(K=et.call(R.childNodes),R.childNodes),K[R.childNodes.length].nodeType}catch(wt){Z={apply:K.length?function(e,t){Y.apply(e,et.call(t))}:function(e,t){for(var r=e.length,n=0;e[r++]=t[n++];);e.length=r-1}}}w=t.support={},D=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},S=t.setDocument=function(e){var t,r=e?e.ownerDocument||e:R,n=r.defaultView;return r!==N&&9===r.nodeType&&r.documentElement?(N=r,O=r.documentElement,I=!D(r),n&&n!==n.top&&(n.addEventListener?n.addEventListener("unload",function(){S()},!1):n.attachEvent&&n.attachEvent("onunload",function(){S()})),w.attributes=o(function(e){return e.className="i",!e.getAttribute("className")}),w.getElementsByTagName=o(function(e){return e.appendChild(r.createComment("")),!e.getElementsByTagName("*").length}),w.getElementsByClassName=vt.test(r.getElementsByClassName)&&o(function(e){return e.innerHTML="<div class='a'></div><div class='a i'></div>",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),w.getById=o(function(e){return O.appendChild(e).id=j,!r.getElementsByName||!r.getElementsByName(j).length}),w.getById?(_.find.ID=function(e,t){if(typeof t.getElementById!==W&&I){var r=t.getElementById(e);return r&&r.parentNode?[r]:[]}},_.filter.ID=function(e){var t=e.replace(At,Ct);return function(e){return e.getAttribute("id")===t}}):(delete _.find.ID,_.filter.ID=function(e){var t=e.replace(At,Ct);return function(e){var r=typeof e.getAttributeNode!==W&&e.getAttributeNode("id");return r&&r.value===t}}),_.find.TAG=w.getElementsByTagName?function(e,t){return typeof t.getElementsByTagName!==W?t.getElementsByTagName(e):void 0}:function(e,t){var r,n=[],o=0,a=t.getElementsByTagName(e);if("*"===e){for(;r=a[o++];)1===r.nodeType&&n.push(r);return n}return a},_.find.CLASS=w.getElementsByClassName&&function(e,t){return typeof t.getElementsByClassName!==W&&I?t.getElementsByClassName(e):void 0},q=[],L=[],(w.qsa=vt.test(r.querySelectorAll))&&(o(function(e){e.innerHTML="<select t=''><option selected=''></option></select>",e.querySelectorAll("[t^='']").length&&L.push("[*^$]="+nt+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||L.push("\\["+nt+"*(?:value|"+rt+")"),e.querySelectorAll(":checked").length||L.push(":checked")}),o(function(e){var t=r.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&L.push("name"+nt+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||L.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),L.push(",.*:")})),(w.matchesSelector=vt.test(M=O.webkitMatchesSelector||O.mozMatchesSelector||O.oMatchesSelector||O.msMatchesSelector))&&o(function(e){w.disconnectedMatch=M.call(e,"div"),M.call(e,"[s!='']:x"),q.push("!=",st)}),L=L.length&&new RegExp(L.join("|")),q=q.length&&new RegExp(q.join("|")),t=vt.test(O.compareDocumentPosition),P=t||vt.test(O.contains)?function(e,t){var r=9===e.nodeType?e.documentElement:e,n=t&&t.parentNode;return e===n||!(!n||1!==n.nodeType||!(r.contains?r.contains(n):e.compareDocumentPosition&&16&e.compareDocumentPosition(n)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},J=t?function(e,t){if(e===t)return F=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!w.sortDetached&&t.compareDocumentPosition(e)===n?e===r||e.ownerDocument===R&&P(R,e)?-1:t===r||t.ownerDocument===R&&P(R,t)?1:B?tt.call(B,e)-tt.call(B,t):0:4&n?-1:1)}:function(e,t){if(e===t)return F=!0,0;var n,o=0,a=e.parentNode,s=t.parentNode,i=[e],u=[t];if(!a||!s)return e===r?-1:t===r?1:a?-1:s?1:B?tt.call(B,e)-tt.call(B,t):0;if(a===s)return c(e,t);for(n=e;n=n.parentNode;)i.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;i[o]===u[o];)o++;return o?c(i[o],u[o]):i[o]===R?-1:u[o]===R?1:0},r):N},t.matches=function(e,r){return t(e,null,null,r)},t.matchesSelector=function(e,r){if((e.ownerDocument||e)!==N&&S(e),r=r.replace(pt,"='$1']"),!(!w.matchesSelector||!I||q&&q.test(r)||L&&L.test(r)))try{var n=M.call(e,r);if(n||w.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(o){}return t(r,N,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==N&&S(e),P(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==N&&S(e);var r=_.attrHandle[t.toLowerCase()],n=r&&X.call(_.attrHandle,t.toLowerCase())?r(e,t,!I):void 0;return void 0!==n?n:w.attributes||!I?e.getAttribute(t):(n=e.getAttributeNode(t))&&n.specified?n.value:null},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,r=[],n=0,o=0;if(F=!w.detectDuplicates,B=!w.sortStable&&e.slice(0),e.sort(J),F){for(;t=e[o++];)t===e[o]&&(n=r.push(o));for(;n--;)e.splice(r[n],1)}return B=null,e},x=t.getText=function(e){var t,r="",n=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)r+=x(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[n++];)r+=x(t);return r},_=t.selectors={cacheLength:50,createPseudo:n,match:ft,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(At,Ct),e[3]=(e[4]||e[5]||"").replace(At,Ct),"~="===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]||t.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]&&t.error(e[0]),e},PSEUDO:function(e){var t,r=!e[5]&&e[2];return ft.CHILD.test(e[0])?null:(e[3]&&void 0!==e[4]?e[2]=e[4]:r&<.test(r)&&(t=l(r,!0))&&(t=r.indexOf(")",r.length-t)-r.length)&&(e[0]=e[0].slice(0,t),e[2]=r.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(At,Ct).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=U[e+" "];return t||(t=new RegExp("(^|"+nt+")"+e+"("+nt+"|$)"))&&U(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==W&&e.getAttribute("class")||"")})},ATTR:function(e,r,n){return function(o){var a=t.attr(o,e);return null==a?"!="===r:r?(a+="","="===r?a===n:"!="===r?a!==n:"^="===r?n&&0===a.indexOf(n):"*="===r?n&&a.indexOf(n)>-1:"$="===r?n&&a.slice(-n.length)===n:"~="===r?(" "+a+" ").indexOf(n)>-1:"|="===r?a===n||a.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,r,n,o){var a="nth"!==e.slice(0,3),c="last"!==e.slice(-4),s="of-type"===t;return 1===n&&0===o?function(e){return!!e.parentNode}:function(t,r,i){var u,d,p,l,h,f,g=a!==c?"nextSibling":"previousSibling",m=t.parentNode,v=s&&t.nodeName.toLowerCase(),y=!i&&!s;if(m){if(a){for(;g;){for(p=t;p=p[g];)if(s?p.nodeName.toLowerCase()===v:1===p.nodeType)return!1;f=g="only"===e&&!f&&"nextSibling"}return!0}if(f=[c?m.firstChild:m.lastChild],c&&y){for(d=m[j]||(m[j]={}),u=d[e]||[],h=u[0]===$&&u[1],l=u[0]===$&&u[2],p=h&&m.childNodes[h];p=++h&&p&&p[g]||(l=h=0)||f.pop();)if(1===p.nodeType&&++l&&p===t){d[e]=[$,h,l];break}}else if(y&&(u=(t[j]||(t[j]={}))[e])&&u[0]===$)l=u[1];else for(;(p=++h&&p&&p[g]||(l=h=0)||f.pop())&&((s?p.nodeName.toLowerCase()!==v:1!==p.nodeType)||!++l||(y&&((p[j]||(p[j]={}))[e]=[$,l]),p!==t)););return l-=o,l===n||l%n===0&&l/n>=0}}},PSEUDO:function(e,r){var o,a=_.pseudos[e]||_.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return a[j]?a(r):a.length>1?(o=[e,e,"",r],_.setFilters.hasOwnProperty(e.toLowerCase())?n(function(e,t){for(var n,o=a(e,r),c=o.length;c--;)n=tt.call(e,o[c]),e[n]=!(t[n]=o[c])}):function(e){return a(e,0,o)}):a}},pseudos:{not:n(function(e){var t=[],r=[],o=T(e.replace(it,"$1"));return o[j]?n(function(e,t,r,n){for(var a,c=o(e,null,n,[]),s=e.length;s--;)(a=c[s])&&(e[s]=!(t[s]=a))}):function(e,n,a){return t[0]=e,o(t,null,a,r),!r.pop()}}),has:n(function(e){return function(r){return t(e,r).length>0}}),contains:n(function(e){return function(t){return(t.textContent||t.innerText||x(t)).indexOf(e)>-1}}),lang:n(function(e){return ht.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(At,Ct).toLowerCase(),function(t){var r;do if(r=I?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return r=r.toLowerCase(),r===e||0===r.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var r=e.location&&e.location.hash;return r&&r.slice(1)===t.id},root:function(e){return e===O},focus:function(e){return e===N.activeElement&&(!N.hasFocus||N.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.nodeType<6)return!1;return!0},parent:function(e){return!_.pseudos.empty(e)},header:function(e){return mt.test(e.nodeName)},input:function(e){return gt.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"))||"text"===t.toLowerCase())},first:u(function(){return[0]}),last:u(function(e,t){return[t-1]}),eq:u(function(e,t,r){return[0>r?r+t:r]}),even:u(function(e,t){for(var r=0;t>r;r+=2)e.push(r);return e}),odd:u(function(e,t){for(var r=1;t>r;r+=2)e.push(r);return e}),lt:u(function(e,t,r){for(var n=0>r?r+t:r;--n>=0;)e.push(n);return e}),gt:u(function(e,t,r){for(var n=0>r?r+t:r;++n<t;)e.push(n);return e})}},_.pseudos.nth=_.pseudos.eq;for(C in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})_.pseudos[C]=s(C);for(C in{submit:!0,reset:!0})_.pseudos[C]=i(C);return p.prototype=_.filters=_.pseudos,_.setFilters=new p,T=t.compile=function(e,t){var r,n=[],o=[],a=z[e+" "];if(!a){for(t||(t=l(e)),r=t.length;r--;)a=y(t[r]),a[j]?n.push(a):o.push(a);a=z(e,E(o,n))}return a},w.sortStable=j.split("").sort(J).join("")===j,w.detectDuplicates=!!F,S(),w.sortDetached=o(function(e){return 1&e.compareDocumentPosition(N.createElement("div"))}),o(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||a("type|href|height|width",function(e,t,r){return r?void 0:e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),w.attributes&&o(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||a("value",function(e,t,r){return r||"input"!==e.nodeName.toLowerCase()?void 0:e.defaultValue}),o(function(e){return null==e.getAttribute("disabled")})||a(rt,function(e,t,r){var n;return r?void 0:e[t]===!0?t.toLowerCase():(n=e.getAttributeNode(t))&&n.specified?n.value:null}),t}(e);at.find=dt,at.expr=dt.selectors,at.expr[":"]=at.expr.pseudos,at.unique=dt.uniqueSort,at.text=dt.getText,at.isXMLDoc=dt.isXML,at.contains=dt.contains;var pt=at.expr.match.needsContext,lt=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,ht=/^.[^:#\[\.,]*$/;at.filter=function(e,t,r){var n=t[0];return r&&(e=":not("+e+")"),1===t.length&&1===n.nodeType?at.find.matchesSelector(n,e)?[n]:[]:at.find.matches(e,at.grep(t,function(e){return 1===e.nodeType}))},at.fn.extend({find:function(e){var t,r=[],n=this,o=n.length;if("string"!=typeof e)return this.pushStack(at(e).filter(function(){for(t=0;o>t;t++)if(at.contains(n[t],this))return!0}));for(t=0;o>t;t++)at.find(e,n[t],r);return r=this.pushStack(o>1?at.unique(r):r),r.selector=this.selector?this.selector+" "+e:e,r},filter:function(e){return this.pushStack(n(this,e||[],!1))},not:function(e){return this.pushStack(n(this,e||[],!0))},is:function(e){return!!n(this,"string"==typeof e&&pt.test(e)?at(e):e||[],!1).length}});var ft,gt=e.document,mt=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,vt=at.fn.init=function(e,t){var r,n;if(!e)return this;if("string"==typeof e){if(r="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:mt.exec(e),!r||!r[1]&&t)return!t||t.jquery?(t||ft).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof at?t[0]:t,at.merge(this,at.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:gt,!0)),lt.test(r[1])&&at.isPlainObject(t))for(r in t)at.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}if(n=gt.getElementById(r[2]),n&&n.parentNode){if(n.id!==r[2])return ft.find(e);this.length=1,this[0]=n}return this.context=gt,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):at.isFunction(e)?"undefined"!=typeof ft.ready?ft.ready(e):e(at):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),at.makeArray(e,this))};vt.prototype=at.fn,ft=at(gt);var yt=/^(?:parents|prev(?:Until|All))/,Et={children:!0,contents:!0,next:!0,prev:!0};at.extend({dir:function(e,t,r){for(var n=[],o=e[t];o&&9!==o.nodeType&&(void 0===r||1!==o.nodeType||!at(o).is(r));)1===o.nodeType&&n.push(o),o=o[t];return n},sibling:function(e,t){for(var r=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&r.push(e);return r}}),at.fn.extend({has:function(e){var t,r=at(e,this),n=r.length;return this.filter(function(){for(t=0;n>t;t++)if(at.contains(this,r[t]))return!0})},closest:function(e,t){for(var r,n=0,o=this.length,a=[],c=pt.test(e)||"string"!=typeof e?at(e,t||this.context):0;o>n;n++)for(r=this[n];r&&r!==t;r=r.parentNode)if(r.nodeType<11&&(c?c.index(r)>-1:1===r.nodeType&&at.find.matchesSelector(r,e))){a.push(r);break}return this.pushStack(a.length>1?at.unique(a):a)},index:function(e){return e?"string"==typeof e?at.inArray(this[0],at(e)):at.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(at.unique(at.merge(this.get(),at(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),at.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return at.dir(e,"parentNode")},parentsUntil:function(e,t,r){return at.dir(e,"parentNode",r)},next:function(e){return o(e,"nextSibling")},prev:function(e){return o(e,"previousSibling")},nextAll:function(e){return at.dir(e,"nextSibling")},prevAll:function(e){return at.dir(e,"previousSibling")},nextUntil:function(e,t,r){return at.dir(e,"nextSibling",r)},prevUntil:function(e,t,r){return at.dir(e,"previousSibling",r)},siblings:function(e){return at.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return at.sibling(e.firstChild)},contents:function(e){return at.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:at.merge([],e.childNodes)}},function(e,t){at.fn[e]=function(r,n){var o=at.map(this,t,r);return"Until"!==e.slice(-5)&&(n=r),n&&"string"==typeof n&&(o=at.filter(n,o)),this.length>1&&(Et[e]||(o=at.unique(o)),yt.test(e)&&(o=o.reverse())),this.pushStack(o)}});var bt=/\S+/g,At={};at.Callbacks=function(e){e="string"==typeof e?At[e]||a(e):at.extend({},e);var t,r,n,o,c,s,i=[],u=!e.once&&[],d=function(a){for(r=e.memory&&a,n=!0,c=s||0,s=0,o=i.length,t=!0;i&&o>c;c++)if(i[c].apply(a[0],a[1])===!1&&e.stopOnFalse){r=!1;break}t=!1,i&&(u?u.length&&d(u.shift()):r?i=[]:p.disable())},p={add:function(){if(i){var n=i.length;!function a(t){at.each(t,function(t,r){var n=at.type(r);"function"===n?e.unique&&p.has(r)||i.push(r):r&&r.length&&"string"!==n&&a(r)})}(arguments),t?o=i.length:r&&(s=n,d(r))}return this},remove:function(){return i&&at.each(arguments,function(e,r){for(var n;(n=at.inArray(r,i,n))>-1;)i.splice(n,1),t&&(o>=n&&o--,c>=n&&c--)}),this},has:function(e){return e?at.inArray(e,i)>-1:!(!i||!i.length)},empty:function(){return i=[],o=0,this},disable:function(){return i=u=r=void 0,this},disabled:function(){return!i},lock:function(){return u=void 0,r||p.disable(),this},locked:function(){return!u},fireWith:function(e,r){return!i||n&&!u||(r=r||[],r=[e,r.slice?r.slice():r],t?u.push(r):d(r)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!n}};return p},at.extend({Deferred:function(e){var t=[["resolve","done",at.Callbacks("once memory"),"resolved"],["reject","fail",at.Callbacks("once memory"),"rejected"],["notify","progress",at.Callbacks("memory")]],r="pending",n={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},then:function(){var e=arguments;return at.Deferred(function(r){at.each(t,function(t,a){var c=at.isFunction(e[t])&&e[t];o[a[1]](function(){var e=c&&c.apply(this,arguments);e&&at.isFunction(e.promise)?e.promise().done(r.resolve).fail(r.reject).progress(r.notify):r[a[0]+"With"](this===n?r.promise():this,c?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?at.extend(e,n):n}},o={};return n.pipe=n.then,at.each(t,function(e,a){var c=a[2],s=a[3];n[a[1]]=c.add,s&&c.add(function(){r=s},t[1^e][2].disable,t[2][2].lock),o[a[0]]=function(){return o[a[0]+"With"](this===o?n:this,arguments),this},o[a[0]+"With"]=c.fireWith}),n.promise(o),e&&e.call(o,o),o},when:function(e){var t,r,n,o=0,a=X.call(arguments),c=a.length,s=1!==c||e&&at.isFunction(e.promise)?c:0,i=1===s?e:at.Deferred(),u=function(e,r,n){return function(o){r[e]=this,n[e]=arguments.length>1?X.call(arguments):o,n===t?i.notifyWith(r,n):--s||i.resolveWith(r,n)}};if(c>1)for(t=new Array(c),r=new Array(c),n=new Array(c);c>o;o++)a[o]&&at.isFunction(a[o].promise)?a[o].promise().done(u(o,n,a)).fail(i.reject).progress(u(o,r,t)):--s;return s||i.resolveWith(n,a),i.promise()}});var Ct;at.fn.ready=function(e){return at.ready.promise().done(e),this},at.extend({isReady:!1,readyWait:1,holdReady:function(e){e?at.readyWait++:at.ready(!0)},ready:function(e){if(e===!0?!--at.readyWait:!at.isReady){if(!gt.body)return setTimeout(at.ready);at.isReady=!0,e!==!0&&--at.readyWait>0||(Ct.resolveWith(gt,[at]),at.fn.trigger&&at(gt).trigger("ready").off("ready"))}}}),at.ready.promise=function(t){if(!Ct)if(Ct=at.Deferred(),"complete"===gt.readyState)setTimeout(at.ready);else if(gt.addEventListener)gt.addEventListener("DOMContentLoaded",s,!1),e.addEventListener("load",s,!1);else{gt.attachEvent("onreadystatechange",s),e.attachEvent("onload",s);var r=!1;try{r=null==e.frameElement&>.documentElement}catch(n){}r&&r.doScroll&&!function o(){if(!at.isReady){try{r.doScroll("left")}catch(e){return setTimeout(o,50)}c(),at.ready()}}()}return Ct.promise(t)};var wt,_t="undefined";for(wt in at(nt))break;nt.ownLast="0"!==wt,nt.inlineBlockNeedsLayout=!1,at(function(){var e,t,r=gt.getElementsByTagName("body")[0];r&&(e=gt.createElement("div"),e.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",t=gt.createElement("div"),r.appendChild(e).appendChild(t),typeof t.style.zoom!==_t&&(t.style.cssText="border:0;margin:0;width:1px;padding:1px;display:inline;zoom:1",(nt.inlineBlockNeedsLayout=3===t.offsetWidth)&&(r.style.zoom=1)),r.removeChild(e),e=t=null)}),function(){var e=gt.createElement("div");if(null==nt.deleteExpando){nt.deleteExpando=!0;try{delete e.test}catch(t){nt.deleteExpando=!1}}e=null}(),at.acceptData=function(e){var t=at.noData[(e.nodeName+" ").toLowerCase()],r=+e.nodeType||1;return 1!==r&&9!==r?!1:!t||t!==!0&&e.getAttribute("classid")===t};var xt=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Dt=/([A-Z])/g;at.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?at.cache[e[at.expando]]:e[at.expando],!!e&&!u(e)},data:function(e,t,r){return d(e,t,r)},removeData:function(e,t){return p(e,t) | |
},_data:function(e,t,r){return d(e,t,r,!0)},_removeData:function(e,t){return p(e,t,!0)}}),at.fn.extend({data:function(e,t){var r,n,o,a=this[0],c=a&&a.attributes;if(void 0===e){if(this.length&&(o=at.data(a),1===a.nodeType&&!at._data(a,"parsedAttrs"))){for(r=c.length;r--;)n=c[r].name,0===n.indexOf("data-")&&(n=at.camelCase(n.slice(5)),i(a,n,o[n]));at._data(a,"parsedAttrs",!0)}return o}return"object"==typeof e?this.each(function(){at.data(this,e)}):arguments.length>1?this.each(function(){at.data(this,e,t)}):a?i(a,e,at.data(a,e)):void 0},removeData:function(e){return this.each(function(){at.removeData(this,e)})}}),at.extend({queue:function(e,t,r){var n;return e?(t=(t||"fx")+"queue",n=at._data(e,t),r&&(!n||at.isArray(r)?n=at._data(e,t,at.makeArray(r)):n.push(r)),n||[]):void 0},dequeue:function(e,t){t=t||"fx";var r=at.queue(e,t),n=r.length,o=r.shift(),a=at._queueHooks(e,t),c=function(){at.dequeue(e,t)};"inprogress"===o&&(o=r.shift(),n--),o&&("fx"===t&&r.unshift("inprogress"),delete a.stop,o.call(e,c,a)),!n&&a&&a.empty.fire()},_queueHooks:function(e,t){var r=t+"queueHooks";return at._data(e,r)||at._data(e,r,{empty:at.Callbacks("once memory").add(function(){at._removeData(e,t+"queue"),at._removeData(e,r)})})}}),at.fn.extend({queue:function(e,t){var r=2;return"string"!=typeof e&&(t=e,e="fx",r--),arguments.length<r?at.queue(this[0],e):void 0===t?this:this.each(function(){var r=at.queue(this,e,t);at._queueHooks(this,e),"fx"===e&&"inprogress"!==r[0]&&at.dequeue(this,e)})},dequeue:function(e){return this.each(function(){at.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var r,n=1,o=at.Deferred(),a=this,c=this.length,s=function(){--n||o.resolveWith(a,[a])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";c--;)r=at._data(a[c],e+"queueHooks"),r&&r.empty&&(n++,r.empty.add(s));return s(),o.promise(t)}});var Tt=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,kt=["Top","Right","Bottom","Left"],Bt=function(e,t){return e=t||e,"none"===at.css(e,"display")||!at.contains(e.ownerDocument,e)},Ft=at.access=function(e,t,r,n,o,a,c){var s=0,i=e.length,u=null==r;if("object"===at.type(r)){o=!0;for(s in r)at.access(e,t,s,r[s],!0,a,c)}else if(void 0!==n&&(o=!0,at.isFunction(n)||(c=!0),u&&(c?(t.call(e,n),t=null):(u=t,t=function(e,t,r){return u.call(at(e),r)})),t))for(;i>s;s++)t(e[s],r,c?n:n.call(e[s],s,t(e[s],r)));return o?e:u?t.call(e):i?t(e[0],r):a},St=/^(?:checkbox|radio)$/i;!function(){var e=gt.createDocumentFragment(),t=gt.createElement("div"),r=gt.createElement("input");if(t.setAttribute("className","t"),t.innerHTML=" <link/><table></table><a href='/a'>a</a>",nt.leadingWhitespace=3===t.firstChild.nodeType,nt.tbody=!t.getElementsByTagName("tbody").length,nt.htmlSerialize=!!t.getElementsByTagName("link").length,nt.html5Clone="<:nav></:nav>"!==gt.createElement("nav").cloneNode(!0).outerHTML,r.type="checkbox",r.checked=!0,e.appendChild(r),nt.appendChecked=r.checked,t.innerHTML="<textarea>x</textarea>",nt.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue,e.appendChild(t),t.innerHTML="<input type='radio' checked='checked' name='t'/>",nt.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,nt.noCloneEvent=!0,t.attachEvent&&(t.attachEvent("onclick",function(){nt.noCloneEvent=!1}),t.cloneNode(!0).click()),null==nt.deleteExpando){nt.deleteExpando=!0;try{delete t.test}catch(n){nt.deleteExpando=!1}}e=t=r=null}(),function(){var t,r,n=gt.createElement("div");for(t in{submit:!0,change:!0,focusin:!0})r="on"+t,(nt[t+"Bubbles"]=r in e)||(n.setAttribute(r,"t"),nt[t+"Bubbles"]=n.attributes[r].expando===!1);n=null}();var Nt=/^(?:input|select|textarea)$/i,Ot=/^key/,It=/^(?:mouse|contextmenu)|click/,Lt=/^(?:focusinfocus|focusoutblur)$/,qt=/^([^.]*)(?:\.(.+)|)$/;at.event={global:{},add:function(e,t,r,n,o){var a,c,s,i,u,d,p,l,h,f,g,m=at._data(e);if(m){for(r.handler&&(i=r,r=i.handler,o=i.selector),r.guid||(r.guid=at.guid++),(c=m.events)||(c=m.events={}),(d=m.handle)||(d=m.handle=function(e){return typeof at===_t||e&&at.event.triggered===e.type?void 0:at.event.dispatch.apply(d.elem,arguments)},d.elem=e),t=(t||"").match(bt)||[""],s=t.length;s--;)a=qt.exec(t[s])||[],h=g=a[1],f=(a[2]||"").split(".").sort(),h&&(u=at.event.special[h]||{},h=(o?u.delegateType:u.bindType)||h,u=at.event.special[h]||{},p=at.extend({type:h,origType:g,data:n,handler:r,guid:r.guid,selector:o,needsContext:o&&at.expr.match.needsContext.test(o),namespace:f.join(".")},i),(l=c[h])||(l=c[h]=[],l.delegateCount=0,u.setup&&u.setup.call(e,n,f,d)!==!1||(e.addEventListener?e.addEventListener(h,d,!1):e.attachEvent&&e.attachEvent("on"+h,d))),u.add&&(u.add.call(e,p),p.handler.guid||(p.handler.guid=r.guid)),o?l.splice(l.delegateCount++,0,p):l.push(p),at.event.global[h]=!0);e=null}},remove:function(e,t,r,n,o){var a,c,s,i,u,d,p,l,h,f,g,m=at.hasData(e)&&at._data(e);if(m&&(d=m.events)){for(t=(t||"").match(bt)||[""],u=t.length;u--;)if(s=qt.exec(t[u])||[],h=g=s[1],f=(s[2]||"").split(".").sort(),h){for(p=at.event.special[h]||{},h=(n?p.delegateType:p.bindType)||h,l=d[h]||[],s=s[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=a=l.length;a--;)c=l[a],!o&&g!==c.origType||r&&r.guid!==c.guid||s&&!s.test(c.namespace)||n&&n!==c.selector&&("**"!==n||!c.selector)||(l.splice(a,1),c.selector&&l.delegateCount--,p.remove&&p.remove.call(e,c));i&&!l.length&&(p.teardown&&p.teardown.call(e,f,m.handle)!==!1||at.removeEvent(e,h,m.handle),delete d[h])}else for(h in d)at.event.remove(e,h+t[u],r,n,!0);at.isEmptyObject(d)&&(delete m.handle,at._removeData(e,"events"))}},trigger:function(t,r,n,o){var a,c,s,i,u,d,p,l=[n||gt],h=tt.call(t,"type")?t.type:t,f=tt.call(t,"namespace")?t.namespace.split("."):[];if(s=d=n=n||gt,3!==n.nodeType&&8!==n.nodeType&&!Lt.test(h+at.event.triggered)&&(h.indexOf(".")>=0&&(f=h.split("."),h=f.shift(),f.sort()),c=h.indexOf(":")<0&&"on"+h,t=t[at.expando]?t:new at.Event(h,"object"==typeof t&&t),t.isTrigger=o?2:3,t.namespace=f.join("."),t.namespace_re=t.namespace?new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=n),r=null==r?[t]:at.makeArray(r,[t]),u=at.event.special[h]||{},o||!u.trigger||u.trigger.apply(n,r)!==!1)){if(!o&&!u.noBubble&&!at.isWindow(n)){for(i=u.delegateType||h,Lt.test(i+h)||(s=s.parentNode);s;s=s.parentNode)l.push(s),d=s;d===(n.ownerDocument||gt)&&l.push(d.defaultView||d.parentWindow||e)}for(p=0;(s=l[p++])&&!t.isPropagationStopped();)t.type=p>1?i:u.bindType||h,a=(at._data(s,"events")||{})[t.type]&&at._data(s,"handle"),a&&a.apply(s,r),a=c&&s[c],a&&a.apply&&at.acceptData(s)&&(t.result=a.apply(s,r),t.result===!1&&t.preventDefault());if(t.type=h,!o&&!t.isDefaultPrevented()&&(!u._default||u._default.apply(l.pop(),r)===!1)&&at.acceptData(n)&&c&&n[h]&&!at.isWindow(n)){d=n[c],d&&(n[c]=null),at.event.triggered=h;try{n[h]()}catch(g){}at.event.triggered=void 0,d&&(n[c]=d)}return t.result}},dispatch:function(e){e=at.event.fix(e);var t,r,n,o,a,c=[],s=X.call(arguments),i=(at._data(this,"events")||{})[e.type]||[],u=at.event.special[e.type]||{};if(s[0]=e,e.delegateTarget=this,!u.preDispatch||u.preDispatch.call(this,e)!==!1){for(c=at.event.handlers.call(this,e,i),t=0;(o=c[t++])&&!e.isPropagationStopped();)for(e.currentTarget=o.elem,a=0;(n=o.handlers[a++])&&!e.isImmediatePropagationStopped();)(!e.namespace_re||e.namespace_re.test(n.namespace))&&(e.handleObj=n,e.data=n.data,r=((at.event.special[n.origType]||{}).handle||n.handler).apply(o.elem,s),void 0!==r&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,e),e.result}},handlers:function(e,t){var r,n,o,a,c=[],s=t.delegateCount,i=e.target;if(s&&i.nodeType&&(!e.button||"click"!==e.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==e.type)){for(o=[],a=0;s>a;a++)n=t[a],r=n.selector+" ",void 0===o[r]&&(o[r]=n.needsContext?at(r,this).index(i)>=0:at.find(r,this,null,[i]).length),o[r]&&o.push(n);o.length&&c.push({elem:i,handlers:o})}return s<t.length&&c.push({elem:this,handlers:t.slice(s)}),c},fix:function(e){if(e[at.expando])return e;var t,r,n,o=e.type,a=e,c=this.fixHooks[o];for(c||(this.fixHooks[o]=c=It.test(o)?this.mouseHooks:Ot.test(o)?this.keyHooks:{}),n=c.props?this.props.concat(c.props):this.props,e=new at.Event(a),t=n.length;t--;)r=n[t],e[r]=a[r];return e.target||(e.target=a.srcElement||gt),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,c.filter?c.filter(e,a):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var r,n,o,a=t.button,c=t.fromElement;return null==e.pageX&&null!=t.clientX&&(n=e.target.ownerDocument||gt,o=n.documentElement,r=n.body,e.pageX=t.clientX+(o&&o.scrollLeft||r&&r.scrollLeft||0)-(o&&o.clientLeft||r&&r.clientLeft||0),e.pageY=t.clientY+(o&&o.scrollTop||r&&r.scrollTop||0)-(o&&o.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&c&&(e.relatedTarget=c===e.target?t.toElement:c),e.which||void 0===a||(e.which=1&a?1:2&a?3:4&a?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==f()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===f()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return at.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(e){return at.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,r,n){var o=at.extend(new at.Event,r,{type:e,isSimulated:!0,originalEvent:{}});n?at.event.trigger(o,null,t):at.event.dispatch.call(t,o),o.isDefaultPrevented()&&r.preventDefault()}},at.removeEvent=gt.removeEventListener?function(e,t,r){e.removeEventListener&&e.removeEventListener(t,r,!1)}:function(e,t,r){var n="on"+t;e.detachEvent&&(typeof e[n]===_t&&(e[n]=null),e.detachEvent(n,r))},at.Event=function(e,t){return this instanceof at.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&(e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault())?l:h):this.type=e,t&&at.extend(this,t),this.timeStamp=e&&e.timeStamp||at.now(),void(this[at.expando]=!0)):new at.Event(e,t)},at.Event.prototype={isDefaultPrevented:h,isPropagationStopped:h,isImmediatePropagationStopped:h,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=l,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=l,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=l,this.stopPropagation()}},at.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){at.event.special[e]={delegateType:t,bindType:t,handle:function(e){var r,n=this,o=e.relatedTarget,a=e.handleObj;return(!o||o!==n&&!at.contains(n,o))&&(e.type=a.origType,r=a.handler.apply(this,arguments),e.type=t),r}}}),nt.submitBubbles||(at.event.special.submit={setup:function(){return at.nodeName(this,"form")?!1:void at.event.add(this,"click._submit keypress._submit",function(e){var t=e.target,r=at.nodeName(t,"input")||at.nodeName(t,"button")?t.form:void 0;r&&!at._data(r,"submitBubbles")&&(at.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),at._data(r,"submitBubbles",!0))})},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&at.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return at.nodeName(this,"form")?!1:void at.event.remove(this,"._submit")}}),nt.changeBubbles||(at.event.special.change={setup:function(){return Nt.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(at.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),at.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),at.event.simulate("change",this,e,!0)})),!1):void at.event.add(this,"beforeactivate._change",function(e){var t=e.target;Nt.test(t.nodeName)&&!at._data(t,"changeBubbles")&&(at.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||at.event.simulate("change",this.parentNode,e,!0)}),at._data(t,"changeBubbles",!0))})},handle:function(e){var t=e.target;return this!==t||e.isSimulated||e.isTrigger||"radio"!==t.type&&"checkbox"!==t.type?e.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return at.event.remove(this,"._change"),!Nt.test(this.nodeName)}}),nt.focusinBubbles||at.each({focus:"focusin",blur:"focusout"},function(e,t){var r=function(e){at.event.simulate(t,e.target,at.event.fix(e),!0)};at.event.special[t]={setup:function(){var n=this.ownerDocument||this,o=at._data(n,t);o||n.addEventListener(e,r,!0),at._data(n,t,(o||0)+1)},teardown:function(){var n=this.ownerDocument||this,o=at._data(n,t)-1;o?at._data(n,t,o):(n.removeEventListener(e,r,!0),at._removeData(n,t))}}}),at.fn.extend({on:function(e,t,r,n,o){var a,c;if("object"==typeof e){"string"!=typeof t&&(r=r||t,t=void 0);for(a in e)this.on(a,t,r,e[a],o);return this}if(null==r&&null==n?(n=t,r=t=void 0):null==n&&("string"==typeof t?(n=r,r=void 0):(n=r,r=t,t=void 0)),n===!1)n=h;else if(!n)return this;return 1===o&&(c=n,n=function(e){return at().off(e),c.apply(this,arguments)},n.guid=c.guid||(c.guid=at.guid++)),this.each(function(){at.event.add(this,e,n,r,t)})},one:function(e,t,r,n){return this.on(e,t,r,n,1)},off:function(e,t,r){var n,o;if(e&&e.preventDefault&&e.handleObj)return n=e.handleObj,at(e.delegateTarget).off(n.namespace?n.origType+"."+n.namespace:n.origType,n.selector,n.handler),this;if("object"==typeof e){for(o in e)this.off(o,t,e[o]);return this}return(t===!1||"function"==typeof t)&&(r=t,t=void 0),r===!1&&(r=h),this.each(function(){at.event.remove(this,e,r,t)})},trigger:function(e,t){return this.each(function(){at.event.trigger(e,t,this)})},triggerHandler:function(e,t){var r=this[0];return r?at.event.trigger(e,t,r,!0):void 0}});var Mt="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",Pt=/ jQuery\d+="(?:null|\d+)"/g,jt=new RegExp("<(?:"+Mt+")[\\s/>]","i"),Rt=/^\s+/,$t=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Ht=/<([\w:]+)/,Ut=/<tbody/i,Vt=/<|&#?\w+;/,zt=/<(?:script|style|link)/i,Jt=/checked\s*(?:[^=]|=\s*.checked.)/i,Wt=/^$|\/(?:java|ecma)script/i,Gt=/^true\/(.*)/,Xt=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,Kt={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:nt.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},Qt=g(gt),Yt=Qt.appendChild(gt.createElement("div"));Kt.optgroup=Kt.option,Kt.tbody=Kt.tfoot=Kt.colgroup=Kt.caption=Kt.thead,Kt.th=Kt.td,at.extend({clone:function(e,t,r){var n,o,a,c,s,i=at.contains(e.ownerDocument,e);if(nt.html5Clone||at.isXMLDoc(e)||!jt.test("<"+e.nodeName+">")?a=e.cloneNode(!0):(Yt.innerHTML=e.outerHTML,Yt.removeChild(a=Yt.firstChild)),!(nt.noCloneEvent&&nt.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||at.isXMLDoc(e)))for(n=m(a),s=m(e),c=0;null!=(o=s[c]);++c)n[c]&&w(o,n[c]);if(t)if(r)for(s=s||m(e),n=n||m(a),c=0;null!=(o=s[c]);c++)C(o,n[c]);else C(e,a);return n=m(a,"script"),n.length>0&&A(n,!i&&m(e,"script")),n=s=o=null,a},buildFragment:function(e,t,r,n){for(var o,a,c,s,i,u,d,p=e.length,l=g(t),h=[],f=0;p>f;f++)if(a=e[f],a||0===a)if("object"===at.type(a))at.merge(h,a.nodeType?[a]:a);else if(Vt.test(a)){for(s=s||l.appendChild(t.createElement("div")),i=(Ht.exec(a)||["",""])[1].toLowerCase(),d=Kt[i]||Kt._default,s.innerHTML=d[1]+a.replace($t,"<$1></$2>")+d[2],o=d[0];o--;)s=s.lastChild;if(!nt.leadingWhitespace&&Rt.test(a)&&h.push(t.createTextNode(Rt.exec(a)[0])),!nt.tbody)for(a="table"!==i||Ut.test(a)?"<table>"!==d[1]||Ut.test(a)?0:s:s.firstChild,o=a&&a.childNodes.length;o--;)at.nodeName(u=a.childNodes[o],"tbody")&&!u.childNodes.length&&a.removeChild(u);for(at.merge(h,s.childNodes),s.textContent="";s.firstChild;)s.removeChild(s.firstChild);s=l.lastChild}else h.push(t.createTextNode(a));for(s&&l.removeChild(s),nt.appendChecked||at.grep(m(h,"input"),v),f=0;a=h[f++];)if((!n||-1===at.inArray(a,n))&&(c=at.contains(a.ownerDocument,a),s=m(l.appendChild(a),"script"),c&&A(s),r))for(o=0;a=s[o++];)Wt.test(a.type||"")&&r.push(a);return s=null,l},cleanData:function(e,t){for(var r,n,o,a,c=0,s=at.expando,i=at.cache,u=nt.deleteExpando,d=at.event.special;null!=(r=e[c]);c++)if((t||at.acceptData(r))&&(o=r[s],a=o&&i[o])){if(a.events)for(n in a.events)d[n]?at.event.remove(r,n):at.removeEvent(r,n,a.handle);i[o]&&(delete i[o],u?delete r[s]:typeof r.removeAttribute!==_t?r.removeAttribute(s):r[s]=null,G.push(o))}}}),at.fn.extend({text:function(e){return Ft(this,function(e){return void 0===e?at.text(this):this.empty().append((this[0]&&this[0].ownerDocument||gt).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=y(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=y(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){for(var r,n=e?at.filter(e,this):this,o=0;null!=(r=n[o]);o++)t||1!==r.nodeType||at.cleanData(m(r)),r.parentNode&&(t&&at.contains(r.ownerDocument,r)&&A(m(r,"script")),r.parentNode.removeChild(r));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&&at.cleanData(m(e,!1));e.firstChild;)e.removeChild(e.firstChild);e.options&&at.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 at.clone(this,e,t)})},html:function(e){return Ft(this,function(e){var t=this[0]||{},r=0,n=this.length;if(void 0===e)return 1===t.nodeType?t.innerHTML.replace(Pt,""):void 0;if(!("string"!=typeof e||zt.test(e)||!nt.htmlSerialize&&jt.test(e)||!nt.leadingWhitespace&&Rt.test(e)||Kt[(Ht.exec(e)||["",""])[1].toLowerCase()])){e=e.replace($t,"<$1></$2>");try{for(;n>r;r++)t=this[r]||{},1===t.nodeType&&(at.cleanData(m(t,!1)),t.innerHTML=e);t=0}catch(o){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=arguments[0];return this.domManip(arguments,function(t){e=this.parentNode,at.cleanData(m(this)),e&&e.replaceChild(t,this)}),e&&(e.length||e.nodeType)?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t){e=K.apply([],e);var r,n,o,a,c,s,i=0,u=this.length,d=this,p=u-1,l=e[0],h=at.isFunction(l);if(h||u>1&&"string"==typeof l&&!nt.checkClone&&Jt.test(l))return this.each(function(r){var n=d.eq(r);h&&(e[0]=l.call(this,r,n.html())),n.domManip(e,t)});if(u&&(s=at.buildFragment(e,this[0].ownerDocument,!1,this),r=s.firstChild,1===s.childNodes.length&&(s=r),r)){for(a=at.map(m(s,"script"),E),o=a.length;u>i;i++)n=s,i!==p&&(n=at.clone(n,!0,!0),o&&at.merge(a,m(n,"script"))),t.call(this[i],n,i);if(o)for(c=a[a.length-1].ownerDocument,at.map(a,b),i=0;o>i;i++)n=a[i],Wt.test(n.type||"")&&!at._data(n,"globalEval")&&at.contains(c,n)&&(n.src?at._evalUrl&&at._evalUrl(n.src):at.globalEval((n.text||n.textContent||n.innerHTML||"").replace(Xt,"")));s=r=null}return this}}),at.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){at.fn[e]=function(e){for(var r,n=0,o=[],a=at(e),c=a.length-1;c>=n;n++)r=n===c?this:this.clone(!0),at(a[n])[t](r),Q.apply(o,r.get());return this.pushStack(o)}});var Zt,er={};!function(){var e,t,r=gt.createElement("div"),n="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";r.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",e=r.getElementsByTagName("a")[0],e.style.cssText="float:left;opacity:.5",nt.opacity=/^0.5/.test(e.style.opacity),nt.cssFloat=!!e.style.cssFloat,r.style.backgroundClip="content-box",r.cloneNode(!0).style.backgroundClip="",nt.clearCloneStyle="content-box"===r.style.backgroundClip,e=r=null,nt.shrinkWrapBlocks=function(){var e,r,o,a;if(null==t){if(e=gt.getElementsByTagName("body")[0],!e)return;a="border:0;width:0;height:0;position:absolute;top:0;left:-9999px",r=gt.createElement("div"),o=gt.createElement("div"),e.appendChild(r).appendChild(o),t=!1,typeof o.style.zoom!==_t&&(o.style.cssText=n+";width:1px;padding:1px;zoom:1",o.innerHTML="<div></div>",o.firstChild.style.width="5px",t=3!==o.offsetWidth),e.removeChild(r),e=r=o=null}return t}}();var tr,rr,nr=/^margin/,or=new RegExp("^("+Tt+")(?!px)[a-z%]+$","i"),ar=/^(top|right|bottom|left)$/;e.getComputedStyle?(tr=function(e){return e.ownerDocument.defaultView.getComputedStyle(e,null)},rr=function(e,t,r){var n,o,a,c,s=e.style;return r=r||tr(e),c=r?r.getPropertyValue(t)||r[t]:void 0,r&&(""!==c||at.contains(e.ownerDocument,e)||(c=at.style(e,t)),or.test(c)&&nr.test(t)&&(n=s.width,o=s.minWidth,a=s.maxWidth,s.minWidth=s.maxWidth=s.width=c,c=r.width,s.width=n,s.minWidth=o,s.maxWidth=a)),void 0===c?c:c+""}):gt.documentElement.currentStyle&&(tr=function(e){return e.currentStyle},rr=function(e,t,r){var n,o,a,c,s=e.style;return r=r||tr(e),c=r?r[t]:void 0,null==c&&s&&s[t]&&(c=s[t]),or.test(c)&&!ar.test(t)&&(n=s.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),s.left="fontSize"===t?"1em":c,c=s.pixelLeft+"px",s.left=n,a&&(o.left=a)),void 0===c?c:c+""||"auto"}),function(){function t(){var t,r,n=gt.getElementsByTagName("body")[0];n&&(t=gt.createElement("div"),r=gt.createElement("div"),t.style.cssText=u,n.appendChild(t).appendChild(r),r.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:absolute;display:block;padding:1px;border:1px;width:4px;margin-top:1%;top:1%",at.swap(n,null!=n.style.zoom?{zoom:1}:{},function(){o=4===r.offsetWidth}),a=!0,c=!1,s=!0,e.getComputedStyle&&(c="1%"!==(e.getComputedStyle(r,null)||{}).top,a="4px"===(e.getComputedStyle(r,null)||{width:"4px"}).width),n.removeChild(t),r=n=null)}var r,n,o,a,c,s,i=gt.createElement("div"),u="border:0;width:0;height:0;position:absolute;top:0;left:-9999px",d="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;padding:0;margin:0;border:0";i.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",r=i.getElementsByTagName("a")[0],r.style.cssText="float:left;opacity:.5",nt.opacity=/^0.5/.test(r.style.opacity),nt.cssFloat=!!r.style.cssFloat,i.style.backgroundClip="content-box",i.cloneNode(!0).style.backgroundClip="",nt.clearCloneStyle="content-box"===i.style.backgroundClip,r=i=null,at.extend(nt,{reliableHiddenOffsets:function(){if(null!=n)return n;var e,t,r,o=gt.createElement("div"),a=gt.getElementsByTagName("body")[0];if(a)return o.setAttribute("className","t"),o.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",e=gt.createElement("div"),e.style.cssText=u,a.appendChild(e).appendChild(o),o.innerHTML="<table><tr><td></td><td>t</td></tr></table>",t=o.getElementsByTagName("td"),t[0].style.cssText="padding:0;margin:0;border:0;display:none",r=0===t[0].offsetHeight,t[0].style.display="",t[1].style.display="none",n=r&&0===t[0].offsetHeight,a.removeChild(e),o=a=null,n},boxSizing:function(){return null==o&&t(),o},boxSizingReliable:function(){return null==a&&t(),a},pixelPosition:function(){return null==c&&t(),c},reliableMarginRight:function(){var t,r,n,o;if(null==s&&e.getComputedStyle){if(t=gt.getElementsByTagName("body")[0],!t)return;r=gt.createElement("div"),n=gt.createElement("div"),r.style.cssText=u,t.appendChild(r).appendChild(n),o=n.appendChild(gt.createElement("div")),o.style.cssText=n.style.cssText=d,o.style.marginRight=o.style.width="0",n.style.width="1px",s=!parseFloat((e.getComputedStyle(o,null)||{}).marginRight),t.removeChild(r)}return s}})}(),at.swap=function(e,t,r,n){var o,a,c={};for(a in t)c[a]=e.style[a],e.style[a]=t[a];o=r.apply(e,n||[]);for(a in t)e.style[a]=c[a];return o};var cr=/alpha\([^)]*\)/i,sr=/opacity\s*=\s*([^)]*)/,ir=/^(none|table(?!-c[ea]).+)/,ur=new RegExp("^("+Tt+")(.*)$","i"),dr=new RegExp("^([+-])=("+Tt+")","i"),pr={position:"absolute",visibility:"hidden",display:"block"},lr={letterSpacing:0,fontWeight:400},hr=["Webkit","O","Moz","ms"];at.extend({cssHooks:{opacity:{get:function(e,t){if(t){var r=rr(e,"opacity");return""===r?"1":r}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":nt.cssFloat?"cssFloat":"styleFloat"},style:function(e,t,r,n){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,c,s=at.camelCase(t),i=e.style;if(t=at.cssProps[s]||(at.cssProps[s]=T(i,s)),c=at.cssHooks[t]||at.cssHooks[s],void 0===r)return c&&"get"in c&&void 0!==(o=c.get(e,!1,n))?o:i[t];if(a=typeof r,"string"===a&&(o=dr.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(at.css(e,t)),a="number"),null!=r&&r===r&&("number"!==a||at.cssNumber[s]||(r+="px"),nt.clearCloneStyle||""!==r||0!==t.indexOf("background")||(i[t]="inherit"),!(c&&"set"in c&&void 0===(r=c.set(e,r,n)))))try{i[t]="",i[t]=r}catch(u){}}},css:function(e,t,r,n){var o,a,c,s=at.camelCase(t);return t=at.cssProps[s]||(at.cssProps[s]=T(e.style,s)),c=at.cssHooks[t]||at.cssHooks[s],c&&"get"in c&&(a=c.get(e,!0,r)),void 0===a&&(a=rr(e,t,n)),"normal"===a&&t in lr&&(a=lr[t]),""===r||r?(o=parseFloat(a),r===!0||at.isNumeric(o)?o||0:a):a}}),at.each(["height","width"],function(e,t){at.cssHooks[t]={get:function(e,r,n){return r?0===e.offsetWidth&&ir.test(at.css(e,"display"))?at.swap(e,pr,function(){return S(e,t,n)}):S(e,t,n):void 0},set:function(e,r,n){var o=n&&tr(e);return B(e,r,n?F(e,t,n,nt.boxSizing()&&"border-box"===at.css(e,"boxSizing",!1,o),o):0)}}}),nt.opacity||(at.cssHooks.opacity={get:function(e,t){return sr.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var r=e.style,n=e.currentStyle,o=at.isNumeric(t)?"alpha(opacity="+100*t+")":"",a=n&&n.filter||r.filter||"";r.zoom=1,(t>=1||""===t)&&""===at.trim(a.replace(cr,""))&&r.removeAttribute&&(r.removeAttribute("filter"),""===t||n&&!n.filter)||(r.filter=cr.test(a)?a.replace(cr,o):a+" "+o)}}),at.cssHooks.marginRight=D(nt.reliableMarginRight,function(e,t){return t?at.swap(e,{display:"inline-block"},rr,[e,"marginRight"]):void 0}),at.each({margin:"",padding:"",border:"Width"},function(e,t){at.cssHooks[e+t]={expand:function(r){for(var n=0,o={},a="string"==typeof r?r.split(" "):[r];4>n;n++)o[e+kt[n]+t]=a[n]||a[n-2]||a[0];return o}},nr.test(e)||(at.cssHooks[e+t].set=B)}),at.fn.extend({css:function(e,t){return Ft(this,function(e,t,r){var n,o,a={},c=0;if(at.isArray(t)){for(n=tr(e),o=t.length;o>c;c++)a[t[c]]=at.css(e,t[c],!1,n);return a}return void 0!==r?at.style(e,t,r):at.css(e,t)},e,t,arguments.length>1)},show:function(){return k(this,!0)},hide:function(){return k(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Bt(this)?at(this).show():at(this).hide()})}}),at.Tween=N,N.prototype={constructor:N,init:function(e,t,r,n,o,a){this.elem=e,this.prop=r,this.easing=o||"swing",this.options=t,this.start=this.now=this.cur(),this.end=n,this.unit=a||(at.cssNumber[r]?"":"px")},cur:function(){var e=N.propHooks[this.prop];return e&&e.get?e.get(this):N.propHooks._default.get(this)},run:function(e){var t,r=N.propHooks[this.prop];return this.pos=t=this.options.duration?at.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),r&&r.set?r.set(this):N.propHooks._default.set(this),this}},N.prototype.init.prototype=N.prototype,N.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=at.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){at.fx.step[e.prop]?at.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[at.cssProps[e.prop]]||at.cssHooks[e.prop])?at.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},N.propHooks.scrollTop=N.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},at.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},at.fx=N.prototype.init,at.fx.step={};var fr,gr,mr=/^(?:toggle|show|hide)$/,vr=new RegExp("^(?:([+-])=|)("+Tt+")([a-z%]*)$","i"),yr=/queueHooks$/,Er=[q],br={"*":[function(e,t){var r=this.createTween(e,t),n=r.cur(),o=vr.exec(t),a=o&&o[3]||(at.cssNumber[e]?"":"px"),c=(at.cssNumber[e]||"px"!==a&&+n)&&vr.exec(at.css(r.elem,e)),s=1,i=20;if(c&&c[3]!==a){a=a||c[3],o=o||[],c=+n||1;do s=s||".5",c/=s,at.style(r.elem,e,c+a);while(s!==(s=r.cur()/n)&&1!==s&&--i)}return o&&(c=r.start=+c||+n||0,r.unit=a,r.end=o[1]?c+(o[1]+1)*o[2]:+o[2]),r}]};at.Animation=at.extend(P,{tweener:function(e,t){at.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");for(var r,n=0,o=e.length;o>n;n++)r=e[n],br[r]=br[r]||[],br[r].unshift(t)},prefilter:function(e,t){t?Er.unshift(e):Er.push(e)}}),at.speed=function(e,t,r){var n=e&&"object"==typeof e?at.extend({},e):{complete:r||!r&&t||at.isFunction(e)&&e,duration:e,easing:r&&t||t&&!at.isFunction(t)&&t};return n.duration=at.fx.off?0:"number"==typeof n.duration?n.duration:n.duration in at.fx.speeds?at.fx.speeds[n.duration]:at.fx.speeds._default,(null==n.queue||n.queue===!0)&&(n.queue="fx"),n.old=n.complete,n.complete=function(){at.isFunction(n.old)&&n.old.call(this),n.queue&&at.dequeue(this,n.queue)},n},at.fn.extend({fadeTo:function(e,t,r,n){return this.filter(Bt).css("opacity",0).show().end().animate({opacity:t},e,r,n)},animate:function(e,t,r,n){var o=at.isEmptyObject(e),a=at.speed(t,r,n),c=function(){var t=P(this,at.extend({},e),a);(o||at._data(this,"finish"))&&t.stop(!0)};return c.finish=c,o||a.queue===!1?this.each(c):this.queue(a.queue,c)},stop:function(e,t,r){var n=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=t,t=e,e=void 0),t&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,o=null!=e&&e+"queueHooks",a=at.timers,c=at._data(this);if(o)c[o]&&c[o].stop&&n(c[o]);else for(o in c)c[o]&&c[o].stop&&yr.test(o)&&n(c[o]);for(o=a.length;o--;)a[o].elem!==this||null!=e&&a[o].queue!==e||(a[o].anim.stop(r),t=!1,a.splice(o,1));(t||!r)&&at.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,r=at._data(this),n=r[e+"queue"],o=r[e+"queueHooks"],a=at.timers,c=n?n.length:0;for(r.finish=!0,at.queue(this,e,[]),o&&o.stop&&o.stop.call(this,!0),t=a.length;t--;)a[t].elem===this&&a[t].queue===e&&(a[t].anim.stop(!0),a.splice(t,1));for(t=0;c>t;t++)n[t]&&n[t].finish&&n[t].finish.call(this);delete r.finish})}}),at.each(["toggle","show","hide"],function(e,t){var r=at.fn[t];at.fn[t]=function(e,n,o){return null==e||"boolean"==typeof e?r.apply(this,arguments):this.animate(I(t,!0),e,n,o)}}),at.each({slideDown:I("show"),slideUp:I("hide"),slideToggle:I("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){at.fn[e]=function(e,r,n){return this.animate(t,e,r,n) | |
}}),at.timers=[],at.fx.tick=function(){var e,t=at.timers,r=0;for(fr=at.now();r<t.length;r++)e=t[r],e()||t[r]!==e||t.splice(r--,1);t.length||at.fx.stop(),fr=void 0},at.fx.timer=function(e){at.timers.push(e),e()?at.fx.start():at.timers.pop()},at.fx.interval=13,at.fx.start=function(){gr||(gr=setInterval(at.fx.tick,at.fx.interval))},at.fx.stop=function(){clearInterval(gr),gr=null},at.fx.speeds={slow:600,fast:200,_default:400},at.fn.delay=function(e,t){return e=at.fx?at.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,r){var n=setTimeout(t,e);r.stop=function(){clearTimeout(n)}})},function(){var e,t,r,n,o=gt.createElement("div");o.setAttribute("className","t"),o.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",e=o.getElementsByTagName("a")[0],r=gt.createElement("select"),n=r.appendChild(gt.createElement("option")),t=o.getElementsByTagName("input")[0],e.style.cssText="top:1px",nt.getSetAttribute="t"!==o.className,nt.style=/top/.test(e.getAttribute("style")),nt.hrefNormalized="/a"===e.getAttribute("href"),nt.checkOn=!!t.value,nt.optSelected=n.selected,nt.enctype=!!gt.createElement("form").enctype,r.disabled=!0,nt.optDisabled=!n.disabled,t=gt.createElement("input"),t.setAttribute("value",""),nt.input=""===t.getAttribute("value"),t.value="t",t.setAttribute("type","radio"),nt.radioValue="t"===t.value,e=t=r=n=o=null}();var Ar=/\r/g;at.fn.extend({val:function(e){var t,r,n,o=this[0];{if(arguments.length)return n=at.isFunction(e),this.each(function(r){var o;1===this.nodeType&&(o=n?e.call(this,r,at(this).val()):e,null==o?o="":"number"==typeof o?o+="":at.isArray(o)&&(o=at.map(o,function(e){return null==e?"":e+""})),t=at.valHooks[this.type]||at.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,o,"value")||(this.value=o))});if(o)return t=at.valHooks[o.type]||at.valHooks[o.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(r=t.get(o,"value"))?r:(r=o.value,"string"==typeof r?r.replace(Ar,""):null==r?"":r)}}}),at.extend({valHooks:{option:{get:function(e){var t=at.find.attr(e,"value");return null!=t?t:at.text(e)}},select:{get:function(e){for(var t,r,n=e.options,o=e.selectedIndex,a="select-one"===e.type||0>o,c=a?null:[],s=a?o+1:n.length,i=0>o?s:a?o:0;s>i;i++)if(r=n[i],!(!r.selected&&i!==o||(nt.optDisabled?r.disabled:null!==r.getAttribute("disabled"))||r.parentNode.disabled&&at.nodeName(r.parentNode,"optgroup"))){if(t=at(r).val(),a)return t;c.push(t)}return c},set:function(e,t){for(var r,n,o=e.options,a=at.makeArray(t),c=o.length;c--;)if(n=o[c],at.inArray(at.valHooks.option.get(n),a)>=0)try{n.selected=r=!0}catch(s){n.scrollHeight}else n.selected=!1;return r||(e.selectedIndex=-1),o}}}}),at.each(["radio","checkbox"],function(){at.valHooks[this]={set:function(e,t){return at.isArray(t)?e.checked=at.inArray(at(e).val(),t)>=0:void 0}},nt.checkOn||(at.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Cr,wr,_r=at.expr.attrHandle,xr=/^(?:checked|selected)$/i,Dr=nt.getSetAttribute,Tr=nt.input;at.fn.extend({attr:function(e,t){return Ft(this,at.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){at.removeAttr(this,e)})}}),at.extend({attr:function(e,t,r){var n,o,a=e.nodeType;if(e&&3!==a&&8!==a&&2!==a)return typeof e.getAttribute===_t?at.prop(e,t,r):(1===a&&at.isXMLDoc(e)||(t=t.toLowerCase(),n=at.attrHooks[t]||(at.expr.match.bool.test(t)?wr:Cr)),void 0===r?n&&"get"in n&&null!==(o=n.get(e,t))?o:(o=at.find.attr(e,t),null==o?void 0:o):null!==r?n&&"set"in n&&void 0!==(o=n.set(e,r,t))?o:(e.setAttribute(t,r+""),r):void at.removeAttr(e,t))},removeAttr:function(e,t){var r,n,o=0,a=t&&t.match(bt);if(a&&1===e.nodeType)for(;r=a[o++];)n=at.propFix[r]||r,at.expr.match.bool.test(r)?Tr&&Dr||!xr.test(r)?e[n]=!1:e[at.camelCase("default-"+r)]=e[n]=!1:at.attr(e,r,""),e.removeAttribute(Dr?r:n)},attrHooks:{type:{set:function(e,t){if(!nt.radioValue&&"radio"===t&&at.nodeName(e,"input")){var r=e.value;return e.setAttribute("type",t),r&&(e.value=r),t}}}}}),wr={set:function(e,t,r){return t===!1?at.removeAttr(e,r):Tr&&Dr||!xr.test(r)?e.setAttribute(!Dr&&at.propFix[r]||r,r):e[at.camelCase("default-"+r)]=e[r]=!0,r}},at.each(at.expr.match.bool.source.match(/\w+/g),function(e,t){var r=_r[t]||at.find.attr;_r[t]=Tr&&Dr||!xr.test(t)?function(e,t,n){var o,a;return n||(a=_r[t],_r[t]=o,o=null!=r(e,t,n)?t.toLowerCase():null,_r[t]=a),o}:function(e,t,r){return r?void 0:e[at.camelCase("default-"+t)]?t.toLowerCase():null}}),Tr&&Dr||(at.attrHooks.value={set:function(e,t,r){return at.nodeName(e,"input")?void(e.defaultValue=t):Cr&&Cr.set(e,t,r)}}),Dr||(Cr={set:function(e,t,r){var n=e.getAttributeNode(r);return n||e.setAttributeNode(n=e.ownerDocument.createAttribute(r)),n.value=t+="","value"===r||t===e.getAttribute(r)?t:void 0}},_r.id=_r.name=_r.coords=function(e,t,r){var n;return r?void 0:(n=e.getAttributeNode(t))&&""!==n.value?n.value:null},at.valHooks.button={get:function(e,t){var r=e.getAttributeNode(t);return r&&r.specified?r.value:void 0},set:Cr.set},at.attrHooks.contenteditable={set:function(e,t,r){Cr.set(e,""===t?!1:t,r)}},at.each(["width","height"],function(e,t){at.attrHooks[t]={set:function(e,r){return""===r?(e.setAttribute(t,"auto"),r):void 0}}})),nt.style||(at.attrHooks.style={get:function(e){return e.style.cssText||void 0},set:function(e,t){return e.style.cssText=t+""}});var kr=/^(?:input|select|textarea|button|object)$/i,Br=/^(?:a|area)$/i;at.fn.extend({prop:function(e,t){return Ft(this,at.prop,e,t,arguments.length>1)},removeProp:function(e){return e=at.propFix[e]||e,this.each(function(){try{this[e]=void 0,delete this[e]}catch(t){}})}}),at.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(e,t,r){var n,o,a,c=e.nodeType;if(e&&3!==c&&8!==c&&2!==c)return a=1!==c||!at.isXMLDoc(e),a&&(t=at.propFix[t]||t,o=at.propHooks[t]),void 0!==r?o&&"set"in o&&void 0!==(n=o.set(e,r,t))?n:e[t]=r:o&&"get"in o&&null!==(n=o.get(e,t))?n:e[t]},propHooks:{tabIndex:{get:function(e){var t=at.find.attr(e,"tabindex");return t?parseInt(t,10):kr.test(e.nodeName)||Br.test(e.nodeName)&&e.href?0:-1}}}}),nt.hrefNormalized||at.each(["href","src"],function(e,t){at.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),nt.optSelected||(at.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}),at.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){at.propFix[this.toLowerCase()]=this}),nt.enctype||(at.propFix.enctype="encoding");var Fr=/[\t\r\n\f]/g;at.fn.extend({addClass:function(e){var t,r,n,o,a,c,s=0,i=this.length,u="string"==typeof e&&e;if(at.isFunction(e))return this.each(function(t){at(this).addClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(bt)||[];i>s;s++)if(r=this[s],n=1===r.nodeType&&(r.className?(" "+r.className+" ").replace(Fr," "):" ")){for(a=0;o=t[a++];)n.indexOf(" "+o+" ")<0&&(n+=o+" ");c=at.trim(n),r.className!==c&&(r.className=c)}return this},removeClass:function(e){var t,r,n,o,a,c,s=0,i=this.length,u=0===arguments.length||"string"==typeof e&&e;if(at.isFunction(e))return this.each(function(t){at(this).removeClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(bt)||[];i>s;s++)if(r=this[s],n=1===r.nodeType&&(r.className?(" "+r.className+" ").replace(Fr," "):"")){for(a=0;o=t[a++];)for(;n.indexOf(" "+o+" ")>=0;)n=n.replace(" "+o+" "," ");c=e?at.trim(n):"",r.className!==c&&(r.className=c)}return this},toggleClass:function(e,t){var r=typeof e;return"boolean"==typeof t&&"string"===r?t?this.addClass(e):this.removeClass(e):this.each(at.isFunction(e)?function(r){at(this).toggleClass(e.call(this,r,this.className,t),t)}:function(){if("string"===r)for(var t,n=0,o=at(this),a=e.match(bt)||[];t=a[n++];)o.hasClass(t)?o.removeClass(t):o.addClass(t);else(r===_t||"boolean"===r)&&(this.className&&at._data(this,"__className__",this.className),this.className=this.className||e===!1?"":at._data(this,"__className__")||"")})},hasClass:function(e){for(var t=" "+e+" ",r=0,n=this.length;n>r;r++)if(1===this[r].nodeType&&(" "+this[r].className+" ").replace(Fr," ").indexOf(t)>=0)return!0;return!1}}),at.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){at.fn[t]=function(e,r){return arguments.length>0?this.on(t,null,e,r):this.trigger(t)}}),at.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,r){return this.on(e,null,t,r)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,r,n){return this.on(t,e,r,n)},undelegate:function(e,t,r){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",r)}});var Sr=at.now(),Nr=/\?/,Or=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;at.parseJSON=function(t){if(e.JSON&&e.JSON.parse)return e.JSON.parse(t+"");var r,n=null,o=at.trim(t+"");return o&&!at.trim(o.replace(Or,function(e,t,o,a){return r&&t&&(n=0),0===n?e:(r=o||t,n+=!a-!o,"")}))?Function("return "+o)():at.error("Invalid JSON: "+t)},at.parseXML=function(t){var r,n;if(!t||"string"!=typeof t)return null;try{e.DOMParser?(n=new DOMParser,r=n.parseFromString(t,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(t))}catch(o){r=void 0}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||at.error("Invalid XML: "+t),r};var Ir,Lr,qr=/#.*$/,Mr=/([?&])_=[^&]*/,Pr=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,jr=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Rr=/^(?:GET|HEAD)$/,$r=/^\/\//,Hr=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Ur={},Vr={},zr="*/".concat("*");try{Lr=location.href}catch(Jr){Lr=gt.createElement("a"),Lr.href="",Lr=Lr.href}Ir=Hr.exec(Lr.toLowerCase())||[],at.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Lr,type:"GET",isLocal:jr.test(Ir[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":zr,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":at.parseJSON,"text xml":at.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?$($(e,at.ajaxSettings),t):$(at.ajaxSettings,e)},ajaxPrefilter:j(Ur),ajaxTransport:j(Vr),ajax:function(e,t){function r(e,t,r,n){var o,d,v,y,b,C=t;2!==E&&(E=2,s&&clearTimeout(s),u=void 0,c=n||"",A.readyState=e>0?4:0,o=e>=200&&300>e||304===e,r&&(y=H(p,A,r)),y=U(p,y,A,o),o?(p.ifModified&&(b=A.getResponseHeader("Last-Modified"),b&&(at.lastModified[a]=b),b=A.getResponseHeader("etag"),b&&(at.etag[a]=b)),204===e||"HEAD"===p.type?C="nocontent":304===e?C="notmodified":(C=y.state,d=y.data,v=y.error,o=!v)):(v=C,(e||!C)&&(C="error",0>e&&(e=0))),A.status=e,A.statusText=(t||C)+"",o?f.resolveWith(l,[d,C,A]):f.rejectWith(l,[A,C,v]),A.statusCode(m),m=void 0,i&&h.trigger(o?"ajaxSuccess":"ajaxError",[A,p,o?d:v]),g.fireWith(l,[A,C]),i&&(h.trigger("ajaxComplete",[A,p]),--at.active||at.event.trigger("ajaxStop")))}"object"==typeof e&&(t=e,e=void 0),t=t||{};var n,o,a,c,s,i,u,d,p=at.ajaxSetup({},t),l=p.context||p,h=p.context&&(l.nodeType||l.jquery)?at(l):at.event,f=at.Deferred(),g=at.Callbacks("once memory"),m=p.statusCode||{},v={},y={},E=0,b="canceled",A={readyState:0,getResponseHeader:function(e){var t;if(2===E){if(!d)for(d={};t=Pr.exec(c);)d[t[1].toLowerCase()]=t[2];t=d[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===E?c:null},setRequestHeader:function(e,t){var r=e.toLowerCase();return E||(e=y[r]=y[r]||e,v[e]=t),this},overrideMimeType:function(e){return E||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>E)for(t in e)m[t]=[m[t],e[t]];else A.always(e[A.status]);return this},abort:function(e){var t=e||b;return u&&u.abort(t),r(0,t),this}};if(f.promise(A).complete=g.add,A.success=A.done,A.error=A.fail,p.url=((e||p.url||Lr)+"").replace(qr,"").replace($r,Ir[1]+"//"),p.type=t.method||t.type||p.method||p.type,p.dataTypes=at.trim(p.dataType||"*").toLowerCase().match(bt)||[""],null==p.crossDomain&&(n=Hr.exec(p.url.toLowerCase()),p.crossDomain=!(!n||n[1]===Ir[1]&&n[2]===Ir[2]&&(n[3]||("http:"===n[1]?"80":"443"))===(Ir[3]||("http:"===Ir[1]?"80":"443")))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=at.param(p.data,p.traditional)),R(Ur,p,t,A),2===E)return A;i=p.global,i&&0===at.active++&&at.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Rr.test(p.type),a=p.url,p.hasContent||(p.data&&(a=p.url+=(Nr.test(a)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=Mr.test(a)?a.replace(Mr,"$1_="+Sr++):a+(Nr.test(a)?"&":"?")+"_="+Sr++)),p.ifModified&&(at.lastModified[a]&&A.setRequestHeader("If-Modified-Since",at.lastModified[a]),at.etag[a]&&A.setRequestHeader("If-None-Match",at.etag[a])),(p.data&&p.hasContent&&p.contentType!==!1||t.contentType)&&A.setRequestHeader("Content-Type",p.contentType),A.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+zr+"; q=0.01":""):p.accepts["*"]);for(o in p.headers)A.setRequestHeader(o,p.headers[o]);if(p.beforeSend&&(p.beforeSend.call(l,A,p)===!1||2===E))return A.abort();b="abort";for(o in{success:1,error:1,complete:1})A[o](p[o]);if(u=R(Vr,p,t,A)){A.readyState=1,i&&h.trigger("ajaxSend",[A,p]),p.async&&p.timeout>0&&(s=setTimeout(function(){A.abort("timeout")},p.timeout));try{E=1,u.send(v,r)}catch(C){if(!(2>E))throw C;r(-1,C)}}else r(-1,"No Transport");return A},getJSON:function(e,t,r){return at.get(e,t,r,"json")},getScript:function(e,t){return at.get(e,void 0,t,"script")}}),at.each(["get","post"],function(e,t){at[t]=function(e,r,n,o){return at.isFunction(r)&&(o=o||n,n=r,r=void 0),at.ajax({url:e,type:t,dataType:o,data:r,success:n})}}),at.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){at.fn[t]=function(e){return this.on(t,e)}}),at._evalUrl=function(e){return at.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},at.fn.extend({wrapAll:function(e){if(at.isFunction(e))return this.each(function(t){at(this).wrapAll(e.call(this,t))});if(this[0]){var t=at(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 this.each(at.isFunction(e)?function(t){at(this).wrapInner(e.call(this,t))}:function(){var t=at(this),r=t.contents();r.length?r.wrapAll(e):t.append(e)})},wrap:function(e){var t=at.isFunction(e);return this.each(function(r){at(this).wrapAll(t?e.call(this,r):e)})},unwrap:function(){return this.parent().each(function(){at.nodeName(this,"body")||at(this).replaceWith(this.childNodes)}).end()}}),at.expr.filters.hidden=function(e){return e.offsetWidth<=0&&e.offsetHeight<=0||!nt.reliableHiddenOffsets()&&"none"===(e.style&&e.style.display||at.css(e,"display"))},at.expr.filters.visible=function(e){return!at.expr.filters.hidden(e)};var Wr=/%20/g,Gr=/\[\]$/,Xr=/\r?\n/g,Kr=/^(?:submit|button|image|reset|file)$/i,Qr=/^(?:input|select|textarea|keygen)/i;at.param=function(e,t){var r,n=[],o=function(e,t){t=at.isFunction(t)?t():null==t?"":t,n[n.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=at.ajaxSettings&&at.ajaxSettings.traditional),at.isArray(e)||e.jquery&&!at.isPlainObject(e))at.each(e,function(){o(this.name,this.value)});else for(r in e)V(r,e[r],t,o);return n.join("&").replace(Wr,"+")},at.fn.extend({serialize:function(){return at.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=at.prop(this,"elements");return e?at.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!at(this).is(":disabled")&&Qr.test(this.nodeName)&&!Kr.test(e)&&(this.checked||!St.test(e))}).map(function(e,t){var r=at(this).val();return null==r?null:at.isArray(r)?at.map(r,function(e){return{name:t.name,value:e.replace(Xr,"\r\n")}}):{name:t.name,value:r.replace(Xr,"\r\n")}}).get()}}),at.ajaxSettings.xhr=void 0!==e.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&z()||J()}:z;var Yr=0,Zr={},en=at.ajaxSettings.xhr();e.ActiveXObject&&at(e).on("unload",function(){for(var e in Zr)Zr[e](void 0,!0)}),nt.cors=!!en&&"withCredentials"in en,en=nt.ajax=!!en,en&&at.ajaxTransport(function(e){if(!e.crossDomain||nt.cors){var t;return{send:function(r,n){var o,a=e.xhr(),c=++Yr;if(a.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(o in e.xhrFields)a[o]=e.xhrFields[o];e.mimeType&&a.overrideMimeType&&a.overrideMimeType(e.mimeType),e.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest");for(o in r)void 0!==r[o]&&a.setRequestHeader(o,r[o]+"");a.send(e.hasContent&&e.data||null),t=function(r,o){var s,i,u;if(t&&(o||4===a.readyState))if(delete Zr[c],t=void 0,a.onreadystatechange=at.noop,o)4!==a.readyState&&a.abort();else{u={},s=a.status,"string"==typeof a.responseText&&(u.text=a.responseText);try{i=a.statusText}catch(d){i=""}s||!e.isLocal||e.crossDomain?1223===s&&(s=204):s=u.text?200:404}u&&n(s,i,u,a.getAllResponseHeaders())},e.async?4===a.readyState?setTimeout(t):a.onreadystatechange=Zr[c]=t:t()},abort:function(){t&&t(void 0,!0)}}}}),at.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return at.globalEval(e),e}}}),at.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),at.ajaxTransport("script",function(e){if(e.crossDomain){var t,r=gt.head||at("head")[0]||gt.documentElement;return{send:function(n,o){t=gt.createElement("script"),t.async=!0,e.scriptCharset&&(t.charset=e.scriptCharset),t.src=e.url,t.onload=t.onreadystatechange=function(e,r){(r||!t.readyState||/loaded|complete/.test(t.readyState))&&(t.onload=t.onreadystatechange=null,t.parentNode&&t.parentNode.removeChild(t),t=null,r||o(200,"success"))},r.insertBefore(t,r.firstChild)},abort:function(){t&&t.onload(void 0,!0)}}}});var tn=[],rn=/(=)\?(?=&|$)|\?\?/;at.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=tn.pop()||at.expando+"_"+Sr++;return this[e]=!0,e}}),at.ajaxPrefilter("json jsonp",function(t,r,n){var o,a,c,s=t.jsonp!==!1&&(rn.test(t.url)?"url":"string"==typeof t.data&&!(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&rn.test(t.data)&&"data");return s||"jsonp"===t.dataTypes[0]?(o=t.jsonpCallback=at.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(rn,"$1"+o):t.jsonp!==!1&&(t.url+=(Nr.test(t.url)?"&":"?")+t.jsonp+"="+o),t.converters["script json"]=function(){return c||at.error(o+" was not called"),c[0]},t.dataTypes[0]="json",a=e[o],e[o]=function(){c=arguments},n.always(function(){e[o]=a,t[o]&&(t.jsonpCallback=r.jsonpCallback,tn.push(o)),c&&at.isFunction(a)&&a(c[0]),c=a=void 0}),"script"):void 0}),at.parseHTML=function(e,t,r){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(r=t,t=!1),t=t||gt;var n=lt.exec(e),o=!r&&[];return n?[t.createElement(n[1])]:(n=at.buildFragment([e],t,o),o&&o.length&&at(o).remove(),at.merge([],n.childNodes))};var nn=at.fn.load;at.fn.load=function(e,t,r){if("string"!=typeof e&&nn)return nn.apply(this,arguments);var n,o,a,c=this,s=e.indexOf(" ");return s>=0&&(n=e.slice(s,e.length),e=e.slice(0,s)),at.isFunction(t)?(r=t,t=void 0):t&&"object"==typeof t&&(a="POST"),c.length>0&&at.ajax({url:e,type:a,dataType:"html",data:t}).done(function(e){o=arguments,c.html(n?at("<div>").append(at.parseHTML(e)).find(n):e)}).complete(r&&function(e,t){c.each(r,o||[e.responseText,t,e])}),this},at.expr.filters.animated=function(e){return at.grep(at.timers,function(t){return e===t.elem}).length};var on=e.document.documentElement;at.offset={setOffset:function(e,t,r){var n,o,a,c,s,i,u,d=at.css(e,"position"),p=at(e),l={};"static"===d&&(e.style.position="relative"),s=p.offset(),a=at.css(e,"top"),i=at.css(e,"left"),u=("absolute"===d||"fixed"===d)&&at.inArray("auto",[a,i])>-1,u?(n=p.position(),c=n.top,o=n.left):(c=parseFloat(a)||0,o=parseFloat(i)||0),at.isFunction(t)&&(t=t.call(e,r,s)),null!=t.top&&(l.top=t.top-s.top+c),null!=t.left&&(l.left=t.left-s.left+o),"using"in t?t.using.call(e,l):p.css(l)}},at.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){at.offset.setOffset(this,e,t)});var t,r,n={top:0,left:0},o=this[0],a=o&&o.ownerDocument;if(a)return t=a.documentElement,at.contains(t,o)?(typeof o.getBoundingClientRect!==_t&&(n=o.getBoundingClientRect()),r=W(a),{top:n.top+(r.pageYOffset||t.scrollTop)-(t.clientTop||0),left:n.left+(r.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}):n},position:function(){if(this[0]){var e,t,r={top:0,left:0},n=this[0];return"fixed"===at.css(n,"position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),at.nodeName(e[0],"html")||(r=e.offset()),r.top+=at.css(e[0],"borderTopWidth",!0),r.left+=at.css(e[0],"borderLeftWidth",!0)),{top:t.top-r.top-at.css(n,"marginTop",!0),left:t.left-r.left-at.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||on;e&&!at.nodeName(e,"html")&&"static"===at.css(e,"position");)e=e.offsetParent;return e||on})}}),at.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var r=/Y/.test(t);at.fn[e]=function(n){return Ft(this,function(e,n,o){var a=W(e);return void 0===o?a?t in a?a[t]:a.document.documentElement[n]:e[n]:void(a?a.scrollTo(r?at(a).scrollLeft():o,r?o:at(a).scrollTop()):e[n]=o)},e,n,arguments.length,null)}}),at.each(["top","left"],function(e,t){at.cssHooks[t]=D(nt.pixelPosition,function(e,r){return r?(r=rr(e,t),or.test(r)?at(e).position()[t]+"px":r):void 0})}),at.each({Height:"height",Width:"width"},function(e,t){at.each({padding:"inner"+e,content:t,"":"outer"+e},function(r,n){at.fn[n]=function(n,o){var a=arguments.length&&(r||"boolean"!=typeof n),c=r||(n===!0||o===!0?"margin":"border");return Ft(this,function(t,r,n){var o;return at.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===n?at.css(t,r,c):at.style(t,r,n,c)},t,a?n:void 0,a,null)}})}),at.fn.size=function(){return this.length},at.fn.andSelf=at.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return at});var an=e.jQuery,cn=e.$;return at.noConflict=function(t){return e.$===at&&(e.$=cn),t&&e.jQuery===at&&(e.jQuery=an),at},typeof t===_t&&(e.jQuery=e.$=at),at})}).call(this),function(){e=t=window.jQuery.noConflict()}.call(this),"undefined"==typeof Package&&(Package={}),Package.jquery={$:e,jQuery:t}}(),function(){var e,t=Package.meteor.Meteor;(function(){e={},e.active=!1,e.currentComputation=null;var r=function(t){e.currentComputation=t,e.active=!!t},n=Object.prototype.hasOwnProperty,o=function(e,t){for(var r in t)n.call(t,r)&&(e[r]=t[r]);return e},a=function(){return"undefined"!=typeof t?t._debug:"undefined"!=typeof console&&console.log?function(){console.log.apply(console,arguments)}:function(){}},c=function(e,t){if(h)throw t;a()("Exception from Deps "+e+" function:",t.stack||t.message)},s=function(e,r){"undefined"==typeof t||t.isClient?e(r):t._noYieldsAllowed(function(){e(r)})},i=1,u=[],d=!1,p=!1,l=!1,h=!1,f=[],g=function(){d||(setTimeout(e.flush,0),d=!0)},m=!1;e.Computation=function(e,t){if(!m)throw new Error("Deps.Computation constructor is private; use Deps.autorun");m=!1;var r=this;r.stopped=!1,r.invalidated=!1,r.firstRun=!0,r._id=i++,r._onInvalidateCallbacks=[],r._parent=t,r._func=e,r._recomputing=!1;var n=!0;try{r._compute(),n=!1}finally{r.firstRun=!1,n&&r.stop()}},o(e.Computation.prototype,{onInvalidate:function(t){var r=this;if("function"!=typeof t)throw new Error("onInvalidate requires a function");r.invalidated?e.nonreactive(function(){s(t,r)}):r._onInvalidateCallbacks.push(t)},invalidate:function(){var t=this;if(!t.invalidated){t._recomputing||t.stopped||(g(),u.push(this)),t.invalidated=!0;for(var r,n=0;r=t._onInvalidateCallbacks[n];n++)e.nonreactive(function(){s(r,t)});t._onInvalidateCallbacks=[]}},stop:function(){this.stopped||(this.stopped=!0,this.invalidate())},_compute:function(){var t=this;t.invalidated=!1;var n=e.currentComputation;r(t);l=!0;try{s(t._func,t)}finally{r(n),l=!1}},_recompute:function(){var e=this;e._recomputing=!0;try{for(;e.invalidated&&!e.stopped;)try{e._compute()}catch(t){c("recompute",t)}}finally{e._recomputing=!1}}}),e.Dependency=function(){this._dependentsById={}},o(e.Dependency.prototype,{depend:function(t){if(!t){if(!e.active)return!1;t=e.currentComputation}var r=this,n=t._id;return n in r._dependentsById?!1:(r._dependentsById[n]=t,t.onInvalidate(function(){delete r._dependentsById[n]}),!0)},changed:function(){var e=this;for(var t in e._dependentsById)e._dependentsById[t].invalidate()},hasDependents:function(){var e=this;for(var t in e._dependentsById)return!0;return!1}}),o(e,{flush:function(t){if(p)throw new Error("Can't call Deps.flush while flushing");if(l)throw new Error("Can't flush inside Deps.autorun");p=!0,d=!0,h=!(!t||!t._throwFirstError);var r=!1;try{for(;u.length||f.length;){for(;u.length;){var n=u.shift();n._recompute()}if(f.length){var o=f.shift();try{o()}catch(a){c("afterFlush function",a)}}}r=!0}finally{r||(p=!1,e.flush({_throwFirstError:!1})),d=!1,p=!1}},autorun:function(t){if("function"!=typeof t)throw new Error("Deps.autorun requires a function argument");m=!0;var r=new e.Computation(t,e.currentComputation);return e.active&&e.onInvalidate(function(){r.stop()}),r},nonreactive:function(t){var n=e.currentComputation;r(null);try{return t()}finally{r(n)}},onInvalidate:function(t){if(!e.active)throw new Error("Deps.onInvalidate requires a currentComputation");e.currentComputation.onInvalidate(t)},afterFlush:function(e){f.push(e),g()}})}).call(this),function(){t.flush=e.flush,t.autorun=e.autorun,t.autosubscribe=e.autorun,e.depend=function(e){return e.depend()}}.call(this),"undefined"==typeof Package&&(Package={}),Package.deps={Deps:e}}(),function(){{var e,t=Package.meteor.Meteor;Package.underscore._}(function(){if(t.isServer)var r=Npm.require("crypto");var n=function(){function e(){var e=4022871197,t=function(t){t=t.toString();for(var r=0;r<t.length;r++){e+=t.charCodeAt(r);var n=.02519603282416938*e;e=n>>>0,n-=e,n*=e,e=n>>>0,n-=e,e+=4294967296*n}return 2.3283064365386963e-10*(e>>>0)};return t.version="Mash 0.9",t}return function(t){var r=0,n=0,o=0,a=1;0==t.length&&(t=[+new Date]);var c=e();r=c(" "),n=c(" "),o=c(" ");for(var s=0;s<t.length;s++)r-=c(t[s]),0>r&&(r+=1),n-=c(t[s]),0>n&&(n+=1),o-=c(t[s]),0>o&&(o+=1);c=null;var i=function(){var e=2091639*r+2.3283064365386963e-10*a;return r=n,n=o,o=e-(a=0|e)};return i.uint32=function(){return 4294967296*i()},i.fract53=function(){return i()+1.1102230246251565e-16*(2097152*i()|0)},i.version="Alea 0.9",i.args=t,i}(Array.prototype.slice.call(arguments))},o="23456789ABCDEFGHJKLMNPQRSTWXYZabcdefghijkmnopqrstuvwxyz",a="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_",c=function(e){var t=this;void 0!==e&&(t.alea=n.apply(null,e))};c.prototype.fraction=function(){var e=this;if(e.alea)return e.alea();if(r){var t=parseInt(e.hexString(8),16);return 2.3283064365386963e-10*t}if("undefined"!=typeof window&&window.crypto&&window.crypto.getRandomValues){var n=new Uint32Array(1);return window.crypto.getRandomValues(n),2.3283064365386963e-10*n[0]}throw new Error("No random generator available")},c.prototype.hexString=function(e){var t=this;if(r&&!t.alea){var n,o=Math.ceil(e/2);try{n=r.randomBytes(o)}catch(a){n=r.pseudoRandomBytes(o)}var c=n.toString("hex");return c.substring(0,e)}for(var s=[],i=0;e>i;++i)s.push(t.choice("0123456789abcdef"));return s.join("")},c.prototype._randomString=function(e,t){for(var r=this,n=[],o=0;e>o;o++)n[o]=r.choice(t);return n.join("")},c.prototype.id=function(e){var t=this;return void 0===e&&(e=17),t._randomString(e,o)},c.prototype.secret=function(e){var t=this;return void 0===e&&(e=43),t._randomString(e,a)},c.prototype.choice=function(e){var t=Math.floor(this.fraction()*e.length);return"string"==typeof e?e.substr(t,1):e[t]};var s="undefined"!=typeof window&&window.innerHeight||"undefined"!=typeof document&&document.documentElement&&document.documentElement.clientHeight||"undefined"!=typeof document&&document.body&&document.body.clientHeight||1,i="undefined"!=typeof window&&window.innerWidth||"undefined"!=typeof document&&document.documentElement&&document.documentElement.clientWidth||"undefined"!=typeof document&&document.body&&document.body.clientWidth||1,u="undefined"!=typeof navigator&&navigator.userAgent||"";e=r||"undefined"!=typeof window&&window.crypto&&window.crypto.getRandomValues?new c:new c([new Date,s,i,u,Math.random()]),e.createWithSeeds=function(){if(0===arguments.length)throw new Error("No seeds were provided");return new c(arguments)}}).call(this),function(){t.uuid=function(){for(var t="0123456789abcdef",r=[],n=0;36>n;n++)r[n]=e.choice(t);r[14]="4",r[19]=t.substr(3&parseInt(r[19],16)|8,1),r[8]=r[13]=r[18]=r[23]="-";var o=r.join("");return o}}.call(this),"undefined"==typeof Package&&(Package={}),Package.random={Random:e}}(),function(){var Meteor=Package.meteor.Meteor,JSON;(function(){window.JSON&&(JSON=window.JSON)}).call(this),function(){"object"!=typeof JSON&&(JSON={}),function(){"use strict";function f(e){return 10>e?"0"+e:e}function quote(e){return escapable.lastIndex=0,escapable.test(e)?'"'+e.replace(escapable,function(e){var t=meta[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function str(e,t){var r,n,o,a,c,s=gap,i=t[e];switch(i&&"object"==typeof i&&"function"==typeof i.toJSON&&(i=i.toJSON(e)),"function"==typeof rep&&(i=rep.call(t,e,i)),typeof i){case"string":return quote(i);case"number":return isFinite(i)?String(i):"null";case"boolean":case"null":return String(i);case"object":if(!i)return"null";if(gap+=indent,c=[],"[object Array]"===Object.prototype.toString.apply(i)){for(a=i.length,r=0;a>r;r+=1)c[r]=str(r,i)||"null";return o=0===c.length?"[]":gap?"[\n"+gap+c.join(",\n"+gap)+"\n"+s+"]":"["+c.join(",")+"]",gap=s,o}if(rep&&"object"==typeof rep)for(a=rep.length,r=0;a>r;r+=1)"string"==typeof rep[r]&&(n=rep[r],o=str(n,i),o&&c.push(quote(n)+(gap?": ":":")+o));else for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(o=str(n,i),o&&c.push(quote(n)+(gap?": ":":")+o));return o=0===c.length?"{}":gap?"{\n"+gap+c.join(",\n"+gap)+"\n"+s+"}":"{"+c.join(",")+"}",gap=s,o}}"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()});var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;"function"!=typeof JSON.stringify&&(JSON.stringify=function(e,t,r){var n;if(gap="",indent="","number"==typeof r)for(n=0;r>n;n+=1)indent+=" ";else"string"==typeof r&&(indent=r);if(rep=t,t&&"function"!=typeof t&&("object"!=typeof t||"number"!=typeof t.length))throw new Error("JSON.stringify");return str("",{"":e})}),"function"!=typeof JSON.parse&&(JSON.parse=function(text,reviver){function walk(e,t){var r,n,o=e[t]; | |
if(o&&"object"==typeof o)for(r in o)Object.prototype.hasOwnProperty.call(o,r)&&(n=walk(o,r),void 0!==n?o[r]=n:delete o[r]);return reviver.call(e,t,o)}var j;if(text=String(text),cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})),/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}()}.call(this),"undefined"==typeof Package&&(Package={}),Package.json={JSON:JSON}}(),function(){var e,t,r,n,o=Package.meteor.Meteor,a=Package.json.JSON,c=Package.underscore._;(function(){e={},t={};var s={};e.addType=function(e,t){if(c.has(s,e))throw new Error("Type "+e+" already present");s[e]=t};var i=function(e){return c.isNaN(e)||1/0===e||e===-1/0},u=[{matchJSONValue:function(e){return c.has(e,"$date")&&1===c.size(e)},matchObject:function(e){return e instanceof Date},toJSONValue:function(e){return{$date:e.getTime()}},fromJSONValue:function(e){return new Date(e.$date)}},{matchJSONValue:function(e){return c.has(e,"$InfNaN")&&1===c.size(e)},matchObject:i,toJSONValue:function(e){var t;return t=c.isNaN(e)?0:1/0===e?1:-1,{$InfNaN:t}},fromJSONValue:function(e){return e.$InfNaN/0}},{matchJSONValue:function(e){return c.has(e,"$binary")&&1===c.size(e)},matchObject:function(e){return"undefined"!=typeof Uint8Array&&e instanceof Uint8Array||e&&c.has(e,"$Uint8ArrayPolyfill")},toJSONValue:function(e){return{$binary:r(e)}},fromJSONValue:function(e){return n(e.$binary)}},{matchJSONValue:function(e){return c.has(e,"$escape")&&1===c.size(e)},matchObject:function(e){return c.isEmpty(e)||c.size(e)>2?!1:c.any(u,function(t){return t.matchJSONValue(e)})},toJSONValue:function(t){var r={};return c.each(t,function(t,n){r[n]=e.toJSONValue(t)}),{$escape:r}},fromJSONValue:function(t){var r={};return c.each(t.$escape,function(t,n){r[n]=e.fromJSONValue(t)}),r}},{matchJSONValue:function(e){return c.has(e,"$type")&&c.has(e,"$value")&&2===c.size(e)},matchObject:function(t){return e._isCustomType(t)},toJSONValue:function(e){var t=o._noYieldsAllowed(function(){return e.toJSONValue()});return{$type:e.typeName(),$value:t}},fromJSONValue:function(e){var t=e.$type;if(!c.has(s,t))throw new Error("Custom EJSON type "+t+" is not defined");var r=s[t];return o._noYieldsAllowed(function(){return r(e.$value)})}}];e._isCustomType=function(e){return e&&"function"==typeof e.toJSONValue&&"function"==typeof e.typeName&&c.has(s,e.typeName())};var d=e._adjustTypesToJSONValue=function(e){if(null===e)return null;var t=p(e);return void 0!==t?t:"object"!=typeof e?e:(c.each(e,function(t,r){if("object"==typeof t||void 0===t||i(t)){var n=p(t);return n?void(e[r]=n):void d(t)}}),e)},p=function(e){for(var t=0;t<u.length;t++){var r=u[t];if(r.matchObject(e))return r.toJSONValue(e)}return void 0};e.toJSONValue=function(t){var r=p(t);return void 0!==r?r:("object"==typeof t&&(t=e.clone(t),d(t)),t)};var l=e._adjustTypesFromJSONValue=function(e){if(null===e)return null;var t=h(e);return t!==e?t:"object"!=typeof e?e:(c.each(e,function(t,r){if("object"==typeof t){var n=h(t);if(t!==n)return void(e[r]=n);l(t)}}),e)},h=function(e){if("object"==typeof e&&null!==e&&c.size(e)<=2&&c.all(e,function(e,t){return"string"==typeof t&&"$"===t.substr(0,1)}))for(var t=0;t<u.length;t++){var r=u[t];if(r.matchJSONValue(e))return r.fromJSONValue(e)}return e};e.fromJSONValue=function(t){var r=h(t);return r===t&&"object"==typeof t?(t=e.clone(t),l(t),t):r},e.stringify=function(t,r){var n=e.toJSONValue(t);return r&&(r.canonical||r.indent)?e._canonicalStringify(n,r):a.stringify(n)},e.parse=function(t){if("string"!=typeof t)throw new Error("EJSON.parse argument should be a string");return e.fromJSONValue(a.parse(t))},e.isBinary=function(e){return!!("undefined"!=typeof Uint8Array&&e instanceof Uint8Array||e&&e.$Uint8ArrayPolyfill)},e.equals=function(t,r,n){var o,a=!(!n||!n.keyOrderSensitive);if(t===r)return!0;if(c.isNaN(t)&&c.isNaN(r))return!0;if(!t||!r)return!1;if("object"!=typeof t||"object"!=typeof r)return!1;if(t instanceof Date&&r instanceof Date)return t.valueOf()===r.valueOf();if(e.isBinary(t)&&e.isBinary(r)){if(t.length!==r.length)return!1;for(o=0;o<t.length;o++)if(t[o]!==r[o])return!1;return!0}if("function"==typeof t.equals)return t.equals(r,n);if("function"==typeof r.equals)return r.equals(t,n);if(t instanceof Array){if(!(r instanceof Array))return!1;if(t.length!==r.length)return!1;for(o=0;o<t.length;o++)if(!e.equals(t[o],r[o],n))return!1;return!0}switch(e._isCustomType(t)+e._isCustomType(r)){case 1:return!1;case 2:return e.equals(e.toJSONValue(t),e.toJSONValue(r))}var s;if(a){var i=[];return c.each(r,function(e,t){i.push(t)}),o=0,s=c.all(t,function(t,a){return o>=i.length?!1:a!==i[o]?!1:e.equals(t,r[i[o]],n)?(o++,!0):!1}),s&&o===i.length}return o=0,s=c.all(t,function(t,a){return c.has(r,a)&&e.equals(t,r[a],n)?(o++,!0):!1}),s&&c.size(r)===o},e.clone=function(t){var r;if("object"!=typeof t)return t;if(null===t)return null;if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp)return t;if(e.isBinary(t)){r=e.newBinary(t.length);for(var n=0;n<t.length;n++)r[n]=t[n];return r}if(c.isArray(t)||c.isArguments(t)){for(r=[],n=0;n<t.length;n++)r[n]=e.clone(t[n]);return r}return"function"==typeof t.clone?t.clone():e._isCustomType(t)?e.fromJSONValue(e.clone(e.toJSONValue(t)),!0):(r={},c.each(t,function(t,n){r[n]=e.clone(t)}),r)}}).call(this),function(){function t(e){return a.stringify(e)}var r=function(e,n,o,a,s){var i,u,d,p,l=a,h=n[e];switch(typeof h){case"string":return t(h);case"number":return isFinite(h)?String(h):"null";case"boolean":return String(h);case"object":if(!h)return"null";if(l=a+o,p=[],c.isArray(h)||c.isArguments(h)){for(d=h.length,i=0;d>i;i+=1)p[i]=r(i,h,o,l,s)||"null";return u=0===p.length?"[]":l?"[\n"+l+p.join(",\n"+l)+"\n"+a+"]":"["+p.join(",")+"]"}var f=c.keys(h);return s&&(f=f.sort()),c.each(f,function(e){u=r(e,h,o,l,s),u&&p.push(t(e)+(l?": ":":")+u)}),u=0===p.length?"{}":l?"{\n"+l+p.join(",\n"+l)+"\n"+a+"}":"{"+p.join(",")+"}"}};e._canonicalStringify=function(e,t){if(t=c.extend({indent:"",canonical:!1},t),t.indent===!0)t.indent=" ";else if("number"==typeof t.indent){for(var n="",o=0;o<t.indent;o++)n+=" ";t.indent=n}return r("",{"":e},t.indent,"",t.canonical)}}.call(this),function(){for(var o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a={},c=0;c<o.length;c++)a[o.charAt(c)]=c;r=function(e){for(var t=[],r=null,n=null,o=null,a=null,c=0;c<e.length;c++)switch(c%3){case 0:r=e[c]>>2&63,n=(3&e[c])<<4;break;case 1:n|=e[c]>>4&15,o=(15&e[c])<<2;break;case 2:o|=e[c]>>6&3,a=63&e[c],t.push(s(r)),t.push(s(n)),t.push(s(o)),t.push(s(a)),r=null,n=null,o=null,a=null}return null!=r&&(t.push(s(r)),t.push(s(n)),t.push(null==o?"=":s(o)),null==a&&t.push("=")),t.join("")};var s=function(e){return o.charAt(e)},i=function(e){return"="===e?-1:a[e]};e.newBinary=function(e){if("undefined"==typeof Uint8Array||"undefined"==typeof ArrayBuffer){for(var t=[],r=0;e>r;r++)t.push(0);return t.$Uint8ArrayPolyfill=!0,t}return new Uint8Array(new ArrayBuffer(e))},n=function(t){var r=Math.floor(3*t.length/4);"="==t.charAt(t.length-1)&&(r--,"="==t.charAt(t.length-2)&&r--);for(var n=e.newBinary(r),o=null,a=null,c=null,s=0,u=0;u<t.length;u++){var d=t.charAt(u),p=i(d);switch(u%4){case 0:if(0>p)throw new Error("invalid base64 string");o=p<<2;break;case 1:if(0>p)throw new Error("invalid base64 string");o|=p>>4,n[s++]=o,a=(15&p)<<4;break;case 2:p>=0&&(a|=p>>2,n[s++]=a,c=(3&p)<<6);break;case 3:p>=0&&(n[s++]=c|p)}}return n},t.base64Encode=r,t.base64Decode=n}.call(this),"undefined"==typeof Package&&(Package={}),Package.ejson={EJSON:e,EJSONTest:t}}(),function(){var e,t=(Package.meteor.Meteor,Package.underscore._);(function(){var r=function(e,t,r,n){return{key:e,value:t,next:r,prev:n}};e=function(){var e=this;e._dict={},e._first=null,e._last=null,e._size=0;var r=t.toArray(arguments);e._stringify=function(e){return e},"function"==typeof r[0]&&(e._stringify=r.shift()),t.each(r,function(t){e.putBefore(t[0],t[1],null)})},t.extend(e.prototype,{_k:function(e){return" "+this._stringify(e)},empty:function(){var e=this;return!e._first},size:function(){var e=this;return e._size},_linkEltIn:function(e){var t=this;e.next?(e.prev=e.next.prev,e.next.prev=e,e.prev&&(e.prev.next=e)):(e.prev=t._last,t._last&&(t._last.next=e),t._last=e),(null===t._first||t._first===e.next)&&(t._first=e)},_linkEltOut:function(e){var t=this;e.next&&(e.next.prev=e.prev),e.prev&&(e.prev.next=e.next),e===t._last&&(t._last=e.prev),e===t._first&&(t._first=e.next)},putBefore:function(e,t,n){var o=this;if(o._dict[o._k(e)])throw new Error("Item "+e+" already present in OrderedDict");var a=n?r(e,t,o._dict[o._k(n)]):r(e,t,null);if(void 0===a.next)throw new Error("could not find item to put this one before");o._linkEltIn(a),o._dict[o._k(e)]=a,o._size++},append:function(e,t){var r=this;r.putBefore(e,t,null)},remove:function(e){var t=this,r=t._dict[t._k(e)];if(void 0===r)throw new Error("Item "+e+" not present in OrderedDict");return t._linkEltOut(r),t._size--,delete t._dict[t._k(e)],r.value},get:function(e){var t=this;return t.has(e)?t._dict[t._k(e)].value:void 0},has:function(e){var r=this;return t.has(r._dict,r._k(e))},forEach:function(t){for(var r=this,n=0,o=r._first;null!==o;){var a=t(o.value,o.key,n);if(a===e.BREAK)return;o=o.next,n++}},first:function(){var e=this;return e.empty()?void 0:e._first.key},firstValue:function(){var e=this;return e.empty()?void 0:e._first.value},last:function(){var e=this;return e.empty()?void 0:e._last.key},lastValue:function(){var e=this;return e.empty()?void 0:e._last.value},prev:function(e){var t=this;if(t.has(e)){var r=t._dict[t._k(e)];if(r.prev)return r.prev.key}return null},next:function(e){var t=this;if(t.has(e)){var r=t._dict[t._k(e)];if(r.next)return r.next.key}return null},moveBefore:function(e,t){var r=this,n=r._dict[r._k(e)],o=t?r._dict[r._k(t)]:null;if(void 0===n)throw new Error("Item to move is not present");if(void 0===o)throw new Error("Could not find element to move this one before");o!==n.next&&(r._linkEltOut(n),n.next=o,r._linkEltIn(n))},indexOf:function(t){var r=this,n=null;return r.forEach(function(o,a,c){return r._k(a)===r._k(t)?(n=c,e.BREAK):void 0}),n},_checkRep:function(){var e=this;t.each(e._dict,function(e,t){if(t.next===t)throw new Error("Next is a loop");if(t.prev===t)throw new Error("Prev is a loop")})}}),e.BREAK={"break":!0}}).call(this),"undefined"==typeof Package&&(Package={}),Package["ordered-dict"]={OrderedDict:e}}(),function(){var e,t=(Package.meteor.Meteor,Package.underscore._),r=Package.json.JSON,n=Package.ejson.EJSON;(function(){e=function(e,t){var n=this;n._map={},n._idStringify=e||r.stringify,n._idParse=t||r.parse},t.extend(e.prototype,{get:function(e){var t=this,r=t._idStringify(e);return t._map[r]},set:function(e,t){var r=this,n=r._idStringify(e);r._map[n]=t},remove:function(e){var t=this,r=t._idStringify(e);delete t._map[r]},has:function(e){var r=this,n=r._idStringify(e);return t.has(r._map,n)},empty:function(){var e=this;return t.isEmpty(e._map)},clear:function(){var e=this;e._map={}},forEach:function(e){for(var r=this,n=t.keys(r._map),o=0;o<n.length;o++){var a=e.call(null,r._map[n[o]],r._idParse(n[o]));if(a===!1)return}},size:function(){var e=this;return t.size(e._map)},setDefault:function(e,r){var n=this,o=n._idStringify(e);return t.has(n._map,o)?n._map[o]:(n._map[o]=r,r)},clone:function(){var t=this,r=new e(t._idStringify,t._idParse);return t.forEach(function(e,t){r.set(t,n.clone(e))}),r}})}).call(this),"undefined"==typeof Package&&(Package={}),Package["id-map"]={IdMap:e}}(),function(){{var e,t;Package.meteor.Meteor}(function(){t={exports:{}}}).call(this),function(){!function(){function e(e){for(var t=[],r=[],n=0;n<e[0].length;n++)t.push(e[0][n][1]),r.push(e[0][n][0]);return t=t.sort(function(e,t){return e-t}),r=r.sort(function(e,t){return e-t}),[[t[0],r[0]],[t[t.length-1],r[r.length-1]]]}function r(e,t,r){for(var n=[[0,0]],o=0;o<r.length;o++){for(var a=0;a<r[o].length;a++)n.push(r[o][a]);n.push([0,0])}for(var c=!1,o=0,a=n.length-1;o<n.length;a=o++)n[o][0]>t!=n[a][0]>t&&e<(n[a][1]-n[o][1])*(t-n[o][0])/(n[a][0]-n[o][0])+n[o][1]&&(c=!c);return c}var n={};"undefined"!=typeof t&&t.exports&&(t.exports=n),n.lineStringsIntersect=function(e,t){for(var r=[],n=0;n<=e.coordinates.length-2;++n)for(var o=0;o<=t.coordinates.length-2;++o){var a={x:e.coordinates[n][1],y:e.coordinates[n][0]},c={x:e.coordinates[n+1][1],y:e.coordinates[n+1][0]},s={x:t.coordinates[o][1],y:t.coordinates[o][0]},i={x:t.coordinates[o+1][1],y:t.coordinates[o+1][0]},u=(i.x-s.x)*(a.y-s.y)-(i.y-s.y)*(a.x-s.x),d=(c.x-a.x)*(a.y-s.y)-(c.y-a.y)*(a.x-s.x),p=(i.y-s.y)*(c.x-a.x)-(i.x-s.x)*(c.y-a.y);if(0!=p){var l=u/p,h=d/p;l>=0&&1>=l&&h>=0&&1>=h&&r.push({type:"Point",coordinates:[a.x+l*(c.x-a.x),a.y+l*(c.y-a.y)]})}}return 0==r.length&&(r=!1),r},n.pointInBoundingBox=function(e,t){return!(e.coordinates[1]<t[0][0]||e.coordinates[1]>t[1][0]||e.coordinates[0]<t[0][1]||e.coordinates[0]>t[1][1])},n.pointInPolygon=function(t,o){for(var a="Polygon"==o.type?[o.coordinates]:o.coordinates,c=!1,s=0;s<a.length;s++)n.pointInBoundingBox(t,e(a[s]))&&(c=!0);if(!c)return!1;for(var i=!1,s=0;s<a.length;s++)r(t.coordinates[1],t.coordinates[0],a[s])&&(i=!0);return i},n.numberToRadius=function(e){return e*Math.PI/180},n.numberToDegree=function(e){return 180*e/Math.PI},n.drawCircle=function(e,t,r){for(var o=[t.coordinates[1],t.coordinates[0]],a=e/1e3/6371,c=[n.numberToRadius(o[0]),n.numberToRadius(o[1])],r=r||15,s=[[o[0],o[1]]],i=0;r>i;i++){var u=2*Math.PI*i/r,d=Math.asin(Math.sin(c[0])*Math.cos(a)+Math.cos(c[0])*Math.sin(a)*Math.cos(u)),p=c[1]+Math.atan2(Math.sin(u)*Math.sin(a)*Math.cos(c[0]),Math.cos(a)-Math.sin(c[0])*Math.sin(d));s[i]=[],s[i][1]=n.numberToDegree(d),s[i][0]=n.numberToDegree(p)}return{type:"Polygon",coordinates:[s]}},n.rectangleCentroid=function(e){var t=e.coordinates[0],r=t[0][0],n=t[0][1],o=t[2][0],a=t[2][1],c=o-r,s=a-n;return{type:"Point",coordinates:[r+c/2,n+s/2]}},n.pointDistance=function(e,t){var r=e.coordinates[0],o=e.coordinates[1],a=t.coordinates[0],c=t.coordinates[1],s=n.numberToRadius(c-o),i=n.numberToRadius(a-r),u=Math.pow(Math.sin(s/2),2)+Math.cos(n.numberToRadius(o))*Math.cos(n.numberToRadius(c))*Math.pow(Math.sin(i/2),2),d=2*Math.atan2(Math.sqrt(u),Math.sqrt(1-u));return 6371*d*1e3},n.geometryWithinRadius=function(e,t,r){if("Point"==e.type)return n.pointDistance(e,t)<=r;if("LineString"==e.type||"Polygon"==e.type){var o,a={};o="Polygon"==e.type?e.coordinates[0]:e.coordinates;for(var c in o)if(a.coordinates=o[c],n.pointDistance(a,t)>r)return!1}return!0},n.area=function(e){for(var t,r,n=0,o=e.coordinates[0],a=o.length-1,c=0;c<o.length;a=c++){var t={x:o[c][1],y:o[c][0]},r={x:o[a][1],y:o[a][0]};n+=t.x*r.y,n-=t.y*r.x}return n/=2},n.centroid=function(e){for(var t,r,o,a=0,c=0,s=e.coordinates[0],i=s.length-1,u=0;u<s.length;i=u++){var r={x:s[u][1],y:s[u][0]},o={x:s[i][1],y:s[i][0]};t=r.x*o.y-o.x*r.y,a+=(r.x+o.x)*t,c+=(r.y+o.y)*t}return t=6*n.area(e),{type:"Point",coordinates:[c/t,a/t]}},n.simplify=function(e,t){t=t||20,e=e.map(function(e){return{lng:e.coordinates[0],lat:e.coordinates[1]}});var r,n,o,a,c,s,i,u,d,p,l,h,f,g,m,v,y,E,b,A=Math.PI/180*.5,C=new Array,w=new Array,_=new Array;if(e.length<3)return e;for(r=e.length,p=360*t/(2*Math.PI*6378137),p*=p,o=0,w[0]=0,_[0]=r-1,n=1;n>0;)if(a=w[n-1],c=_[n-1],n--,c-a>1){for(l=e[c].lng()-e[a].lng(),h=e[c].lat()-e[a].lat(),Math.abs(l)>180&&(l=360-Math.abs(l)),l*=Math.cos(A*(e[c].lat()+e[a].lat())),f=l*l+h*h,s=a+1,i=a,d=-1;c>s;s++)g=e[s].lng()-e[a].lng(),m=e[s].lat()-e[a].lat(),Math.abs(g)>180&&(g=360-Math.abs(g)),g*=Math.cos(A*(e[s].lat()+e[a].lat())),v=g*g+m*m,y=e[s].lng()-e[c].lng(),E=e[s].lat()-e[c].lat(),Math.abs(y)>180&&(y=360-Math.abs(y)),y*=Math.cos(A*(e[s].lat()+e[c].lat())),b=y*y+E*E,u=v>=f+b?b:b>=f+v?v:(g*h-m*l)*(g*h-m*l)/f,u>d&&(i=s,d=u);p>d?(C[o]=a,o++):(n++,w[n-1]=i,_[n-1]=c,n++,w[n-1]=a,_[n-1]=i)}else C[o]=a,o++;C[o]=r-1,o++;for(var x=new Array,s=0;o>s;s++)x.push(e[C[s]]);return x.map(function(e){return{type:"Point",coordinates:[e.lng,e.lat]}})},n.destinationPoint=function(e,t,r){r/=6371,t=n.numberToRadius(t);var o=n.numberToRadius(e.coordinates[0]),a=n.numberToRadius(e.coordinates[1]),c=Math.asin(Math.sin(o)*Math.cos(r)+Math.cos(o)*Math.sin(r)*Math.cos(t)),s=a+Math.atan2(Math.sin(t)*Math.sin(r)*Math.cos(o),Math.cos(r)-Math.sin(o)*Math.sin(c));return s=(s+3*Math.PI)%(2*Math.PI)-Math.PI,{type:"Point",coordinates:[n.numberToDegree(c),n.numberToDegree(s)]}}}()}.call(this),function(){e=t.exports}.call(this),"undefined"==typeof Package&&(Package={}),Package["geojson-utils"]={GeoJSON:e}}(),function(){var e,t,r,n,o,a,c,s,i,u,d,p,l,h,f,g,m=Package.meteor.Meteor,v=Package.underscore._,y=Package.json.JSON,E=Package.ejson.EJSON,b=Package["id-map"].IdMap,A=Package["ordered-dict"].OrderedDict,C=Package.deps.Deps,w=Package.random.Random,_=Package["geojson-utils"].GeoJSON;(function(){e=function(t){var r=this;r.name=t,r._docs=new e._IdMap,r._observeQueue=new m._SynchronousQueue,r.next_qid=1,r.queries={},r._savedOriginals=null,r.paused=!1},t={},r={},e._applyChanges=function(e,t){v.each(t,function(t,r){void 0===t?delete e[r]:e[r]=t})},n=function(e){var t=new Error(e);return t.name="MinimongoError",t},e.prototype.find=function(t,r){return 0===arguments.length&&(t={}),new e.Cursor(this,t,r)},e.Cursor=function(r,n,o){var a=this;o||(o={}),a.collection=r,a.sorter=null,e._selectorIsId(n)?(a._selectorId=n,a.matcher=new t.Matcher(n,a)):(a._selectorId=void 0,a.matcher=new t.Matcher(n,a),(a.matcher.hasGeoQuery()||o.sort)&&(a.sorter=new t.Sorter(o.sort||[],{matcher:a.matcher}))),a.skip=o.skip,a.limit=o.limit,a.fields=o.fields,a.fields&&(a.projectionFn=e._compileProjection(a.fields)),a._transform=e.wrapTransform(o.transform),a.db_objects=null,a.cursor_pos=0,"undefined"!=typeof C&&(a.reactive=void 0===o.reactive?!0:o.reactive)},e.Cursor.prototype.rewind=function(){var e=this;e.db_objects=null,e.cursor_pos=0},e.prototype.findOne=function(e,t){return 0===arguments.length&&(e={}),t=t||{},t.limit=1,this.find(e,t).fetch()[0]},e.Cursor.prototype.forEach=function(e,t){var r=this;for(null===r.db_objects&&(r.db_objects=r._getRawObjects({ordered:!0})),r.reactive&&r._depend({addedBefore:!0,removed:!0,changed:!0,movedBefore:!0});r.cursor_pos<r.db_objects.length;){var n=E.clone(r.db_objects[r.cursor_pos]);r.projectionFn&&(n=r.projectionFn(n)),r._transform&&(n=r._transform(n)),e.call(t,n,r.cursor_pos,r),++r.cursor_pos}},e.Cursor.prototype.getTransform=function(){return this._transform},e.Cursor.prototype.map=function(e,t){var r=this,n=[];return r.forEach(function(o,a){n.push(e.call(t,o,a,r))}),n},e.Cursor.prototype.fetch=function(){var e=this,t=[];return e.forEach(function(e){t.push(e)}),t},e.Cursor.prototype.count=function(){var e=this;return e.reactive&&e._depend({added:!0,removed:!0},!0),null===e.db_objects&&(e.db_objects=e._getRawObjects({ordered:!0})),e.db_objects.length},e.Cursor.prototype._publishCursor=function(e){var t=this;if(!t.collection.name)throw new Error("Can't publish a cursor from a collection without a name.");var r=t.collection.name;return m.Collection._publishCursor(t,e,r)},e.Cursor.prototype._getCollectionName=function(){var e=this;return e.collection.name},e._observeChangesCallbacksAreOrdered=function(e){if(e.added&&e.addedBefore)throw new Error("Please specify only one of added() and addedBefore()");return!(!e.addedBefore&&!e.movedBefore)},e._observeCallbacksAreOrdered=function(e){if(e.addedAt&&e.added)throw new Error("Please specify only one of added() and addedAt()");if(e.changedAt&&e.changed)throw new Error("Please specify only one of changed() and changedAt()");if(e.removed&&e.removedAt)throw new Error("Please specify only one of removed() and removedAt()");return!!(e.addedAt||e.movedTo||e.changedAt||e.removedAt)},e.ObserveHandle=function(){},v.extend(e.Cursor.prototype,{observe:function(t){var r=this;return e._observeFromObserveChanges(r,t)},observeChanges:function(t){var r=this,n=e._observeChangesCallbacksAreOrdered(t);if(!t._allow_unordered&&!n&&(r.skip||r.limit))throw new Error("must use ordered observe with skip or limit");if(r.fields&&(0===r.fields._id||r.fields._id===!1))throw Error("You may not observe a cursor with {fields: {_id: 0}}");var o,a={matcher:r.matcher,sorter:n&&r.sorter,distances:r.matcher.hasGeoQuery()&&n&&new e._IdMap,resultsSnapshot:null,ordered:n,cursor:r,projectionFn:r.projectionFn};r.reactive&&(o=r.collection.next_qid++,r.collection.queries[o]=a),a.results=r._getRawObjects({ordered:n,distances:a.distances}),r.collection.paused&&(a.resultsSnapshot=n?[]:new e._IdMap);var c=function(e,t,n){return e?function(){var o=this,a=arguments;r.collection.paused||void 0!==t&&r.projectionFn&&(a[t]=r.projectionFn(a[t]),n&&v.isEmpty(a[t]))||r.collection._observeQueue.queueTask(function(){e.apply(o,a)})}:function(){}};if(a.added=c(t.added,1),a.changed=c(t.changed,1,!0),a.removed=c(t.removed),n&&(a.addedBefore=c(t.addedBefore,1),a.movedBefore=c(t.movedBefore)),!t._suppress_initial&&!r.collection.paused){var s=n?v.bind(v.each,null,a.results):v.bind(a.results.forEach,a.results);s(function(e){var t=E.clone(e);delete t._id,n&&a.addedBefore(e._id,t,null),a.added(e._id,t)})}var i=new e.ObserveHandle;return v.extend(i,{collection:r.collection,stop:function(){r.reactive&&delete r.collection.queries[o]}}),r.reactive&&C.active&&C.onInvalidate(function(){i.stop()}),r.collection._observeQueue.drain(),i}}),e.Cursor.prototype._getRawObjects=function(t){var r=this;t=t||{};var n=t.ordered?[]:new e._IdMap;if(void 0!==r._selectorId){if(r.skip)return n;var o=r.collection._docs.get(r._selectorId);return o&&(t.ordered?n.push(o):n.set(r._selectorId,o)),n}var a;if(r.matcher.hasGeoQuery()&&t.ordered&&(t.distances?(a=t.distances,a.clear()):a=new e._IdMap),r.collection._docs.forEach(function(e,o){var c=r.matcher.documentMatches(e);return c.result&&(t.ordered?(n.push(e),a&&void 0!==c.distance&&a.set(o,c.distance)):n.set(o,e)),!r.limit||r.skip||r.sorter||n.length!==r.limit?!0:!1}),!t.ordered)return n;if(r.sorter){var c=r.sorter.getComparator({distances:a});n.sort(c)}var s=r.skip||0,i=r.limit?r.limit+s:n.length;return n.slice(s,i)},e.Cursor.prototype._depend=function(e,t){var r=this;if(C.active){var n=new C.Dependency;n.depend();var o=v.bind(n.changed,n),a={_suppress_initial:!0,_allow_unordered:t};v.each(["added","changed","removed","addedBefore","movedBefore"],function(t){e[t]&&(a[t]=o)}),r.observeChanges(a)}},e.prototype.insert=function(t,r){var o=this;t=E.clone(t),v.has(t,"_id")||(t._id=e._useOID?new e._ObjectID:w.id());var a=t._id;if(o._docs.has(a))throw n("Duplicate _id '"+a+"'");o._saveOriginal(a,void 0),o._docs.set(a,t);var c=[];for(var s in o.queries){var i=o.queries[s],u=i.matcher.documentMatches(t);u.result&&(i.distances&&void 0!==u.distance&&i.distances.set(a,u.distance),i.cursor.skip||i.cursor.limit?c.push(s):e._insertInResults(i,t))}return v.each(c,function(t){o.queries[t]&&e._recomputeResults(o.queries[t])}),o._observeQueue.drain(),r&&m.defer(function(){r(null,a)}),a},e.prototype._eachPossiblyMatchingDoc=function(t,r){var n=this,o=e._idsMatchedBySelector(t);if(o)for(var a=0;a<o.length;++a){var c=o[a],s=n._docs.get(c);if(s){var i=r(s,c);if(i===!1)break}}else n._docs.forEach(r)},e.prototype.remove=function(r,n){var o=this;if(o.paused&&!o._savedOriginals&&E.equals(r,{})){var a=o._docs.size();return o._docs.clear(),v.each(o.queries,function(e){e.ordered?e.results=[]:e.results.clear()}),n&&m.defer(function(){n(null,a)}),a}var c=new t.Matcher(r,o),s=[];o._eachPossiblyMatchingDoc(r,function(e,t){c.documentMatches(e).result&&s.push(t)});for(var i=[],u=[],d=0;d<s.length;d++){var p=s[d],l=o._docs.get(p);v.each(o.queries,function(e,t){e.matcher.documentMatches(l).result&&(e.cursor.skip||e.cursor.limit?i.push(t):u.push({qid:t,doc:l}))}),o._saveOriginal(p,l),o._docs.remove(p)}return v.each(u,function(t){var r=o.queries[t.qid];r&&(r.distances&&r.distances.remove(t.doc._id),e._removeFromResults(r,t.doc))}),v.each(i,function(t){var r=o.queries[t];r&&e._recomputeResults(r)}),o._observeQueue.drain(),a=s.length,n&&m.defer(function(){n(null,a)}),a},e.prototype.update=function(r,n,o,a){var c=this;!a&&o instanceof Function&&(a=o,o=null),o||(o={});var s=new t.Matcher(r,c),i={};v.each(c.queries,function(e,t){!e.cursor.skip&&!e.cursor.limit||e.paused||(i[t]=E.clone(e.results))});var u={},d=0;c._eachPossiblyMatchingDoc(r,function(e,t){var r=s.documentMatches(e);return r.result&&(c._saveOriginal(t,e),c._modifyAndNotify(e,n,u,r.arrayIndices),++d,!o.multi)?!1:!0}),v.each(u,function(t,r){var n=c.queries[r];n&&e._recomputeResults(n,i[r])}),c._observeQueue.drain();var p;if(0===d&&o.upsert){var l=e._removeDollarOperators(r);e._modify(l,n,{isInsert:!0}),!l._id&&o.insertedId&&(l._id=o.insertedId),p=c.insert(l),d=1}var h;return o._returnObject?(h={numberAffected:d},void 0!==p&&(h.insertedId=p)):h=d,a&&m.defer(function(){a(null,h)}),h},e.prototype.upsert=function(e,t,r,n){var o=this;return n||"function"!=typeof r||(n=r,r={}),o.update(e,t,v.extend({},r,{upsert:!0,_returnObject:!0}),n)},e.prototype._modifyAndNotify=function(t,r,n,o){var a=this,c={};for(var s in a.queries){var i=a.queries[s];c[s]=i.ordered?i.matcher.documentMatches(t).result:i.results.has(t._id)}var u=E.clone(t);e._modify(t,r,{arrayIndices:o});for(s in a.queries){i=a.queries[s];var d=c[s],p=i.matcher.documentMatches(t),l=p.result;l&&i.distances&&void 0!==p.distance&&i.distances.set(t._id,p.distance),i.cursor.skip||i.cursor.limit?(d||l)&&(n[s]=!0):d&&!l?e._removeFromResults(i,t):!d&&l?e._insertInResults(i,t):d&&l&&e._updateInResults(i,t,u)}},e._insertInResults=function(t,r){var n=E.clone(r);if(delete n._id,t.ordered){if(t.sorter){var o=e._insertInSortedList(t.sorter.getComparator({distances:t.distances}),t.results,r),a=t.results[o+1];a=a?a._id:null,t.addedBefore(r._id,n,a)}else t.addedBefore(r._id,n,null),t.results.push(r);t.added(r._id,n)}else t.added(r._id,n),t.results.set(r._id,r)},e._removeFromResults=function(t,r){if(t.ordered){var n=e._findInOrderedResults(t,r);t.removed(r._id),t.results.splice(n,1)}else{var o=r._id;t.removed(r._id),t.results.remove(o)}},e._updateInResults=function(t,r,n){if(!E.equals(r._id,n._id))throw new Error("Can't change a doc's _id while updating");var o=e._makeChangedFields(r,n);if(!t.ordered)return void(v.isEmpty(o)||(t.changed(r._id,o),t.results.set(r._id,r)));var a=e._findInOrderedResults(t,r);if(v.isEmpty(o)||t.changed(r._id,o),t.sorter){t.results.splice(a,1);var c=e._insertInSortedList(t.sorter.getComparator({distances:t.distances}),t.results,r);if(a!==c){var s=t.results[c+1];s=s?s._id:null,t.movedBefore&&t.movedBefore(r._id,s)}}},e._recomputeResults=function(t,r){r||(r=t.results),t.distances&&t.distances.clear(),t.results=t.cursor._getRawObjects({ordered:t.ordered,distances:t.distances}),t.paused||e._diffQueryChanges(t.ordered,r,t.results,t)},e._findInOrderedResults=function(e,t){if(!e.ordered)throw new Error("Can't call _findInOrderedResults on unordered query");for(var r=0;r<e.results.length;r++)if(e.results[r]===t)return r;throw Error("object missing from query")},e._binarySearch=function(e,t,r){for(var n=0,o=t.length;o>0;){var a=Math.floor(o/2);e(r,t[n+a])>=0?(n+=a+1,o-=a+1):o=a}return n},e._insertInSortedList=function(t,r,n){if(0===r.length)return r.push(n),0;var o=e._binarySearch(t,r,n);return r.splice(o,0,n),o},e.prototype.saveOriginals=function(){var t=this;if(t._savedOriginals)throw new Error("Called saveOriginals twice without retrieveOriginals");t._savedOriginals=new e._IdMap},e.prototype.retrieveOriginals=function(){var e=this;if(!e._savedOriginals)throw new Error("Called retrieveOriginals without saveOriginals");var t=e._savedOriginals;return e._savedOriginals=null,t},e.prototype._saveOriginal=function(e,t){var r=this;r._savedOriginals&&(r._savedOriginals.has(e)||r._savedOriginals.set(e,E.clone(t)))},e.prototype.pauseObservers=function(){if(!this.paused){this.paused=!0;for(var e in this.queries){var t=this.queries[e];t.resultsSnapshot=E.clone(t.results)}}},e.prototype.resumeObservers=function(){var t=this;if(this.paused){this.paused=!1;for(var r in this.queries){var n=t.queries[r];e._diffQueryChanges(n.ordered,n.resultsSnapshot,n.results,n),n.resultsSnapshot=null}t._observeQueue.drain()}},e._idStringify=function(t){if(t instanceof e._ObjectID)return t.valueOf();if("string"==typeof t)return""===t?t:"-"===t.substr(0,1)||"~"===t.substr(0,1)||e._looksLikeObjectID(t)||"{"===t.substr(0,1)?"-"+t:t;if(void 0===t)return"-";if("object"==typeof t&&null!==t)throw new Error("Meteor does not currently support objects other than ObjectID as ids");return"~"+y.stringify(t)},e._idParse=function(t){return""===t?t:"-"===t?void 0:"-"===t.substr(0,1)?t.substr(1):"~"===t.substr(0,1)?y.parse(t.substr(1)):e._looksLikeObjectID(t)?new e._ObjectID(t):t},e._makeChangedFields=function(t,r){var n={};return e._diffObjects(r,t,{leftOnly:function(e){n[e]=void 0},rightOnly:function(e,t){n[e]=t},both:function(e,t,r){E.equals(t,r)||(n[e]=r)}}),n}}).call(this),function(){e.wrapTransform=function(e){return e?function(t){if(!v.has(t,"_id"))throw new Error("can only transform documents with _id");var r=t._id,n=C.nonreactive(function(){return e(t)});if(!a(n))throw new Error("transform must return object");if(v.has(n,"_id")){if(!E.equals(n._id,r))throw new Error("transformed document can't have different _id")}else n._id=r;return n}:null}}.call(this),function(){o=function(e){return v.isArray(e)&&!E.isBinary(e)},a=e._isPlainObject=function(t){return t&&3===e._f._type(t)},c=function(e){return o(e)||a(e)},s=function(e,t){if(!a(e))return!1;var r=void 0;return v.each(e,function(n,o){var a="$"===o.substr(0,1);if(void 0===r)r=a;else if(r!==a){if(!t)throw new Error("Inconsistent operator: "+y.stringify(e));r=!1}}),!!r},i=function(e){return/^[0-9]+$/.test(e)}}.call(this),function(){t.Matcher=function(e){var t=this;t._paths={},t._hasGeoQuery=!1,t._hasWhere=!1,t._isSimple=!0,t._matchingDocument=void 0,t._selector=null,t._docMatcher=t._compileSelector(e)},v.extend(t.Matcher.prototype,{documentMatches:function(e){if(!e||"object"!=typeof e)throw Error("documentMatches needs a document");return this._docMatcher(e)},hasGeoQuery:function(){return this._hasGeoQuery},hasWhere:function(){return this._hasWhere},isSimple:function(){return this._isSimple},_compileSelector:function(t){var r=this;if(t instanceof Function)return r._isSimple=!1,r._selector=t,r._recordPathUsed(""),function(e){return{result:!!t.call(e)}};if(e._selectorIsId(t))return r._selector={_id:t},r._recordPathUsed("_id"),function(e){return{result:E.equals(e._id,t)}};if(!t||"_id"in t&&!t._id)return r._isSimple=!1,T;if("boolean"==typeof t||o(t)||E.isBinary(t))throw new Error("Invalid selector: "+t);return r._selector=E.clone(t),n(t,r,{isRoot:!0})},_recordPathUsed:function(e){this._paths[e]=!0},_getPaths:function(){return v.keys(this._paths)}});var n=function(e,t,r){r=r||{};var n=[];return v.each(e,function(e,o){if("$"===o.substr(0,1)){if(!v.has(b,o))throw new Error("Unrecognized logical operator: "+o);t._isSimple=!1,n.push(b[o](e,t,r.inElemMatch))}else{r.inElemMatch||t._recordPathUsed(o);var a=l(o),c=f(e,t,r.isRoot);n.push(function(e){var t=a(e);return c(t)})}}),F(n)},f=function(e,t,r){return e instanceof RegExp?(t._isSimple=!1,g(u(e))):s(e)?m(e,t,r):g(d(e))},g=function(e,t){return t=t||{},function(r){var n=r;t.dontExpandLeafArrays||(n=h(r,t.dontIncludeLeafArrays));var o={};return o.result=v.any(n,function(t){var r=e(t.value);return"number"==typeof r&&(t.arrayIndices||(t.arrayIndices=[r]),r=!0),r&&t.arrayIndices&&(o.arrayIndices=t.arrayIndices),r}),o}};u=function(e){return function(t){return t instanceof RegExp?v.isEqual(t,e):"string"!=typeof t?!1:e.test(t)}},d=function(t){if(s(t))throw Error("Can't create equalityValueSelector for operator object");return null==t?function(e){return null==e}:function(r){return e._f._equal(t,r)}};var m=function(e,t,r){var n=[];return v.each(e,function(o,a){var c=v.contains(["$lt","$lte","$gt","$gte"],a)&&v.isNumber(o),s="$ne"===a&&!v.isObject(o),i=v.contains(["$in","$nin"],a)&&v.isArray(o)&&!v.any(o,v.isObject); | |
if("$eq"===a||c||i||s||(t._isSimple=!1),v.has(C,a))n.push(C[a](o,e,t,r));else{if(!v.has(p,a))throw new Error("Unrecognized operator: "+a);var u=p[a];n.push(g(u.compileElementSelector(o,e,t),u))}}),S(n)},y=function(e,t,r){if(!o(e)||v.isEmpty(e))throw Error("$and/$or/$nor must be nonempty array");return v.map(e,function(e){if(!a(e))throw Error("$or/$and/$nor entries need to be full objects");return n(e,t,{inElemMatch:r})})},b={$and:function(e,t,r){var n=y(e,t,r);return F(n)},$or:function(e,t,r){var n=y(e,t,r);return 1===n.length?n[0]:function(e){var t=v.any(n,function(t){return t(e).result});return{result:t}}},$nor:function(e,t,r){var n=y(e,t,r);return function(e){var t=v.all(n,function(t){return!t(e).result});return{result:t}}},$where:function(e,t){return t._recordPathUsed(""),t._hasWhere=!0,e instanceof Function||(e=Function("obj","return "+e)),function(t){return{result:e.call(t,t)}}},$comment:function(){return function(){return{result:!0}}}},A=function(e){return function(t){var r=e(t);return{result:!r.result}}},C={$not:function(e,t,r){return A(f(e,r))},$ne:function(e){return A(g(d(e)))},$nin:function(e){return A(g(p.$in.compileElementSelector(e)))},$exists:function(e){var t=g(function(e){return void 0!==e});return e?t:A(t)},$options:function(e,t){if(!v.has(t,"$regex"))throw Error("$options needs a $regex");return k},$maxDistance:function(e,t){if(!t.$near)throw Error("$maxDistance needs a $near");return k},$all:function(e,t,r){if(!o(e))throw Error("$all requires array");if(v.isEmpty(e))return T;var n=[];return v.each(e,function(e){if(s(e))throw Error("no $ expressions in $all");n.push(f(e,r))}),S(n)},$near:function(e,t,r,n){if(!n)throw Error("$near can't be inside another $ operator");r._hasGeoQuery=!0;var c,s,i;if(a(e)&&v.has(e,"$geometry"))c=e.$maxDistance,s=e.$geometry,i=function(e){return e&&e.type?"Point"===e.type?_.pointDistance(s,e):_.geometryWithinRadius(e,s,c)?0:c+1:null};else{if(c=t.$maxDistance,!o(e)&&!a(e))throw Error("$near argument must be coordinate pair or GeoJSON");s=x(e),i=function(e){return o(e)||a(e)?w(s,e):null}}return function(e){e=h(e);var t={result:!1};return v.each(e,function(e){var r=i(e.value);null===r||r>c||void 0!==t.distance&&t.distance<=r||(t.result=!0,t.distance=r,e.arrayIndices?t.arrayIndices=e.arrayIndices:delete t.arrayIndices)}),t}}},w=function(e,t){e=x(e),t=x(t);var r=e[0]-t[0],n=e[1]-t[1];return v.isNaN(r)||v.isNaN(n)?null:Math.sqrt(r*r+n*n)},x=function(e){return v.map(e,v.identity)},D=function(t){return{compileElementSelector:function(r){if(o(r))return function(){return!1};void 0===r&&(r=null);var n=e._f._type(r);return function(o){return void 0===o&&(o=null),e._f._type(o)!==n?!1:t(e._f._cmp(o,r))}}}};p={$lt:D(function(e){return 0>e}),$gt:D(function(e){return e>0}),$lte:D(function(e){return 0>=e}),$gte:D(function(e){return e>=0}),$mod:{compileElementSelector:function(e){if(!o(e)||2!==e.length||"number"!=typeof e[0]||"number"!=typeof e[1])throw Error("argument to $mod must be an array of two numbers");var t=e[0],r=e[1];return function(e){return"number"==typeof e&&e%t===r}}},$in:{compileElementSelector:function(e){if(!o(e))throw Error("$in needs an array");var t=[];return v.each(e,function(e){if(e instanceof RegExp)t.push(u(e));else{if(s(e))throw Error("cannot nest $ under $in");t.push(d(e))}}),function(e){return void 0===e&&(e=null),v.any(t,function(t){return t(e)})}}},$size:{dontExpandLeafArrays:!0,compileElementSelector:function(e){if("string"==typeof e)e=0;else if("number"!=typeof e)throw Error("$size needs a number");return function(t){return o(t)&&t.length===e}}},$type:{dontIncludeLeafArrays:!0,compileElementSelector:function(t){if("number"!=typeof t)throw Error("$type needs a number");return function(r){return void 0!==r&&e._f._type(r)===t}}},$regex:{compileElementSelector:function(e,t){if(!("string"==typeof e||e instanceof RegExp))throw Error("$regex has to be a string or RegExp");var r;if(void 0!==t.$options){if(/[^gim]/.test(t.$options))throw new Error("Only the i, m, and g regexp options are supported");var n=e instanceof RegExp?e.source:e;r=new RegExp(n,t.$options)}else r=e instanceof RegExp?e:new RegExp(e);return u(r)}},$elemMatch:{dontExpandLeafArrays:!0,compileElementSelector:function(e,t,r){if(!a(e))throw Error("$elemMatch need an object");var c,i;return s(e,!0)?(c=f(e,r),i=!1):(c=n(e,r,{inElemMatch:!0}),i=!0),function(e){if(!o(e))return!1;for(var t=0;t<e.length;++t){var r,n=e[t];if(i){if(!a(n)&&!o(n))return!1;r=n}else r=[{value:n,dontIterate:!0}];if(c(r).result)return t}return!1}}}},l=function(e){var t,r=e.split("."),n=r.length?r[0]:"",s=i(n);r.length>1&&(t=l(r.slice(1).join(".")));var u=function(e){return e.dontIterate||delete e.dontIterate,e.arrayIndices&&!e.arrayIndices.length&&delete e.arrayIndices,e};return function(e,r){if(r||(r=[]),o(e)){if(!(s&&n<e.length))return[];r=r.concat(+n,"x")}var i=e[n];if(!t)return[u({value:i,dontIterate:o(e)&&o(i),arrayIndices:r})];if(!c(i))return o(e)?[]:[u({value:void 0,arrayIndices:r})];var d=[],p=function(e){Array.prototype.push.apply(d,e)};return p(t(i,r)),o(i)&&v.each(i,function(e,n){a(e)&&p(t(e,r.concat(n)))}),d}},r.makeLookupFunction=l,h=function(e,t){var r=[];return v.each(e,function(e){var n=o(e.value);t&&n&&!e.dontIterate||r.push({value:e.value,arrayIndices:e.arrayIndices}),n&&!e.dontIterate&&v.each(e.value,function(t,n){r.push({value:t,arrayIndices:(e.arrayIndices||[]).concat(n)})})}),r};var T=function(){return{result:!1}},k=function(){return{result:!0}},B=function(e){return 0===e.length?k:1===e.length?e[0]:function(t){var r={};return r.result=v.all(e,function(e){var n=e(t);return n.result&&void 0!==n.distance&&void 0===r.distance&&(r.distance=n.distance),n.result&&n.arrayIndices&&(r.arrayIndices=n.arrayIndices),n.result}),r.result||(delete r.distance,delete r.arrayIndices),r}},F=B,S=B;e._f={_type:function(t){return"number"==typeof t?1:"string"==typeof t?2:"boolean"==typeof t?8:o(t)?4:null===t?10:t instanceof RegExp?11:"function"==typeof t?13:t instanceof Date?9:E.isBinary(t)?5:t instanceof e._ObjectID?7:3},_equal:function(e,t){return E.equals(e,t,{keyOrderSensitive:!0})},_typeorder:function(e){return[-1,1,2,3,4,5,-1,6,7,8,0,9,-1,100,2,100,1,8,1][e]},_cmp:function(t,r){if(void 0===t)return void 0===r?0:-1;if(void 0===r)return 1;var n=e._f._type(t),o=e._f._type(r),a=e._f._typeorder(n),c=e._f._typeorder(o);if(a!==c)return c>a?-1:1;if(n!==o)throw Error("Missing type coercion logic in _cmp");if(7===n&&(n=o=2,t=t.toHexString(),r=r.toHexString()),9===n&&(n=o=1,t=t.getTime(),r=r.getTime()),1===n)return t-r;if(2===o)return r>t?-1:t===r?0:1;if(3===n){var s=function(e){var t=[];for(var r in e)t.push(r),t.push(e[r]);return t};return e._f._cmp(s(t),s(r))}if(4===n)for(var i=0;;i++){if(i===t.length)return i===r.length?0:-1;if(i===r.length)return 1;var u=e._f._cmp(t[i],r[i]);if(0!==u)return u}if(5===n){if(t.length!==r.length)return t.length-r.length;for(i=0;i<t.length;i++){if(t[i]<r[i])return-1;if(t[i]>r[i])return 1}return 0}if(8===n)return t?r?0:1:r?-1:0;if(10===n)return 0;if(11===n)throw Error("Sorting not supported on regular expression");if(13===n)throw Error("Sorting not supported on Javascript code");throw Error("Unknown type to sort")}},e._removeDollarOperators=function(e){var t={};for(var r in e)"$"!==r.substr(0,1)&&(t[r]=e[r]);return t}}.call(this),function(){t.Sorter=function(e,n){var o=this;n=n||{},o._sortSpecParts=[];var a=function(e,t){if(!e)throw Error("sort keys must be non-empty");if("$"===e.charAt(0))throw Error("unsupported sort key: "+e);o._sortSpecParts.push({path:e,lookup:l(e),ascending:t})};if(e instanceof Array)for(var c=0;c<e.length;c++)"string"==typeof e[c]?a(e[c],!0):a(e[c][0],"desc"!==e[c][1]);else{if("object"!=typeof e)throw Error("Bad sort specification: "+y.stringify(e));v.each(e,function(e,t){a(t,e>=0)})}if(o.affectedByModifier){var s={};v.each(o._sortSpecParts,function(e){s[e.path]=1}),o._selectorForAffectedByModifier=new t.Matcher(s)}o._keyComparator=r(v.map(o._sortSpecParts,function(e,t){return o._keyFieldComparator(t)})),o._keyFilter=null,n.matcher&&o._useWithMatcher(n.matcher)},v.extend(t.Sorter.prototype,{getComparator:function(e){var t=this;if(!e||!e.distances)return t._getBaseComparator();var n=e.distances;return r([t._getBaseComparator(),function(e,t){if(!n.has(e._id))throw Error("Missing distance for "+e._id);if(!n.has(t._id))throw Error("Missing distance for "+t._id);return n.get(e._id)-n.get(t._id)}])},_getPaths:function(){var e=this;return v.pluck(e._sortSpecParts,"path")},_getMinKeyFromDoc:function(e){var t=this,r=null;if(t._generateKeysFromDoc(e,function(e){return t._keyCompatibleWithSelector(e)?null===r?void(r=e):void(t._compareKeys(e,r)<0&&(r=e)):void 0}),null===r)throw Error("sort selector found no keys in doc?");return r},_keyCompatibleWithSelector:function(e){var t=this;return!t._keyFilter||t._keyFilter(e)},_generateKeysFromDoc:function(e,t){var r=this;if(0===r._sortSpecParts.length)throw new Error("can't generate keys without a spec");var n=[],o=function(e){return e.join(",")+","},a=null;if(v.each(r._sortSpecParts,function(t,r){var c=h(t.lookup(e),!0);c.length||(c=[{value:null}]);var s=!1;if(n[r]={},v.each(c,function(e){if(!e.arrayIndices){if(c.length>1)throw Error("multiple branches but no array used?");return void(n[r][""]=e.value)}s=!0;var t=o(e.arrayIndices);if(v.has(n[r],t))throw Error("duplicate path: "+t);if(n[r][t]=e.value,a&&!v.has(a,t))throw Error("cannot index parallel arrays")}),a){if(!v.has(n[r],"")&&v.size(a)!==v.size(n[r]))throw Error("cannot index parallel arrays!")}else s&&(a={},v.each(n[r],function(e,t){a[t]=!0}))}),!a){var c=v.map(n,function(e){if(!v.has(e,""))throw Error("no value in sole key case?");return e[""]});return void t(c)}v.each(a,function(e,r){var o=v.map(n,function(e){if(v.has(e,""))return e[""];if(!v.has(e,r))throw Error("missing path?");return e[r]});t(o)})},_compareKeys:function(e,t){var r=this;if(e.length!==r._sortSpecParts.length||t.length!==r._sortSpecParts.length)throw Error("Key has wrong length");return r._keyComparator(e,t)},_keyFieldComparator:function(t){var r=this,n=!r._sortSpecParts[t].ascending;return function(r,o){var a=e._f._cmp(r[t],o[t]);return n&&(a=-a),a}},_getBaseComparator:function(){var e=this;return e._sortSpecParts.length?function(t,r){var n=e._getMinKeyFromDoc(t),o=e._getMinKeyFromDoc(r);return e._compareKeys(n,o)}:function(){return 0}},_useWithMatcher:function(e){var t=this;if(t._keyFilter)throw Error("called _useWithMatcher twice?");if(!v.isEmpty(t._sortSpecParts)){var r=e._selector;if(!(r instanceof Function)){var n={};v.each(t._sortSpecParts,function(e){n[e.path]=[]}),v.each(r,function(e,t){var r=n[t];if(r){if(e instanceof RegExp){if(e.ignoreCase||e.multiline)return;return void r.push(u(e))}return s(e)?void v.each(e,function(t,n){v.contains(["$lt","$lte","$gt","$gte"],n)&&r.push(p[n].compileElementSelector(t)),"$regex"!==n||e.$options||r.push(p.$regex.compileElementSelector(t,e))}):void r.push(d(e))}}),v.isEmpty(n[t._sortSpecParts[0].path])||(t._keyFilter=function(e){return v.all(t._sortSpecParts,function(t,r){return v.all(n[t.path],function(t){return t(e[r])})})})}}}});var r=function(e){return function(t,r){for(var n=0;n<e.length;++n){var o=e[n](t,r);if(0!==o)return o}return 0}}}.call(this),function(){e._compileProjection=function(t){e._checkSupportedProjection(t);var r=v.isUndefined(t._id)?!0:t._id,n=f(t),o=function(e,t){if(v.isArray(e))return v.map(e,function(e){return o(e,t)});var r=n.including?{}:E.clone(e);return v.each(t,function(t,a){v.has(e,a)&&(v.isObject(t)?v.isObject(e[a])&&(r[a]=o(e[a],t)):n.including?r[a]=E.clone(e[a]):delete r[a])}),r};return function(e){var t=o(e,n.tree);return r&&v.has(e,"_id")&&(t._id=e._id),!r&&v.has(t,"_id")&&delete t._id,t}},f=function(e){var t=v.keys(e).sort();t.length>0&&(1!==t.length||"_id"!==t[0])&&(t=v.reject(t,function(e){return"_id"===e}));var r=null;v.each(t,function(t){var o=!!e[t];if(null===r&&(r=o),r!==o)throw n("You cannot currently mix including and excluding fields.")});var o=g(t,function(){return r},function(e,t,r){var o=r,a=t;throw n("both "+o+" and "+a+" found in fields option, using both of them may trigger unexpected behavior. Did you mean to use only one of them?")});return{tree:o,including:r}},g=function(e,t,r,n){return n=n||{},v.each(e,function(e){var o=n,a=e.split("."),c=v.all(a.slice(0,-1),function(t,n){if(v.has(o,t)){if(!v.isObject(o[t])&&(o[t]=r(o[t],a.slice(0,n+1).join("."),e),!v.isObject(o[t])))return!1}else o[t]={};return o=o[t],!0});if(c){var s=v.last(a);o[s]=v.has(o,s)?r(o[s],e,e):t(e)}}),n},e._checkSupportedProjection=function(e){if(!v.isObject(e)||v.isArray(e))throw n("fields option must be an object");v.each(e,function(e,t){if(v.contains(t.split("."),"$"))throw n("Minimongo doesn't support $ operator in projections yet.");if(-1===v.indexOf([1,0,!0,!1],e))throw n("Projection values should be one of 1, 0, true, or false")})}}.call(this),function(){e._modify=function(e,t,c){if(c=c||{},!a(t))throw n("Modifier must be an object");var i,d=s(t);if(d)i=E.clone(e),v.each(t,function(e,t){var a=u[t];if(c.isInsert&&"$setOnInsert"===t&&(a=u.$set),!a)throw n("Invalid modifier specified "+t);v.each(e,function(e,s){if(s.length&&"."===s[s.length-1])throw n("Invalid mod field name, may not end in a period");if("_id"===s)throw n("Mod on _id not allowed");var u=s.split("."),d=(v.has(o,t),r(i,u,{noCreate:o[t],forbidArray:"$rename"===t,arrayIndices:c.arrayIndices})),p=u.pop();a(d,p,e,s,i)})});else{if(t._id&&!E.equals(e._id,t._id))throw n("Cannot change the _id of a document");for(var p in t)if(/\./.test(p))throw n("When replacing document, field name may not contain '.'");i=t}v.each(v.keys(e),function(t){("_id"!==t||c.isInsert)&&delete e[t]}),v.each(i,function(t,r){e[r]=t})};var r=function(e,t,r){r=r||{};for(var o=!1,a=0;a<t.length;a++){var s=a===t.length-1,u=t[a],d=c(e);if(!d){if(r.noCreate)return void 0;var p=n("cannot use the part '"+u+"' to traverse "+e);throw p.setPropertyError=!0,p}if(e instanceof Array){if(r.forbidArray)return null;if("$"===u){if(o)throw n("Too many positional (i.e. '$') elements");if(!r.arrayIndices||!r.arrayIndices.length)throw n("The positional operator did not find the match needed from the query");u=r.arrayIndices[0],o=!0}else{if(!i(u)){if(r.noCreate)return void 0;throw n("can't append to array using string field name ["+u+"]")}u=parseInt(u)}if(s&&(t[a]=u),r.noCreate&&u>=e.length)return void 0;for(;e.length<u;)e.push(null);if(!s)if(e.length===u)e.push({});else if("object"!=typeof e[u])throw n("can't modify field '"+t[a+1]+"' of list value "+y.stringify(e[u]))}else{if(u.length&&"$"===u.substr(0,1))throw n("can't set field named "+u);if(!(u in e)){if(r.noCreate)return void 0;s||(e[u]={})}}if(s)return e;e=e[u]}},o={$unset:!0,$pop:!0,$rename:!0,$pull:!0,$pullAll:!0},u={$inc:function(e,t,r){if("number"!=typeof r)throw n("Modifier $inc allowed for numbers only");if(t in e){if("number"!=typeof e[t])throw n("Cannot apply $inc modifier to non-number");e[t]+=r}else e[t]=r},$set:function(e,t,r){if(!v.isObject(e)){var o=n("Cannot set property on non-object field");throw o.setPropertyError=!0,o}if(null===e){var o=n("Cannot set property on null");throw o.setPropertyError=!0,o}e[t]=E.clone(r)},$setOnInsert:function(){},$unset:function(e,t){void 0!==e&&(e instanceof Array?t in e&&(e[t]=null):delete e[t])},$push:function(r,o,a){if(void 0===r[o]&&(r[o]=[]),!(r[o]instanceof Array))throw n("Cannot apply $push modifier to non-array");if(!a||!a.$each)return void r[o].push(E.clone(a));var c=a.$each;if(!(c instanceof Array))throw n("$each must be an array");var s=void 0;if("$slice"in a){if("number"!=typeof a.$slice)throw n("$slice must be a numeric value");if(a.$slice>0)throw n("$slice in $push must be zero or negative");s=a.$slice}var i=void 0;if(a.$sort){if(void 0===s)throw n("$sort requires $slice to be present");i=new t.Sorter(a.$sort).getComparator();for(var u=0;u<c.length;u++)if(3!==e._f._type(c[u]))throw n("$push like modifiers using $sort require all elements to be objects")}for(var d=0;d<c.length;d++)r[o].push(E.clone(c[d]));i&&r[o].sort(i),void 0!==s&&(r[o]=0===s?[]:r[o].slice(s))},$pushAll:function(e,t,r){if(!("object"==typeof r&&r instanceof Array))throw n("Modifier $pushAll/pullAll allowed for arrays only");var o=e[t];if(void 0===o)e[t]=r;else{if(!(o instanceof Array))throw n("Cannot apply $pushAll modifier to non-array");for(var a=0;a<r.length;a++)o.push(r[a])}},$addToSet:function(t,r,o){var a=t[r];if(void 0===a)t[r]=[o];else{if(!(a instanceof Array))throw n("Cannot apply $addToSet modifier to non-array");var c=!1;if("object"==typeof o)for(var s in o){"$each"===s&&(c=!0);break}var i=c?o.$each:[o];v.each(i,function(t){for(var r=0;r<a.length;r++)if(e._f._equal(t,a[r]))return;a.push(E.clone(t))})}},$pop:function(e,t,r){if(void 0!==e){var o=e[t];if(void 0!==o){if(!(o instanceof Array))throw n("Cannot apply $pop modifier to non-array");"number"==typeof r&&0>r?o.splice(0,1):o.pop()}}},$pull:function(r,o,a){if(void 0!==r){var c=r[o];if(void 0!==c){if(!(c instanceof Array))throw n("Cannot apply $pull/pullAll modifier to non-array");var s=[];if("object"!=typeof a||a instanceof Array)for(var i=0;i<c.length;i++)e._f._equal(c[i],a)||s.push(c[i]);else for(var u=new t.Matcher(a),i=0;i<c.length;i++)u.documentMatches(c[i]).result||s.push(c[i]);r[o]=s}}},$pullAll:function(t,r,o){if(!("object"==typeof o&&o instanceof Array))throw n("Modifier $pushAll/pullAll allowed for arrays only");if(void 0!==t){var a=t[r];if(void 0!==a){if(!(a instanceof Array))throw n("Cannot apply $pull/pullAll modifier to non-array");for(var c=[],s=0;s<a.length;s++){for(var i=!1,u=0;u<o.length;u++)if(e._f._equal(a[s],o[u])){i=!0;break}i||c.push(a[s])}t[r]=c}}},$rename:function(e,t,o,a,c){if(a===o)throw n("$rename source must differ from target");if(null===e)throw n("$rename source field invalid");if("string"!=typeof o)throw n("$rena |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment