agenda-libre-ruby/public/webshims/1.15.8/shims/es5.js

1 line
15 KiB
JavaScript
Raw Normal View History

!function(){function a(a){return a=+a,a!==a?a=0:0!==a&&a!==1/0&&a!==-(1/0)&&(a=(a>0||-1)*Math.floor(Math.abs(a))),a}function b(a){var b=typeof a;return null===a||"undefined"===b||"boolean"===b||"number"===b||"string"===b}function c(a){var c,d,e;if(b(a))return a;if(d=a.valueOf,p(d)&&(c=d.call(a),b(c)))return c;if(e=a.toString,p(e)&&(c=e.call(a),b(c)))return c;throw new TypeError}function d(){}setTimeout(function(){webshims.isReady("es5",!0)});var e,f=Array.prototype,g=Object.prototype,h=Function.prototype,i=String.prototype,j=Number.prototype,k=f.slice,l=f.splice,m=(f.push,f.unshift),n=h.call,o=g.toString,p=function(a){return"[object Function]"===g.toString.call(a)},q=function(a){return"[object RegExp]"===g.toString.call(a)},r=function(a){return"[object Array]"===o.call(a)},s=function(a){return"[object String]"===o.call(a)},t=function(a){var b=o.call(a),c="[object Arguments]"===b;return c||(c=!r(a)&&null!==a&&"object"==typeof a&&"number"==typeof a.length&&a.length>=0&&p(a.callee)),c},u=Object.defineProperty&&function(){try{return Object.defineProperty({},"x",{}),!0}catch(a){return!1}}();e=u?function(a,b,c,d){!d&&b in a||Object.defineProperty(a,b,{configurable:!0,enumerable:!1,writable:!0,value:c})}:function(a,b,c,d){!d&&b in a||(a[b]=c)};var v=function(a,b,c){for(var d in b)g.hasOwnProperty.call(b,d)&&e(a,d,b[d],c)},w=function(a){if(null==a)throw new TypeError("can't convert "+a+" to object");return Object(a)},x=function(a){return a>>>0};v(h,{bind:function(a){var b=this;if(!p(b))throw new TypeError("Function.prototype.bind called on incompatible "+b);for(var c=k.call(arguments,1),e=function(){if(this instanceof i){var d=b.apply(this,c.concat(k.call(arguments)));return Object(d)===d?d:this}return b.apply(a,c.concat(k.call(arguments)))},f=Math.max(0,b.length-c.length),g=[],h=0;f>h;h++)g.push("$"+h);var i=Function("binder","return function ("+g.join(",")+"){return binder.apply(this,arguments)}")(e);return b.prototype&&(d.prototype=b.prototype,i.prototype=new d,d.prototype=null),i}});var y,z,A,B,C,D=n.bind(g.hasOwnProperty);(C=D(g,"__defineGetter__"))&&(y=n.bind(g.__defineGetter__),z=n.bind(g.__defineSetter__),A=n.bind(g.__lookupGetter__),B=n.bind(g.__lookupSetter__));var E=function(){var a=[1,2],b=a.splice();return 2===a.length&&r(b)&&0===b.length}();v(f,{splice:function(){return 0===arguments.length?[]:l.apply(this,arguments)}},E);var F=function(){var a={};return f.splice.call(a,0,0,1),1===a.length}();v(f,{splice:function(b,c){if(0===arguments.length)return[];var d=arguments;return this.length=Math.max(a(this.length),0),arguments.length>0&&"number"!=typeof c&&(d=k.call(arguments),d.length<2?d.push(this.length-b):d[1]=a(c)),l.apply(this,d)}},!F);var G=1!==[].unshift(0);v(f,{unshift:function(){return m.apply(this,arguments),this.length}},G),v(Array,{isArray:r});var H=Object("a"),I="a"!==H[0]||!(0 in H),J=function(a){var b=!0,c=!0;return a&&(a.call("foo",function(a,c,d){"object"!=typeof d&&(b=!1)}),a.call([1],function(){"use strict";c="string"==typeof this},"x")),!!a&&b&&c};v(f,{forEach:function(a){var b=w(this),c=I&&s(this)?this.split(""):b,d=arguments[1],e=-1,f=c.length>>>0;if(!p(a))throw new TypeError;for(;++e<f;)e in c&&a.call(d,c[e],e,b)}},!J(f.forEach)),v(f,{map:function(a){var b=w(this),c=I&&s(this)?this.split(""):b,d=c.length>>>0,e=Array(d),f=arguments[1];if(!p(a))throw new TypeError(a+" is not a function");for(var g=0;d>g;g++)g in c&&(e[g]=a.call(f,c[g],g,b));return e}},!J(f.map)),v(f,{filter:function(a){var b,c=w(this),d=I&&s(this)?this.split(""):c,e=d.length>>>0,f=[],g=arguments[1];if(!p(a))throw new TypeError(a+" is not a function");for(var h=0;e>h;h++)h in d&&(b=d[h],a.call(g,b,h,c)&&f.push(b));return f}},!J(f.filter)),v(f,{every:function(a){var b=w(this),c=I&&s(this)?this.split(""):b,d=c.length>>>0,e=arguments[1];if(!p(a))throw new TypeError(a+" is not a function");for(var f=0;d>f;f++)if(f in c&&!a.call(e,c[f],f,b))return!1;return!0}},!J(f.every)),v(f,{some:function(a){var b=w(this),c=I&&s(this)?this.split(""):b,d=c.length>>>0,e=arguments[1];if(!p(a))throw new TypeError(a+" is not a function");for(var f=0;d>f;f+