// augment.js JavaScript 1.8.5 methods for all, version: 1.0.0 // using snippets from Mozilla - https://developer.mozilla.org/en/JavaScript // (c) 2011 Oliver Nightingale // // Released under MIT license. // // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/every Array.prototype.every||(Array.prototype.every=function(a,b){if(this===void 0||this===null||typeof a!="function")throw new TypeError;var c=Object(this),d=c.length>>>0,e=b===void 0||b===null;for(var f=0;f>>0,e=b===void 0||b===null,f=[];for(var g=0;g>>0,e=b===void 0||b===null;for(var f=0;f>>0,e=b!==void 0&&b!==null;if(d===0)return-1;var f=0;e&&(f=Number(b),f!==f?f=0:f!==0&&f!==Infinity&&f!==-Infinity&&(f=(f>0||-1)*Math.floor(Math.abs(f))));if(f>=d)return-1;var g=f>=0?f:Math.max(d-Math.abs(f),0);for(;g>>0,e=b!==void 0&&b!==null;if(d===0)return-1;var f=d;e&&(f=Number(b),f!==f?f=0:f!==0&&f!==Infinity&&f!==-Infinity&&(f=(f>0||-1)*Math.floor(Math.abs(f))));var g=f>=0?Math.min(f,d-1):d-Math.abs(f);for(;g>=0;g--)if(g in c&&c[g]===a)return g;return-1}),Array.prototype.map||(Array.prototype.map=function(a,b){if(this===void 0||this===null||typeof a!="function")throw new TypeError;var c=Object(this),d=c.length>>>0,e=b===void 0||b===null,f=new Array(d);for(var g=0;g>>0,e=b!==void 0&&b!==null;if(d==0&&!e)throw new TypeError;var f=0,g;if(e)g=b;else do{if(f in c){g=c[f++];break}if(++f>=d)throw new TypeError}while(!0);while(f>>0,e=b!==void 0&&b!==null;if(d==0&&!e)throw new TypeError;var f=d-1,g;if(e)g=b;else do{if(f in this){g=c[f--];break}if(--f<0)throw new TypeError}while(!0);while(f--)f in c&&(g=callbackfn(g,c[f],f,c));return g}),Array.prototype.some||(Array.prototype.some=function(a,b){if(this===void 0||this===null||typeof a!="function")throw new TypeError;var c=Object(this),d=c.length>>>0,e=b===void 0||b===null;for(var f=0;f9999?"+":"")+("00000"+Math.abs(b)).slice(0<=b&&b<=9999?-4:-6);var c=[b,a(this.getUTCMonth()+1),a(this.getUTCDate())].join("-"),d=[a(this.getUTCHours()),a(this.getUTCMinutes()),a(this.getUTCSeconds())].join(":")+"."+a(this.getUTCMilliseconds(),3);return[c,d].join("T")+"Z"}}()),Date.prototype.toJSON||(Date.prototype.toJSON=function(){var a=Object(this),b=a.toISOString;if(typeof b!="function")throw new TypeError;return b.call(a)}),Function.prototype.bind||(Function.prototype.bind=function(a){if(typeof this!="function")throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var b=Array.prototype.slice,c=b.call(arguments,1),d=this,e=function(){},f=function(){if(e.prototype&&this instanceof e){var f=d.apply(new e,c.concat(b.call(arguments)));return Object(f)===f?f:d}return d.apply(a,c.concat(b.call(arguments)))};return e.prototype=d.prototype,f.prototype=new e,f}),function(){"use strict";var a=function(a){if(a!==Object(a))throw new TypeError("Object.getPrototypeOf called on non-object")};Object.getPrototypeOf||(typeof "test".__proto__=="object"?Object.getPrototypeOf=function(b){return a(b),b.__proto__}:Object.getPrototypeOf=function(b){return a(b),b.constructor.prototype})}(),Object.keys||(Object.keys=function(){var a=Object.prototype.hasOwnProperty,b=!{toString:null}.propertyIsEnumerable("toString"),c=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],d=c.length;return function(e){if(typeof e!="object"&&typeof e!="function"||e===null)throw new TypeError("Object.keys called on non-object");var f=[];for(var g in e)a.call(e,g)&&f.push(g);if(b)for(var h=0;h