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