-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
3 lines (3 loc) · 64.8 KB
/
index.js
1
2
3
// Copyright (c) 2025 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0
!function(r,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(r="undefined"!=typeof globalThis?globalThis:r||self).iterator2arrayviewRight=e()}(this,(function(){"use strict";var r=/./,e="function"==typeof Object.defineProperty?Object.defineProperty:null;var t=Object.defineProperty;function n(r){return"number"==typeof r}function i(r){var e,t="";for(e=0;e<r;e++)t+="0";return t}function o(r,e,t){var n=!1,o=e-r.length;return o<0||(function(r){return"-"===r[0]}(r)&&(n=!0,r=r.substr(1)),r=t?r+i(o):i(o)+r,n&&(r="-"+r)),r}var a=String.prototype.toLowerCase,u=String.prototype.toUpperCase;function f(r){var e,t,i;switch(r.specifier){case"b":e=2;break;case"o":e=8;break;case"x":case"X":e=16;break;default:e=10}if(t=r.arg,i=parseInt(t,10),!isFinite(i)){if(!n(t))throw new Error("invalid integer. Value: "+t);i=0}return i<0&&("u"===r.specifier||10!==e)&&(i=4294967295+i+1),i<0?(t=(-i).toString(e),r.precision&&(t=o(t,r.precision,r.padRight)),t="-"+t):(t=i.toString(e),i||r.precision?r.precision&&(t=o(t,r.precision,r.padRight)):t="",r.sign&&(t=r.sign+t)),16===e&&(r.alternate&&(t="0x"+t),t=r.specifier===u.call(r.specifier)?u.call(t):a.call(t)),8===e&&r.alternate&&"0"!==t.charAt(0)&&(t="0"+t),t}var l=Math.abs,s=String.prototype.toLowerCase,h=String.prototype.toUpperCase,c=String.prototype.replace,p=/e\+(\d)$/,y=/e-(\d)$/,m=/^(\d+)$/,g=/^(\d+)e/,w=/\.0$/,v=/\.0*e/,b=/(\..*[^0])0*e/;function d(r){var e,t,i=parseFloat(r.arg);if(!isFinite(i)){if(!n(r.arg))throw new Error("invalid floating-point number. Value: "+t);i=r.arg}switch(r.specifier){case"e":case"E":t=i.toExponential(r.precision);break;case"f":case"F":t=i.toFixed(r.precision);break;case"g":case"G":l(i)<1e-4?((e=r.precision)>0&&(e-=1),t=i.toExponential(e)):t=i.toPrecision(r.precision),r.alternate||(t=c.call(t,b,"$1e"),t=c.call(t,v,"e"),t=c.call(t,w,""));break;default:throw new Error("invalid double notation. Value: "+r.specifier)}return t=c.call(t,p,"e+0$1"),t=c.call(t,y,"e-0$1"),r.alternate&&(t=c.call(t,m,"$1."),t=c.call(t,g,"$1.e")),i>=0&&r.sign&&(t=r.sign+t),t=r.specifier===h.call(r.specifier)?h.call(t):s.call(t)}function E(r){var e,t="";for(e=0;e<r;e++)t+=" ";return t}var T=String.fromCharCode,_=Array.isArray;function x(r){return r!=r}function V(r){var e={};return e.specifier=r.specifier,e.precision=void 0===r.precision?1:r.precision,e.width=r.width,e.flags=r.flags||"",e.mapping=r.mapping,e}function A(r){var e,t,n,i,a,u,l,s,h,c,p,y,m;if(!_(r))throw new TypeError("invalid argument. First argument must be an array. Value: `"+r+"`.");for(u="",l=1,s=0;s<r.length;s++)if(n=r[s],"string"==typeof n)u+=n;else{if(e=void 0!==n.precision,!(n=V(n)).specifier)throw new TypeError("invalid argument. Token is missing `specifier` property. Index: `"+s+"`. Value: `"+n+"`.");for(n.mapping&&(l=n.mapping),t=n.flags,h=0;h<t.length;h++)switch(i=t.charAt(h)){case" ":n.sign=" ";break;case"+":n.sign="+";break;case"-":n.padRight=!0,n.padZeros=!1;break;case"0":n.padZeros=t.indexOf("-")<0;break;case"#":n.alternate=!0;break;default:throw new Error("invalid flag: "+i)}if("*"===n.width){if(n.width=parseInt(arguments[l],10),l+=1,x(n.width))throw new TypeError("the argument for * width at position "+l+" is not a number. Value: `"+n.width+"`.");n.width<0&&(n.padRight=!0,n.width=-n.width)}if(e&&"*"===n.precision){if(n.precision=parseInt(arguments[l],10),l+=1,x(n.precision))throw new TypeError("the argument for * precision at position "+l+" is not a number. Value: `"+n.precision+"`.");n.precision<0&&(n.precision=1,e=!1)}switch(n.arg=arguments[l],n.specifier){case"b":case"o":case"x":case"X":case"d":case"i":case"u":e&&(n.padZeros=!1),n.arg=f(n);break;case"s":n.maxWidth=e?n.precision:-1,n.arg=String(n.arg);break;case"c":if(!x(n.arg)){if((a=parseInt(n.arg,10))<0||a>127)throw new Error("invalid character code. Value: "+n.arg);n.arg=x(a)?String(n.arg):T(a)}break;case"e":case"E":case"f":case"F":case"g":case"G":e||(n.precision=6),n.arg=d(n);break;default:throw new Error("invalid specifier: "+n.specifier)}n.maxWidth>=0&&n.arg.length>n.maxWidth&&(n.arg=n.arg.substring(0,n.maxWidth)),n.padZeros?n.arg=o(n.arg,n.width||n.precision,n.padRight):n.width&&(n.arg=(c=n.arg,p=n.width,y=n.padRight,m=void 0,(m=p-c.length)<0?c:c=y?c+E(m):E(m)+c)),u+=n.arg||"",l+=1}return u}var j=/%(?:([1-9]\d*)\$)?([0 +\-#]*)(\*|\d+)?(?:(\.)(\*|\d+)?)?[hlL]?([%A-Za-z])/g;function S(r){var e={mapping:r[1]?parseInt(r[1],10):void 0,flags:r[2],width:r[3],precision:r[5],specifier:r[6]};return"."===r[4]&&void 0===r[5]&&(e.precision="1"),e}function F(r){var e,t,n,i;for(t=[],i=0,n=j.exec(r);n;)(e=r.slice(i,j.lastIndex-n[0].length)).length&&t.push(e),t.push(S(n)),i=j.lastIndex,n=j.exec(r);return(e=r.slice(i)).length&&t.push(e),t}function L(r){var e,t;if("string"!=typeof r)throw new TypeError(L("invalid argument. First argument must be a string. Value: `%s`.",r));for(e=[F(r)],t=1;t<arguments.length;t++)e.push(arguments[t]);return A.apply(null,e)}var k,R=Object.prototype,B=R.toString,I=R.__defineGetter__,O=R.__defineSetter__,M=R.__lookupGetter__,C=R.__lookupSetter__;k=function(){try{return e({},"x",{}),!0}catch(r){return!1}}()?t:function(r,e,t){var n,i,o,a;if("object"!=typeof r||null===r||"[object Array]"===B.call(r))throw new TypeError(L("invalid argument. First argument must be an object. Value: `%s`.",r));if("object"!=typeof t||null===t||"[object Array]"===B.call(t))throw new TypeError(L("invalid argument. Property descriptor must be an object. Value: `%s`.",t));if((i="value"in t)&&(M.call(r,e)||C.call(r,e)?(n=r.__proto__,r.__proto__=R,delete r[e],r[e]=t.value,r.__proto__=n):r[e]=t.value),o="get"in t,a="set"in t,i&&(o||a))throw new Error("invalid argument. Cannot specify one or more accessors and a value or writable attribute in the property descriptor.");return o&&I&&I.call(r,e,t.get),a&&O&&O.call(r,e,t.set),r};var P=k;function N(r,e,t){P(r,e,{configurable:!1,enumerable:!1,writable:!1,value:t})}function U(r){return"boolean"==typeof r}var Y="function"==typeof Symbol&&"symbol"==typeof Symbol("foo");function W(){return Y&&"symbol"==typeof Symbol.toStringTag}var $=Object.prototype.toString;var z=Object.prototype.hasOwnProperty;function G(r,e){return null!=r&&z.call(r,e)}var Z="function"==typeof Symbol?Symbol:void 0,J="function"==typeof Z?Z.toStringTag:"";var X=W()?function(r){var e,t,n;if(null==r)return $.call(r);t=r[J],e=G(r,J);try{r[J]=void 0}catch(e){return $.call(r)}return n=$.call(r),e?r[J]=t:delete r[J],n}:function(r){return $.call(r)},q=Boolean,D=Boolean.prototype.toString;var H=W();function K(r){return"object"==typeof r&&(r instanceof q||(H?function(r){try{return D.call(r),!0}catch(r){return!1}}(r):"[object Boolean]"===X(r)))}function Q(r){return U(r)||K(r)}N(Q,"isPrimitive",U),N(Q,"isObject",K);var rr="object"==typeof self?self:null,er="object"==typeof window?window:null,tr="object"==typeof global?global:null,nr="object"==typeof globalThis?globalThis:null;var ir=function(r){if(arguments.length){if(!U(r))throw new TypeError(L("invalid argument. Must provide a boolean. Value: `%s`.",r));if(r)return new Function("return this;")()}if(nr)return nr;if(rr)return rr;if(er)return er;if(tr)return tr;throw new Error("unexpected error. Unable to resolve global object.")}(),or=ir.document&&ir.document.childNodes,ar=Int8Array;function ur(){return/^\s*function\s*([^(]*)/i}var fr=/^\s*function\s*([^(]*)/i;N(ur,"REGEXP",fr);var lr=Array.isArray?Array.isArray:function(r){return"[object Array]"===X(r)};function sr(r){return null!==r&&"object"==typeof r}function hr(r){return sr(r)&&(r._isBuffer||r.constructor&&"function"==typeof r.constructor.isBuffer&&r.constructor.isBuffer(r))}function cr(r){var e,t,n;if(("Object"===(t=X(r).slice(8,-1))||"Error"===t)&&r.constructor){if("string"==typeof(n=r.constructor).name)return n.name;if(e=fr.exec(n.toString()))return e[1]}return hr(r)?"Buffer":t}N(sr,"isObjectLikeArray",function(r){if("function"!=typeof r)throw new TypeError(L("invalid argument. Must provide a function. Value: `%s`.",r));return function(e){var t,n;if(!lr(e))return!1;if(0===(t=e.length))return!1;for(n=0;n<t;n++)if(!1===r(e[n]))return!1;return!0}}(sr));var pr="function"==typeof r||"object"==typeof ar||"function"==typeof or?function(r){return cr(r).toLowerCase()}:function(r){var e;return null===r?"null":"object"===(e=typeof r)?cr(r).toLowerCase():e};function yr(r){return"function"===pr(r)}var mr=Math.floor;function gr(r){return mr(r)===r}var wr=9007199254740991;function vr(r){return"object"==typeof r&&null!==r&&"number"==typeof r.length&&gr(r.length)&&r.length>=0&&r.length<=wr}function br(r){return"number"==typeof r}var dr=Number,Er=dr.prototype.toString;var Tr=W();function _r(r){return"object"==typeof r&&(r instanceof dr||(Tr?function(r){try{return Er.call(r),!0}catch(r){return!1}}(r):"[object Number]"===X(r)))}function xr(r){return br(r)||_r(r)}N(xr,"isPrimitive",br),N(xr,"isObject",_r);var Vr=Number.POSITIVE_INFINITY,Ar=dr.NEGATIVE_INFINITY;function jr(r){return r<Vr&&r>Ar&&gr(r)}function Sr(r){return br(r)&&jr(r)}function Fr(r){return _r(r)&&jr(r.valueOf())}function Lr(r){return Sr(r)||Fr(r)}N(Lr,"isPrimitive",Sr),N(Lr,"isObject",Fr);var kr="function";var Rr={complex128:function(r,e,t){r.set(t,e)},complex64:function(r,e,t){r.set(t,e)},default:function(r,e,t){r.set(t,e)}};var Br={float64:function(r,e,t){r[e]=t},float32:function(r,e,t){r[e]=t},int32:function(r,e,t){r[e]=t},int16:function(r,e,t){r[e]=t},int8:function(r,e,t){r[e]=t},uint32:function(r,e,t){r[e]=t},uint16:function(r,e,t){r[e]=t},uint8:function(r,e,t){r[e]=t},uint8c:function(r,e,t){r[e]=t},generic:function(r,e,t){r[e]=t},default:function(r,e,t){r[e]=t}};var Ir={Float32Array:"float32",Float64Array:"float64",Array:"generic",Int16Array:"int16",Int32Array:"int32",Int8Array:"int8",Uint16Array:"uint16",Uint32Array:"uint32",Uint8Array:"uint8",Uint8ClampedArray:"uint8c",Complex64Array:"complex64",Complex128Array:"complex128",BooleanArray:"bool"},Or="function"==typeof Float64Array;var Mr="function"==typeof Float64Array?Float64Array:null;var Cr="function"==typeof Float64Array?Float64Array:void 0;var Pr=function(){var r,e,t;if("function"!=typeof Mr)return!1;try{e=new Mr([1,3.14,-3.14,NaN]),t=e,r=(Or&&t instanceof Float64Array||"[object Float64Array]"===X(t))&&1===e[0]&&3.14===e[1]&&-3.14===e[2]&&e[3]!=e[3]}catch(e){r=!1}return r}()?Cr:function(){throw new Error("not implemented")},Nr="function"==typeof Float32Array;var Ur="function"==typeof Float32Array?Float32Array:null;var Yr="function"==typeof Float32Array?Float32Array:void 0;var Wr=function(){var r,e,t;if("function"!=typeof Ur)return!1;try{e=new Ur([1,3.14,-3.14,5e40]),t=e,r=(Nr&&t instanceof Float32Array||"[object Float32Array]"===X(t))&&1===e[0]&&3.140000104904175===e[1]&&-3.140000104904175===e[2]&&e[3]===Vr}catch(e){r=!1}return r}()?Yr:function(){throw new Error("not implemented")},$r="function"==typeof Uint32Array;var zr="function"==typeof Uint32Array?Uint32Array:null;var Gr="function"==typeof Uint32Array?Uint32Array:void 0;var Zr=function(){var r,e,t;if("function"!=typeof zr)return!1;try{e=new zr(e=[1,3.14,-3.14,4294967296,4294967297]),t=e,r=($r&&t instanceof Uint32Array||"[object Uint32Array]"===X(t))&&1===e[0]&&3===e[1]&&4294967293===e[2]&&0===e[3]&&1===e[4]}catch(e){r=!1}return r}()?Gr:function(){throw new Error("not implemented")},Jr="function"==typeof Int32Array;var Xr="function"==typeof Int32Array?Int32Array:null;var qr="function"==typeof Int32Array?Int32Array:void 0;var Dr=function(){var r,e,t;if("function"!=typeof Xr)return!1;try{e=new Xr([1,3.14,-3.14,2147483648]),t=e,r=(Jr&&t instanceof Int32Array||"[object Int32Array]"===X(t))&&1===e[0]&&3===e[1]&&-3===e[2]&&-2147483648===e[3]}catch(e){r=!1}return r}()?qr:function(){throw new Error("not implemented")},Hr="function"==typeof Uint16Array;var Kr="function"==typeof Uint16Array?Uint16Array:null;var Qr="function"==typeof Uint16Array?Uint16Array:void 0;var re=function(){var r,e,t;if("function"!=typeof Kr)return!1;try{e=new Kr(e=[1,3.14,-3.14,65536,65537]),t=e,r=(Hr&&t instanceof Uint16Array||"[object Uint16Array]"===X(t))&&1===e[0]&&3===e[1]&&65533===e[2]&&0===e[3]&&1===e[4]}catch(e){r=!1}return r}()?Qr:function(){throw new Error("not implemented")},ee="function"==typeof Int16Array;var te="function"==typeof Int16Array?Int16Array:null;var ne="function"==typeof Int16Array?Int16Array:void 0;var ie=function(){var r,e,t;if("function"!=typeof te)return!1;try{e=new te([1,3.14,-3.14,32768]),t=e,r=(ee&&t instanceof Int16Array||"[object Int16Array]"===X(t))&&1===e[0]&&3===e[1]&&-3===e[2]&&-32768===e[3]}catch(e){r=!1}return r}()?ne:function(){throw new Error("not implemented")},oe="function"==typeof Uint8Array;var ae="function"==typeof Uint8Array?Uint8Array:null;var ue="function"==typeof Uint8Array?Uint8Array:void 0;var fe=function(){var r,e,t;if("function"!=typeof ae)return!1;try{e=new ae(e=[1,3.14,-3.14,256,257]),t=e,r=(oe&&t instanceof Uint8Array||"[object Uint8Array]"===X(t))&&1===e[0]&&3===e[1]&&253===e[2]&&0===e[3]&&1===e[4]}catch(e){r=!1}return r}()?ue:function(){throw new Error("not implemented")},le="function"==typeof Uint8ClampedArray;var se="function"==typeof Uint8ClampedArray?Uint8ClampedArray:null;var he="function"==typeof Uint8ClampedArray?Uint8ClampedArray:void 0;var ce=function(){var r,e,t;if("function"!=typeof se)return!1;try{e=new se([-1,0,1,3.14,4.99,255,256]),t=e,r=(le&&t instanceof Uint8ClampedArray||"[object Uint8ClampedArray]"===X(t))&&0===e[0]&&0===e[1]&&1===e[2]&&3===e[3]&&5===e[4]&&255===e[5]&&255===e[6]}catch(e){r=!1}return r}()?he:function(){throw new Error("not implemented")},pe="function"==typeof Int8Array;var ye="function"==typeof Int8Array?Int8Array:null;var me="function"==typeof Int8Array?Int8Array:void 0;var ge=function(){var r,e,t;if("function"!=typeof ye)return!1;try{e=new ye([1,3.14,-3.14,128]),t=e,r=(pe&&t instanceof Int8Array||"[object Int8Array]"===X(t))&&1===e[0]&&3===e[1]&&-3===e[2]&&-128===e[3]}catch(e){r=!1}return r}()?me:function(){throw new Error("not implemented")};function we(r){return Sr(r)&&r>=0}function ve(r){return Fr(r)&&r.valueOf()>=0}function be(r){return we(r)||ve(r)}N(be,"isPrimitive",we),N(be,"isObject",ve);var de=4294967295;function Ee(r){return"object"==typeof r&&null!==r&&"number"==typeof r.length&&gr(r.length)&&r.length>=0&&r.length<=de}var Te="function"==typeof ArrayBuffer;function _e(r){return Te&&r instanceof ArrayBuffer||"[object ArrayBuffer]"===X(r)}function xe(r){return"object"==typeof r&&null!==r&&!lr(r)}function Ve(r){return"string"==typeof r}var Ae=String.prototype.valueOf;var je=W();function Se(r){return"object"==typeof r&&(r instanceof String||(je?function(r){try{return Ae.call(r),!0}catch(r){return!1}}(r):"[object String]"===X(r)))}function Fe(r){return Ve(r)||Se(r)}function Le(r,e){if(!(this instanceof Le))throw new TypeError("invalid invocation. Constructor must be called with the `new` keyword.");if(!br(r))throw new TypeError(L("invalid argument. Real component must be a number. Value: `%s`.",r));if(!br(e))throw new TypeError(L("invalid argument. Imaginary component must be a number. Value: `%s`.",e));return P(this,"re",{configurable:!1,enumerable:!0,writable:!1,value:r}),P(this,"im",{configurable:!1,enumerable:!0,writable:!1,value:e}),this}N(Fe,"isPrimitive",Ve),N(Fe,"isObject",Se),N(Le,"BYTES_PER_ELEMENT",8),N(Le.prototype,"BYTES_PER_ELEMENT",8),N(Le.prototype,"byteLength",16),N(Le.prototype,"toString",(function(){var r=""+this.re;return this.im<0?r+=" - "+-this.im:r+=" + "+this.im,r+="i"})),N(Le.prototype,"toJSON",(function(){var r={type:"Complex128"};return r.re=this.re,r.im=this.im,r}));var ke="function"==typeof Math.fround?Math.fround:null,Re=new Wr(1);var Be="function"==typeof ke?ke:function(r){return Re[0]=r,Re[0]};function Ie(r,e){if(!(this instanceof Ie))throw new TypeError("invalid invocation. Constructor must be called with the `new` keyword.");if(!br(r))throw new TypeError(L("invalid argument. Real component must be a number. Value: `%s`.",r));if(!br(e))throw new TypeError(L("invalid argument. Imaginary component must be a number. Value: `%s`.",e));return P(this,"re",{configurable:!1,enumerable:!0,writable:!1,value:Be(r)}),P(this,"im",{configurable:!1,enumerable:!0,writable:!1,value:Be(e)}),this}function Oe(r){return r instanceof Le||r instanceof Ie||"object"==typeof r&&null!==r&&"number"==typeof r.re&&"number"==typeof r.im}function Me(r){return gr(r/2)}N(Ie,"BYTES_PER_ELEMENT",4),N(Ie.prototype,"BYTES_PER_ELEMENT",4),N(Ie.prototype,"byteLength",8),N(Ie.prototype,"toString",(function(){var r=""+this.re;return this.im<0?r+=" - "+-this.im:r+=" + "+this.im,r+="i"})),N(Ie.prototype,"toJSON",(function(){var r={type:"Complex64"};return r.re=this.re,r.im=this.im,r}));var Ce=8;function Pe(r){return"object"==typeof r&&null!==r&&"Complex64Array"===r.constructor.name&&r.BYTES_PER_ELEMENT===Ce}var Ne=16;function Ue(r){return"object"==typeof r&&null!==r&&"Complex128Array"===r.constructor.name&&r.BYTES_PER_ELEMENT===Ne}function Ye(){return"function"==typeof Z&&"symbol"==typeof Z("foo")&&G(Z,"iterator")&&"symbol"==typeof Z.iterator}var We=Ye()?Symbol.iterator:null;function $e(r,e,t){P(r,e,{configurable:!1,enumerable:!1,get:t})}function ze(r,e){if(!(this instanceof ze))throw new TypeError("invalid invocation. Constructor must be called with the `new` keyword.");if(!br(r))throw new TypeError(L("invalid argument. Real component must be a number. Value: `%s`.",r));if(!br(e))throw new TypeError(L("invalid argument. Imaginary component must be a number. Value: `%s`.",e));return P(this,"re",{configurable:!1,enumerable:!0,writable:!1,value:Be(r)}),P(this,"im",{configurable:!1,enumerable:!0,writable:!1,value:Be(e)}),this}function Ge(r){return r.re}function Ze(r){return r.im}function Je(r,e){return new Wr(r.buffer,r.byteOffset+r.BYTES_PER_ELEMENT*e,2*(r.length-e))}function Xe(r,e){return new Pr(r.buffer,r.byteOffset+r.BYTES_PER_ELEMENT*e,2*(r.length-e))}N(ze,"BYTES_PER_ELEMENT",4),N(ze.prototype,"BYTES_PER_ELEMENT",4),N(ze.prototype,"byteLength",8),N(ze.prototype,"toString",(function(){var r=""+this.re;return this.im<0?r+=" - "+-this.im:r+=" + "+this.im,r+="i"})),N(ze.prototype,"toJSON",(function(){var r={type:"Complex64"};return r.re=this.re,r.im=this.im,r}));var qe={float64:function(r,e){return r[e]},float32:function(r,e){return r[e]},int32:function(r,e){return r[e]},int16:function(r,e){return r[e]},int8:function(r,e){return r[e]},uint32:function(r,e){return r[e]},uint16:function(r,e){return r[e]},uint8:function(r,e){return r[e]},uint8c:function(r,e){return r[e]},generic:function(r,e){return r[e]},default:function(r,e){return r[e]}};function De(r){var e=qe[r];return"function"==typeof e?e:qe.default}var He={complex128:function(r,e){return r.get(e)},complex64:function(r,e){return r.get(e)},default:function(r,e){return r.get(e)}};function Ke(r){var e=He[r];return"function"==typeof e?e:He.default}function Qe(r){var e,t,n;for(e=[];!(t=r.next()).done;)if(Ee(n=t.value)&&n.length>=2)e.push(n[0],n[1]);else{if(!Oe(n))return new TypeError(L("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",n));e.push(Ge(n),Ze(n))}return e}var rt=2*Wr.BYTES_PER_ELEMENT,et=Ye();function tt(r){return r instanceof ot||"object"==typeof r&&null!==r&&("Complex64Array"===r.constructor.name||"Complex128Array"===r.constructor.name)&&"number"==typeof r._length&&"object"==typeof r._buffer}function nt(r){return r===ot||"Complex128Array"===r.name}function it(r,e){return new ze(r[e*=2],r[e+1])}function ot(){var r,e,t,n;if(e=arguments.length,!(this instanceof ot))return 0===e?new ot:1===e?new ot(arguments[0]):2===e?new ot(arguments[0],arguments[1]):new ot(arguments[0],arguments[1],arguments[2]);if(0===e)t=new Wr(0);else if(1===e)if(we(arguments[0]))t=new Wr(2*arguments[0]);else if(vr(arguments[0]))if((n=(t=arguments[0]).length)&&lr(t)&&Oe(t[0])){if(t=function(r,e){var t,n,i,o;for(t=e.length,o=0,i=0;i<t;i++){if(!Oe(n=e[i]))return null;r[o]=Ge(n),r[o+1]=Ze(n),o+=2}return r}(new Wr(2*n),t),null===t){if(!Me(n))throw new RangeError(L("invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.",n));t=new Wr(arguments[0])}}else{if(Pe(t))t=Je(t,0);else if(Ue(t))t=Xe(t,0);else if(!Me(n))throw new RangeError(L("invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.",n));t=new Wr(t)}else if(_e(arguments[0])){if(!gr((t=arguments[0]).byteLength/rt))throw new RangeError(L("invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.",rt,t.byteLength));t=new Wr(t)}else{if(!xe(arguments[0]))throw new TypeError(L("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",arguments[0]));if(t=arguments[0],!1===et)throw new TypeError(L("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.",t));if(!yr(t[We]))throw new TypeError(L("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",t));if(!yr((t=t[We]()).next))throw new TypeError(L("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",t));if((t=Qe(t))instanceof Error)throw t;t=new Wr(t)}else{if(!_e(t=arguments[0]))throw new TypeError(L("invalid argument. First argument must be an ArrayBuffer. Value: `%s`.",t));if(!we(r=arguments[1]))throw new TypeError(L("invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.",r));if(!gr(r/rt))throw new RangeError(L("invalid argument. Byte offset must be a multiple of %u. Value: `%u`.",rt,r));if(2===e){if(!gr((n=t.byteLength-r)/rt))throw new RangeError(L("invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.",rt,n));t=new Wr(t,r)}else{if(!we(n=arguments[2]))throw new TypeError(L("invalid argument. Length must be a nonnegative integer. Value: `%s`.",n));if(n*rt>t.byteLength-r)throw new RangeError(L("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*rt));t=new Wr(t,r,2*n)}}return N(this,"_buffer",t),N(this,"_length",t.length/2),this}function at(r,e){if(!(this instanceof at))throw new TypeError("invalid invocation. Constructor must be called with the `new` keyword.");if(!br(r))throw new TypeError(L("invalid argument. Real component must be a number. Value: `%s`.",r));if(!br(e))throw new TypeError(L("invalid argument. Imaginary component must be a number. Value: `%s`.",e));return P(this,"re",{configurable:!1,enumerable:!0,writable:!1,value:r}),P(this,"im",{configurable:!1,enumerable:!0,writable:!1,value:e}),this}function ut(r){return r.re}function ft(r){return r.im}function lt(r){var e,t,n;for(e=[];!(t=r.next()).done;)if(Ee(n=t.value)&&n.length>=2)e.push(n[0],n[1]);else{if(!Oe(n))return new TypeError(L("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",n));e.push(ut(n),ft(n))}return e}N(ot,"BYTES_PER_ELEMENT",rt),N(ot,"name","Complex64Array"),N(ot,"from",(function(r){var e,t,n,i,o,a,u,f,l,s,h,c;if(!yr(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!nt(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((t=arguments.length)>1){if(!yr(n=arguments[1]))throw new TypeError(L("invalid argument. Second argument must be a function. Value: `%s`.",n));t>2&&(e=arguments[2])}if(tt(r)){if(f=r.length,n){for(o=(i=new this(f))._buffer,c=0,h=0;h<f;h++){if(Oe(s=n.call(e,r.get(h),h)))o[c]=Ge(s),o[c+1]=Ze(s);else{if(!(Ee(s)&&s.length>=2))throw new TypeError(L("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",s));o[c]=s[0],o[c+1]=s[1]}c+=2}return i}return new this(r)}if(vr(r)){if(n){for(f=r.length,u=r.get&&r.set?Ke("default"):De("default"),h=0;h<f;h++)if(!Oe(u(r,h))){l=!0;break}if(l){if(!Me(f))throw new RangeError(L("invalid argument. First argument must have a length which is a multiple of %u. Length: `%u`.",2,f));for(o=(i=new this(f/2))._buffer,h=0;h<f;h++)o[h]=n.call(e,u(r,h),h);return i}for(o=(i=new this(f))._buffer,c=0,h=0;h<f;h++){if(Oe(s=n.call(e,u(r,h),h)))o[c]=Ge(s),o[c+1]=Ze(s);else{if(!(Ee(s)&&s.length>=2))throw new TypeError(L("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",s));o[c]=s[0],o[c+1]=s[1]}c+=2}return i}return new this(r)}if(xe(r)&&et&&yr(r[We])){if(!yr((o=r[We]()).next))throw new TypeError(L("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r));if(a=n?function(r,e,t){var n,i,o,a;for(n=[],a=-1;!(i=r.next()).done;)if(a+=1,Ee(o=e.call(t,i.value,a))&&o.length>=2)n.push(o[0],o[1]);else{if(!Oe(o))return new TypeError(L("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",o));n.push(Ge(o),Ze(o))}return n}(o,n,e):Qe(o),a instanceof Error)throw a;for(o=(i=new this(f=a.length/2))._buffer,h=0;h<f;h++)o[h]=a[h];return i}throw new TypeError(L("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r))})),N(ot,"of",(function(){var r,e;if(!yr(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!nt(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(r=[],e=0;e<arguments.length;e++)r.push(arguments[e]);return new this(r)})),N(ot.prototype,"at",(function(r){if(!tt(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!gr(r))throw new TypeError(L("invalid argument. Must provide an integer. Value: `%s`.",r));if(r<0&&(r+=this._length),!(r<0||r>=this._length))return it(this._buffer,r)})),$e(ot.prototype,"buffer",(function(){return this._buffer.buffer})),$e(ot.prototype,"byteLength",(function(){return this._buffer.byteLength})),$e(ot.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),N(ot.prototype,"BYTES_PER_ELEMENT",ot.BYTES_PER_ELEMENT),N(ot.prototype,"copyWithin",(function(r,e){if(!tt(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return 2===arguments.length?this._buffer.copyWithin(2*r,2*e):this._buffer.copyWithin(2*r,2*e,2*arguments[2]),this})),N(ot.prototype,"entries",(function(){var r,e,t,n,i,o,a;if(!tt(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return e=this,r=this._buffer,n=this._length,o=-1,a=-2,N(t={},"next",(function(){var e;if(o+=1,i||o>=n)return{done:!0};return e=new ze(r[a+=2],r[a+1]),{value:[o,e],done:!1}})),N(t,"return",(function(r){if(i=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),We&&N(t,We,(function(){return e.entries()})),t})),N(ot.prototype,"every",(function(r,e){var t,n;if(!tt(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!yr(r))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=0;n<this._length;n++)if(!r.call(e,it(t,n),n,this))return!1;return!0})),N(ot.prototype,"fill",(function(r,e,t){var n,i,o,a,u,f;if(!tt(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Oe(r))throw new TypeError(L("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(n=this._buffer,i=this._length,arguments.length>1){if(!gr(e))throw new TypeError(L("invalid argument. Second argument must be an integer. Value: `%s`.",e));if(e<0&&(e+=i)<0&&(e=0),arguments.length>2){if(!gr(t))throw new TypeError(L("invalid argument. Third argument must be an integer. Value: `%s`.",t));t<0&&(t+=i)<0&&(t=0),t>i&&(t=i)}else t=i}else e=0,t=i;for(a=Ge(r),u=Ze(r),f=e;f<t;f++)n[o=2*f]=a,n[o+1]=u;return this})),N(ot.prototype,"filter",(function(r,e){var t,n,i,o;if(!tt(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!yr(r))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=[],i=0;i<this._length;i++)o=it(t,i),r.call(e,o,i,this)&&n.push(o);return new this.constructor(n)})),N(ot.prototype,"find",(function(r,e){var t,n,i;if(!tt(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!yr(r))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=0;n<this._length;n++)if(i=it(t,n),r.call(e,i,n,this))return i})),N(ot.prototype,"findIndex",(function(r,e){var t,n,i;if(!tt(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!yr(r))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=0;n<this._length;n++)if(i=it(t,n),r.call(e,i,n,this))return n;return-1})),N(ot.prototype,"findLast",(function(r,e){var t,n,i;if(!tt(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!yr(r))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=this._length-1;n>=0;n--)if(i=it(t,n),r.call(e,i,n,this))return i})),N(ot.prototype,"findLastIndex",(function(r,e){var t,n,i;if(!tt(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!yr(r))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=this._length-1;n>=0;n--)if(i=it(t,n),r.call(e,i,n,this))return n;return-1})),N(ot.prototype,"forEach",(function(r,e){var t,n,i;if(!tt(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!yr(r))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=0;n<this._length;n++)i=it(t,n),r.call(e,i,n,this)})),N(ot.prototype,"get",(function(r){if(!tt(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!we(r))throw new TypeError(L("invalid argument. Must provide a nonnegative integer. Value: `%s`.",r));if(!(r>=this._length))return it(this._buffer,r)})),N(ot.prototype,"includes",(function(r,e){var t,n,i,o,a;if(!tt(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Oe(r))throw new TypeError(L("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!gr(e))throw new TypeError(L("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0&&(e+=this._length)<0&&(e=0)}else e=0;for(i=Ge(r),o=Ze(r),t=this._buffer,a=e;a<this._length;a++)if(i===t[n=2*a]&&o===t[n+1])return!0;return!1})),N(ot.prototype,"indexOf",(function(r,e){var t,n,i,o,a;if(!tt(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Oe(r))throw new TypeError(L("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!gr(e))throw new TypeError(L("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0&&(e+=this._length)<0&&(e=0)}else e=0;for(i=Ge(r),o=Ze(r),t=this._buffer,a=e;a<this._length;a++)if(i===t[n=2*a]&&o===t[n+1])return a;return-1})),N(ot.prototype,"join",(function(r){var e,t,n,i;if(!tt(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(0===arguments.length)n=",";else{if(!Ve(r))throw new TypeError(L("invalid argument. First argument must be a string. Value: `%s`.",r));n=r}for(e=[],t=this._buffer,i=0;i<this._length;i++)e.push(it(t,i).toString());return e.join(n)})),N(ot.prototype,"lastIndexOf",(function(r,e){var t,n,i,o,a;if(!tt(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Oe(r))throw new TypeError(L("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!gr(e))throw new TypeError(L("invalid argument. Second argument must be an integer. Value: `%s`.",e));e>=this._length?e=this._length-1:e<0&&(e+=this._length)}else e=this._length-1;for(i=Ge(r),o=Ze(r),t=this._buffer,a=e;a>=0;a--)if(i===t[n=2*a]&&o===t[n+1])return a;return-1})),$e(ot.prototype,"length",(function(){return this._length})),N(ot.prototype,"map",(function(r,e){var t,n,i,o,a;if(!tt(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!yr(r))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",r));for(n=this._buffer,t=(i=new this.constructor(this._length))._buffer,o=0;o<this._length;o++)if(Oe(a=r.call(e,it(n,o),o,this)))t[2*o]=Ge(a),t[2*o+1]=Ze(a);else{if(!Ee(a)||2!==a.length)throw new TypeError(L("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",a));t[2*o]=a[0],t[2*o+1]=a[1]}return i})),N(ot.prototype,"reduce",(function(r,e){var t,n,i,o;if(!tt(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!yr(r))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",r));if(t=this._buffer,i=this._length,arguments.length>1)n=e,o=0;else{if(0===i)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");n=it(t,0),o=1}for(;o<i;o++)n=r(n,it(t,o),o,this);return n})),N(ot.prototype,"reverse",(function(){var r,e,t,n,i,o;if(!tt(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(t=this._length,r=this._buffer,n=mr(t/2),i=0;i<n;i++)o=t-i-1,e=r[2*i],r[2*i]=r[2*o],r[2*o]=e,e=r[2*i+1],r[2*i+1]=r[2*o+1],r[2*o+1]=e;return this})),N(ot.prototype,"set",(function(r){var e,t,n,i,o,a,u,f,l;if(!tt(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,arguments.length>1){if(!we(t=arguments[1]))throw new TypeError(L("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",t))}else t=0;if(Oe(r)){if(t>=this._length)throw new RangeError(L("invalid argument. Index argument is out-of-bounds. Value: `%u`.",t));return n[t*=2]=Ge(r),void(n[t+1]=Ze(r))}if(tt(r)){if(t+(a=r._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(e=r._buffer,l=n.byteOffset+t*rt,e.buffer===n.buffer&&e.byteOffset<l&&e.byteOffset+e.byteLength>l){for(i=new Wr(e.length),f=0;f<e.length;f++)i[f]=e[f];e=i}for(t*=2,l=0,f=0;f<a;f++)n[t]=e[l],n[t+1]=e[l+1],t+=2,l+=2}else{if(!vr(r))throw new TypeError(L("invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `%s`.",r));for(a=r.length,f=0;f<a;f++)if(!Oe(r[f])){o=!0;break}if(o){if(!Me(a))throw new RangeError(L("invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.",a));if(t+a/2>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(e=r,l=n.byteOffset+t*rt,e.buffer===n.buffer&&e.byteOffset<l&&e.byteOffset+e.byteLength>l){for(i=new Wr(a),f=0;f<a;f++)i[f]=e[f];e=i}for(t*=2,a/=2,l=0,f=0;f<a;f++)n[t]=e[l],n[t+1]=e[l+1],t+=2,l+=2;return}if(t+a>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(t*=2,f=0;f<a;f++)u=r[f],n[t]=Ge(u),n[t+1]=Ze(u),t+=2}})),N(ot.prototype,"slice",(function(r,e){var t,n,i,o,a,u,f;if(!tt(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(a=this._buffer,u=this._length,0===arguments.length)r=0,e=u;else{if(!gr(r))throw new TypeError(L("invalid argument. First argument must be an integer. Value: `%s`.",r));if(r<0&&(r+=u)<0&&(r=0),1===arguments.length)e=u;else{if(!gr(e))throw new TypeError(L("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0?(e+=u)<0&&(e=0):e>u&&(e=u)}}for(t=r<e?e-r:0,n=(i=new this.constructor(t))._buffer,f=0;f<t;f++)o=2*(f+r),n[2*f]=a[o],n[2*f+1]=a[o+1];return i})),N(ot.prototype,"some",(function(r,e){var t,n;if(!tt(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!yr(r))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=0;n<this._length;n++)if(r.call(e,it(t,n),n,this))return!0;return!1})),N(ot.prototype,"subarray",(function(r,e){var t,n,i;if(!tt(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,i=this._length,0===arguments.length)r=0,e=i;else{if(!gr(r))throw new TypeError(L("invalid argument. First argument must be an integer. Value: `%s`.",r));if(r<0&&(r+=i)<0&&(r=0),1===arguments.length)e=i;else{if(!gr(e))throw new TypeError(L("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0?(e+=i)<0&&(e=0):e>i&&(e=i)}}return r>=i?(i=0,t=n.byteLength):r>=e?(i=0,t=n.byteOffset+r*rt):(i=e-r,t=n.byteOffset+r*rt),new this.constructor(n.buffer,t,i<0?0:i)})),N(ot.prototype,"toReversed",(function(){var r,e,t,n,i,o;if(!tt(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(t=this._length,e=new this.constructor(t),n=this._buffer,r=e._buffer,i=0;i<t;i++)o=t-i-1,r[2*i]=n[2*o],r[2*i+1]=n[2*o+1];return e})),N(ot.prototype,"toString",(function(){var r,e,t;if(!tt(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(r=[],e=this._buffer,t=0;t<this._length;t++)r.push(it(e,t).toString());return r.join(",")})),N(ot.prototype,"with",(function(r,e){var t,n,i;if(!tt(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!gr(r))throw new TypeError(L("invalid argument. First argument must be an integer. Value: `%s`.",r));if(i=this._length,r<0&&(r+=i),r<0||r>=i)throw new RangeError(L("invalid argument. Index argument is out-of-bounds. Value: `%s`.",r));if(!Oe(e))throw new TypeError(L("invalid argument. Second argument must be a complex number. Value: `%s`.",e));return(t=(n=new this.constructor(this._buffer))._buffer)[2*r]=Ge(e),t[2*r+1]=Ze(e),n})),N(at,"BYTES_PER_ELEMENT",8),N(at.prototype,"BYTES_PER_ELEMENT",8),N(at.prototype,"byteLength",16),N(at.prototype,"toString",(function(){var r=""+this.re;return this.im<0?r+=" - "+-this.im:r+=" + "+this.im,r+="i"})),N(at.prototype,"toJSON",(function(){var r={type:"Complex128"};return r.re=this.re,r.im=this.im,r}));var st=2*Pr.BYTES_PER_ELEMENT,ht=Ye();function ct(r){return r instanceof mt||"object"==typeof r&&null!==r&&("Complex64Array"===r.constructor.name||"Complex128Array"===r.constructor.name)&&"number"==typeof r._length&&"object"==typeof r._buffer}function pt(r){return r===mt||"Complex64Array"===r.name}function yt(r,e){return new at(r[e*=2],r[e+1])}function mt(){var r,e,t,n;if(e=arguments.length,!(this instanceof mt))return 0===e?new mt:1===e?new mt(arguments[0]):2===e?new mt(arguments[0],arguments[1]):new mt(arguments[0],arguments[1],arguments[2]);if(0===e)t=new Pr(0);else if(1===e)if(we(arguments[0]))t=new Pr(2*arguments[0]);else if(vr(arguments[0]))if((n=(t=arguments[0]).length)&&lr(t)&&Oe(t[0])){if(t=function(r,e){var t,n,i,o;for(t=e.length,o=0,i=0;i<t;i++){if(!Oe(n=e[i]))return null;r[o]=ut(n),r[o+1]=ft(n),o+=2}return r}(new Pr(2*n),t),null===t){if(!Me(n))throw new RangeError(L("invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.",n));t=new Pr(arguments[0])}}else{if(Pe(t))t=Je(t,0);else if(Ue(t))t=Xe(t,0);else if(!Me(n))throw new RangeError(L("invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.",n));t=new Pr(t)}else if(_e(arguments[0])){if(!gr((t=arguments[0]).byteLength/st))throw new RangeError(L("invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.",st,t.byteLength));t=new Pr(t)}else{if(!xe(arguments[0]))throw new TypeError(L("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",arguments[0]));if(t=arguments[0],!1===ht)throw new TypeError(L("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.",t));if(!yr(t[We]))throw new TypeError(L("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",t));if(!yr((t=t[We]()).next))throw new TypeError(L("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",t));if((t=lt(t))instanceof Error)throw t;t=new Pr(t)}else{if(!_e(t=arguments[0]))throw new TypeError(L("invalid argument. First argument must be an ArrayBuffer. Value: `%s`.",t));if(!we(r=arguments[1]))throw new TypeError(L("invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.",r));if(!gr(r/st))throw new RangeError(L("invalid argument. Byte offset must be a multiple of %u. Value: `%u`.",st,r));if(2===e){if(!gr((n=t.byteLength-r)/st))throw new RangeError(L("invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.",st,n));t=new Pr(t,r)}else{if(!we(n=arguments[2]))throw new TypeError(L("invalid argument. Length must be a nonnegative integer. Value: `%s`.",n));if(n*st>t.byteLength-r)throw new RangeError(L("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*st));t=new Pr(t,r,2*n)}}return N(this,"_buffer",t),N(this,"_length",t.length/2),this}function gt(r){var e,t;for(e=[];!(t=r.next()).done;)e.push(q(t.value));return e}N(mt,"BYTES_PER_ELEMENT",st),N(mt,"name","Complex128Array"),N(mt,"from",(function(r){var e,t,n,i,o,a,u,f,l,s,h,c;if(!yr(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!pt(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((t=arguments.length)>1){if(!yr(n=arguments[1]))throw new TypeError(L("invalid argument. Second argument must be a function. Value: `%s`.",n));t>2&&(e=arguments[2])}if(ct(r)){if(f=r.length,n){for(o=(i=new this(f))._buffer,c=0,h=0;h<f;h++){if(Oe(s=n.call(e,r.get(h),h)))o[c]=ut(s),o[c+1]=ft(s);else{if(!(Ee(s)&&s.length>=2))throw new TypeError(L("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",s));o[c]=s[0],o[c+1]=s[1]}c+=2}return i}return new this(r)}if(vr(r)){if(n){for(f=r.length,u=r.get&&r.set?Ke("default"):De("default"),h=0;h<f;h++)if(!Oe(u(r,h))){l=!0;break}if(l){if(!Me(f))throw new RangeError(L("invalid argument. First argument must have a length which is a multiple of two. Length: `%u`.",f));for(o=(i=new this(f/2))._buffer,h=0;h<f;h++)o[h]=n.call(e,u(r,h),h);return i}for(o=(i=new this(f))._buffer,c=0,h=0;h<f;h++){if(Oe(s=n.call(e,u(r,h),h)))o[c]=ut(s),o[c+1]=ft(s);else{if(!(Ee(s)&&s.length>=2))throw new TypeError(L("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",s));o[c]=s[0],o[c+1]=s[1]}c+=2}return i}return new this(r)}if(xe(r)&&ht&&yr(r[We])){if(!yr((o=r[We]()).next))throw new TypeError(L("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r));if(a=n?function(r,e,t){var n,i,o,a;for(n=[],a=-1;!(i=r.next()).done;)if(a+=1,Ee(o=e.call(t,i.value,a))&&o.length>=2)n.push(o[0],o[1]);else{if(!Oe(o))return new TypeError(L("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",o));n.push(ut(o),ft(o))}return n}(o,n,e):lt(o),a instanceof Error)throw a;for(o=(i=new this(f=a.length/2))._buffer,h=0;h<f;h++)o[h]=a[h];return i}throw new TypeError(L("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r))})),N(mt,"of",(function(){var r,e;if(!yr(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!pt(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(r=[],e=0;e<arguments.length;e++)r.push(arguments[e]);return new this(r)})),N(mt.prototype,"at",(function(r){if(!ct(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!gr(r))throw new TypeError(L("invalid argument. Must provide an integer. Value: `%s`.",r));if(r<0&&(r+=this._length),!(r<0||r>=this._length))return yt(this._buffer,r)})),$e(mt.prototype,"buffer",(function(){return this._buffer.buffer})),$e(mt.prototype,"byteLength",(function(){return this._buffer.byteLength})),$e(mt.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),N(mt.prototype,"BYTES_PER_ELEMENT",mt.BYTES_PER_ELEMENT),N(mt.prototype,"copyWithin",(function(r,e){if(!ct(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return 2===arguments.length?this._buffer.copyWithin(2*r,2*e):this._buffer.copyWithin(2*r,2*e,2*arguments[2]),this})),N(mt.prototype,"entries",(function(){var r,e,t,n,i,o,a;if(!ct(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return e=this,r=this._buffer,n=this._length,o=-1,a=-2,N(t={},"next",(function(){var e;if(o+=1,i||o>=n)return{done:!0};return e=new at(r[a+=2],r[a+1]),{value:[o,e],done:!1}})),N(t,"return",(function(r){if(i=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),We&&N(t,We,(function(){return e.entries()})),t})),N(mt.prototype,"every",(function(r,e){var t,n;if(!ct(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!yr(r))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=0;n<this._length;n++)if(!r.call(e,yt(t,n),n,this))return!1;return!0})),N(mt.prototype,"fill",(function(r,e,t){var n,i,o,a,u,f;if(!ct(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Oe(r))throw new TypeError(L("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(n=this._buffer,i=this._length,arguments.length>1){if(!gr(e))throw new TypeError(L("invalid argument. Second argument must be an integer. Value: `%s`.",e));if(e<0&&(e+=i)<0&&(e=0),arguments.length>2){if(!gr(t))throw new TypeError(L("invalid argument. Third argument must be an integer. Value: `%s`.",t));t<0&&(t+=i)<0&&(t=0),t>i&&(t=i)}else t=i}else e=0,t=i;for(a=ut(r),u=ft(r),f=e;f<t;f++)n[o=2*f]=a,n[o+1]=u;return this})),N(mt.prototype,"filter",(function(r,e){var t,n,i,o;if(!ct(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!yr(r))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=[],i=0;i<this._length;i++)o=yt(t,i),r.call(e,o,i,this)&&n.push(o);return new this.constructor(n)})),N(mt.prototype,"find",(function(r,e){var t,n,i;if(!ct(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!yr(r))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=0;n<this._length;n++)if(i=yt(t,n),r.call(e,i,n,this))return i})),N(mt.prototype,"findIndex",(function(r,e){var t,n,i;if(!ct(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!yr(r))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=0;n<this._length;n++)if(i=yt(t,n),r.call(e,i,n,this))return n;return-1})),N(mt.prototype,"findLast",(function(r,e){var t,n,i;if(!ct(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!yr(r))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=this._length-1;n>=0;n--)if(i=yt(t,n),r.call(e,i,n,this))return i})),N(mt.prototype,"findLastIndex",(function(r,e){var t,n,i;if(!ct(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!yr(r))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=this._length-1;n>=0;n--)if(i=yt(t,n),r.call(e,i,n,this))return n;return-1})),N(mt.prototype,"forEach",(function(r,e){var t,n,i;if(!ct(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!yr(r))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=0;n<this._length;n++)i=yt(t,n),r.call(e,i,n,this)})),N(mt.prototype,"get",(function(r){if(!ct(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!we(r))throw new TypeError(L("invalid argument. Must provide a nonnegative integer. Value: `%s`.",r));if(!(r>=this._length))return yt(this._buffer,r)})),$e(mt.prototype,"length",(function(){return this._length})),N(mt.prototype,"includes",(function(r,e){var t,n,i,o,a;if(!ct(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Oe(r))throw new TypeError(L("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!gr(e))throw new TypeError(L("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0&&(e+=this._length)<0&&(e=0)}else e=0;for(i=ut(r),o=ft(r),t=this._buffer,a=e;a<this._length;a++)if(i===t[n=2*a]&&o===t[n+1])return!0;return!1})),N(mt.prototype,"indexOf",(function(r,e){var t,n,i,o,a;if(!ct(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Oe(r))throw new TypeError(L("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!gr(e))throw new TypeError(L("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0&&(e+=this._length)<0&&(e=0)}else e=0;for(i=ut(r),o=ft(r),t=this._buffer,a=e;a<this._length;a++)if(i===t[n=2*a]&&o===t[n+1])return a;return-1})),N(mt.prototype,"join",(function(r){var e,t,n,i;if(!ct(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(0===arguments.length)n=",";else{if(!Fe(r))throw new TypeError(L("invalid argument. First argument must be a string. Value: `%s`.",r));n=r}for(e=[],t=this._buffer,i=0;i<this._length;i++)e.push(yt(t,i).toString());return e.join(n)})),N(mt.prototype,"lastIndexOf",(function(r,e){var t,n,i,o,a;if(!ct(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Oe(r))throw new TypeError(L("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!gr(e))throw new TypeError(L("invalid argument. Second argument must be an integer. Value: `%s`.",e));e>=this._length?e=this._length-1:e<0&&(e+=this._length)}else e=this._length-1;for(i=ut(r),o=ft(r),t=this._buffer,a=e;a>=0;a--)if(i===t[n=2*a]&&o===t[n+1])return a;return-1})),N(mt.prototype,"map",(function(r,e){var t,n,i,o,a;if(!ct(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!yr(r))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",r));for(n=this._buffer,t=(i=new this.constructor(this._length))._buffer,o=0;o<this._length;o++)if(Oe(a=r.call(e,yt(n,o),o,this)))t[2*o]=ut(a),t[2*o+1]=ft(a);else{if(!Ee(a)||2!==a.length)throw new TypeError(L("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",a));t[2*o]=a[0],t[2*o+1]=a[1]}return i})),N(mt.prototype,"reduce",(function(r,e){var t,n,i,o;if(!ct(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!yr(r))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",r));if(t=this._buffer,i=this._length,arguments.length>1)n=e,o=0;else{if(0===i)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");n=yt(t,0),o=1}for(;o<i;o++)n=r(n,yt(t,o),o,this);return n})),N(mt.prototype,"reverse",(function(){var r,e,t,n,i,o;if(!ct(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(t=this._length,r=this._buffer,n=mr(t/2),i=0;i<n;i++)o=t-i-1,e=r[2*i],r[2*i]=r[2*o],r[2*o]=e,e=r[2*i+1],r[2*i+1]=r[2*o+1],r[2*o+1]=e;return this})),N(mt.prototype,"set",(function(r){var e,t,n,i,o,a,u,f,l;if(!ct(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,arguments.length>1){if(!we(t=arguments[1]))throw new TypeError(L("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",t))}else t=0;if(Oe(r)){if(t>=this._length)throw new RangeError(L("invalid argument. Index argument is out-of-bounds. Value: `%u`.",t));return n[t*=2]=ut(r),void(n[t+1]=ft(r))}if(ct(r)){if(t+(a=r._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(e=r._buffer,l=n.byteOffset+t*st,e.buffer===n.buffer&&e.byteOffset<l&&e.byteOffset+e.byteLength>l){for(i=new Pr(e.length),f=0;f<e.length;f++)i[f]=e[f];e=i}for(t*=2,l=0,f=0;f<a;f++)n[t]=e[l],n[t+1]=e[l+1],t+=2,l+=2}else{if(!vr(r))throw new TypeError(L("invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `%s`.",r));for(a=r.length,f=0;f<a;f++)if(!Oe(r[f])){o=!0;break}if(o){if(!Me(a))throw new RangeError(L("invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.",a));if(t+a/2>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(e=r,l=n.byteOffset+t*st,e.buffer===n.buffer&&e.byteOffset<l&&e.byteOffset+e.byteLength>l){for(i=new Pr(a),f=0;f<a;f++)i[f]=e[f];e=i}for(t*=2,a/=2,l=0,f=0;f<a;f++)n[t]=e[l],n[t+1]=e[l+1],t+=2,l+=2;return}if(t+a>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(t*=2,f=0;f<a;f++)u=r[f],n[t]=ut(u),n[t+1]=ft(u),t+=2}})),N(mt.prototype,"slice",(function(r,e){var t,n,i,o,a,u,f;if(!ct(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(a=this._buffer,u=this._length,0===arguments.length)r=0,e=u;else{if(!gr(r))throw new TypeError(L("invalid argument. First argument must be an integer. Value: `%s`.",r));if(r<0&&(r+=u)<0&&(r=0),1===arguments.length)e=u;else{if(!gr(e))throw new TypeError(L("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0?(e+=u)<0&&(e=0):e>u&&(e=u)}}for(t=r<e?e-r:0,n=(i=new this.constructor(t))._buffer,f=0;f<t;f++)o=2*(f+r),n[2*f]=a[o],n[2*f+1]=a[o+1];return i})),N(mt.prototype,"some",(function(r,e){var t,n;if(!ct(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!yr(r))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,n=0;n<this._length;n++)if(r.call(e,yt(t,n),n,this))return!0;return!1})),N(mt.prototype,"subarray",(function(r,e){var t,n,i;if(!ct(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,i=this._length,0===arguments.length)r=0,e=i;else{if(!gr(r))throw new TypeError(L("invalid argument. First argument must be an integer. Value: `%s`.",r));if(r<0&&(r+=i)<0&&(r=0),1===arguments.length)e=i;else{if(!gr(e))throw new TypeError(L("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0?(e+=i)<0&&(e=0):e>i&&(e=i)}}return r>=i?(i=0,t=n.byteLength):r>=e?(i=0,t=n.byteOffset+r*st):(i=e-r,t=n.byteOffset+r*st),new this.constructor(n.buffer,t,i<0?0:i)})),N(mt.prototype,"toReversed",(function(){var r,e,t,n,i,o;if(!ct(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(t=this._length,e=new this.constructor(t),n=this._buffer,r=e._buffer,i=0;i<t;i++)o=t-i-1,r[2*i]=n[2*o],r[2*i+1]=n[2*o+1];return e})),N(mt.prototype,"toString",(function(){var r,e,t;if(!ct(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(r=[],e=this._buffer,t=0;t<this._length;t++)r.push(yt(e,t).toString());return r.join(",")})),N(mt.prototype,"with",(function(r,e){var t,n,i;if(!ct(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!gr(r))throw new TypeError(L("invalid argument. First argument must be an integer. Value: `%s`.",r));if(i=this._length,r<0&&(r+=i),r<0||r>=i)throw new RangeError(L("invalid argument. Index argument is out-of-bounds. Value: `%s`.",r));if(!Oe(e))throw new TypeError(L("invalid argument. Second argument must be a complex number. Value: `%s`.",e));return(t=(n=new this.constructor(this._buffer))._buffer)[2*r]=ut(e),t[2*r+1]=ft(e),n}));var wt=fe.BYTES_PER_ELEMENT,vt=Ye();function bt(r){return"object"==typeof r&&null!==r&&"BooleanArray"===r.constructor.name&&r.BYTES_PER_ELEMENT===wt}function dt(r){return r===Et}function Et(){var r,e,t,n,i;if(e=arguments.length,!(this instanceof Et))return 0===e?new Et:1===e?new Et(arguments[0]):2===e?new Et(arguments[0],arguments[1]):new Et(arguments[0],arguments[1],arguments[2]);if(0===e)t=new fe(0);else if(1===e)if(we(i=arguments[0]))t=new fe(i);else if(vr(i))t=function(r,e){var t,n;for(t=e.length,n=0;n<t;n++)r[n]=q(e[n]);return r}(new fe(i.length),i);else if(_e(i))t=new fe(i);else{if(!xe(i))throw new TypeError(L("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",i));if(!1===vt)throw new TypeError(L("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.",i));if(!yr(i[We]))throw new TypeError(L("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",i));if(!yr((t=i[We]()).next))throw new TypeError(L("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",i));t=new fe(gt(t))}else{if(!_e(t=arguments[0]))throw new TypeError(L("invalid argument. First argument must be an ArrayBuffer. Value: `%s`.",t));if(!we(r=arguments[1]))throw new TypeError(L("invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.",r));if(2===e)t=new fe(t,r);else{if(!we(n=arguments[2]))throw new TypeError(L("invalid argument. Length must be a nonnegative integer. Value: `%s`.",n));if(n*wt>t.byteLength-r)throw new RangeError(L("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*wt));t=new fe(t,r,n)}}return N(this,"_buffer",t),N(this,"_length",t.length),this}N(Et,"BYTES_PER_ELEMENT",wt),N(Et,"name","BooleanArray"),N(Et,"from",(function(r){var e,t,n,i,o,a,u,f,l;if(!yr(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!dt(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if((t=arguments.length)>1){if(!yr(n=arguments[1]))throw new TypeError(L("invalid argument. Second argument must be a function. Value: `%s`.",n));t>2&&(e=arguments[2])}if(vr(r)){if(n){for(f=r.length,u=r.get&&r.set?Ke("default"):De("default"),o=(i=new this(f))._buffer,l=0;l<f;l++)o[l]=q(n.call(e,u(r,l),l));return i}return new this(r)}if(xe(r)&&vt&&yr(r[We])){if(!yr((o=r[We]()).next))throw new TypeError(L("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r));for(a=n?function(r,e,t){var n,i,o;for(n=[],o=-1;!(i=r.next()).done;)o+=1,n.push(q(e.call(t,i.value,o)));return n}(o,n,e):gt(o),o=(i=new this(f=a.length))._buffer,l=0;l<f;l++)o[l]=a[l];return i}throw new TypeError(L("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r))})),N(Et,"of",(function(){var r,e;if(!yr(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!dt(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");for(r=[],e=0;e<arguments.length;e++)r.push(arguments[e]);return new this(r)})),$e(Et.prototype,"buffer",(function(){return this._buffer.buffer})),$e(Et.prototype,"byteLength",(function(){return this._buffer.byteLength})),$e(Et.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),N(Et.prototype,"BYTES_PER_ELEMENT",Et.BYTES_PER_ELEMENT),N(Et.prototype,"find",(function(r,e){var t,n,i;if(!bt(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!yr(r))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,i=0;i<this._length;i++)if(n=q(t[i]),r.call(e,n,i,this))return n})),N(Et.prototype,"findIndex",(function(r,e){var t,n,i;if(!bt(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!yr(r))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,i=0;i<this._length;i++)if(n=q(t[i]),r.call(e,n,i,this))return i;return-1})),N(Et.prototype,"findLast",(function(r,e){var t,n,i;if(!bt(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!yr(r))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,i=this._length-1;i>=0;i--)if(n=q(t[i]),r.call(e,n,i,this))return n})),N(Et.prototype,"findLastIndex",(function(r,e){var t,n,i;if(!bt(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!yr(r))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",r));for(t=this._buffer,i=this._length-1;i>=0;i--)if(n=q(t[i]),r.call(e,n,i,this))return i;return-1})),N(Et.prototype,"get",(function(r){if(!bt(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!we(r))throw new TypeError(L("invalid argument. Must provide a nonnegative integer. Value: `%s`.",r));if(!(r>=this._length))return q(this._buffer[r])})),$e(Et.prototype,"length",(function(){return this._length})),N(Et.prototype,"map",(function(r,e){var t,n,i,o;if(!bt(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!yr(r))throw new TypeError("invalid argument. First argument must be a function. Value: `%s`.",r);for(i=this._buffer,t=(n=new this.constructor(this._length))._buffer,o=0;o<this._length;o++)t[o]=q(r.call(e,q(i[o]),o,this));return n})),N(Et.prototype,"reverse",(function(){var r,e,t,n,i,o;if(!bt(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");for(r=this._buffer,t=this._length,n=mr(t/2),i=0;i<n;i++)o=t-i-1,e=r[i],r[i]=r[o],r[o]=e;return this})),N(Et.prototype,"set",(function(r){var e,t,n,i,o,a,u;if(!bt(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(n=this._buffer,arguments.length>1){if(!we(t=arguments[1]))throw new TypeError(L("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",t))}else t=0;if(vr(r)){if(t+(o=r.length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(e=bt(r)?r._buffer:r,u=n.byteOffset+t*wt,e.buffer===n.buffer&&e.byteOffset<u&&e.byteOffset+e.byteLength>u){for(i=new fe(e.length),a=0;a<e.length;a++)i[a]=e[a];e=i}for(a=0;a<o;t++,a++)n[t]=e[a]?1:0}else{if(t>=this._length)throw new RangeError(L("invalid argument. Index argument is out-of-bounds. Value: `%u`.",t));n[t]=r?1:0}})),N(Et.prototype,"sort",(function(r){var e;if(!bt(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(e=this._buffer,0===arguments.length)return e.sort(),this;if(!yr(r))throw new TypeError(L("invalid argument. First argument must be a function. Value: `%s`.",r));return e.sort((function(e,t){return r(q(e),q(t))})),this})),N(Et.prototype,"toReversed",(function(){var r,e,t,n,i;if(!bt(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");for(t=this._length,e=new this.constructor(t),n=this._buffer,r=e._buffer,i=0;i<t;i++)r[i]=n[t-i-1];return e}));var Tt=[Pr,Wr,Dr,Zr,ie,re,ge,fe,ce,ot,mt,Et],_t=["float64","float32","int32","uint32","int16","uint16","int8","uint8","uint8c","complex64","complex128","bool"],xt=_t.length;function Vt(){var r,e=arguments,t="https://stdlib.io/e/"+e[0]+"?";for(r=1;r<e.length;r++)t+="&arg[]="+encodeURIComponent(e[r]);return t}return function(r,e){var t,n,i,o,a,u,f,l,s,h,c;if(c=typeof(h=r),null===h||"object"!==c&&"function"!==c||!yr(h.next))throw new TypeError(Vt("0Pz46",r));if(!vr(e))throw new TypeError(Vt("0Pz2y",e));if(2===(n=arguments.length))i=0,o=e.length;else if(3===n)yr(arguments[2])?(i=0,a=arguments[2]):i=arguments[2],o=e.length;else if(4===n)yr(arguments[2])?(i=0,o=e.length,a=arguments[2],t=arguments[3]):yr(arguments[3])?(i=arguments[2],o=e.length,a=arguments[3]):(i=arguments[2],o=arguments[3]);else if(5===n){if(i=arguments[2],yr(arguments[3]))o=e.length,a=arguments[3],t=arguments[4];else if(o=arguments[3],!yr(a=arguments[4]))throw new TypeError(Vt("0Pz31",a))}else{if(i=arguments[2],o=arguments[3],!yr(a=arguments[4]))throw new TypeError(Vt("0Pz31",a));t=arguments[5]}if(!Sr(i))throw new TypeError(Vt("0PzE2",i));if(!Sr(o))throw new TypeError(Vt("0PzE3",o));if(o<0?(o=e.length+o)<0&&(o=0):o>e.length&&(o=e.length),i<0&&(i=e.length+i)<0&&(i=0),f=function(r){var e;if(lr(r))return"generic";if(hr(r))return null;for(e=0;e<xt;e++)if(r instanceof Tt[e])return _t[e];return Ir[cr(r)]||null}(e),u=function(r){return typeof r.get===kr&&typeof r.set===kr}(e)?function(r){var e=Rr[r];return"function"==typeof e?e:Rr.default}(f):function(r){var e=Br[r];return"function"==typeof e?e:Br.default}(f),l=o,a){for(;l>i&&(l-=1,!(s=r.next()).done);)u(e,l,a.call(t,s.value,l,o-l-1));return e}for(;l>i&&(l-=1,!(s=r.next()).done);)u(e,l,s.value);return e}}));
//# sourceMappingURL=index.js.map