-
Notifications
You must be signed in to change notification settings - Fork 0
/
polyfills.json
12 lines (12 loc) · 3.48 KB
/
polyfills.json
1
2
3
4
5
6
7
8
9
10
11
12
{
"Array.prototype.indexOf": "Array.prototype.indexOf||(Array.prototype.indexOf=function(c,a){var b=this.length>>>0;if(0===b||a&&(a=a||0,a=a===-1/0?0:(0>a?-a:a)|0,b<=a))return-1;for(a=0<=a?a:0<b+a?b+a:0;a<b;++a)if(this[a]===c)return a;return-1});",
"Array.prototype.pop": "Array.prototype.pop||(Array.prototype.pop=function(){var a=this.length,b=this[a-1];a&&--this.length;return b});",
"Array.prototype.push": "Array.prototype.push||(Array.prototype.push=function(){for(var b=arguments,a=0,c=b.length,d=this.length;a<c;++a)this[d+a]=b[a];return this.length});",
"Array.prototype.shift": "Array.prototype.shift||(Array.prototype.shift=function(){var b=this.length;if(b){for(var c=this[0],a=1;a<b;++a)this[a-1]=this[a];--this.length;return c}});",
"Array.prototype.splice": "Array.prototype.splice||(Array.prototype.splice=function(c,e){var f=arguments,d=f.length-2-e,g=this.slice(c,c+e),b;if(0<d){var a=this.length-1;for(b=c+e;a>=b;--a)this[a+d]=this[a]}else if(0>d){a=c+e;for(b=this.length;a<b;++a)this[a+d]=this[a];this.length+=d}a=2;for(b=f.length;a<b;++a)this[a-2+c]=f[a];return g});",
"Array.prototype.unshift": "Array.prototype.unshift||(Array.prototype.unshift=function(){for(var c=arguments,b=c.length,d=this.length+=b-1,a=d;a>=b;--a)this[a]=this[a-b];for(a=0;a<b;++a)this[a]=c[a];return d});",
"decodeURIComponent": "window.decodeURI||(decodeURI=function(d){var e=[],f=parseInt,h=String.fromCharCode;d+=\"\";for(var g=-1,b=0,k=d.length,c,a;b<k;++b)a?(a=f(d.substr(b,2),16),++b,127<a&&(223<a?(c=(a&15)<<12,a=f(d.substr(b+2,2),16)&63,b+=3,c+=a<<6):c=(a&63)<<6,a=f(d.substr(b+2,2),16)&63,b+=3,a+=c),e[++g]=h(a),a=!1):(c=d.charAt(b),(a=\"%\"===c)||(e[++g]=c));return e.join(\"\")});window.decodeURIComponent||(decodeURIComponent=decodeURI);",
"encodeURIComponent": "(function(){function f(b,c){for(var g=[],l=k,e=b+\"\",d=0,m=e.length,h,a;d<m;++d)h=c<l[a=e.charCodeAt(d)]?e.charAt(d):(16>a?\"%0\"+a.toString(16):128>a?\"%\"+a.toString(16):2048>a?\"%\"+(a>>6|192).toString(16)+\"%\"+(a&63|128).toString(16):\"%\"+(a>>12|224).toString(16)+\"%\"+(a>>6&63|128).toString(16)+\"%\"+(a&63|128).toString(16)).toUpperCase(),g[d]=h;return g.join(\"\")}if(!window.encodeURIComponent){encodeURI=function(b){return f(b,0)};encodeURIComponent=function(b){return f(b,1)};var k=function(){var b={},c;for(c=\n71;c;)b[\"!'()*-.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz~\".charCodeAt(--c)]=2;for(c=12;c;)b[\"#$&+,-/:;=?@\".charCodeAt(--c)]=1;return b}()}})();",
"Function.prototype.apply": "Function.prototype.apply||(Function.prototype.apply=function(_x,_y){var f=this,x=_x!=null?_x:{},y=_y||[],j=y.length,i=0,r,a,u;x.__apply=f;if(!x.__apply)a=x.constructor.prototype.__apply=f;switch(j){case 0:r=x.__apply();break;case 1:r=x.__apply(y[0]);break;case 2:r=x.__apply(y[0],y[1]);break;case 3:r=x.__apply(y[0],y[1],y[2]);break;case 4:r=x.__apply(y[0],y[1],y[2],y[3]);break;case 5:r=x.__apply(y[0],y[1],y[2],y[3],y[4]);break;case 6:r=x.__apply(y[0],y[1],y[2],y[3],y[4],y[5]);break;case 7:r=x.__apply(y[0],\ny[1],y[2],y[3],y[4],y[5],y[6]);break;case 8:r=x.__apply(y[0],y[1],y[2],y[3],y[4],y[5],y[6],y[7]);break;case 9:r=x.__apply(y[0],y[1],y[2],y[3],y[4],y[5],y[6],y[7],y[8]);break;default:r=[];for(;i<j;++i)r[i]=\"y[\"+i+\"]\";r=eval(\"x.__apply(\"+r.join(\",\")+\")\")}a?delete x.constructor.prototype.__apply:x.__apply=u;return r});",
"Function.prototype.call": "Function.prototype.call||(Function.prototype.call=function(){for(var b=arguments,c=[],a=1,d=b.length;a<d;++a)c[a-1]=b[a];return this.apply(b[0],c)});"
}