Build 533169stable
Module 739305
2,130 characters · in no known chunkDependencies
Source Raw
function(e,t,n){"use strict";var r,i,s,a=n(593858),o=n(257943),l=n(860511),u=n(339626),c=n(598349),d=n(210140),_=n(324988),f=n(406208),p=n(706938),h=n(693655),m=n(485155),E=n(524152),g=n(42756),A=n(458680),I=n(380744),T=n(753891),S=n(883972),y=S.enforce,v=S.get,N=l.Int8Array,C=N&&N.prototype,R=l.Uint8ClampedArray,O=R&&R.prototype,b=N&&g(N),D=C&&g(C),L=Object.prototype,w=l.TypeError,M=I("toStringTag"),P=T("TYPED_ARRAY_TAG"),x="TypedArrayConstructor",k=a&&!!A&&"Opera"!==_(l.opera),U=!1,G={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},F={BigInt64Array:8,BigUint64Array:8},V=function(e){if(!c(e))return!1;var t=_(e);return"DataView"===t||d(G,t)||d(F,t)},B=function(e){var t=g(e);if(c(t)){var n=v(t);return n&&d(n,x)?n[x]:B(t)}},H=function(e){if(!c(e))return!1;var t=_(e);return d(G,t)||d(F,t)},j=function(e){if(H(e))return e;throw new w("Target is not a typed array")},Y=function(e){if(u(e)&&(!A||E(b,e)))return e;throw new w(f(e)+" is not a typed array constructor")},W=function(e,t,n,r){if(o){if(n)for(var i in G){var s=l[i];if(s&&d(s.prototype,e))try{delete s.prototype[e]}catch(n){try{s.prototype[e]=t}catch(e){}}}(!D[e]||n)&&h(D,e,n?t:k&&C[e]||t,r)}},K=function(e,t,n){var r,i;if(o){if(A){if(n){for(r in G)if((i=l[r])&&d(i,e))try{delete i[e]}catch(e){}}if(b[e]&&!n)return;try{return h(b,e,n?t:k&&b[e]||t)}catch(e){}}for(r in G)(i=l[r])&&(!i[e]||n)&&h(i,e,t)}};for(r in G)(s=(i=l[r])&&i.prototype)?y(s)[x]=i:k=!1;for(r in F)(s=(i=l[r])&&i.prototype)&&(y(s)[x]=i);if((!k||!u(b)||b===Function.prototype)&&(b=function(){throw new w("Incorrect invocation")},k))for(r in G)l[r]&&A(l[r],b);if((!k||!D||D===L)&&(D=b.prototype,k))for(r in G)l[r]&&A(l[r].prototype,D);if(k&&g(O)!==D&&A(O,D),o&&!d(D,M))for(r in U=!0,m(D,M,{configurable:!0,get:function(){return c(this)?this[P]:void 0}}),G)l[r]&&p(l[r],P,r);e.exports={NATIVE_ARRAY_BUFFER_VIEWS:k,TYPED_ARRAY_TAG:U&&P,aTypedArray:j,aTypedArrayConstructor:Y,exportTypedArrayMethod:W,exportTypedArrayStaticMethod:K,getTypedArrayConstructor:B,isView:V,isTypedArray:H,TypedArray:b,TypedArrayPrototype:D}}