agenda-libre-ruby/public/webshims/1.15.9/shims/es6.js

1 line
23 KiB
JavaScript
Raw Normal View History

webshim.register("es6",function(a,b,c,d,e){"use strict";var f=function(a){try{a()}catch(b){return!1}return!0},g=function(a,b){try{var c=function(){a.apply(this,arguments)};return c.__proto__?(Object.setPrototypeOf(c,a),c.prototype=Object.create(a.prototype,{constructor:{value:a}}),b(c)):!1}catch(d){return!1}},h=function(){try{return Object.defineProperty({},"x",{}),!0}catch(a){return!1}},i=function(){var a=!1;if(String.prototype.startsWith)try{"/a/".startsWith(/a/)}catch(b){a=!0}return a},j=new Function("return this;"),k=function(){var a,b=j(),d=b.isFinite,k=!!Object.defineProperty&&h(),l=i(),m=Array.prototype.slice,n=String.prototype.indexOf,o=Object.prototype.toString,p=Object.prototype.hasOwnProperty,q=function(a,b){Object.keys(b).forEach(function(c){var d=b[c];c in a||(k?Object.defineProperty(a,c,{configurable:!0,enumerable:!1,writable:!0,value:d}):a[c]=d)})},r=Object.create||function(a,b){function c(){}c.prototype=a;var d=new c;return"undefined"!=typeof b&&q(d,b),d},s="function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_";b.Set&&"function"==typeof(new b.Set)["@@iterator"]&&(s="@@iterator");var t=function(a,b){b||(b=function(){return this});var c={};c[s]=b,q(a,c)},u=function(a){var b=o.call(a),c="[object Arguments]"===b;return c||(c="[object Array]"!==b&&null!==a&&"object"==typeof a&&"number"==typeof a.length&&a.length>=0&&"[object Function]"===o.call(a.callee)),c},v=function(a){if(!w.TypeIsObject(a))throw new TypeError("bad object");return a._es6construct||(a.constructor&&w.IsCallable(a.constructor["@@create"])&&(a=a.constructor["@@create"](a)),q(a,{_es6construct:!0})),a},w={CheckObjectCoercible:function(a,b){if(null==a)throw new TypeError(b||"Cannot call method on "+a);return a},TypeIsObject:function(a){return null!=a&&Object(a)===a},ToObject:function(a,b){return Object(w.CheckObjectCoercible(a,b))},IsCallable:function(a){return"function"==typeof a&&"[object Function]"===o.call(a)},ToInt32:function(a){return a>>0},ToUint32:function(a){return a>>>0},ToInteger:function(a){var b=+a;return Number.isNaN(b)?0:0!==b&&Number.isFinite(b)?Math.sign(b)*Math.floor(Math.abs(b)):b},ToLength:function(a){var b=w.ToInteger(a);return 0>=b?0:b>Number.MAX_SAFE_INTEGER?Number.MAX_SAFE_INTEGER:b},SameValue:function(a,b){return a===b?0===a?1/a===1/b:!0:Number.isNaN(a)&&Number.isNaN(b)},SameValueZero:function(a,b){return a===b||Number.isNaN(a)&&Number.isNaN(b)},IsIterable:function(a){return w.TypeIsObject(a)&&(a[s]!==e||u(a))},GetIterator:function(b){if(u(b))return new a(b,"value");var c=b[s]();if(!w.TypeIsObject(c))throw new TypeError("bad iterator");return c},IteratorNext:function(a){var b=arguments.length>1?a.next(arguments[1]):a.next();if(!w.TypeIsObject(b))throw new TypeError("bad iterator");return b},Construct:function(a,b){var c;c=w.IsCallable(a["@@create"])?a["@@create"]():r(a.prototype||null),q(c,{_es6construct:!0});var d=a.apply(c,b);return w.TypeIsObject(d)?d:c}},x=function(){function a(a){var b=Math.floor(a),c=a-b;return.5>c?b:c>.5?b+1:b%2?b+1:b}function b(b,c,d){var e,f,g,h,i,j,k,l=(1<<c-1)-1;for(b!==b?(f=(1<<c)-1,g=Math.pow(2,d-1),e=0):1/0===b||b===-1/0?(f=(1<<c)-1,g=0,e=0>b?1:0):0===b?(f=0,g=0,e=1/b===-1/0?1:0):(e=0>b,b=Math.abs(b),b>=Math.pow(2,1-l)?(f=Math.min(Math.floor(Math.log(b)/Math.LN2),1023),g=a(b/Math.pow(2,f)*Math.pow(2,d)),g/Math.pow(2,d)>=2&&(f+=1,g=1),f>l?(f=(1<<c)-1,g=0):(f+=l,g-=Math.pow(2,d))):(f=0,g=a(b/Math.pow(2,1-l-d)))),i=[],h=d;h;h-=1)i.push(g%2?1:0),g=Math.floor(g/2);for(h=c;h;h-=1)i.push(f%2?1:0),f=Math.floor(f/2);for(i.push(e?1:0),i.reverse(),j=i.join(""),k=[];j.length;)k.push(parseInt(j.slice(0,8),2)),j=j.slice(8);return k}function c(a,b,c){var d,e,f,g,h,i,j,k,l=[];for(d=a.length;d;d-=1)for(f=a[d-1],e=8;e;e-=1)l.push(f%2?1:0),f>>=1;return l.reverse(),g=l.join(""),h=(1<<b-1)-1,i=parseInt(g.slice(0,1),2)?-1:1,j=parseInt(g.slice(1,1+b),2),k=parseInt(g.slice(1+b),2),j===(1<<b)-1?0!==k?0/0:1/0*i:j>0?i*Math.pow(2,j-h)*(1+k/Math.pow(2,c)):0!==k?i*Math.pow(2,-(h-1))*(k/Math.pow(2,c)):0>i?-0:0}function d(a){return c(a,8,23)}function e(a){return b(a,8,23)}var f={toFloat32:function(a){return d(e(a