sugar-rails 0.0.2 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  ## Usage
7
7
 
8
- This gem vendors Sugar 0.9.5 for Rails 3.1 and greater. The files will be added to the asset pipeline and available for you to use.
8
+ This gem vendors Sugar 1.0 for Rails 3.1 and greater. The files will be added to the asset pipeline and available for you to use.
9
9
 
10
10
  To enable, add the following line to the file `app/assets/javascripts/application.js` (or other [sprockets](https://github.com/sstephenson/sprockets) manifest):
11
11
 
@@ -1,5 +1,5 @@
1
1
  module Sugar
2
2
  module Rails
3
- VERSION = "0.0.2"
3
+ VERSION = "1.0.0"
4
4
  end
5
5
  end
@@ -1,101 +1,97 @@
1
1
  /*
2
- * Sugar Library v0.9.5
2
+ * Sugar Library v1.0
3
3
  *
4
4
  * Freely distributable and licensed under the MIT-style license.
5
5
  * Copyright (c) 2011 Andrew Plummer
6
6
  * http://sugarjs.com/
7
7
  *
8
8
  * ---------------------------- */
9
- (function(){var k=function(a,b,c,d){var e=b?a.prototype:a;da(a,b,d);p(d,function(f,g){if(typeof c==="function")j(e,f,ea(e[f],g,c));else if(c===true||!e[f])j(e,f,g);a.SugarMethods[f]={instance:b,method:g}})},da=function(a){if(!a.SugarMethods){a.SugarMethods={};j(a,"sugar",function(){var b=arguments,c=b.length===0;p(a.SugarMethods,function(d,e){if(c||u(b,d))j(e.instance?a.prototype:a,d,e.method)})})}},ea=function(a,b,c){return function(){return a&&(c===true||c.apply(this,arguments))?a.apply(this,arguments):
10
- b.apply(this,arguments)}},j=function(a,b,c){if(Object.defineProperty&&Object.defineProperties)Object.defineProperty(a,b,{value:c,configurable:true,enumerable:false,writeable:true});else a[b]=c},p=function(a,b){var c=0,d;for(d in a)if(a.hasOwnProperty(d)){b.call(a,d,a[d],c);c++}},fa=function(a,b,c){var d=[],e;for(e in a)e in a&&e>>>0==e&&e!=4294967295&&e>=c&&d.push(e.toNumber());d.sort();d.each(function(f){return b.call(a,a[f],f,a)});return a},A=function(a,b){if(typeof a=="object"&&typeof b=="object"&&
11
- a!==null&&b!==null){for(var c in a)if(a.hasOwnProperty(c))if(!b.hasOwnProperty(c)||!A(a[c],b[c]))return false;return Object.keys(a).length===Object.keys(b).length}else return a===b},v=function(a,b,c,d){return a===b?true:Object.isRegExp(b)?b.test(a):Object.isFunction(b)?b.apply(c,[a].concat(d)):typeof b==="object"?A(b,a):false},x=function(a,b,c,d){var e=a[0];if(a.length===0)return b;else if(!Object.isFunction(e)&&!Object.isString(e))throw new TypeError("first argument must be a function or a string");
12
- return Object.isFunction(e)?e.apply(c,[b].concat(d)):typeof b[e]=="function"?b[e].call(b):b[e]},r=function(a,b){m(Array.prototype.slice.call(a).flatten(),b)},B=function(a,b,c,d){var e=c==="max",f=c==="min",g=e?-Infinity:Infinity,h=[];p(a,function(i){i=a[i];var l=x(b,i,d);if(!(l===undefined||l===null))if(l===g)h.push(i);else if(e&&l>g||f&&l<g){h=[i];g=l}});return h},Q=function(a,b,c){var d=b[b.length-1]!==false,e=[],f,g;for(g=0;g<b.length;g++){f=b[g];if(f===true||f===false)break;if(d){f%=a.length;
13
- if(f<0)f=a.length+f}if(f>=0&&f<a.length)e.push(c?a.charAt(f):a[f])}return e.length==0?c?"":null:e.length==1?e[0]:e},u=function(a,b,c,d){var e;m(a,function(f,g,h){if(v(f,b,h,[g,h])){e=f;return false}},c,d);return e},m=function(a,b,c,d){var e,f;C(b);f=isNaN(c)?0:parseInt(c>>0);for(e=d===true?a.length+f:a.length;f<e;){c=f%a.length;if(c in a){if(b.call(a,a[c],c,a)===false)break}else return fa(a,b,f,d);f++}},w=function(a){var b=[];a.each(function(c){u(b,c)===undefined&&b.push(c)});return b},R=function(a,
14
- b,c,d){var e=[];a=parseInt(a);for(var f=d>0;f&&a<=b||!f&&a>=b;){e.push(a);c&&c.call(this,a);a+=d}return e},C=function(a){if(!a||!a.call)throw new TypeError("callback is not callable");},D=function(a){if(a.length===0)throw new TypeError("first argument must be defined");},L=function(a,b){return Object.prototype.toString.call(a)==="[object "+b+"]"},E=function(a,b,c){var d;d=Array.isArray(a)?[]:c?Object.extended({}):{};p(a,function(e,f){d[e]=b&&(Object.isObject(f)||Array.isArray(f))?E(f,b,c):f});return d},
15
- S=function(a,b,c,d){var e=/^(.+?)(\[.*\])$/,f,g,h;if(d!==false&&(g=b.match(e))){h=g[1];b=g[2].replace(/^\[|\]$/g,"").split("][");m(b,function(i){f=!i||i.match(/^\d+$/);if(!h&&Object.isArray(a))h=a.length;a[h]||(a[h]=f?[]:{});a=a[h];h=i});if(!h&&f)h=a.length.toString();S(a,h,c)}else a[b]=c.match(/^\d+$/)?parseInt(c):c==="true"?true:c==="false"?false:c},y=function(a){var b=this;p(a,function(c,d){b[c]=d})};y.prototype.constructor=Object;k(y,true,false,{clone:function(a){return E(this,a,true)}});var T=
16
- ["Array","Boolean","Date","Function","Number","String","RegExp"],U=["keys","values","each","merge","isEmpty","equals"];k(Object,false,false,{enableSugar:function(){T.each(function(a){j(Object.prototype,"is"+a,function(){return Object["is"+a](this)})});U.each(function(a){j(Object.prototype,a,y.prototype[a])});j(Object.prototype,"clone",function(a){return E(this,a,true)})},extended:function(a){return new y(a)},isObject:function(a){return a===null||a===undefined||arguments.length===0?false:L(a,"Object")&&
17
- a.constructor===Object},each:function(a,b){p(a,function(c,d){b&&b.call(a,c,d,a)});return a},merge:function(){var a=arguments[0];r(arguments,function(b){typeof b==="object"&&p(b,function(c,d){a[c]=d})},1);return a},isEmpty:function(a){if(!a)return true;return A(a,{})},equals:function(a,b){return A(a,b)},values:function(a,b){var c=[];p(a,function(d,e){c.push(e);b&&b.call(a,e)});return c},clone:E,fromQueryString:function(a,b){var c=Object.extended();a=a&&a.toString?a.toString():"";a.replace(/^.*?\?/,
18
- "").unescapeURL().split("&").each(function(d){d=d.split("=");d.length===2&&S(c,d[0],d[1],b)});return c}});k(Object,false,function(){return arguments.length<2},{keys:function(a,b){if(a===null||typeof a!="object")throw new TypeError("object required");var c=[];p(a,function(d){c.push(d);b&&b.call(a,d)});return c}});k(Array,false,false,{isArray:function(a){return L(a,"Array")}});k(Array,true,function(){return arguments.length===0||Object.isFunction(arguments[0])},{every:function(a,b){var c=this.length,
19
- d=0;for(D(arguments);d<c;){if(d in this&&!v(this[d],a,b,[d,this]))return false;d++}return true},some:function(a,b){var c=this.length,d=0;for(D(arguments);d<c;){if(d in this&&v(this[d],a,b,[d,this]))return true;d++}return false},map:function(a,b){var c=this.length,d=0,e=Array(c);for(D(arguments);d<c;){if(d in this)e[d]=x(arguments,this[d],b,[d,this]);d++}return e},filter:function(a,b){var c=this.length,d=0,e=[];for(D(arguments);d<c;){d in this&&v(this[d],a,b,[d,this])&&e.push(this[d]);d++}return e}});
20
- k(Array,true,false,{indexOf:function(a,b){var c=this.length,d=isNaN(b)?0:parseInt(b>>0);if(Object.isString(this))return this.indexOf(a,b);if(d<0)d=Math.max(c+d,0);if(c==0||d>c)return-1;for(;d<c;){if(d in this&&this[d]===a)return d;d++}return-1},lastIndexOf:function(a,b){var c=this.length,d=isNaN(b)?c:parseInt(b>>0);if(Object.isString(this))return this.lastIndexOf(a,b);if(d<0)d=c+d;if(c==0||d<0)return-1;for(;d>=0;){if(d in this&&this[d]===a)return d;d--}return-1},forEach:function(a,b){var c=this.length,
21
- d=0;for(C(a);d<c;){d in this&&a.call(b,this[d],d,this);d++}},reduce:function(a,b){var c=this.length,d=0,e=arguments.length>1&&b;C(a);if(c==0&&!e)throw new TypeError("Reduce called on empty array with no initial value");else if(e)e=e;else{e=this[d];d++}for(;d<c;){if(d in this)e=a.call(undefined,e,this[d],d,this);d++}return e},reduceRight:function(a,b){var c=this.length,d=c-1,e=arguments.length>1&&b;C(a);if(c==0&&!e)throw new TypeError("Reduce called on empty array with no initial value");else if(e)c=
22
- e;else{c=this[d];d--}for(;d>=0;){if(d in this)c=a.call(undefined,c,this[d],d,this);d--}return c},each:function(a,b,c){m(this,a,b,c);return this},find:function(a,b,c){return u(this,a,b,c)},findAll:function(a,b,c){var d=[];m(this,function(e,f,g){v(e,a,g,[f,g])&&d.push(e)},b,c);return d},count:function(a){if(a===undefined)return this.length;return this.findAll(a).length},none:function(){return!this.any.apply(this,arguments)},remove:function(){var a,b=this;r(arguments,function(c){for(a=0;a<b.length;)if(v(b[a],
23
- c,b,[a,b]))b.splice(a,1);else a++});return b},removeAt:function(a,b){if(a===undefined)return this;if(b===undefined)b=a;for(var c=0;c<=b-a;c++)this.splice(a,1);return this},add:function(a,b){if(!Object.isNumber(b)||isNaN(b))b=this.length;Array.prototype.splice.apply(this,[b,0].concat(a));return this},include:function(a,b){return this.clone().add(a,b)},exclude:function(){return Array.prototype.remove.apply(this.clone(),arguments)},clone:function(){return this.concat()},unique:function(){return w(this)},
24
- union:function(){var a=this;r(arguments,function(b){a=a.concat(b)});return w(a)},intersect:function(){var a=[],b=arguments;this.each(function(c){r(b,function(d){Array.isArray(d)||(d=[d]);u(a,c)===undefined&&u(d,c)!==undefined&&a.push(c)})});return a},subtract:function(){var a=this.clone();r(arguments,function(b){Array.isArray(b)||(b=[b]);b.each(function(c){a.remove(c)})});return a},at:function(){return Q(this,arguments,false)},first:function(a){if(a===undefined)return this[0];if(a<0)a=0;return this.slice(0,
25
- a)},last:function(a){if(a===undefined)return this[this.length-1];return this.slice(this.length-a<0?0:this.length-a)},from:function(a){return this.slice(a)},to:function(a){if(a===undefined)a=this.length;return this.slice(0,a)},min:function(){return w(B(this,arguments,"min"))},max:function(){return w(B(this,arguments,"max"))},least:function(){var a=B(this.groupBy.apply(this,arguments),["length"],"min").flatten();return a.length===this.length?[]:w(a)},most:function(){var a=B(this.groupBy.apply(this,
26
- arguments),["length"],"max").flatten();return a.length===this.length?[]:w(a)},sum:function(a){a=a?this.map(a):this;return a.length>0?a.reduce(function(b,c){return b+c}):0},average:function(a){a=a?this.map(a):this;return a.length>0?a.sum()/a.length:0},groupBy:function(){var a={},b=arguments,c;this.each(function(d){c=x(b,d);a[c]||(a[c]=[]);a[c].push(d)});return a},inGroups:function(a,b){var c=arguments.length>1,d=this,e=[],f=Math.ceil(this.length/a);(0).upto(a-1,function(g){g=g*f;var h=d.slice(g,g+
27
- f);c&&h.length<f&&(f-h.length).times(function(){h=h.add(b)});e.push(h)});return e},inGroupsOf:function(a,b){if(this.length===0||a===0)return this;if(a===undefined)a=1;if(b===undefined)b=null;var c=[],d=null;this.each(function(e,f){if(f%a===0){d&&c.push(d);d=[]}if(e===undefined)e=b;d.push(e)});if(!this.length.isMultipleOf(a)){(a-this.length%a).times(function(){d.push(b)});this.length+=a-this.length%a}d.length>0&&c.push(d);return c},compact:function(a){var b=[];this.each(function(c){if(Array.isArray(c))b.push(c.compact());
28
- else if(a&&c)b.push(c);else if(!a&&c!==undefined&&c!==null&&(typeof c!="number"||!isNaN(c)))b.push(c)});return b},isEmpty:function(){return this.compact().length==0},flatten:function(){var a=[];this.each(function(b){if(Array.isArray(b))a=a.concat(b.flatten());else a.push(b)});return a},sortBy:function(a,b){var c=arguments;this.sort(function(d,e){var f=x(c,d),g=x(c,e),h=typeof f=="number";return h&&b?g-f:h&&!b?f-g:f===g?0:b?f<g?1:-1:f<g?-1:1});return this},randomize:function(){for(var a=this.concat(),
29
- b,c,d=a.length;d;b=parseInt(Math.random()*d),c=a[--d],a[d]=a[b],a[b]=c);return a}});k(Array,true,false,{all:Array.prototype.every,any:Array.prototype.some,has:Array.prototype.some,insert:Array.prototype.add});var M=function(a,b,c){c=Math[c];var d=Math.pow(10,Math.abs(b||0));if(b<0)d=1/d;return c(a*d)/d};k(Number,false,false,{random:function(a,b){var c;if(arguments.length==1){b=a;a=0}c=Math.min(a||0,b||1);return Math.round(Math.random()*(Math.max(a||0,b||1)-c)+c)}});k(Number,true,false,{toNumber:function(){return parseFloat(this,
30
- 10)},ceil:function(a){return M(this,a,"ceil")},floor:function(a){return M(this,a,"floor")},abs:function(){return Math.abs(this)},pow:function(a){if(a===undefined||a==null)a=1;return Math.pow(this,a)},round:function(a){return M(this,a,"round")},chr:function(){return String.fromCharCode(this)},isOdd:function(){return!this.isMultipleOf(2)},isEven:function(){return this.isMultipleOf(2)},isMultipleOf:function(a){return this%a===0},upto:function(a,b,c){return R(this,a,b,c||1)},downto:function(a,b,c){return R(this,
31
- a,b,-(c||1))},times:function(a){if(a)for(var b=0;b<this;b++)a.call(this,b);return this.toNumber()},ordinalize:function(){var a;if(this>=11&&this<=13)a="th";else switch(this%10){case 1:a="st";break;case 2:a="nd";break;case 3:a="rd";break;default:a="th"}return this.toString()+a},pad:function(a,b,c){c=c||10;c=this.toNumber()===0?"":this.toString(c).replace(/^-/,"");c=F(c,"0",a-c.replace(/\.\d+$/,"").length,0);if(b||this<0)c=(this<0?"-":"+")+c;return c},format:function(a,b){a=a||",";b=b||".";var c=this.toString().split("."),
32
- d=c[0];c=c.length>1?b+c[1]:"";for(var e=/(\d+)(\d{3})/;e.test(d);)d=d.replace(e,"$1"+a+"$2");return d+c},hex:function(a){return this.pad(a||1,false,16)}});var ga=[{base:"A",reg:/[A\u24b6\uff21\u00c0\u00c1\u00c2\u1ea6\u1ea4\u1eaa\u1ea8\u00c3\u0100\u0102\u1eb0\u1eae\u1eb4\u1eb2\u0226\u01e0\u00c4\u01de\u1ea2\u00c5\u01fa\u01cd\u0200\u0202\u1ea0\u1eac\u1eb6\u1e00\u0104\u023a\u2c6f]/g},{base:"B",reg:/[B\u24b7\uff22\u1e02\u1e04\u1e06\u0243\u0182\u0181]/g},{base:"C",reg:/[C\u24b8\uff23\u0106\u0108\u010a\u010c\u00c7\u1e08\u0187\u023b\ua73e]/g},
33
- {base:"D",reg:/[D\u24b9\uff24\u1e0a\u010e\u1e0c\u1e10\u1e12\u1e0e\u0110\u018b\u018a\u0189\ua779]/g},{base:"E",reg:/[E\u24ba\uff25\u00c8\u00c9\u00ca\u1ec0\u1ebe\u1ec4\u1ec2\u1ebc\u0112\u1e14\u1e16\u0114\u0116\u00cb\u1eba\u011a\u0204\u0206\u1eb8\u1ec6\u0228\u1e1c\u0118\u1e18\u1e1a\u0190\u018e]/g},{base:"F",reg:/[F\u24bb\uff26\u1e1e\u0191\ua77b]/g},{base:"G",reg:/[G\u24bc\uff27\u01f4\u011c\u1e20\u011e\u0120\u01e6\u0122\u01e4\u0193\ua7a0\ua77d\ua77e]/g},{base:"H",reg:/[H\u24bd\uff28\u0124\u1e22\u1e26\u021e\u1e24\u1e28\u1e2a\u0126\u2c67\u2c75\ua78d]/g},
34
- {base:"I",reg:/[I\u24be\uff29\u00cc\u00cd\u00ce\u0128\u012a\u012c\u0130\u00cf\u1e2e\u1ec8\u01cf\u0208\u020a\u1eca\u012e\u1e2c\u0197]/g},{base:"J",reg:/[J\u24bf\uff2a\u0134\u0248]/g},{base:"K",reg:/[K\u24c0\uff2b\u1e30\u01e8\u1e32\u0136\u1e34\u0198\u2c69\ua740\ua742\ua744\ua7a2]/g},{base:"L",reg:/[L\u24c1\uff2c\u013f\u0139\u013d\u1e36\u1e38\u013b\u1e3c\u1e3a\u0141\u023d\u2c62\u2c60\ua748\ua746\ua780]/g},{base:"M",reg:/[M\u24c2\uff2d\u1e3e\u1e40\u1e42\u2c6e\u019c]/g},{base:"N",reg:/[N\u24c3\uff2e\u01f8\u0143\u00d1\u1e44\u0147\u1e46\u0145\u1e4a\u1e48\u0220\u019d\ua790\ua7a4]/g},
35
- {base:"O",reg:/[O\u24c4\uff2f\u00d2\u00d3\u00d4\u1ed2\u1ed0\u1ed6\u1ed4\u00d5\u1e4c\u022c\u1e4e\u014c\u1e50\u1e52\u014e\u022e\u0230\u00d6\u022a\u1ece\u0150\u01d1\u020c\u020e\u01a0\u1edc\u1eda\u1ee0\u1ede\u1ee2\u1ecc\u1ed8\u01ea\u01ec\u00d8\u01fe\u0186\u019f\ua74a\ua74c]/g},{base:"P",reg:/[P\u24c5\uff30\u1e54\u1e56\u01a4\u2c63\ua750\ua752\ua754]/g},{base:"Q",reg:/[Q\u24c6\uff31\ua756\ua758\u024a]/g},{base:"R",reg:/[R\u24c7\uff32\u0154\u1e58\u0158\u0210\u0212\u1e5a\u1e5c\u0156\u1e5e\u024c\u2c64\ua75a\ua7a6\ua782]/g},
36
- {base:"S",reg:/[S\u24c8\uff33\u1e9e\u015a\u1e64\u015c\u1e60\u0160\u1e66\u1e62\u1e68\u0218\u015e\u2c7e\ua7a8\ua784]/g},{base:"T",reg:/[T\u24c9\uff34\u1e6a\u0164\u1e6c\u021a\u0162\u1e70\u1e6e\u0166\u01ac\u01ae\u023e\ua786]/g},{base:"U",reg:/[U\u24ca\uff35\u00d9\u00da\u00db\u0168\u1e78\u016a\u1e7a\u016c\u00dc\u01db\u01d7\u01d5\u01d9\u1ee6\u016e\u0170\u01d3\u0214\u0216\u01af\u1eea\u1ee8\u1eee\u1eec\u1ef0\u1ee4\u1e72\u0172\u1e76\u1e74\u0244]/g},{base:"V",reg:/[V\u24cb\uff36\u1e7c\u1e7e\u01b2\ua75e\u0245]/g},
37
- {base:"W",reg:/[W\u24cc\uff37\u1e80\u1e82\u0174\u1e86\u1e84\u1e88\u2c72]/g},{base:"X",reg:/[X\u24cd\uff38\u1e8a\u1e8c]/g},{base:"Y",reg:/[Y\u24ce\uff39\u1ef2\u00dd\u0176\u1ef8\u0232\u1e8e\u0178\u1ef6\u1ef4\u01b3\u024e\u1efe]/g},{base:"Z",reg:/[Z\u24cf\uff3a\u0179\u1e90\u017b\u017d\u1e92\u1e94\u01b5\u0224\u2c7f\u2c6b\ua762]/g},{base:"a",reg:/[a\u24d0\uff41\u1e9a\u00e0\u00e1\u00e2\u1ea7\u1ea5\u1eab\u1ea9\u00e3\u0101\u0103\u1eb1\u1eaf\u1eb5\u1eb3\u0227\u01e1\u00e4\u01df\u1ea3\u00e5\u01fb\u01ce\u0201\u0203\u1ea1\u1ead\u1eb7\u1e01\u0105\u2c65\u0250]/g},
38
- {base:"b",reg:/[b\u24d1\uff42\u1e03\u1e05\u1e07\u0180\u0183\u0253]/g},{base:"c",reg:/[c\u24d2\uff43\u0107\u0109\u010b\u010d\u00e7\u1e09\u0188\u023c\ua73f\u2184]/g},{base:"d",reg:/[d\u24d3\uff44\u1e0b\u010f\u1e0d\u1e11\u1e13\u1e0f\u0111\u018c\u0256\u0257\ua77a]/g},{base:"e",reg:/[e\u24d4\uff45\u00e8\u00e9\u00ea\u1ec1\u1ebf\u1ec5\u1ec3\u1ebd\u0113\u1e15\u1e17\u0115\u0117\u00eb\u1ebb\u011b\u0205\u0207\u1eb9\u1ec7\u0229\u1e1d\u0119\u1e19\u1e1b\u0247\u025b\u01dd]/g},{base:"f",reg:/[f\u24d5\uff46\u1e1f\u0192\ua77c]/g},
39
- {base:"g",reg:/[g\u24d6\uff47\u01f5\u011d\u1e21\u011f\u0121\u01e7\u0123\u01e5\u0260\ua7a1\u1d79\ua77f]/g},{base:"h",reg:/[h\u24d7\uff48\u0125\u1e23\u1e27\u021f\u1e25\u1e29\u1e2b\u1e96\u0127\u2c68\u2c76\u0265]/g},{base:"i",reg:/[i\u24d8\uff49\u00ec\u00ed\u00ee\u0129\u012b\u012d\u00ef\u1e2f\u1ec9\u01d0\u0209\u020b\u1ecb\u012f\u1e2d\u0268\u0131]/g},{base:"j",reg:/[j\u24d9\uff4a\u0135\u01f0\u0249]/g},{base:"k",reg:/[k\u24da\uff4b\u1e31\u01e9\u1e33\u0137\u1e35\u0199\u2c6a\ua741\ua743\ua745\ua7a3]/g},{base:"l",
40
- reg:/[l\u24db\uff4c\u0140\u013a\u013e\u1e37\u1e39\u013c\u1e3d\u1e3b\u017f\u0142\u019a\u026b\u2c61\ua749\ua781\ua747]/g},{base:"m",reg:/[m\u24dc\uff4d\u1e3f\u1e41\u1e43\u0271\u026f]/g},{base:"n",reg:/[n\u24dd\uff4e\u01f9\u0144\u00f1\u1e45\u0148\u1e47\u0146\u1e4b\u1e49\u019e\u0272\u0149\ua791\ua7a5]/g},{base:"o",reg:/[o\u24de\uff4f\u00f2\u00f3\u00f4\u1ed3\u1ed1\u1ed7\u1ed5\u00f5\u1e4d\u022d\u1e4f\u014d\u1e51\u1e53\u014f\u022f\u0231\u00f6\u022b\u1ecf\u0151\u01d2\u020d\u020f\u01a1\u1edd\u1edb\u1ee1\u1edf\u1ee3\u1ecd\u1ed9\u01eb\u01ed\u00f8\u01ff\u0254\ua74b\ua74d\u0275]/g},
41
- {base:"p",reg:/[p\u24df\uff50\u1e55\u1e57\u01a5\u1d7d\ua751\ua753\ua755]/g},{base:"q",reg:/[q\u24e0\uff51\u024b\ua757\ua759]/g},{base:"r",reg:/[r\u24e1\uff52\u0155\u1e59\u0159\u0211\u0213\u1e5b\u1e5d\u0157\u1e5f\u024d\u027d\ua75b\ua7a7\ua783]/g},{base:"s",reg:/[s\u24e2\uff53\u00df\u015b\u1e65\u015d\u1e61\u0161\u1e67\u1e63\u1e69\u0219\u015f\u023f\ua7a9\ua785\u1e9b]/g},{base:"t",reg:/[t\u24e3\uff54\u1e6b\u1e97\u0165\u1e6d\u021b\u0163\u1e71\u1e6f\u0167\u01ad\u0288\u2c66\ua787]/g},{base:"u",reg:/[u\u24e4\uff55\u00f9\u00fa\u00fb\u0169\u1e79\u016b\u1e7b\u016d\u00fc\u01dc\u01d8\u01d6\u01da\u1ee7\u016f\u0171\u01d4\u0215\u0217\u01b0\u1eeb\u1ee9\u1eef\u1eed\u1ef1\u1ee5\u1e73\u0173\u1e77\u1e75\u0289]/g},
42
- {base:"v",reg:/[v\u24e5\uff56\u1e7d\u1e7f\u028b\ua75f\u028c]/g},{base:"w",reg:/[w\u24e6\uff57\u1e81\u1e83\u0175\u1e87\u1e85\u1e98\u1e89\u2c73]/g},{base:"x",reg:/[x\u24e7\uff58\u1e8b\u1e8d]/g},{base:"y",reg:/[y\u24e8\uff59\u1ef3\u00fd\u0177\u1ef9\u0233\u1e8f\u00ff\u1ef7\u1e99\u1ef5\u01b4\u024f\u1eff]/g},{base:"z",reg:/[z\u24e9\uff5a\u017a\u1e91\u017c\u017e\u1e93\u1e95\u01b6\u0225\u0240\u2c6c\ua763]/g},{base:"AA",reg:/[\ua732]/g},{base:"AE",reg:/[\u00c6\u01fc\u01e2]/g},{base:"AO",reg:/[\ua734]/g},{base:"AU",
43
- reg:/[\ua736]/g},{base:"AV",reg:/[\ua738\ua73a]/g},{base:"AY",reg:/[\ua73c]/g},{base:"DZ",reg:/[\u01f1\u01c4]/g},{base:"Dz",reg:/[\u01f2\u01c5]/g},{base:"LJ",reg:/[\u01c7]/g},{base:"Lj",reg:/[\u01c8]/g},{base:"NJ",reg:/[\u01ca]/g},{base:"Nj",reg:/[\u01cb]/g},{base:"OI",reg:/[\u01a2]/g},{base:"OO",reg:/[\ua74e]/g},{base:"OU",reg:/[\u0222]/g},{base:"TZ",reg:/[\ua728]/g},{base:"VY",reg:/[\ua760]/g},{base:"aa",reg:/[\ua733]/g},{base:"ae",reg:/[\u00e6\u01fd\u01e3]/g},{base:"ao",reg:/[\ua735]/g},{base:"au",
44
- reg:/[\ua737]/g},{base:"av",reg:/[\ua739\ua73b]/g},{base:"ay",reg:/[\ua73d]/g},{base:"dz",reg:/[\u01f3\u01c6]/g},{base:"hv",reg:/[\u0195]/g},{base:"lj",reg:/[\u01c9]/g},{base:"nj",reg:/[\u01cc]/g},{base:"oi",reg:/[\u01a3]/g},{base:"ou",reg:/[\u0223]/g},{base:"oo",reg:/[\ua74f]/g},{base:"tz",reg:/[\ua729]/g},{base:"vy",reg:/[\ua761]/g}],ha=[{names:["Arabic"],source:"\u0600-\u06ff"},{names:["Armenian"],source:"\u0530-\u058f"},{names:["Bopomofo"],source:"\u3100-\u312f"},{names:["Cyrillic"],source:"\u0400-\u04ff"},
45
- {names:["Devanagari"],source:"\u0900-\u097f"},{names:["Ethiopic"],source:"\u1200-\u137c\u2d80-\u2dde"},{names:["Georgian"],source:"\u10a0-\u10ff"},{names:["Greek"],source:"\u0370-\u03ff"},{names:["Hangul"],source:"\uac00-\ud7af\u1100-\u11ff"},{names:["Han","Kanji"],source:"\u4e00-\u9fff\uf900-\ufaff"},{names:["Hebrew"],source:"\u0590-\u05ff"},{names:["Hiragana"],source:"\u3040-\u309f\u30fb-\u30fc"},{names:["Kana"],source:"\u3040-\u30ff\uff61-\uff9f"},{names:["Katakana"],source:"\u30a0-\u30ff\uff61-\uff9f"},
46
- {names:["Thai"],source:"\u0e00-\u0e7f"}],V=function(a,b,c,d){var e=Array.prototype.slice.call(b).join("");e=e.replace(/all/,"").replace(/(\w)lphabet|umbers?|atakana|paces?|unctuation/g,"$1");return a.replace(c,function(f){return d[f]&&(!e||e.has(d[f].type))?d[f].to:f})},ia=[{type:"a",shift:65248,start:65,end:90},{type:"a",shift:65248,start:97,end:122},{type:"n",shift:65248,start:48,end:57},{type:"p",shift:65248,start:33,end:47},{type:"p",shift:65248,start:58,end:64},{type:"p",shift:65248,start:91,
47
- end:96},{type:"p",shift:65248,start:123,end:126}],W={},X={},ja=/[\u0020-\u00A5]|[\uFF61-\uFF9F][\uff9e\uff9f]?/g,ka=/[\u3000-\u301C]|[\u301A-\u30FC]|[\uFF01-\uFF60]|[\uFFE0-\uFFE6]/g,la=/[\u30ab\u30ad\u30af\u30b1\u30b3\u30b5\u30b7\u30b9\u30bb\u30bd\u30bf\u30c1\u30c4\u30c6\u30c8\u30cf\u30d2\u30d5\u30d8\u30db]/,ma=/[\u30cf\u30d2\u30d5\u30d8\u30db\u30f2]/,q=function(a,b,c){W[b]={type:a,to:c};X[c]={type:a,to:b}},F=function(a,b,c,d){var e=String(b);if(e!=b)e="";Object.isNumber(c)||(c=1);Object.isNumber(d)||
48
- (d=1);return e.repeat(c)+a+e.repeat(d)},na=function(a,b){var c=a.match(b);if(c&&!RegExp.NPCGSupport&&!b.global)for(var d=1;d<c.length;d++)if(c[d]==="")c[d]=undefined;return c};k(String,true,false,{escapeRegExp:function(){return RegExp.escape(this)},escapeURL:function(a){return a?encodeURIComponent(this):encodeURI(this)},unescapeURL:function(a){return a?decodeURI(this):decodeURIComponent(this)},escapeHTML:function(){return this.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},unescapeHTML:function(){return this.replace(/&lt;/g,
49
- "<").replace(/&gt;/g,">").replace(/&amp;/g,"&")},encodeBase64:function(){return btoa(this)},decodeBase64:function(){return atob(this)},capitalize:function(a){a=a?/\b[a-z]/g:/^[a-z]/;return this.toLowerCase().replace(a,function(b){return b.toUpperCase()})},pad:function(a,b){return F(this,a,b,b)},padLeft:function(a,b){return F(this,a,b,0)},padRight:function(a,b){return F(this,a,0,b)},repeat:function(a){if(!Object.isNumber(a)||a<1)return"";for(var b="",c=0;c<a;c++)b+=this;return b},each:function(a,b){if(Object.isFunction(a)){b=
9
+ (function(){function m(a,b,c,d){var e=b?a.prototype:a;ma(a,b,d);t(d,function(g,h){if(typeof c==="function")l(e,g,na(e[g],h,c));else if(c===true||!e[g])l(e,g,h);a.SugarMethods[g]={instance:b,method:h}})}function ma(a){if(!a.SugarMethods){a.SugarMethods={};l(a,"sugar",function(){var b=arguments,c=b.length===0,d=false;a===Object&&c&&oa();t(a.SugarMethods,function(e,g){if(c||v(b,e)){l(g.instance?a.prototype:a,e,g.method);d=true}});return d})}}function na(a,b,c){return function(){return a&&(c===true||
10
+ c.apply(this,arguments))?a.apply(this,arguments):b.apply(this,arguments)}}function l(a,b,c){if(V)Object.defineProperty(a,b,{value:c,configurable:true,enumerable:false,writable:true});else a[b]=c}function t(a,b){var c=0,d;for(d in a)if(a.hasOwnProperty(d)){b.call(a,d,a[d],c);c++}}function G(a,b){if(typeof a=="object"&&typeof b=="object"&&a!==null&&b!==null){for(var c in a)if(a.hasOwnProperty(c))if(!b.hasOwnProperty(c)||!G(a[c],b[c]))return false;return Object.keys(a).length===Object.keys(b).length}else return a===
11
+ b}function x(a,b,c,d){return a===b?true:Object.isRegExp(b)?b.test(a):Object.isFunction(b)?b.apply(c,[a].concat(d)):typeof b==="object"?G(b,a):false}function z(a,b,c,d){var e=a[0];if(a.length===0)return b;else if(!Object.isFunction(e)&&!Object.isString(e))throw new TypeError("First argument must be a function or a string");return Object.isFunction(e)?e.apply(c,[b].concat(d)):typeof b[e]=="function"?b[e].call(b):b[e]}function s(a,b){k(A(Array.prototype.slice.call(a)),b)}function W(a,b,c){var d=[],e=
12
+ a.length,g=b[b.length-1]!==false,h;s(b,function(f){if(typeof f==="boolean")return false;if(g){f%=e;if(f<0)f=e+f}h=c?a.charAt(f)||"":a[f];d.push(h)});return d.length<2?d[0]:d}function P(a,b){return Object.prototype.toString.call(a)==="[object "+b+"]"}function H(a,b,c){var d;d=Array.isArray(a)?[]:c?Object.extended():{};t(a,function(e,g){d[e]=b&&(Object.isObject(g)||Array.isArray(g))?H(g,b,c):g});return d}function X(a,b,c,d){var e=/^(.+?)(\[.*\])$/,g,h,f;if(d!==false&&(h=b.match(e))){f=h[1];b=h[2].replace(/^\[|\]$/g,
13
+ "").split("][");k(b,function(i){g=!i||i.match(/^\d+$/);if(!f&&Object.isArray(a))f=a.length;a[f]||(a[f]=g?[]:{});a=a[f];f=i});if(!f&&g)f=a.length.toString();X(a,f,c)}else a[b]=c.match(/^\d+$/)?parseInt(c):c==="true"?true:c==="false"?false:c}function B(a){var b=this;t(a,function(c,d){b[c]=d})}function oa(){Y.each(function(a){l(Object.prototype,"is"+a,function(){return Object["is"+a](this)})});Z.each(function(a){l(Object.prototype,a,B.prototype[a])});l(Object.prototype,"clone",function(a){return H(this,
14
+ a,true)})}function k(a,b,c,d,e){var g,h;I(b);h=isNaN(c)?0:parseInt(c>>0);for(g=d===true?a.length+h:a.length;h<g;){c=h%a.length;if(!(c in a)&&e===true)return pa(a,b,h,d);else if(b.call(a,a[c],c,a)===false)break;h++}}function v(a,b,c,d,e){var g,h;k(a,function(f,i,j){if(x(f,b,j,[i,j])){g=f;h=i;return false}},c,d);return e?h:g}function y(a){var b=[];a.each(function(c){v(b,c)===undefined&&b.push(c)});return b}function A(a){var b=[];k(a,function(c){if(Array.isArray(c))b=b.concat(A(c));else b.push(c)});
15
+ return b}function I(a){if(!a||!a.call)throw new TypeError("Callback is not callable");}function J(a){if(a.length===0)throw new TypeError("First argument must be defined");}function pa(a,b,c){var d=[],e;for(e in a)e in a&&e>>>0==e&&e!=4294967295&&e>=c&&d.push(e.toNumber());d.sort().each(function(g){return b.call(a,a[g],g,a)});return a}function K(a,b,c,d){var e=c==="max",g=c==="min",h=e?-Infinity:Infinity,f=[];t(a,function(i){i=a[i];var j=z(b,i,d);if(!(j===undefined||j===null))if(j===h)f.push(i);else if(e&&
16
+ j>h||g&&j<h){f=[i];h=j}});return f}function r(a,b,c){c=Math[c||"round"];var d=Math.pow(10,(b||0).abs());if(b<0)d=1/d;return c(a*d)/d}function $(a,b,c,d){var e=[];a=parseInt(a);for(var g=d>0;g&&a<=b||!g&&a>=b;){e.push(a);c&&c.call(this,a);a+=d}return e}function qa(a,b){function c(){return L(arguments)[d](-this)}var d="add"+a.capitalize()+"s",e=function(){return r(this*b)},g=function(){return L(arguments)[d](this)};l(Number.prototype,a,e);l(Number.prototype,a+"s",e);l(Number.prototype,a+"Before",c);
17
+ l(Number.prototype,a+"sBefore",c);l(Number.prototype,a+"Ago",c);l(Number.prototype,a+"sAgo",c);l(Number.prototype,a+"After",g);l(Number.prototype,a+"sAfter",g);l(Number.prototype,a+"FromNow",g);l(Number.prototype,a+"sFromNow",g)}function aa(a,b,c,d){var e=Array.prototype.slice.call(b).join("");e=e.replace(/all/,"").replace(/(\w)lphabet|umbers?|atakana|paces?|unctuation/g,"$1");return a.replace(c,function(g){return d[g]&&(!e||e.has(d[g].type))?d[g].to:g})}function w(a,b,c){ba[b]={type:a,to:c};ca[c]=
18
+ {type:a,to:b}}function M(a,b,c,d){var e=String(b);if(e!=b)e="";Object.isNumber(c)||(c=1);Object.isNumber(d)||(d=1);return e.repeat(c)+a+e.repeat(d)}function da(a){var b=Date.addFormat,c=a.code;if(!a.formatsAdded){b("("+a.months.join("|")+")",["month"],c);b("("+a.weekdays.join("|")+")",["weekday"],c);b("("+a.modifiers.filter(function(d){return d.name==="day"}).map("text").join("|")+")",["day"],c);k(a.formats,function(d){var e=[];d=d.replace(/\s+/g,"[-,. ]*");d=d.replace(/\{(.+?)\}/g,function(g,h){var f=
19
+ h.match(/\?$/),i=h.match(/(\d)(?:-(\d))?/),j=h.match(/^\d+$/),o=h.replace(/[^a-z]+$/,""),n,p;if(o==="time"){e=e.concat(Q);return f?ea:R}if(j)n=a.optionals[j[0]-1];else if(a[o])n=a[o];else if(a[o+"s"]){n=a[o+"s"];if(i){p=[];k(n,function(u,ra){var fa=ra%(a.units?8:n.length);if(fa>=i[1]&&fa<=(i[2]||i[1]))p.push(u)});n=p}n=n.compact().join("|")}if(j)return"(?:"+n+")?";else{e.push(o);return"("+n+")"+(f?"?":"")}});b(d,e,c)});a.formatsAdded=true}}function C(a,b,c){if(b&&(!Object.isString(a)||!a))a=Date.currentLocale;
20
+ a&&!S[a]&&sa(a,c);return S[a]}function sa(a,b){function c(g,h){g=g.split("+").map(function(f){return f.replace(/(.+):(.+)$/,function(i,j,o){return o.split("|").map(function(n){return j+n}).join("|")})}).join("|");return k(g.split("|"),h)}function d(g,h,f){var i=[];if(b[g]){k(b[g],function(j,o){c(j,function(n,p){i[p*f+o]=n.toLowerCase()})});if(h)i=i.concat(b[g].map(function(j){return j.slice(0,3).toLowerCase()}));return b[g]=i}}function e(g,h){var f="[0-9\uff10-\uff19]"+(g?"{"+g+","+h+"}":"+");if(b.digits)f+=
21
+ "|["+b.digits+"]+";return f}b=b||ta(a);if(!b)throw Error("Invalid locale.");if(b.numbersAreDigits)b.digits=b.numbers.join("");d("months",true,12);d("weekdays",true,7);d("units",false,8);d("numbers",false,10);b.code=a;b.date=e(1,2);b.year=e(4,4);b.num=function(){var g=[e()].concat(b.articles);b.digits||(g=g.concat(b.numbers));return g.compact().join("|")}();(function(){var g=[];b.modifiersByName={};k(b.modifiers,function(h){c(h.text,function(f){b.modifiersByName[f]=h;g.push({name:h.name,text:f,value:h.value})})});
22
+ g.groupBy("name",function(h,f){f=f.map("text");if(h==="day")f=f.concat(b.weekdays);b[h]=f.join("|")});b.modifiers=g})();if(b.monthSuffix){b.month=e(1,2);b.months=(1).upto(12).map(function(g){return g+b.monthSuffix})}S[a]=new ga(b)}function ta(a){function b(e){return!!(d[0]&Math.pow(2,e-1))}if(a.slice(0,3)=="en-")a="en";if(!ha[a])return null;var c={modifiers:[]},d=ha[a].split(";");k(["months","weekdays","units","numbers","articles","optionals","formats"],function(e,g){c[e]=d[g+2]?d[g+2].split(","):
23
+ []});c.outputFormat=d[9];k(["day","sign","shift","edge"],function(e,g){d[g+10]&&k(d[g+10].split(","),function(h,f){h&&c.modifiers.push({name:e,text:h,value:f-2})})});if(b(1)){c.numbersAreDigits=true;c.monthSuffix=d[1]}c.capitalizeUnit=a=="de";c.hasPlural=b(2);c.pastFormat=c.formats[0];c.futureFormat=c.formats[b(3)?1:0];return c}function ua(a){if(!a)a=Date.currentLocale;return a!="en"&&a!="en-US"}function ga(a){Object.merge(this,a)}function D(a){var b;if(typeof a[0]==="object")return a;else if(a.length==
24
+ 1&&Object.isNumber(a[0]))return[a[0]];b={};k(ia,function(c,d){b[c.unit]=a[d]});return[b]}function va(a,b){var c={},d,e;k(b,function(g,h){d=a[h+1];if(d!==undefined){d=d.hankaku("n");if(g==="year")c.yearAsString=d;if(g==="millisecond")d*=Math.pow(10,3-d.length);e=parseFloat(d);c[g]=!isNaN(e)?e:d.toLowerCase()}});return c}function ja(a,b){var c=new Date,d=false,e,g,h,f,i,j,o;if(Object.isDate(a))c=a;else if(Object.isNumber(a))c=new Date(a);else if(Object.isObject(a)){c=(new Date).set(a,true);f=a}else if(Object.isString(a)){da(C(b,
25
+ true));g=ua(b);a=a.trim().replace(/\.+$/,"").replace(/^now$/,"");k(ka,function(n){var p;var u=n.reg;if(!a||!a.match)p=null;else{if((p=a.match(u))&&!RegExp.NPCGSupport&&!u.global)for(u=1;u<p.length;u++)if(p[u]==="")p[u]=undefined;p=p}if(p){h=n;f=va(p,h.to);e=C(h.locale,true);if(h.variant&&!Object.isString(f.month)&&(Object.isString(f.date)||g)){o=f.month;f.month=f.date;f.date=o}if(f.year&&f.yearAsString.length===2)f.year=r((new Date).getFullYear()/100)*100-r(f.year/100)*100+f.year;if(f.month){f.month=
26
+ e.getMonth(f.month);if(f.shift&&!f.unit)f.unit="year"}if(f.weekday&&f.date)delete f.weekday;else if(f.weekday){f.weekday=e.getWeekday(f.weekday);if(f.shift&&!f.unit)f.unit="week"}if(f.day&&(o=e.modifiersByName[f.day])){f.day=o.value;c.resetTime();d=true}else if(f.day&&(o=e.getWeekday(f.day))>-1){delete f.day;f.weekday=o}if(f.date&&!Object.isNumber(f.date))f.date=e.getNumericDate(f.date);if(f.meridian)if(f.meridian==="pm"&&f.hour<12)f.hour+=12;if(f.offset_hours||f.offset_minutes){f.utc=true;f.offset_minutes=
27
+ f.offset_minutes||0;f.offset_minutes+=f.offset_hours*60;if(f.offset_sign==="-")f.offset_minutes*=-1;f.minute-=f.offset_minutes}if(f.unit){d=true;j=e.getNumber(f.num);i=e.getEnglishUnit(f.unit);if(f.shift||f.edge){j*=(o=e.modifiersByName[f.shift])?o.value:0;if(i==="month"&&f.date!==undefined){c.set({day:f.date},true);delete f.date}if(i==="year"&&f.month!==undefined){c.set({month:f.month,day:f.date},true);delete f.month;delete f.date}}if(f.sign&&(o=e.modifiersByName[f.sign]))j*=o.value;if(f.weekday!==
28
+ undefined){c.set({weekday:f.weekday},true);delete f.weekday}f[i]=(f[i]||0)+j}if(f.year_sign==="-")f.year*=-1;return false}});if(h)if(d)c.advance(f);else f.utc?c.setUTC(f,true):c.set(f,true);else c=a?new Date(a):new Date;if(f&&f.edge){o=e.modifiersByName[f.edge];k(N.slice(4),function(n){if(f[n.unit]!==undefined){i=n.unit;return false}});if(i==="year")f.specificity="month";else if(i==="month"||i==="week")f.specificity="day";c[(o.value<0?"endOf":"beginningOf")+i.capitalize()]();o.value===-2&&c.resetTime()}}return{date:c,
29
+ set:f}}function T(a,b,c,d){var e,g=C(d,true),h=/^[A-Z]/,f,i;if(a.isValid())if(Date[b])b=Date[b];else{if(typeof b=="function"){e=la(a);b=b.apply(a,e.concat(g))}}else return"Invalid Date";if(!b&&!c)b=g.outputFormat;else if(!b&&c){e=e||la(a);if(e[1]===0){e[1]=1;e[0]=1}return g.relative(e[0],e[1],e[2])}k(wa,function(j){b=b.replace(RegExp("\\{("+j.token+")(\\d)?\\}",j.caps?"":"i"),function(o,n,p){p=p||1;i=n.length;f=j.format.call(null,a,"");if(j.pad&&n.length===2)f=f.pad(j.pad);if(j.weekdays){f=g.weekdays[f+
30
+ (p-1)*7];if(i===3)f=f.slice(0,3);if(h.test(n))f=f.capitalize()}if(j.months){f=g.months[f+(p-1)*12];if(i===3)f=f.slice(0,3);if(h.test(n))f=f.capitalize()}if(j.meridian){if(i===1)f=f.to(1);if(h.test(n))f=f.toUpperCase()}return f})});return b}function xa(a,b,c){var d=ja(b),e=0,g=b=0,h;if(c>0){b=g=c;h=true}if(!d.date.isValid())return false;if(d.set&&d.set.specificity){k(E,function(i){if(i.unit===d.set.specificity)e=i.multiplier(d.date,a-d.date)-1});if(d.set.edge||d.set.shift)d.date["beginningOf"+d.set.specificity.capitalize()]();
31
+ if(!h&&d.set.sign&&d.set.specificity!="millisecond"){b=50;g=-50}}c=a.getTime();h=d.date.getTime();var f=h+e;return c>=h-b&&c<=f+g}function O(a,b,c,d,e){if(Object.isNumber(b)&&e)b={milliseconds:b};else if(Object.isNumber(b)){a.setTime(b);return a}if(b.date)b.day=b.date;if(!e&&b.day===undefined&&b.weekday!==undefined){q(a,"set",d,"Weekday",b.weekday);b.day=q(a,"get",d,"Date");delete b.weekday}k(N,function(g){if(b[g.unit]!==undefined||b[g.unit+"s"]!==undefined){b.specificity=g.unit;return false}else if(c&&
32
+ g.unit!=="week"&&g.unit!=="year")q(a,"set",d,g.method,g.unit==="day"?1:0)});e&&b.month!==undefined&&ya(a,b,e);k(E,function(g){var h=g.unit;g=g.method;var f=b[h]!==undefined?b[h]:b[h+"s"];if(f!==undefined){if(e){if(h==="week"){f=(b.day||0)+f*7;g="Date"}f=f*e+q(a,"get","",g)}q(a,"set",d,g,f)}});return a}function q(a,b,c,d,e){return a[b+(c?"UTC":"")+d](e)}function la(a){var b;a=a.millisecondsFromNow();var c=a.abs(),d=c,e=0;k(N.from(1),function(g,h){b=r(c/g.multiplier(),1).floor();if(b>=1){d=b;e=h+1}});
33
+ return[d,e,a]}function ya(a,b,c){var d=a.getDate();if(!(d<29||b.specificity!="month"&&b.specificity!="year")){b=(new Date(a.getFullYear()+(b.year*c||0),a.getMonth()+b.month*c)).daysInMonth();b<d&&a.setDate(b)}}function L(a){var b;b=Object.isNumber(a[1])?D(a)[0]:a[0];return ja(b,a[1]).date}function U(a,b,c,d,e){if(!a.timers)a.timers=[];var g=setTimeout(function(){c.apply(d,e);a.timers.remove(g)},b);a.timers.push(g)}var V=Object.defineProperty&&Object.defineProperties;B.prototype.constructor=Object;
34
+ m(B,true,false,{clone:function(a){return H(this,a,true)}});var Y=["Array","Boolean","Date","Function","Number","String","RegExp"],Z=["keys","values","each","merge","isEmpty","equals","watch"];m(Object,false,false,{extended:function(a){return new B(a)},isObject:function(a){return a===null||a===undefined?false:P(a,"Object")&&a.constructor===Object},each:function(a,b){b&&t(a,function(c,d){b.call(a,c,d,a)});return a},merge:function(){var a=arguments[0];s(arguments,function(b){typeof b==="object"&&t(b,
35
+ function(c,d){a[c]=d})});return a},isEmpty:function(a){if(!a)return true;return G(a,{})},equals:function(a,b){return G(a,b)},values:function(a,b){var c=[];t(a,function(d,e){c.push(e);b&&b.call(a,e)});return c},clone:H,fromQueryString:function(a,b){var c=Object.extended();a=a&&a.toString?a.toString():"";a.replace(/^.*?\?/,"").unescapeURL().split("&").each(function(d){d=d.split("=");d.length===2&&X(c,d[0],d[1],b)});return c}});m(Object,false,function(){return arguments.length<2},{keys:function(a,b){if(a===
36
+ null||typeof a!="object")throw new TypeError("Object required");var c=[];t(a,function(d){c.push(d);b&&b.call(a,d)});return c}});m(Array,false,false,{create:function(){var a=[];s(arguments,function(b){if(b&&b.callee)b=Array.prototype.slice.call(b);a=a.concat(b)});return a},isArray:function(a){return P(a,"Array")}});m(Array,true,function(){var a=arguments;return a.length===0||Object.isFunction(a[0])},{every:function(a,b){var c=this.length,d=0;for(J(arguments);d<c;){if(d in this&&!x(this[d],a,b,[d,this]))return false;
37
+ d++}return true},some:function(a,b){var c=this.length,d=0;for(J(arguments);d<c;){if(d in this&&x(this[d],a,b,[d,this]))return true;d++}return false},map:function(a,b){var c=this.length,d=0,e=Array(c);for(J(arguments);d<c;){if(d in this)e[d]=z(arguments,this[d],b,[d,this]);d++}return e},filter:function(a,b){var c=this.length,d=0,e=[];for(J(arguments);d<c;){d in this&&x(this[d],a,b,[d,this])&&e.push(this[d]);d++}return e}});m(Array,true,false,{indexOf:function(a,b){var c=this.length,d=isNaN(b)?0:parseInt(b>>
38
+ 0);if(Object.isString(this))return this.indexOf(a,b);if(d<0)d=Math.max(c+d,0);if(c==0||d>c)return-1;for(;d<c;){if(d in this&&this[d]===a)return d;d++}return-1},lastIndexOf:function(a,b){var c=this.length,d=isNaN(b)?c:parseInt(b>>0);if(Object.isString(this))return this.lastIndexOf(a,b);if(d<0)d=c+d;if(c==0||d<0)return-1;for(;d>=0;){if(d in this&&this[d]===a)return d;d--}return-1},forEach:function(a,b){var c=this.length,d=0;for(I(a);d<c;){d in this&&a.call(b,this[d],d,this);d++}},reduce:function(a,
39
+ b){var c=this.length,d=0,e=arguments.length>1&&b;I(a);if(c==0&&!e)throw new TypeError("Reduce called on empty array with no initial value");else if(e)e=e;else{e=this[d];d++}for(;d<c;){if(d in this)e=a.call(undefined,e,this[d],d,this);d++}return e},reduceRight:function(a,b){var c=this.length,d=c-1,e=arguments.length>1&&b;I(a);if(c==0&&!e)throw new TypeError("Reduce called on empty array with no initial value");else if(e)c=e;else{c=this[d];d--}for(;d>=0;){if(d in this)c=a.call(undefined,c,this[d],d,
40
+ this);d--}return c},each:function(a,b,c){k(this,a,b,c,true);return this},find:function(a,b,c){return v(this,a,b,c)},findAll:function(a,b,c){var d=[];k(this,function(e,g,h){x(e,a,h,[g,h])&&d.push(e)},b,c);return d},count:function(a){if(a===undefined)return this.length;return this.findAll(a).length},none:function(){return!this.any.apply(this,arguments)},remove:function(){var a,b=this;s(arguments,function(c){for(a=0;a<b.length;)if(x(b[a],c,b,[a,b]))b.splice(a,1);else a++});return b},removeAt:function(a,
41
+ b){if(a===undefined)return this;if(b===undefined)b=a;for(var c=0;c<=b-a;c++)this.splice(a,1);return this},add:function(a,b){if(!Object.isNumber(b)||isNaN(b))b=this.length;Array.prototype.splice.apply(this,[b,0].concat(a));return this},include:function(a,b){return this.clone().add(a,b)},exclude:function(){return Array.prototype.remove.apply(this.clone(),arguments)},clone:function(){return this.concat()},unique:function(){return y(this)},union:function(){var a=this;s(arguments,function(b){a=a.concat(b)});
42
+ return y(a)},intersect:function(){var a=[],b=arguments;this.each(function(c){s(b,function(d){Array.isArray(d)||(d=[d]);v(a,c)===undefined&&v(d,c)!==undefined&&a.push(c)})});return a},subtract:function(){var a=this.clone();s(arguments,function(b){Array.isArray(b)||(b=[b]);b.each(function(c){a.remove(c)})});return a},at:function(){return W(this,arguments)},first:function(a){if(a===undefined)return this[0];if(a<0)a=0;return this.slice(0,a)},last:function(a){if(a===undefined)return this[this.length-1];
43
+ return this.slice(this.length-a<0?0:this.length-a)},from:function(a){return this.slice(a)},to:function(a){if(a===undefined)a=this.length;return this.slice(0,a)},min:function(){return y(K(this,arguments,"min"))},max:function(){return y(K(this,arguments,"max"))},least:function(){var a=A(K(this.groupBy.apply(this,arguments),["length"],"min"));return a.length===this.length?[]:y(a)},most:function(){var a=A(K(this.groupBy.apply(this,arguments),["length"],"max"));return a.length===this.length?[]:y(a)},sum:function(a){a=
44
+ a?this.map(a):this;return a.length>0?a.reduce(function(b,c){return b+c}):0},average:function(a){a=a?this.map(a):this;return a.length>0?a.sum()/a.length:0},groupBy:function(a,b){var c=Object.extended(),d=arguments,e;k(this,function(g){e=z(d,g);c[e]||(c[e]=[]);c[e].push(g)});return c.each(b)},inGroups:function(a,b){var c=arguments.length>1,d=this,e=[],g=(this.length/a).ceil();(0).upto(a-1,function(h){h=h*g;var f=d.slice(h,h+g);c&&f.length<g&&(g-f.length).times(function(){f=f.add(b)});e.push(f)});return e},
45
+ inGroupsOf:function(a,b){if(this.length===0||a===0)return this;if(a===undefined)a=1;if(b===undefined)b=null;var c=[],d=null;this.each(function(e,g){if(g%a===0){d&&c.push(d);d=[]}if(e===undefined)e=b;d.push(e)});if(!this.length.isMultipleOf(a)){(a-this.length%a).times(function(){d.push(b)});this.length+=a-this.length%a}d.length>0&&c.push(d);return c},compact:function(a){var b=[];k(this,function(c){if(Array.isArray(c))b.push(c.compact());else if(a&&c)b.push(c);else if(!a&&c!==undefined&&c!==null&&(typeof c!=
46
+ "number"||!isNaN(c)))b.push(c)});return b},isEmpty:function(){return this.compact().length==0},flatten:function(){return A(this)},sortBy:function(a,b){var c=arguments;this.sort(function(d,e){var g=z(c,d),h=z(c,e),f=typeof g=="number";return f&&b?h-g:f&&!b?g-h:g===h?0:b?g<h?1:-1:g<h?-1:1});return this},randomize:function(){for(var a=this.concat(),b,c,d=a.length;d;b=parseInt(Math.random()*d),c=a[--d],a[d]=a[b],a[b]=c);return a}});m(Array,true,false,{all:Array.prototype.every,any:Array.prototype.some,
47
+ has:Array.prototype.some,insert:Array.prototype.add});m(Number,false,false,{random:function(a,b){var c;if(arguments.length==1){b=a;a=0}c=Math.min(a||0,b||1);return r(Math.random()*(Math.max(a||0,b||1)-c)+c)}});m(Number,true,false,{toNumber:function(){return parseFloat(this,10)},ceil:function(a){return r(this,a,"ceil")},floor:function(a){return r(this,a,"floor")},abs:function(){return Math.abs(this)},pow:function(a){if(a===undefined||a==null)a=1;return Math.pow(this,a)},round:function(a){return r(this,
48
+ a,"round")},chr:function(){return String.fromCharCode(this)},isOdd:function(){return!this.isMultipleOf(2)},isEven:function(){return this.isMultipleOf(2)},isMultipleOf:function(a){return this%a===0},upto:function(a,b,c){return $(this,a,b,c||1)},downto:function(a,b,c){return $(this,a,b,-(c||1))},times:function(a){if(a)for(var b=0;b<this;b++)a.call(this,b);return this.toNumber()},ordinalize:function(){var a;if(this>=11&&this<=13)a="th";else switch(this%10){case 1:a="st";break;case 2:a="nd";break;case 3:a=
49
+ "rd";break;default:a="th"}return this.toString()+a},pad:function(a,b,c){c=c||10;c=this.toNumber()===0?"":this.toString(c).replace(/^-/,"");c=M(c,"0",a-c.replace(/\.\d+$/,"").length,0);if(b||this<0)c=(this<0?"-":"+")+c;return c},format:function(a,b){a=a||",";b=b||".";var c=this.toString().split("."),d=c[0];c=c.length>1?b+c[1]:"";for(var e=/(\d+)(\d{3})/;e.test(d);)d=d.replace(e,"$1"+a+"$2");return d+c},hex:function(a){return this.pad(a||1,false,16)}});var F=function(){return"\t\n\u000b\u000c\r \u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u2028\u2029\u3000\ufeff"},
50
+ za=[{names:["Arabic"],source:"\u0600-\u06ff"},{names:["Cyrillic"],source:"\u0400-\u04ff"},{names:["Devanagari"],source:"\u0900-\u097f"},{names:["Greek"],source:"\u0370-\u03ff"},{names:["Hangul"],source:"\uac00-\ud7af\u1100-\u11ff"},{names:["Han","Kanji"],source:"\u4e00-\u9fff\uf900-\ufaff"},{names:["Hebrew"],source:"\u0590-\u05ff"},{names:["Hiragana"],source:"\u3040-\u309f\u30fb-\u30fc"},{names:["Kana"],source:"\u3040-\u30ff\uff61-\uff9f"},{names:["Katakana"],source:"\u30a0-\u30ff\uff61-\uff9f"},
51
+ {names:["Latin"],source:"\u0000-\u0080-\u00ff\u0100-\u017f\u0180-\u024f"},{names:["Thai"],source:"\u0e00-\u0e7f"}],Aa=[{type:"a",shift:65248,start:65,end:90},{type:"a",shift:65248,start:97,end:122},{type:"n",shift:65248,start:48,end:57},{type:"p",shift:65248,start:33,end:47},{type:"p",shift:65248,start:58,end:64},{type:"p",shift:65248,start:91,end:96},{type:"p",shift:65248,start:123,end:126}],ba={},ca={},Ba=/[\u0020-\u00A5]|[\uFF61-\uFF9F][\uff9e\uff9f]?/g,Ca=/[\u3000-\u301C]|[\u301A-\u30FC]|[\uFF01-\uFF60]|[\uFFE0-\uFFE6]/g,
52
+ Da=/[\u30ab\u30ad\u30af\u30b1\u30b3\u30b5\u30b7\u30b9\u30bb\u30bd\u30bf\u30c1\u30c4\u30c6\u30c8\u30cf\u30d2\u30d5\u30d8\u30db]/,Ea=/[\u30cf\u30d2\u30d5\u30d8\u30db\u30f2]/;m(String,true,false,{escapeRegExp:function(){return RegExp.escape(this)},escapeURL:function(a){return a?encodeURIComponent(this):encodeURI(this)},unescapeURL:function(a){return a?decodeURI(this):decodeURIComponent(this)},escapeHTML:function(){return this.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},unescapeHTML:function(){return this.replace(/&lt;/g,
53
+ "<").replace(/&gt;/g,">").replace(/&amp;/g,"&")},encodeBase64:function(){return btoa(this)},decodeBase64:function(){return atob(this)},capitalize:function(a){a=a?/\b[a-z]/g:/^[a-z]/;return this.toLowerCase().replace(a,function(b){return b.toUpperCase()})},pad:function(a,b){return M(this,a,b,b)},padLeft:function(a,b){return M(this,a,b,0)},padRight:function(a,b){return M(this,a,0,b)},repeat:function(a){if(!Object.isNumber(a)||a<1)return"";for(var b="",c=0;c<a;c++)b+=this;return b},each:function(a,b){if(Object.isFunction(a)){b=
50
54
  a;a=/./g}else if(a)if(Object.isString(a))a=RegExp(RegExp.escape(a),"gi");else{if(Object.isRegExp(a))a=a.addFlag("g")}else a=/./g;var c=this.match(a)||[];if(b)for(var d=0;d<c.length;d++)c[d]=b.call(this,c[d],d)||c[d];return c},shift:function(a){var b="";a=a||0;this.codes(function(c){b+=(c+a).chr()});return b},codes:function(a){for(var b=[],c=0;c<this.length;c++){var d=this.charCodeAt(c);b.push(d);a&&a.call(this,d,c)}return b},chars:function(a){return this.trim().each(a)},words:function(a){return this.trim().each(/\S+/g,
51
- a)},lines:function(a){return this.trim().each(/^.*$/gm,a)},paragraphs:function(a){var b=this.trim().split(/[\r\n]{2,}/);return b=b.map(function(c){if(a)var d=a.call(c);return d?d:c})},normalize:function(){var a=this.toString();ga.each(function(b){a=a.replace(b.reg,b.base)});return a},startsWith:function(a,b){if(b===undefined)b=true;var c=Object.isRegExp(a)?a.source.replace("^",""):RegExp.escape(a);return RegExp("^"+c,b?"":"i").test(this)},endsWith:function(a,b){if(b===undefined)b=true;var c=Object.isRegExp(a)?
52
- a.source.replace("$",""):RegExp.escape(a);return RegExp(c+"$",b?"":"i").test(this)},isBlank:function(){return this.trim().length===0},has:function(a){return this.search(a)!==-1},add:function(a,b){return this.split("").add(a,b).join("")},remove:function(a){return this.replace(a,"")},hankaku:function(){return V(this,arguments,ka,X)},zenkaku:function(){return V(this,arguments,ja,W)},hiragana:function(a){var b=this;if(a!==false)b=b.zenkaku("k");return b.replace(/[\u30A1-\u30F6]/g,function(c){return c.shift(-96)})},
53
- katakana:function(){return this.replace(/[\u3041-\u3096]/g,function(a){return a.shift(96)})},toNumber:function(a){var b=this.replace(/,/g,"");return b.match(/\./)?parseFloat(b):parseInt(b,a||10)},reverse:function(){return this.split("").reverse().join("")},compact:function(){return this.replace(/[\r\n]/g,"").trim().replace(/([\s\u3000])+/g,"$1")},at:function(){return Q(this,arguments,true)},first:function(a){a=a===undefined?1:a;return this.substr(0,a)},last:function(a){a=a===undefined?1:a;return this.substr(this.length-
54
- a<0?0:this.length-a)},from:function(a){return this.slice(a)},to:function(a){if(a===undefined)a=this.length;return this.slice(0,a)},toDate:function(){return N([this.toString()])},dasherize:function(){return this.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]/g,"-").toLowerCase()},underscore:function(){return this.replace(/([a-z])([A-Z])/g,"$1_$2").replace(/[-\s]/g,"_").toLowerCase()},camelize:function(a){for(var b=this.dasherize().split("-"),c="",d=0;d<b.length;d++)c+=a===false&&d===0?b[d].toLowerCase():
55
- b[d].substr(0,1).toUpperCase()+b[d].substr(1).toLowerCase();return c},stripTags:function(){var a=this;r(arguments.length>0?arguments:[""],function(b){a=a.replace(RegExp("</?"+b.escapeRegExp()+"[^<>]*>","gi"),"")});return a},removeTags:function(){var a=this;r(arguments.length>0?arguments:["\\S+"],function(b){a=a.replace(RegExp("<("+b+")[^<>]*(?:\\/>|>.*?<\\/\\1>)","gi"),"")});return a},truncate:function(a,b,c){var d;b=b===undefined?"...":String(b);a-=b.length;if(this.length<=a)return this.toString();
56
- d=/^(.)\1+$/.test(b)?b.slice(0,1):"";for(d=RegExp("[^\t\n\u000b\u000c\r \u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u2028\u2029\u3000\ufeff"+d+"][\t\n\u000b\u000c\r \u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u2028\u2029\u3000\ufeff"+d+"]");a>0&&!d.test(this.slice(a-1,a+1))&&c!==true;)a--;return this.slice(0,a)+(a>0?b:"")}});k(String,true,function(a){return!Object.isRegExp(a)},{split:function(a,
57
- b){var c=[],d=0,e=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.sticky?"y":"");a=a.addFlag("g");var f,g,h;RegExp.NPCGSupport||(f=RegExp("^"+a.source+"$(?!\\s)",e));if(b===undefined||+b<0)b=Infinity;else{b=Math.floor(+b);if(!b)return[]}for(;g=a.exec(this);){e=g.index+g[0].length;if(e>d){c.push(this.slice(d,g.index));!RegExp.NPCGSupport&&g.length>1&&g[0].replace(f,function(){for(var i=1;i<arguments.length-2;i++)if(arguments[i]===undefined)g[i]=undefined});g.length>1&&g.index<this.length&&Array.prototype.push.apply(c,
58
- g.slice(1));h=g[0].length;d=e;if(c.length>=b)break}a.lastIndex===g.index&&a.lastIndex++}if(d===this.length){if(h||!a.test(""))c.push("")}else c.push(this.slice(d));return c.length>b?c.slice(0,b):c}});k(String,true,false,{insert:String.prototype.add});var G,H,I=["january","february","march","april","may","june","july","august","september","october","november","december"],J=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],Y=["zero","one","two","three","four","five","six","seven",
59
- "eight","nine","ten"],Z=[{reg:"(\\d{4})",to:["year"]},{reg:"(\\d{4})[-/.](\\d{1,2})",to:["year","month"]},{reg:"([+-])?(\\d{4})[-/.]?(\\d{1,2})[-/.]?(\\d{1,2})",to:["year_sign","year","month","day"]},{reg:"(\\d{2})-?(\\d{2})-?(\\d{2})",to:["year","month","day"]},{reg:"(\\d{1,2})[\\-/.](\\d{1,2})",to:["month","day"],variant:true},{reg:"(\\d{1,2})[\\-/.](\\d{1,2})[\\-/.](\\d{2,4})",to:["month","day","year"],variant:true},{reg:"({MONTHS})[\\s\\-.](\\d{4})",to:["month","year"]},{reg:"(?:{WEEKDAYS})?\\s*({MONTHS})[\\s\\-.]?(?:(\\d{1,2})(?:st|nd|rd|th)?)?,?[\\s\\-.]?(\\d{2,4})?",
60
- to:["month","day","year"]},{reg:"(\\d{1,2}) ({MONTHS}),? (\\d{4})",to:["day","month","year"]},{reg:"(?:(the|a|{NUMBER}|\\d+) (day|week|month|year)s? (before|after|from)\\s+)?(today|tomorrow|yesterday|{WEEKDAYS})(?: at)?",to:["modifier_amount","modifier_unit","modifier_sign","fuzzy_day"]},{reg:"(a|{NUMBER}|\\d+) (millisecond|second|minute|hour|day|week|month|year)s? (from now|ago)",to:["modifier_amount","modifier_unit","modifier_sign"],relative:true},{reg:"(this|next|last)?\\s*(?:week\\s*)?({WEEKDAYS})(?: at)?",
61
- to:["modifier_sign","fuzzy_day"]},{reg:"({WEEKDAYS}) (?:of\\s*)?(this|next|last) week",to:["fuzzy_day","modifier_sign"]},{reg:"({MONTHS})(?: (\\d{1,2})(?:st|nd|rd|th)?)? of (this|next|last) (year)",to:["month","day","modifier_sign","modifier_unit"]},{reg:"(?:the\\s)?(first day|last day)?(\\d{1,2}(?:st|nd|rd|th))? of (?:(the|this|next|last) (month)|({MONTHS}))",to:["modifier_edge","day","modifier_sign","modifier_unit","month"]},{reg:"(?:the\\s)?(beginning|end|first day|last day) of (?:(the|this|next|last) (week|month|year)|(\\d{4})|({MONTHS}))",
62
- to:["modifier_edge","modifier_sign","modifier_unit","year","month"]},{reg:"(this|next|last) (week|month|year)",to:["modifier_sign","modifier_unit"],relative:true},{reg:"(midnight|noon)(?: (tonight|today|tomorrow|yesterday|{WEEKDAYS}))?",to:["hour","fuzzy_day"],timeIncluded:true},{reg:"^(?:(\\d{1,2}):?(\\d{2})?:?(\\d{2})?(\\.\\d{1,6})?(am|pm)?(?:(Z)|(?:([+-])(\\d{2})(?::?(\\d{2}))?)?)?)$",to:["hour","minute","second","millisecond","meridian","utc","offset_sign","offset_hours","offset_minutes"],today:true,
63
- timeIncluded:true}],oa=[{token:"millisec(?:onds?)?|ms(?:ms)?",pad:3,format:function(a,b){return n(a,"get",b,"Milliseconds")}},{token:"s(?:s|ec(?:onds?)?)?",pad:2,format:function(a,b){return n(a,"get",b,"Seconds")}},{token:"m(?:m|in(?:utes?)?)?",pad:2,caps:true,format:function(a,b){return n(a,"get",b,"Minutes")}},{token:"h(?:h|(?:ours?))?|24hr",pad:2,format:function(a,b){return n(a,"get",b,"Hours")}},{token:"12hr",pad:2,format:function(a,b){var c=n(a,"get",b,"Hours");return c===0?12:c-Math.floor(c/
64
- 13)*12}},{token:"d(?:d|ate|ays?)?",pad:2,format:function(a,b){return n(a,"get",b,"Date")}},{token:"dow|weekday(?: short)?",weekdays:true,format:function(a,b){return n(a,"get",b,"Day")}},{token:"MM?",pad:2,caps:true,format:function(a,b){return n(a,"get",b,"Month")+1}},{token:"mon(th)?(?: short)?",months:true,format:function(a,b){return n(a,"get",b,"Month")}},{token:"yy",format:function(a,b){return n(a,"get",b,"FullYear").toString().from(2)}},{token:"yyyy|year",format:function(a,b){return n(a,"get",
65
- b,"FullYear")}},{token:"t{1,2}",meridian:true,format:function(a,b){return n(a,"get",b,"Hours")<12?"am":"pm"}},{token:"tz|timezone",format:function(a){return a.getUTCOffset()}},{token:"iso(tz|timezone)",format:function(a){return a.getUTCOffset(true)}},{token:"ord",format:function(a,b){return n(a,"get",b,"Date").ordinalize()}}],s=[{unit:"year",method:"FullYear",multiplier:function(a){return(365+(a?a.isLeapYear()?1:0:0.25))*24*60*60*1E3}},{unit:"month",method:"Month",multiplier:function(a,b){var c=30.4375,
66
- d;if(a){d=a.daysInMonth();if(b<=d.days())c=d}return c*24*60*60*1E3}},{unit:"week",method:"Week",multiplier:function(){return 6048E5}},{unit:"day",method:"Date",multiplier:function(){return 864E5}},{unit:"hour",method:"Hours",multiplier:function(){return 36E5}},{unit:"minute",method:"Minutes",multiplier:function(){return 6E4}},{unit:"second",method:"Seconds",multiplier:function(){return 1E3}},{unit:"millisecond",method:"Milliseconds",multiplier:function(){return 1}}],z=function(a){if(typeof a[0]===
67
- "object")return a;else if(a.length==1&&Object.isNumber(a[0]))return[a[0]];for(var b={},c=Array.prototype.slice.call(arguments,1),d=0;d<a.length;d++)b[c[d]]=a[d];return[b]},pa=function(a,b){var c={};m(b,function(d,e){var f=a[e+1];if(typeof f==="string")f=f.toLowerCase();c[d]=f});return c},$=function(a){var b,c={},d={},e=false,f=new Date;if(Object.isDate(a))f=a;else if(Object.isNumber(a))f=new Date(a);else if(typeof a=="object"){d=a;f=(new Date).set(a,true)}else if(Object.isString(a)){a=a.trim().replace(/\.+$/,
68
- "").replace(/^now$/,"");m(Z,function(g){if(!b)if(b=na(a,g.reg)){c=g;var h=pa(b,c.to);if(Date.allowVariant&&c.variant){g=h.month;h.month=h.day;h.day=g}if(h.year){if(!h.modifier_unit)h.modifier_unit="year";if(h.year.length===2)h.year=qa(parseFloat(h.year))}if(h.month){g=parseFloat(h.month);h.month=isNaN(g)?G.indexOf(h.month.to(3)):g-1}if(h.hour==="noon"||h.hour==="midnight"){h.hour=h.hour==="noon"?12:24;if(!d.day&&!h.fuzzy_day)h.fuzzy_day="today"}if(h.fuzzy_day){g=0;var i=h.fuzzy_day;if(i==="yesterday")g=
69
- -1;else if(i==="tomorrow")g=1;else if((i=H.indexOf(i.to(3)))!==-1){f.setWeekday(i);g=0;if(h.modifier_sign&&!h.modifier_unit&&!h.modifier_amount)h.modifier_unit="week"}d.year=f.getFullYear();d.month=f.getMonth();d.day=f.getDate()+g}if(h.millisecond)h.millisecond=Math.round(parseFloat(h.millisecond,10)*1E3);m(s,function(o){o=o.unit;if(h[o]!==undefined)d[o]=parseFloat(h[o])});if(h.meridian)if(h.meridian==="pm"&&h.hour<12)d.hour+=12;if(h.utc||h.offset_hours||h.offset_minutes){e=true;g=0;if(h.offset_hours)g+=
70
- parseFloat(h.offset_hours)*60;if(h.offset_minutes)g+=parseFloat(h.offset_minutes);if(h.offset_sign&&h.offset_sign==="-")g*=-1;d.minute-=g}if(h.modifier_unit&&h.modifier_sign){g=h.modifier_amount||1;i=h.modifier_unit;var l;g=g==="the"||g==="a"?1:(l=Y.indexOf(g))!==-1?l:parseFloat(g);if(h.modifier_sign==="before"||h.modifier_sign==="ago"||h.modifier_sign==="last")g*=-1;else if(h.modifier_sign==="this"||h.modifier_sign==="the")g=0;if(i==="year"&&!c.relative)d.year=f.getFullYear();else if(i==="month"&&
71
- !c.relative)d.month=f.getMonth();else if(i==="week"&&!c.relative){d.day=f.getDate();i="day";g*=7}if(d[i]===undefined)d[i]=0;d[i]+=g}if(h.modifier_edge){l=h.modifier_edge;if(l==="beginning"||l==="first"||l==="first day"){if(h.modifier_unit==="week"){d.month=f.getMonth();d.weekday=0}else if(h.modifier_unit==="month"||h.month)d.day=1;if(!l.match(/day/)){d.hour=0;d.minute=0;d.second=0;d.millisecond=0}}else if(l==="end"||l==="last"||l==="last day"){if(h.modifier_unit==="week"){d.month=f.getMonth();d.weekday=
72
- 6}else if(h.modifier_unit==="month"||h.month)d.day=32-(new Date(f.getFullYear(),d.month,32)).getDate();else if(h.modifier_unit==="year"){d.month=11;d.day=31}if(!l.match(/day/)){d.hour=23;d.minute=59;d.second=59;d.millisecond=999}}}if(h.year_sign&&h.year_sign==="-")d.year*=-1;if(c.today){d.year=f.getFullYear();d.month=f.getMonth();d.day=f.getDate()}}});if(b)if(c.relative)f.advance(d);else e?f.setUTC(d,true):f.set(d,true);else f=a?new Date(a):new Date}return{date:f,set:d,format:c}},O=function(a,b){var c;
73
- if(b)if(a.isValid())if(Date[b])b=Date[b];else{if(typeof b=="function"){c=aa(a);b=b.apply(a,c)||"relative"}}else return"Invalid Date";else throw new TypeError("No date format provided");if(b=="relative"){c=c||aa(a);if(c[2]<1E3){c[0]=1;c[1]="second"}return c[0]+" "+c[1]+" "+(c[3]<0?"ago":"from now")}m(oa,function(d){if(b)b=b.replace(RegExp("\\{("+d.token+")(?: (pad))?\\}",d.caps?"":"i"),function(e,f,g){e=d.format.call(null,a,"");if(d.pad&&(f.length===2||g==="pad"))e=e.pad(d.pad);if(d.weekdays){g=f.toLowerCase();
74
- e=(g=g==="dow"||g==="weekday short")?H[e]:J[e];if(f.first().toUpperCase()===f.first())e=e.capitalize()}if(d.months){g=f.toLowerCase();e=(g=g==="mon"||g==="month short")?G[e]:I[e];if(f.first().toUpperCase()===f.first())e=e.capitalize()}if(d.meridian){if(f.length===1)e=e.to(1);if(f.toUpperCase()===f)e=e.toUpperCase()}return e})});return b},t=function(a,b,c,d,e){var f,g,h=$(b);c=c>0?c:0;if(!h.date.isValid())return false;m(s,function(o){if(h.set[o.unit]!==undefined||h.set[o.unit+"s"]!==undefined){f=o.unit;
75
- g=o.multiplier(h.date,a-h.date)-1}});if(h.format.relative)if(b=h.date["beginningOf"+f.capitalize(f)])b.call(h.date);else{c=c||Math.round(g/2);g=0}g=g||0;b=a.getTime();var i=h.date.getTime(),l=i+g;return d==="after"?e?b-c>i:b>l+c:d==="before"?e?b<l+c:b-c<i:b>=i-c&&b<l+c+1},K=function(a,b,c,d,e){d=d===true?"UTC":"";if(Object.isNumber(b)&&!e){a.setTime(b);return a}else if(Object.isNumber(b)&&e)b={milliseconds:b};if(b.date)b.day=b.date;c&&a.setDate(15);e&&b.month!==undefined&&ra(a,b,e);m(s,function(g){var h=
76
- g.unit;g=g.method;var i=ba(b,h,c);if(i!==undefined){if(e){if(h==="week"){i=(b.day||0)+i*7;g="Date"}i=i*e+n(a,"get","",g)}n(a,"set",d,g,i)}});if(!e){var f=ba(b,"weekday",c);f!==undefined&&n(a,"set",d,"Weekday",f)}return a},ba=function(a,b,c){var d=a[b];if(d===undefined)d=a[b+"s"];if(d===undefined&&c)switch(b){case "day":d=1;break;case "year":case "week":case "weekday":break;default:d=0}return d},n=function(a,b,c,d,e){return a[b+c+d].call(a,e)},qa=function(a){return Math.round((new Date).getFullYear()/
77
- 100)*100-Math.round(a/100)*100+a},sa=function(a){if(/\w+\s+\w+/.test(a))return null;a=G.indexOf(a.toLowerCase().to(3));return a===-1?null:a},ta=function(a){if(/\w+\s+\w+/.test(a))return null;a=H.indexOf(a.toLowerCase().to(3));return a===-1?null:a},ca=function(a,b,c,d){b=N(b);var e={};e[c]=a;return b[d].call(b,e)},aa=function(a){var b,c=a.millisecondsAgo(),d=Math.abs(c),e=d;c=c>=0?-1:1;var f="millisecond";m(s.concat().reverse().slice(1),function(g){b=Math.floor(d/g.multiplier(a,d));if(b>=1){e=b;f=
78
- g.unit}});if(e!=1)f+="s";return[e,f,d,c]},ra=function(a,b,c){var d,e=a.getDate();if(!(e<29)){m(s.slice(2),function(f){if(b[f.unit]!==undefined)d=true});if(!d){c=(new Date(a.getFullYear()+(b.year*c||0),a.getMonth()+b.month*c)).daysInMonth();c<e&&a.setDate(c)}}},N=function(a){a=a.length>=2&&Object.isNumber(a[0])?z(a,"year","month","day","hour","minute","second","millisecond")[0]:a[0];return $(a).date},ua=function(a,b){var c=function(){return Math.round(this*b)},d=function(){return ca(this,arguments,
79
- a,"rewind")},e=function(){return ca(this,arguments,a,"advance")};j(Number.prototype,a,c);j(Number.prototype,a+"s",c);j(Number.prototype,a+"Before",d);j(Number.prototype,a+"sBefore",d);j(Number.prototype,a+"Ago",d);j(Number.prototype,a+"sAgo",d);j(Number.prototype,a+"After",e);j(Number.prototype,a+"sAfter",e);j(Number.prototype,a+"FromNow",e);j(Number.prototype,a+"sFromNow",e)},va=function(){m(s,function(a,b){var c=a.unit,d=c.capitalize(),e=a.multiplier();j(Date.prototype,c+"sSince",function(f){return Math.round((this.getTime()-
80
- Date.create(f).getTime())/e)});j(Date.prototype,c+"sUntil",function(f){return Math.round((Date.create(f).getTime()-this.getTime())/e)});j(Date.prototype,c+"sAgo",Date.prototype[c+"sUntil"]);j(Date.prototype,c+"sFromNow",Date.prototype[c+"sSince"]);j(Date.prototype,"add"+d+"s",function(f){var g={};g[c]=f;return this.advance(g)});ua(c,e);if(b<3){j(Date.prototype,"isLast"+d,function(){return this.is("last "+c)});j(Date.prototype,"isThis"+d,function(){return this.is("this "+c)});j(Date.prototype,"isNext"+
81
- d,function(){return this.is("next "+c)})}if(b<4){j(Date.prototype,"beginningOf"+d,function(f){if(f===undefined||c=="day")f=true;var g={month:0,day:1};switch(c){case "week":g.weekday=0;case "day":g.day=this.getDate();case "month":g.month=this.getMonth()}return this.set(g,f)});j(Date.prototype,"endOf"+d,function(f){if(f===undefined||c=="day")f=true;var g=f?{hours:23,minutes:59,seconds:59,milliseconds:999}:{};g.day=this.getDate();g.month=this.getMonth();switch(c){case "year":g.month=11;g.day=31;break;
82
- case "month":g.day=this.daysInMonth();break;case "week":g.weekday=6}return this.set(g,f)})}})},wa=function(){G=I.map(function(d){return d.to(3)});H=J.map(function(d){return d.to(3)});var a=I.map(function(d){return d.to(3)+"(?:\\.|"+d.from(3)+")?"}).join("|"),b=J.map(function(d){return d.to(3)+"(?:\\.|"+d.from(3)+")?"}).join("|"),c=Y.join("|");m(Z,function(d){var e="^"+d.reg;e=e.replace(/{WEEKDAYS}/,b);e=e.replace(/{MONTHS}/,a);e=e.replace(/{NUMBER}/,c);if(!d.timeIncluded){e+="(?:(?:\\s+|t)(\\d{1,2}):?(\\d{2})?:?(\\d{2})?(\\.\\d{1,6})?(am|pm)?(?:(Z)|(?:([+-])(\\d{2})(?::?(\\d{2}))?)?)?)?$";
83
- d.to=d.to.concat(["hour","minute","second","millisecond","meridian","utc","offset_sign","offset_hours","offset_minutes"])}d.reg=RegExp(e,"i")})},xa=function(){m(["today","yesterday","tomorrow","weekday","weekend","future","past"].concat(J).concat(I),function(a){j(Date.prototype,"is"+a.capitalize(),function(){return this.is(a)})})},ya=function(){var a=new Date(1999,11,31);k(Date,true,!(a.toISOString&&a.ISOString==="1999-12-31T00:00:00.000Z"),{toISOString:function(){return O(this.toUTC(),Date.ISO8601_DATETIME)}});
84
- k(Date,true,false,{iso:Date.prototype.toISOString})};k(Date,false,false,{create:function(){return N(arguments)},now:function(){return(new Date).getTime()}});k(Date,true,false,{set:function(){var a=z(arguments,"year","month","day","hour","minute","second","millisecond");return K(this,a[0],a[1])},setUTC:function(){var a=z(arguments,"year","month","day","hour","minute","second","millisecond");return K(this,a[0],a[1],true)},setWeekday:function(a){a!==undefined&&this.setDate(this.getDate()+a-this.getDay())},
85
- setUTCWeekday:function(a){a!==undefined&&this.setDate(this.getUTCDate()+a-this.getDay())},setWeek:function(a){if(a!==undefined){this.getDate();this.setMonth(0);this.setDate(a*7+1)}},setUTCWeek:function(a){if(a!==undefined){this.getUTCDate();this.setMonth(0);this.setUTCDate(a*7+1)}},getWeek:function(){var a=new Date(this.getFullYear(),0,1);return Math.ceil((this.getTime()-a.getTime()+1)/6048E5)},getUTCWeek:function(){var a=(new Date).setUTC(this.getUTCFullYear(),0,1,0,0,0,0);return Math.ceil((this.getTime()-
86
- a.getTime()+1)/6048E5)},getUTCOffset:function(a){var b=this.utc?0:this.getTimezoneOffset(),c=a===true?":":"";if(!b&&a)return"Z";return Math.round(-b/60).pad(2,true)+c+(b%60).pad(2)},toUTC:function(){if(this.utc)return this;var a=this.clone().addMinutes(this.getTimezoneOffset());a.utc=true;return a},isUTC:function(){return this.utc||this.getTimezoneOffset()===0},advance:function(){var a=z(arguments,"year","month","day","hour","minute","second","millisecond");return K(this,a[0],false,false,1,true)},
87
- rewind:function(){var a=z(arguments,"year","month","day","hour","minute","second","millisecond");return K(this,a[0],false,false,-1)},isValid:function(){return!isNaN(this.getTime())},isAfter:function(a,b){return t(this,a,b,"after")},isBefore:function(a,b){return t(this,a,b,"before")},isBetween:function(a,b,c){return t(this,a,c,"after",true)&&t(this,b,c,"before",true)?true:t(this,b,c,"after",true)&&t(this,a,c,"before",true)},isLeapYear:function(){var a=this.getFullYear();return a%4===0&&a%100!==0||
88
- a%400===0},daysInMonth:function(){return 32-(new Date(this.getFullYear(),this.getMonth(),32)).getDate()},format:function(a){return O(this,a)},relative:function(a){return O(this,a||"relative")},is:function(a,b){var c,d;if(Object.isString(b)){var e=u(s,function(f){return f.unit===b});if(e)b=e.multiplier()}b=b>0?b:0;if(Object.isString(a)){a=a.trim();return a==="future"?this.getTime()>(new Date).getTime():a==="past"?this.getTime()<(new Date).getTime():a==="weekday"?!(this.getDay()===0||this.getDay()===
89
- 6):a==="weekend"?this.getDay()===0||this.getDay()===6:(d=ta(a))?this.getDay()===d:(c=sa(a))?this.getMonth()===c:t(this,a,b)}else{a=Date.create(a);b=b||0;c=this.getTime();d=a.getTime();return c>=d-b&&c<d+1+b}},resetTime:function(){return this.set({hour:0,minute:0,second:0,millisecond:0})},clone:function(){return new Date(this.getTime())}});k(Date,true,false,{getWeekday:Date.prototype.getDay,getUTCWeekday:Date.prototype.getUTCDay});RegExp.NPCGSupport=/()??/.exec("")[1]===undefined;k(RegExp,false,false,
90
- {escape:function(a){return a.replace(/([/'*+?|()\[\]{}.^$])/g,"\\$1")}});k(RegExp,true,false,{setFlags:function(a){return RegExp(this.source,a)},addFlag:function(a){var b="";if(this.global||a=="g")b+="g";if(this.ignoreCase||a=="i")b+="i";if(this.multiline||a=="m")b+="m";if(this.sticky||a=="y")b+="y";return this.setFlags(b)},removeFlag:function(a){var b="";if(this.global&&a!="g")b+="g";if(this.ignoreCase&&a!="i")b+="i";if(this.multiline&&a!="m")b+="m";if(this.sticky&&a!="y")b+="y";return this.setFlags(b)}});
91
- var P=function(a,b,c){if(!a.timers)a.timers=[];a.timers.push(setTimeout(c,b))};k(Function,true,false,{lazy:function(a){var b=this;if(a===undefined)a=0;var c=0,d=function(){var e=this,f=arguments;P(d,Math.round(++c*a),function(){return b.apply(e,f)})};return d},delay:function(a){var b=this;Object.isNumber(a)||(a=0);var c=Array.prototype.slice.call(arguments,1);P(b,a,function(){return b.apply(b,c)});return b},debounce:function(a){var b=this;return function(){var c=this,d=arguments;b.cancel();P(b,a,
92
- function(){b.apply(c,d)})}},cancel:function(){if(Object.isArray(this.timers)){m(this.timers,clearTimeout);this.timers=[]}return this},after:function(a){var b=this,c=0;Object.isNumber(a)||(a=1);return function(){c++;if(c==a){c=0;return b.apply(this,arguments)}}},once:function(){var a=this;return function(){return a.hasOwnProperty("memo")?a.memo:a.memo=a.apply(this,arguments)}}});k(Object,false,false,{isArray:Array.isArray});(function(){var a={};T.slice(1).forEach(function(b){a["is"+b]=function(c){return L(c,
93
- b)}});k(Object,false,false,a)})();(function(){U.forEach(function(a){j(y.prototype,a,function(){return Object[a].apply(null,[this].concat(Array.prototype.slice.call(arguments)))})})})();(function(){var a;ia.each(function(b){b.start.upto(b.end,function(c){q(b.type,c.chr(),(c+b.shift).chr())})});"\u30a2\u30a4\u30a6\u30a8\u30aa\u30a1\u30a3\u30a5\u30a7\u30a9\u30ab\u30ad\u30af\u30b1\u30b3\u30b5\u30b7\u30b9\u30bb\u30bd\u30bf\u30c1\u30c4\u30c3\u30c6\u30c8\u30ca\u30cb\u30cc\u30cd\u30ce\u30cf\u30d2\u30d5\u30d8\u30db\u30de\u30df\u30e0\u30e1\u30e2\u30e4\u30e3\u30e6\u30e5\u30e8\u30e7\u30e9\u30ea\u30eb\u30ec\u30ed\u30ef\u30f2\u30f3\u30fc\u30fb".each(function(b,
94
- c){a="\uff71\uff72\uff73\uff74\uff75\uff67\uff68\uff69\uff6a\uff6b\uff76\uff77\uff78\uff79\uff7a\uff7b\uff7c\uff7d\uff7e\uff7f\uff80\uff81\uff82\uff6f\uff83\uff84\uff85\uff86\uff87\uff88\uff89\uff8a\uff8b\uff8c\uff8d\uff8e\uff8f\uff90\uff91\uff92\uff93\uff94\uff6c\uff95\uff6d\uff96\uff6e\uff97\uff98\uff99\uff9a\uff9b\uff9c\uff66\uff9d\uff70\uff65".charAt(c);q("k",a,b);la.test(b)&&q("k",a+"\uff9e",b.shift(1));ma.test(b)&&q("k",a+"\uff9f",b.shift(2))});"\u3002\u3001\u300c\u300d\uffe5\uffe0\uffe1".each(function(b,
95
- c){q("p","\uff61\uff64\uff62\uff63\u00a5\u00a2\u00a3".charAt(c),b)});q("k","\uff73\uff9e","\u30f4");q("k","\uff66\uff9e","\u30fa");q("s"," ","\u3000")})();(function(){ha.each(function(a){var b=RegExp("^["+a.source+"\\s]+$"),c=RegExp("["+a.source+"]");a.names.each(function(d){j(String.prototype,"is"+d,function(){return b.test(this.trim())});j(String.prototype,"has"+d,function(){return c.test(this)})})})})();(function(){if(typeof btoa==="undefined")btoa=function(a){var b="",c,d,e="",f,g,h="",i=0;do{c=
96
- a.charCodeAt(i++);d=a.charCodeAt(i++);e=a.charCodeAt(i++);f=c>>2;c=(c&3)<<4|d>>4;g=(d&15)<<2|e>>6;h=e&63;if(isNaN(d))g=h=64;else if(isNaN(e))h=64;b=b+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(f)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(c)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(g)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h)}while(i<a.length);return b}})();(function(){if(typeof atob===
97
- "undefined")atob=function(a){var b="",c,d,e="",f,g="",h=0;if(/[^A-Za-z0-9\+\/\=]/g.test(a))throw Error("String contains invalid base64 characters");a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");do{c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(h++));d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(h++));f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(h++));g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(h++));
98
- c=c<<2|d>>4;d=(d&15)<<4|f>>2;e=(f&3)<<6|g;b+=c.chr();if(f!=64)b+=d.chr();if(g!=64)b+=e.chr()}while(h<a.length);return unescape(b)}})();(function(){var a=/^\s+$/.test("\t\n\u000b\u000c\r \u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u2028\u2029\u3000\ufeff");try{String.prototype.trim.call([1])}catch(b){a=false}var c=RegExp("^[\t\n\u000b\u000c\r \u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u2028\u2029\u3000\ufeff]+"),
99
- d=RegExp("[\t\n\u000b\u000c\r \u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u2028\u2029\u3000\ufeff]+$");k(String,true,!a,{trim:function(){return this.toString().trimLeft().trimRight()},trimLeft:function(){return this.replace(c,"")},trimRight:function(){return this.replace(d,"")}})})();(function(){va();wa();xa();ya();var a=new Date(1999,11,31);k(Date,true,!(a.toJSON&&a.toJSON==="1999-12-31T00:00:00.000Z"),{toJSON:Date.prototype.toISOString});Date.DSTOffset=
100
- ((new Date(2E3,6,1)).getTimezoneOffset()-(new Date(2E3,0,1)).getTimezoneOffset())*60*1E3;Date.INTERNATIONAL_TIME="{h}:{mm}:{ss}";Date.RFC1123="{Dow}, {dd} {Mon} {yyyy} {hh}:{mm}:{ss} GMT{tz}";Date.RFC1036="{Weekday}, {dd}-{Mon}-{yy} {hh}:{mm}:{ss} GMT{tz}";Date.ISO8601_DATE="{yyyy}-{MM}-{dd}";Date.ISO8601_DATETIME="{yyyy}-{MM}-{dd}T{hh}:{mm}:{ss}.{ms}{isotz}";Date.ISO8601=Date.ISO8601_DATETIME})();(function(){var a=false;if(Function.prototype.bind){a=function(){};var b=a.bind();a=new b instanceof
101
- b&&!(new a instanceof b)}k(Function,true,!a,{bind:function(c){var d=this,e=Array.prototype.slice.call(arguments,1),f,g;if(!Object.isFunction(this))throw new TypeError("Function.prototype.bind called on a non-function");g=function(){return d.apply(d.prototype&&this instanceof d?this:c,e.concat(Array.prototype.slice.call(arguments)))};f=function(){};f.prototype=this.prototype;g.prototype=new f;return g}})})()})();
55
+ a)},lines:function(a){return this.trim().each(/^.*$/gm,a)},paragraphs:function(a){var b=this.trim().split(/[\r\n]{2,}/);return b=b.map(function(c){if(a)var d=a.call(c);return d?d:c})},startsWith:function(a,b){if(b===undefined)b=true;var c=Object.isRegExp(a)?a.source.replace("^",""):RegExp.escape(a);return RegExp("^"+c,b?"":"i").test(this)},endsWith:function(a,b){if(b===undefined)b=true;var c=Object.isRegExp(a)?a.source.replace("$",""):RegExp.escape(a);return RegExp(c+"$",b?"":"i").test(this)},isBlank:function(){return this.trim().length===
56
+ 0},has:function(a){return this.search(a)!==-1},add:function(a,b){return this.split("").add(a,b).join("")},remove:function(a){return this.replace(a,"")},hankaku:function(){return aa(this,arguments,Ca,ca)},zenkaku:function(){return aa(this,arguments,Ba,ba)},hiragana:function(a){var b=this;if(a!==false)b=b.zenkaku("k");return b.replace(/[\u30A1-\u30F6]/g,function(c){return c.shift(-96)})},katakana:function(){return this.replace(/[\u3041-\u3096]/g,function(a){return a.shift(96)})},toNumber:function(a){var b=
57
+ this.replace(/,/g,"");return b.match(/\./)?parseFloat(b):parseInt(b,a||10)},reverse:function(){return this.split("").reverse().join("")},compact:function(){return this.replace(/[\r\n]/g,"").trim().replace(/([\s\u3000])+/g,"$1")},at:function(){return W(this,arguments,true)},first:function(a){a=a===undefined?1:a;return this.substr(0,a)},last:function(a){a=a===undefined?1:a;return this.substr(this.length-a<0?0:this.length-a)},from:function(a){return this.slice(a)},to:function(a){if(a===undefined)a=this.length;
58
+ return this.slice(0,a)},toDate:function(a){return L([this.toString(),a])},dasherize:function(){return this.underscore().replace(/_/g,"-")},underscore:function(){return this.replace(/([a-z])([A-Z])/g,"$1_$2").replace(/[-\s]/g,"_").toLowerCase()},camelize:function(a){for(var b=this.dasherize().split("-"),c="",d=0;d<b.length;d++)c+=a===false&&d===0?b[d].toLowerCase():b[d].substr(0,1).toUpperCase()+b[d].substr(1).toLowerCase();return c},spacify:function(){return this.underscore().replace(/_/g," ")},stripTags:function(){var a=
59
+ this;s(arguments.length>0?arguments:[""],function(b){a=a.replace(RegExp("</?"+b.escapeRegExp()+"[^<>]*>","gi"),"")});return a},removeTags:function(){var a=this;s(arguments.length>0?arguments:["\\S+"],function(b){a=a.replace(RegExp("<("+b+")[^<>]*(?:\\/>|>.*?<\\/\\1>)","gi"),"")});return a},truncate:function(a,b,c){var d;b=b===undefined?"...":String(b);a-=b.length;if(this.length<=a)return this.toString();d=/^(.)\1+$/.test(b)?b.slice(0,1):"";for(d=RegExp("[^"+F()+d+"]["+F()+d+"]");a>0&&!d.test(this.slice(a-
60
+ 1,a+1))&&c!==true;)a--;return this.slice(0,a)+(a>0?b:"")},assign:function(){var a=Object.extended();s(arguments,function(b,c){if(Object.isObject(b))a.merge(b);else a[c+1]=b});return this.replace(/\{(.+?)\}/g,function(b,c){return a[c]||b})}});m(String,true,function(a){return!Object.isRegExp(a)},{split:function(a,b){var c=[],d=0,e=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.sticky?"y":"");a=a.addFlag("g");var g,h,f;RegExp.NPCGSupport||(g=RegExp("^"+a.source+"$(?!\\s)",e));if(b===undefined||+b<0)b=
61
+ Infinity;else{b=(+b).floor();if(!b)return[]}for(;h=a.exec(this);){e=h.index+h[0].length;if(e>d){c.push(this.slice(d,h.index));!RegExp.NPCGSupport&&h.length>1&&h[0].replace(g,function(){for(var i=1;i<arguments.length-2;i++)if(arguments[i]===undefined)h[i]=undefined});h.length>1&&h.index<this.length&&Array.prototype.push.apply(c,h.slice(1));f=h[0].length;d=e;if(c.length>=b)break}a.lastIndex===h.index&&a.lastIndex++}if(d===this.length){if(f||!a.test(""))c.push("")}else c.push(this.slice(d));return c.length>
62
+ b?c.slice(0,b):c}});m(String,true,false,{insert:String.prototype.add});var Q=["hour","minute","second","millisecond","meridian","utc","offset_sign","offset_hours","offset_minutes"],R="(\\d{1,2}):?(\\d{2})?:?(\\d{2})?(?:\\.(\\d{1,6}))?(am|pm)?(?:(Z)|(?:([+-])(\\d{2})(?::?(\\d{2}))?)?)?",ea="\\s*(?:(?:t|at |\\s+)"+R+")?",ka=[],ia,N,Fa=[{src:"(\\d{4})",to:["year"]},{src:"([+-])?(\\d{4})[-.]?({month})[-.]?(\\d{1,2})?",to:["year_sign","year","month","date"]},{src:"(\\d{1,2})[-.\\/]({month})[-.\\/]?(\\d{2,4})?",
63
+ to:["month","date","year"],variant:true}],wa=[{token:"millisec(?:onds?)?|ms(?:ms)?",pad:3,format:function(a,b){return q(a,"get",b,"Milliseconds")}},{token:"s(?:s|ec(?:onds?)?)?",pad:2,format:function(a,b){return q(a,"get",b,"Seconds")}},{token:"m(?:m|in(?:utes?)?)?",pad:2,caps:true,format:function(a,b){return q(a,"get",b,"Minutes")}},{token:"h(?:h|(?:ours?))?|24hr",pad:2,format:function(a,b){return q(a,"get",b,"Hours")}},{token:"12hr",pad:2,format:function(a,b){var c=q(a,"get",b,"Hours");return c===
64
+ 0?12:c-(c/13).floor()*12}},{token:"d(?:d|ate|ays?)?",pad:2,format:function(a,b){return q(a,"get",b,"Date")}},{token:"dow|weekday",weekdays:true,format:function(a,b){return q(a,"get",b,"Day")}},{token:"MM?",pad:2,caps:true,format:function(a,b){return q(a,"get",b,"Month")+1}},{token:"mon(?:th)?",months:true,format:function(a,b){return q(a,"get",b,"Month")}},{token:"yy",format:function(a,b){return q(a,"get",b,"FullYear").toString().from(2)}},{token:"yyyy|year",format:function(a,b){return q(a,"get",b,
65
+ "FullYear")}},{token:"t{1,2}",meridian:true,format:function(a,b){return q(a,"get",b,"Hours")<12?"am":"pm"}},{token:"tz|timezone",format:function(a){return a.getUTCOffset()}},{token:"iso(tz|timezone)",format:function(a){return a.getUTCOffset(true)}},{token:"ord",format:function(a,b){return q(a,"get",b,"Date").ordinalize()}}],E=[{unit:"year",method:"FullYear",multiplier:function(a){return(365+(a?a.isLeapYear()?1:0:0.25))*24*60*60*1E3}},{unit:"month",method:"Month",multiplier:function(a,b){var c=30.4375,
66
+ d;if(a){d=a.daysInMonth();if(b<=d.days())c=d}return c*24*60*60*1E3}},{unit:"week",method:"Week",multiplier:function(){return 6048E5}},{unit:"day",method:"Date",multiplier:function(){return 864E5}},{unit:"hour",method:"Hours",multiplier:function(){return 36E5}},{unit:"minute",method:"Minutes",multiplier:function(){return 6E4}},{unit:"second",method:"Seconds",multiplier:function(){return 1E3}},{unit:"millisecond",method:"Milliseconds",multiplier:function(){return 1}}],S={},ha={en:"2;;January,February,March,April,May,June,July,August,September,October,November,December;Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday;millisecond:|s,second:|s,minute:|s,hour:|s,day:|s,week:|s,month:|s,year:|s;one,two,three,four,five,six,seven,eight,nine,ten;a,an,the;the,st|nd|rd|th,of;{num} {unit} {sign},{num} {unit4} {sign} {day},{weekday?} {month} {date}{2} {year?} {time?},{date} {month} {year},{month} {year},{shift?} {weekday} {time?},{shift} week {weekday} {time?},{shift} {unit=5-7},{1} {edge} of {shift?} {unit=4-7?}{month?}{year?},{weekday} {3} {shift} week,{1} {date}{2} of {month},{1}{month?} {date?}{2} of {shift} {unit=6-7},{day} at {time?},{time} {day};{Month} {d}, {yyyy};,yesterday,today,tomorrow;,ago|before,,from now|after|from;,last,the|this,next;last day,end,,first day|beginning",
67
+ ja:"1;\u6708;;\u65e5\u66dc\u65e5,\u6708\u66dc\u65e5,\u706b\u66dc\u65e5,\u6c34\u66dc\u65e5,\u6728\u66dc\u65e5,\u91d1\u66dc\u65e5,\u571f\u66dc\u65e5;\u30df\u30ea\u79d2,\u79d2,\u5206,\u6642\u9593,\u65e5,\u9031\u9593|\u9031,\u30f6\u6708|\u30f5\u6708|\u6708,\u5e74;\u4e00,\u4e8c,\u4e09,\u56db,\u4e94,\u516d,\u4e03,\u516b,\u4e5d,\u5341;;;{num}{unit}{sign},{shift}{unit=5-7}{weekday?},{year}\u5e74{month?}\u6708?{date?}\u65e5?,{month}\u6708{date?}\u65e5?,{date}\u65e5;{yyyy}\u5e74{M}\u6708{d}\u65e5;\u4e00\u6628\u65e5,\u6628\u65e5,\u4eca\u65e5,\u660e\u65e5,\u660e\u5f8c\u65e5;,\u524d,,\u5f8c;,\u53bb|\u5148,,\u6765",
68
+ ko:"1;\uc6d4;;\uc77c\uc694\uc77c,\uc6d4\uc694\uc77c,\ud654\uc694\uc77c,\uc218\uc694\uc77c,\ubaa9\uc694\uc77c,\uae08\uc694\uc77c,\ud1a0\uc694\uc77c;\ubc00\ub9ac\ucd08,\ucd08,\ubd84,\uc2dc\uac04,\uc77c,\uc8fc,\uac1c\uc6d4|\ub2ec,\ub144;\uc77c|\ud55c,\uc774,\uc0bc,\uc0ac,\uc624,\uc721,\uce60,\ud314,\uad6c,\uc2ed;;;{num}{unit} {sign},{shift} {unit=5-7},{shift} {unit=5?} {weekday},{year}\ub144{month?}\uc6d4?{date?}\uc77c?,{month}\uc6d4{date?}\uc77c?,{date}\uc77c;{yyyy}\ub144{M}\uc6d4{d}\uc77c;\uadf8\uc800\uaed8,\uc5b4\uc81c,\uc624\ub298,\ub0b4\uc77c,\ubaa8\ub808;,\uc804,,\ud6c4;,\uc9c0\ub09c|\uc791,\uc774\ubc88,\ub2e4\uc74c|\ub0b4",
69
+ ru:"4;;\u042f\u043d\u0432\u0430\u0440:\u044f|\u044c,\u0424\u0435\u0432\u0440\u0430\u043b:\u044f|\u044c,\u041c\u0430\u0440\u0442:\u0430|,\u0410\u043f\u0440\u0435\u043b:\u044f|\u044c,\u041c\u0430:\u044f|\u0439,\u0418\u044e\u043d:\u044f|\u044c,\u0418\u044e\u043b:\u044f|\u044c,\u0410\u0432\u0433\u0443\u0441\u0442:\u0430|,\u0421\u0435\u043d\u0442\u044f\u0431\u0440:\u044f|\u044c,\u041e\u043a\u0442\u044f\u0431\u0440:\u044f|\u044c,\u041d\u043e\u044f\u0431\u0440:\u044f|\u044c,\u0414\u0435\u043a\u0430\u0431\u0440:\u044f|\u044c;\u0412\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435,\u041f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a,\u0412\u0442\u043e\u0440\u043d\u0438\u043a,\u0421\u0440\u0435\u0434\u0430,\u0427\u0435\u0442\u0432\u0435\u0440\u0433,\u041f\u044f\u0442\u043d\u0438\u0446\u0430,\u0421\u0443\u0431\u0431\u043e\u0442\u0430;\u043c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434:\u0430|\u0443|\u044b|,\u0441\u0435\u043a\u0443\u043d\u0434:\u0430|\u0443|\u044b|,\u043c\u0438\u043d\u0443\u0442:\u0430|\u0443|\u044b|,\u0447\u0430\u0441:||\u0430|\u043e\u0432,\u0434\u0435\u043d\u044c|\u0434\u0435\u043d\u044c|\u0434\u043d\u044f|\u0434\u043d\u0435\u0439,\u043d\u0435\u0434\u0435\u043b:\u044f|\u044e|\u0438|\u044c|\u0435,\u043c\u0435\u0441\u044f\u0446:||\u0430|\u0435\u0432|\u0435,\u0433\u043e\u0434|\u0433\u043e\u0434|\u0433\u043e\u0434\u0430|\u043b\u0435\u0442|\u0433\u043e\u0434\u0443;\u043e\u0434:\u0438\u043d|\u043d\u0443,\u0434\u0432:\u0430|\u0435,\u0442\u0440\u0438,\u0447\u0435\u0442\u044b\u0440\u0435,\u043f\u044f\u0442\u044c,\u0448\u0435\u0441\u0442\u044c,\u0441\u0435\u043c\u044c,\u0432\u043e\u0441\u0435\u043c\u044c,\u0434\u0435\u0432\u044f\u0442\u044c,\u0434\u0435\u0441\u044f\u0442\u044c;;\u0432|\u043d\u0430,\u0433\u043e\u0434\u0430;{num} {unit} {sign},{sign} {num} {unit},{date} {month} {year?} {2},{month} {year},{1} {shift} {unit=5-7};{d} {month} {yyyy} \u0433\u043e\u0434\u0430;\u043f\u043e\u0437\u0430\u0432\u0447\u0435\u0440\u0430,\u0432\u0447\u0435\u0440\u0430,\u0441\u0435\u0433\u043e\u0434\u043d\u044f,\u0437\u0430\u0432\u0442\u0440\u0430,\u043f\u043e\u0441\u043b\u0435\u0437\u0430\u0432\u0442\u0440\u0430;,\u043d\u0430\u0437\u0430\u0434,,\u0447\u0435\u0440\u0435\u0437;,\u043f\u0440\u043e\u0448\u043b\u043e:\u0439|\u043c,,\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435:\u0439|\u043c",
70
+ es:"6;;enero,febrero,marzo,abril,mayo,junio,julio,agosto,septiembre,octubre,noviembre,diciembre;domingo,lunes,martes,mi\u00e9rcoles|miercoles,jueves,viernes,s\u00e1bado|sabado;milisegundo:|s,segundo:|s,minuto:|s,hora:|s,d\u00eda|d\u00edas|dia|dias,semana:|s,mes:|es,a\u00f1o|a\u00f1os|ano|anos;uno,dos,tres,cuatro,cinco,seis,siete,ocho,nueve,diez;;el,de;{sign} {num} {unit},{num} {unit} {sign},{date?} {2} {month} {2} {year?},{1} {unit=5-7} {shift},{1} {shift} {unit=5-7};{d} de {month} de {yyyy};anteayer,ayer,hoy,ma\u00f1ana|manana;,hace,,de ahora;,pasad:o|a,,pr\u00f3ximo|pr\u00f3xima|proximo|proxima",
71
+ pt:"6;;janeiro,fevereiro,mar\u00e7o,abril,maio,junho,julho,agosto,setembro,outubro,novembro,dezembro;domingo,segunda-feira,ter\u00e7a-feira,quarta-feira,quinta-feira,sexta-feira,s\u00e1bado|sabado;milisegundo:|s,segundo:|s,minuto:|s,hora:|s,dia:|s,semana:|s,m\u00eas|m\u00eases|mes|meses,ano:|s;um,dois,tr\u00eas|tres,quatro,cinco,seis,sete,oito,nove,dez,uma,duas;;a,de;{num} {unit} {sign},{sign} {num} {unit},{date?} {2} {month} {2} {year?},{1} {unit=5-7} {shift},{1} {shift} {unit=5-7};{d} de {month} de {yyyy};anteontem,ontem,hoje,amanh:\u00e3|a;,atr\u00e1s|atras|h\u00e1|ha,,daqui a;,passad:o|a,,pr\u00f3ximo|pr\u00f3xima|proximo|proxima",
72
+ fr:"2;;janvier,f\u00e9vrier|fevrier,mars,avril,mai,juin,juillet,ao\u00fbt,septembre,octobre,novembre;dimanche,lundi,mardi,mercredi,jeudi,vendredi,samedi;milliseconde:|s,seconde:|s,minute:|s,heure:|s,jour:|s,semaine:|s,mois,an:|s|n\u00e9e|nee;un:|e,deux,trois,quatre,cinq,six,sept,huit,neuf,dix;;l'|la|le;{sign} {num} {unit},{sign} {num} {unit},{1} {date?} {month} {year?},{1} {unit=5-7} {shift};{d} {month} {yyyy};,hier,aujourd'hui,demain;,il y a,,dans|d'ici;,derni:er|\u00e8re|ere,,prochain:|e",it:"2;;Gennaio,Febbraio,Marzo,Aprile,Maggio,Giugno,Luglio,Agosto,Settembre,Ottobre,Novembre,Dicembre;Domenica,Luned:\u00ec|i,Marted:\u00ec|i,Mercoled:\u00ec|i,Gioved:\u00ec|i,Venerd:\u00ec|i,Sabato;millisecond:o|i,second:o|i,minut:o|i,or:a|e,giorn:o|i,settiman:a|e,mes:e|i,ann:o|i;un:|'|a|o,due,tre,quattro,cinque,sei,sette,otto,nove,dieci;;l'|la|il;{num} {unit} {sign},{weekday?} {date?} {month} {year?},{1} {unit=5-7} {shift},{1} {shift} {unit=5-7};{d} {month} {yyyy};,ieri,oggi,domani,dopodomani;,fa,,da adesso;,scors:o|a,,prossim:o|a",
73
+ de:"2;;Januar,Februar,M\u00e4rz|Marz,April,Mai,Juni,Juli,August,September,November,Dezember;Sonntag,Montag,Dienstag,Mittwoch,Donnerstag,Freitag,Samstag;Millisekunde:|n,Sekunde:|n,Minute:|n,Stunde:|n,Tag:|en,Woche:|n,Monat:|en,Jahr:|en;ein:|e|er|em|en,zwei,drei,vier,fuenf,sechs,sieben,acht,neun,zehn;;der;{sign} {num} {unit},{num} {unit} {sign},{num} {unit} {sign},{sign} {num} {unit},{weekday?} {date?} {month} {year?},{shift} {unit=5-7};{d}. {Month} {yyyy};vorgestern,gestern,heute,morgen,\u00fcbermorgen|ubermorgen|uebermorgen;,vor:|her,,in;,letzte:|r|n|s,,n\u00e4chste:|r|n|s+naechste:|r|n|s",
74
+ "zh-TW":"1;\u6708;;\u65e5,\u4e00,\u4e8c,\u4e09,\u56db,\u4e94,\u516d;\u6beb\u79d2,\u79d2\u9418,\u5206\u9418,\u5c0f\u6642,\u5929,\u500b\u661f\u671f|\u9031,\u500b\u6708,\u5e74;\u4e00,\u4e8c,\u4e09,\u56db,\u4e94,\u516d,\u4e03,\u516b,\u4e5d,\u5341;;;{num}{unit}{sign},\u661f\u671f{weekday},{shift}{unit=5-7},{shift}{unit=5}{weekday},{year}\u5e74{month?}\u6708?{date?}\u65e5?,{month}\u6708{date?}\u65e5?,{date}\u65e5;{yyyy}\u5e74{M}\u6708{d}\u65e5;\u524d\u5929,\u6628\u5929,\u4eca\u5929,\u660e\u5929,\u5f8c\u5929;,\u524d,,\u5f8c;,\u4e0a|\u53bb,\u9019,\u4e0b|\u660e",
75
+ "zh-CN":"1;\u6708;;\u65e5,\u4e00,\u4e8c,\u4e09,\u56db,\u4e94,\u516d;\u6beb\u79d2,\u79d2\u949f,\u5206\u949f,\u5c0f\u65f6,\u5929,\u4e2a\u661f\u671f|\u5468,\u4e2a\u6708,\u5e74;\u4e00,\u4e8c,\u4e09,\u56db,\u4e94,\u516d,\u4e03,\u516b,\u4e5d,\u5341;;;{num}{unit}{sign},\u661f\u671f{weekday},{shift}{unit=5-7},{shift}{unit=5}{weekday},{year}\u5e74{month?}\u6708?{date?}\u65e5?,{month}\u6708{date?}\u65e5?,{date}\u65e5;{yyyy}\u5e74{M}\u6708{d}\u65e5;\u524d\u5929,\u6628\u5929,\u4eca\u5929,\u660e\u5929,\u540e\u5929;,\u524d,,\u540e;,\u4e0a|\u53bb,\u8fd9,\u4e0b|\u660e"};
76
+ m(ga,true,false,{getMonth:function(a){return Object.isNumber(a)?a-1:v(this.months,RegExp(a,"i"),0,false,true)%12},getWeekday:function(a){return v(this.weekdays,RegExp(a,"i"),0,false,true)%7},getNumber:function(a){var b;return Object.isNumber(a)?a:a&&(b=this.numbers.indexOf(a))!==-1?(b+1)%10:1},getNumericDate:function(a){var b=this;return a.replace(this.numbers[9],"").each(function(c){return b.getNumber(c)}).join("")},getEnglishUnit:function(a){return English.units[this.units.indexOf(a)%8]},relative:function(a,
77
+ b,c){var d,e;d=c>0?this.futureFormat:this.pastFormat;if(this.code=="ru"){e=a.toString().from(-1);switch(true){case e==1:e=1;break;case e>=2&&e<=4:e=2;break;default:e=3}}else e=this.hasPlural&&a>1?1:0;e=this.units[e*8+b]||this.units[b];if(this.capitalizeUnit)e=e.capitalize();b=v(this.modifiers,function(g){return g.name=="sign"&&g.value==(c>0?1:-1)});return d.assign({num:a,unit:e,sign:b.text})}});m(Date,false,false,{create:function(){return L(arguments)},now:function(){return(new Date).getTime()},setLocale:function(a,
78
+ b){var c=C(a,false,b);if(c){Date.currentLocale=a;da(c);return c}},getLocale:function(a){return C(a,true)},addFormat:function(a,b,c,d){ka.push({variant:d,locale:c,reg:RegExp("^"+a+"$","i"),to:b})}});m(Date,true,false,{set:function(){var a=D(arguments);return O(this,a[0],a[1])},setUTC:function(){var a=D(arguments);return O(this,a[0],a[1],true)},setWeekday:function(a){a!==undefined&&this.setDate(this.getDate()+a-this.getDay())},setUTCWeekday:function(a){a!==undefined&&this.setDate(this.getUTCDate()+
79
+ a-this.getDay())},setWeek:function(a){if(a!==undefined){this.getDate();this.setMonth(0);this.setDate(a*7+1)}},setUTCWeek:function(a){if(a!==undefined){this.getUTCDate();this.setMonth(0);this.setUTCDate(a*7+1)}},getWeek:function(){var a=new Date(this.getFullYear(),0,1);return((this.getTime()-a.getTime()+1)/6048E5).ceil()},getUTCWeek:function(){var a=(new Date).setUTC(this.getUTCFullYear(),0,1,0,0,0,0);return((this.getTime()-a.getTime()+1)/6048E5).ceil()},getUTCOffset:function(a){var b=this.utc?0:this.getTimezoneOffset(),
80
+ c=a===true?":":"";if(!b&&a)return"Z";return r(-b/60).pad(2,true)+c+(b%60).pad(2)},toUTC:function(){if(this.utc)return this;var a=this.clone().addMinutes(this.getTimezoneOffset());a.utc=true;return a},isUTC:function(){return this.utc||this.getTimezoneOffset()===0},advance:function(){var a=D(arguments);return O(this,a[0],false,false,1,true)},rewind:function(){var a=D(arguments);return O(this,a[0],false,false,-1)},isValid:function(){return!isNaN(this.getTime())},isAfter:function(a,b){return this.getTime()>
81
+ Date.create(a).getTime()-(b||0)},isBefore:function(a,b){return this.getTime()<Date.create(a).getTime()+(b||0)},isBetween:function(a,b,c){var d=this.getTime();a=Date.create(a).getTime();var e=Date.create(b).getTime();b=Math.min(a,e);a=Math.max(a,e);c=c||0;return b-c<d&&a+c>d},isLeapYear:function(){var a=this.getFullYear();return a%4===0&&a%100!==0||a%400===0},daysInMonth:function(){return 32-(new Date(this.getFullYear(),this.getMonth(),32)).getDate()},format:function(a,b){return T(this,a,false,b)},
82
+ relative:function(a,b){if(Object.isString(a)){b=a;a=null}return T(this,a,true,b)},is:function(a,b){var c;if(Object.isString(a)){a=a.trim().toLowerCase();switch(true){case a==="future":return this.getTime()>(new Date).getTime();case a==="past":return this.getTime()<(new Date).getTime();case a==="weekday":return this.getDay()>0&&this.getDay()<6;case a==="weekend":return this.getDay()===0||this.getDay()===6;case (c=English.weekdays.indexOf(a)%7)>-1:return this.getDay()===c;case (c=English.months.indexOf(a)%
83
+ 12)>-1:return this.getMonth()===c}}return xa(this,a,b)},resetTime:function(){return this.set({hour:0,minute:0,second:0,millisecond:0})},clone:function(){return new Date(this.getTime())}});m(Date,true,false,{getWeekday:Date.prototype.getDay,getUTCWeekday:Date.prototype.getUTCDay});RegExp.NPCGSupport=/()??/.exec("")[1]===undefined;m(RegExp,false,false,{escape:function(a){return a.replace(/([/'*+?|()\[\]{}.^$])/g,"\\$1")}});m(RegExp,true,false,{setFlags:function(a){return RegExp(this.source,a)},addFlag:function(a){var b=
84
+ "";if(this.global||a=="g")b+="g";if(this.ignoreCase||a=="i")b+="i";if(this.multiline||a=="m")b+="m";if(this.sticky||a=="y")b+="y";return this.setFlags(b)},removeFlag:function(a){var b="";if(this.global&&a!="g")b+="g";if(this.ignoreCase&&a!="i")b+="i";if(this.multiline&&a!="m")b+="m";if(this.sticky&&a!="y")b+="y";return this.setFlags(b)}});m(Function,true,false,{lazy:function(a,b){function c(){c.timers&&c.timers.length>=b||U(c,r(++e*a),d,this,arguments)}var d=this;if(a===undefined)a=0;if(b===undefined)b=
85
+ Infinity;var e=0;return c},delay:function(a){Object.isNumber(a)||(a=0);var b=Array.prototype.slice.call(arguments,1);U(this,a,this,this,b);return this},debounce:function(a,b){var c=this,d,e,g;if(b===undefined)b=true;if(b){d=function(){c.cancel()};e=c}else{d=c;e=function(){g=false}}return function(){if(!g){d.apply(this,arguments);U(c,a,e,this,arguments);g=!b}}},cancel:function(){if(Object.isArray(this.timers)){k(this.timers,function(a){clearTimeout(a)});this.timers=[]}return this},after:function(a){var b=
86
+ this,c=0;Object.isNumber(a)||(a=1);return function(){c++;if(c==a){c=0;return b.apply(this,arguments)}}},once:function(){var a=this;return function(){return a.hasOwnProperty("memo")?a.memo:a.memo=a.apply(this,arguments)}}});m(Object,false,false,{isArray:Array.isArray});(function(){var a={};Y.slice(1).forEach(function(b){a["is"+b]=function(c){return P(c,b)}});m(Object,false,false,a)})();(function(){Z.forEach(function(a){l(B.prototype,a,function(){return Object[a].apply(null,[this].concat(Array.prototype.slice.call(arguments)))})})})();
87
+ (function(){m(Object,false,true,{watch:function(a,b,c){if(V){var d=a[b];Object.defineProperty(a,b,{get:function(){return d},set:function(e){d=c.call(a,b,d,e)},enumerable:true,configurable:true})}}})})();(function(a){if(typeof btoa==="undefined"){btoa=function(b){var c="",d,e,g,h,f,i,j=0;do{d=b.charCodeAt(j++);e=b.charCodeAt(j++);g=b.charCodeAt(j++);h=d>>2;d=(d&3)<<4|e>>4;f=(e&15)<<2|g>>6;i=g&63;if(isNaN(e))f=i=64;else if(isNaN(g))i=64;c=c+a.charAt(h)+a.charAt(d)+a.charAt(f)+a.charAt(i)}while(j<b.length);
88
+ return c};atob=function(b){var c="",d,e,g,h,f,i=0;if(/[^A-Za-z0-9\+\/\=]/g.test(b))throw Error("String contains invalid base64 characters");b=b.replace(/[^A-Za-z0-9\+\/\=]/g,"");do{d=a.indexOf(b.charAt(i++));e=a.indexOf(b.charAt(i++));h=a.indexOf(b.charAt(i++));f=a.indexOf(b.charAt(i++));d=d<<2|e>>4;e=(e&15)<<4|h>>2;g=(h&3)<<6|f;c+=d.chr();if(h!=64)c+=e.chr();if(f!=64)c+=g.chr()}while(i<b.length);return unescape(c)}}})("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=");(function(){var a=
89
+ /^\s+$/.test(F());try{String.prototype.trim.call([1])}catch(b){a=false}var c=RegExp("^["+F()+"]+"),d=RegExp("["+F()+"]+$");m(String,true,!a,{trim:function(){return this.toString().trimLeft().trimRight()},trimLeft:function(){return this.replace(c,"")},trimRight:function(){return this.replace(d,"")}})})();(function(){var a;k(Aa,function(b){b.start.upto(b.end,function(c){w(b.type,c.chr(),(c+b.shift).chr())})});"\u30a2\u30a4\u30a6\u30a8\u30aa\u30a1\u30a3\u30a5\u30a7\u30a9\u30ab\u30ad\u30af\u30b1\u30b3\u30b5\u30b7\u30b9\u30bb\u30bd\u30bf\u30c1\u30c4\u30c3\u30c6\u30c8\u30ca\u30cb\u30cc\u30cd\u30ce\u30cf\u30d2\u30d5\u30d8\u30db\u30de\u30df\u30e0\u30e1\u30e2\u30e4\u30e3\u30e6\u30e5\u30e8\u30e7\u30e9\u30ea\u30eb\u30ec\u30ed\u30ef\u30f2\u30f3\u30fc\u30fb".each(function(b,
90
+ c){a="\uff71\uff72\uff73\uff74\uff75\uff67\uff68\uff69\uff6a\uff6b\uff76\uff77\uff78\uff79\uff7a\uff7b\uff7c\uff7d\uff7e\uff7f\uff80\uff81\uff82\uff6f\uff83\uff84\uff85\uff86\uff87\uff88\uff89\uff8a\uff8b\uff8c\uff8d\uff8e\uff8f\uff90\uff91\uff92\uff93\uff94\uff6c\uff95\uff6d\uff96\uff6e\uff97\uff98\uff99\uff9a\uff9b\uff9c\uff66\uff9d\uff70\uff65".charAt(c);w("k",a,b);Da.test(b)&&w("k",a+"\uff9e",b.shift(1));Ea.test(b)&&w("k",a+"\uff9f",b.shift(2))});"\u3002\u3001\u300c\u300d\uffe5\uffe0\uffe1".each(function(b,
91
+ c){w("p","\uff61\uff64\uff62\uff63\u00a5\u00a2\u00a3".charAt(c),b)});w("k","\uff73\uff9e","\u30f4");w("k","\uff66\uff9e","\u30fa");w("s"," ","\u3000")})();(function(){za.each(function(a){var b=RegExp("^["+a.source+"\\s]+$"),c=RegExp("["+a.source+"]");a.names.each(function(d){l(String.prototype,"is"+d,function(){return b.test(this.trim())});l(String.prototype,"has"+d,function(){return c.test(this)})})})})();English=Date.setLocale("en");(function(){k(E,function(a,b){var c=a.unit,d=c.capitalize(),e=
92
+ a.multiplier();l(Date.prototype,c+"sSince",function(g,h){return r((this.getTime()-Date.create(g,h).getTime())/e)});l(Date.prototype,c+"sUntil",function(g,h){return r((Date.create(g,h).getTime()-this.getTime())/e)});l(Date.prototype,c+"sAgo",Date.prototype[c+"sUntil"]);l(Date.prototype,c+"sFromNow",Date.prototype[c+"sSince"]);l(Date.prototype,"add"+d+"s",function(g){var h={};h[c]=g;return this.advance(h)});qa(c,e);b<3&&k(["Last","This","Next"],function(g){l(Date.prototype,"is"+g+d,function(){return this.is(g+
93
+ " "+c)})});if(b<4){l(Date.prototype,"beginningOf"+d,function(){var g={};switch(c){case "year":g.year=this.getFullYear();break;case "month":g.month=this.getMonth();break;case "day":g.day=this.getDate();break;case "week":g.weekday=0}return this.set(g,true)});l(Date.prototype,"endOf"+d,function(){var g={hours:23,minutes:59,seconds:59,milliseconds:999};switch(c){case "year":g.month=11;g.day=31;break;case "month":g.day=this.daysInMonth();break;case "week":g.weekday=6}return this.set(g,true)})}})})();(function(){ia=
94
+ E.clone().removeAt(2);N=E.clone().reverse();var a="\\d{1,2}|"+English.months.join("|");k(Fa,function(b){Date.addFormat(b.src.replace(/\{month\}/,a)+ea,b.to.concat(Q),"en",b.variant)});Date.addFormat(R,Q)})();(function(){var a=English.weekdays.slice(0,7),b=English.months.slice(0,12);k(["today","yesterday","tomorrow","weekday","weekend","future","past"].concat(a).concat(b),function(c){l(Date.prototype,"is"+c.capitalize(),function(){return this.is(c)})})})();(function(){var a=new Date(1999,11,31);m(Date,
95
+ true,!(a.toISOString&&a.ISOString==="1999-12-31T00:00:00.000Z"),{toISOString:function(){return T(this.toUTC(),Date.ISO8601_DATETIME)}});m(Date,true,false,{iso:Date.prototype.toISOString})})();(function(){var a=new Date(1999,11,31);m(Date,true,!(a.toJSON&&a.toJSON==="1999-12-31T00:00:00.000Z"),{toJSON:Date.prototype.toISOString})})();Date.DSTOffset=((new Date(2E3,6,1)).getTimezoneOffset()-(new Date(2E3,0,1)).getTimezoneOffset())*60*1E3;Date.INTERNATIONAL_TIME="{h}:{mm}:{ss}";Date.RFC1123="{Dow}, {dd} {Mon} {yyyy} {hh}:{mm}:{ss} {tz}";
96
+ Date.RFC1036="{Weekday}, {dd}-{Mon}-{yy} {hh}:{mm}:{ss} {tz}";Date.ISO8601_DATE="{yyyy}-{MM}-{dd}";Date.ISO8601_DATETIME="{yyyy}-{MM}-{dd}T{hh}:{mm}:{ss}.{ms}{isotz}";Date.ISO8601=Date.ISO8601_DATETIME;(function(){var a=false;if(Function.prototype.bind){a=function(){};var b=a.bind();a=new b instanceof b&&!(new a instanceof b)}m(Function,true,!a,{bind:function(c){var d=this,e=Array.prototype.slice.call(arguments,1),g,h;if(!Object.isFunction(this))throw new TypeError("Function.prototype.bind called on a non-function");
97
+ h=function(){return d.apply(d.prototype&&this instanceof d?this:c,e.concat(Array.prototype.slice.call(arguments)))};g=function(){};g.prototype=this.prototype;h.prototype=new g;return h}})})()})();
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sugar-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 1.0.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-09-25 00:00:00.000000000Z
12
+ date: 2011-10-21 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties
16
- requirement: &2181105600 !ruby/object:Gem::Requirement
16
+ requirement: &2170914540 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 3.1.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2181105600
24
+ version_requirements: *2170914540
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: bundler
27
- requirement: &2181105100 !ruby/object:Gem::Requirement
27
+ requirement: &2170914040 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 1.1.pre8
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *2181105100
35
+ version_requirements: *2170914040
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rake
38
- requirement: &2181104640 !ruby/object:Gem::Requirement
38
+ requirement: &2170913580 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: 0.9.2
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *2181104640
46
+ version_requirements: *2170913580
47
47
  description: Sugar, tastefully bundled for the Rails 3.1 asset pipeline. Sweet!
48
48
  email:
49
49
  - github@phlippers.net
@@ -76,7 +76,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
76
76
  version: '0'
77
77
  segments:
78
78
  - 0
79
- hash: 4395384466013545745
79
+ hash: -2297859887792056191
80
80
  required_rubygems_version: !ruby/object:Gem::Requirement
81
81
  none: false
82
82
  requirements:
@@ -85,7 +85,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
85
85
  version: '0'
86
86
  segments:
87
87
  - 0
88
- hash: 4395384466013545745
88
+ hash: -2297859887792056191
89
89
  requirements: []
90
90
  rubyforge_project:
91
91
  rubygems_version: 1.8.10