-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbrowser.js
3 lines (3 loc) · 322 KB
/
browser.js
1
2
3
// Copyright (c) 2025 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,l=String.prototype.toLowerCase,s=String.prototype.toUpperCase,c=String.prototype.replace,h=/e\+(\d)$/,p=/e-(\d)$/,g=/^(\d+)$/,y=/^(\d+)e/,m=/\.0$/,d=/\.0*e/,v=/(\..*[^0])0*e/;function w(r){var t,n,i=parseFloat(r.arg);if(!isFinite(i)){if(!e(r.arg))throw new Error("invalid floating-point number. Value: "+n);i=r.arg}switch(r.specifier){case"e":case"E":n=i.toExponential(r.precision);break;case"f":case"F":n=i.toFixed(r.precision);break;case"g":case"G":f(i)<1e-4?((t=r.precision)>0&&(t-=1),n=i.toExponential(t)):n=i.toPrecision(r.precision),r.alternate||(n=c.call(n,v,"$1e"),n=c.call(n,d,"e"),n=c.call(n,m,""));break;default:throw new Error("invalid double notation. Value: "+r.specifier)}return n=c.call(n,h,"e+0$1"),n=c.call(n,p,"e-0$1"),r.alternate&&(n=c.call(n,g,"$1."),n=c.call(n,y,"$1.e")),i>=0&&r.sign&&(n=r.sign+n),n=r.specifier===s.call(r.specifier)?s.call(n):l.call(n)}function b(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,e,n,o,a,f,l,s,c,h,p,g,y;if(!_(r))throw new TypeError("invalid argument. First argument must be an array. Value: `"+r+"`.");for(f="",l=1,s=0;s<r.length;s++)if("string"==typeof(n=r[s]))f+=n;else{if(t=void 0!==n.precision,!(n=x(n)).specifier)throw new TypeError("invalid argument. Token is missing `specifier` property. Index: `"+s+"`. Value: `"+n+"`.");for(n.mapping&&(l=n.mapping),e=n.flags,c=0;c<e.length;c++)switch(o=e.charAt(c)){case" ":n.sign=" ";break;case"+":n.sign="+";break;case"-":n.padRight=!0,n.padZeros=!1;break;case"0":n.padZeros=e.indexOf("-")<0;break;case"#":n.alternate=!0;break;default:throw new Error("invalid flag: "+o)}if("*"===n.width){if(n.width=parseInt(arguments[l],10),l+=1,T(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(t&&"*"===n.precision){if(n.precision=parseInt(arguments[l],10),l+=1,T(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,t=!1)}switch(n.arg=arguments[l],n.specifier){case"b":case"o":case"x":case"X":case"d":case"i":case"u":t&&(n.padZeros=!1),n.arg=u(n);break;case"s":n.maxWidth=t?n.precision:-1,n.arg=String(n.arg);break;case"c":if(!T(n.arg)){if((a=parseInt(n.arg,10))<0||a>127)throw new Error("invalid character code. Value: "+n.arg);n.arg=T(a)?String(n.arg):E(a)}break;case"e":case"E":case"f":case"F":case"g":case"G":t||(n.precision=6),n.arg=w(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=i(n.arg,n.width||n.precision,n.padRight):n.width&&(n.arg=(h=n.arg,p=n.width,g=n.padRight,y=void 0,(y=p-h.length)<0?h:h=g?h+b(y):b(y)+h)),f+=n.arg||"",l+=1}return f}var A=/%(?:([1-9]\d*)\$)?([0 +\-#]*)(\*|\d+)?(?:(\.)(\*|\d+)?)?[hlL]?([%A-Za-z])/g;function S(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(S(n)),i=A.lastIndex,n=A.exec(r);return(t=r.slice(i)).length&&e.push(t),e}function j(r){var t,e;if("string"!=typeof r)throw new TypeError(j("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 k,L=Object.prototype,I=L.toString,O=L.__defineGetter__,R=L.__defineSetter__,B=L.__lookupGetter__,M=L.__lookupSetter__;k=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(j("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(j("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__=L,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&&R&&R.call(r,t,e.set),r};var P=k;function C(r,t,e){P(r,t,{configurable:!1,enumerable:!0,writable:!1,value:e})}function N(r,t,e){P(r,t,{configurable:!1,enumerable:!1,writable:!1,value:e})}var U="function";function D(r){return typeof r.get===U&&typeof r.set===U}var Y={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 W(r){var t=Y[r];return"function"==typeof t?t:Y.default}var z={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 q(r){var t=z[r];return"function"==typeof t?t:z.default}var G={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 $(r){var t=G[r];return"function"==typeof t?t:G.default}var H={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 J(r){var t=H[r];return"function"==typeof t?t:H.default}var Q="function"==typeof Symbol&&"symbol"==typeof Symbol("foo");function X(){return Q&&"symbol"==typeof Symbol.toStringTag}var Z=Object.prototype.toString,K=Object.prototype.hasOwnProperty;function rr(r,t){return null!=r&&K.call(r,t)}var tr="function"==typeof Symbol?Symbol:void 0,er="function"==typeof tr?tr.toStringTag:"",nr=X()?function(r){var t,e,n;if(null==r)return Z.call(r);e=r[er],t=rr(r,er);try{r[er]=void 0}catch(t){return Z.call(r)}return n=Z.call(r),t?r[er]=e:delete r[er],n}:function(r){return Z.call(r)},ir=Array.isArray?Array.isArray:function(r){return"[object Array]"===nr(r)};function or(r){if("function"!=typeof r)throw new TypeError(j("invalid argument. Must provide a function. Value: `%s`.",r));return function(t){var e,n;if(!ir(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 ar(r){return null!==r&&"object"==typeof r}function ur(r){return ar(r)&&(r._isBuffer||r.constructor&&"function"==typeof r.constructor.isBuffer&&r.constructor.isBuffer(r))}function fr(){return/^\s*function\s*([^(]*)/i}N(ar,"isObjectLikeArray",or(ar));var lr=/^\s*function\s*([^(]*)/i;function sr(r){var t,e,n;if(("Object"===(e=nr(r).slice(8,-1))||"Error"===e)&&r.constructor){if("string"==typeof(n=r.constructor).name)return n.name;if(t=lr.exec(n.toString()))return t[1]}return ur(r)?"Buffer":e}N(fr,"REGEXP",lr);var cr={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"},hr="function"==typeof Float64Array,pr="function"==typeof Float64Array?Float64Array:null;function gr(){var r,t,e;if("function"!=typeof pr)return!1;try{t=new pr([1,3.14,-3.14,NaN]),e=t,r=(hr&&e instanceof Float64Array||"[object Float64Array]"===nr(e))&&1===t[0]&&3.14===t[1]&&-3.14===t[2]&&t[3]!=t[3]}catch(t){r=!1}return r}var yr="function"==typeof Float64Array?Float64Array:void 0,mr=gr()?yr:function(){throw new Error("not implemented")},dr="function"==typeof Float32Array,vr=Number.POSITIVE_INFINITY,wr="function"==typeof Float32Array?Float32Array:null;function br(){var r,t,e;if("function"!=typeof wr)return!1;try{t=new wr([1,3.14,-3.14,5e40]),e=t,r=(dr&&e instanceof Float32Array||"[object Float32Array]"===nr(e))&&1===t[0]&&3.140000104904175===t[1]&&-3.140000104904175===t[2]&&t[3]===vr}catch(t){r=!1}return r}var Er="function"==typeof Float32Array?Float32Array:void 0,_r=br()?Er:function(){throw new Error("not implemented")},Tr="function"==typeof Uint32Array,xr=4294967295,Vr="function"==typeof Uint32Array?Uint32Array:null;function Ar(){var r,t,e;if("function"!=typeof Vr)return!1;try{t=new Vr(t=[1,3.14,-3.14,xr+1,xr+2]),e=t,r=(Tr&&e instanceof Uint32Array||"[object Uint32Array]"===nr(e))&&1===t[0]&&3===t[1]&&t[2]===xr-2&&0===t[3]&&1===t[4]}catch(t){r=!1}return r}var Sr="function"==typeof Uint32Array?Uint32Array:void 0,Fr=Ar()?Sr:function(){throw new Error("not implemented")},jr="function"==typeof Int32Array,kr=2147483647,Lr=-2147483648,Ir="function"==typeof Int32Array?Int32Array:null;function Or(){var r,t,e;if("function"!=typeof Ir)return!1;try{t=new Ir([1,3.14,-3.14,kr+1]),e=t,r=(jr&&e instanceof Int32Array||"[object Int32Array]"===nr(e))&&1===t[0]&&3===t[1]&&-3===t[2]&&t[3]===Lr}catch(t){r=!1}return r}var Rr="function"==typeof Int32Array?Int32Array:void 0,Br=Or()?Rr:function(){throw new Error("not implemented")},Mr="function"==typeof Uint16Array,Pr=65535,Cr="function"==typeof Uint16Array?Uint16Array:null;function Nr(){var r,t,e;if("function"!=typeof Cr)return!1;try{t=new Cr(t=[1,3.14,-3.14,Pr+1,Pr+2]),e=t,r=(Mr&&e instanceof Uint16Array||"[object Uint16Array]"===nr(e))&&1===t[0]&&3===t[1]&&t[2]===Pr-2&&0===t[3]&&1===t[4]}catch(t){r=!1}return r}var Ur="function"==typeof Uint16Array?Uint16Array:void 0,Dr=Nr()?Ur:function(){throw new Error("not implemented")},Yr="function"==typeof Int16Array,Wr=32767,zr=-32768,qr="function"==typeof Int16Array?Int16Array:null;function Gr(){var r,t,e;if("function"!=typeof qr)return!1;try{t=new qr([1,3.14,-3.14,Wr+1]),e=t,r=(Yr&&e instanceof Int16Array||"[object Int16Array]"===nr(e))&&1===t[0]&&3===t[1]&&-3===t[2]&&t[3]===zr}catch(t){r=!1}return r}var $r="function"==typeof Int16Array?Int16Array:void 0,Hr=Gr()?$r:function(){throw new Error("not implemented")},Jr="function"==typeof Uint8Array,Qr=255,Xr="function"==typeof Uint8Array?Uint8Array:null;function Zr(){var r,t,e;if("function"!=typeof Xr)return!1;try{t=new Xr(t=[1,3.14,-3.14,Qr+1,Qr+2]),e=t,r=(Jr&&e instanceof Uint8Array||"[object Uint8Array]"===nr(e))&&1===t[0]&&3===t[1]&&t[2]===Qr-2&&0===t[3]&&1===t[4]}catch(t){r=!1}return r}var Kr="function"==typeof Uint8Array?Uint8Array:void 0,rt=Zr()?Kr:function(){throw new Error("not implemented")},tt="function"==typeof Uint8ClampedArray,et="function"==typeof Uint8ClampedArray?Uint8ClampedArray:null;function nt(){var r,t,e;if("function"!=typeof et)return!1;try{t=new et([-1,0,1,3.14,4.99,255,256]),e=t,r=(tt&&e instanceof Uint8ClampedArray||"[object Uint8ClampedArray]"===nr(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}var it="function"==typeof Uint8ClampedArray?Uint8ClampedArray:void 0,ot=nt()?it:function(){throw new Error("not implemented")},at="function"==typeof Int8Array,ut=127,ft=-128,lt="function"==typeof Int8Array?Int8Array:null;function st(){var r,t,e;if("function"!=typeof lt)return!1;try{t=new lt([1,3.14,-3.14,ut+1]),e=t,r=(at&&e instanceof Int8Array||"[object Int8Array]"===nr(e))&&1===t[0]&&3===t[1]&&-3===t[2]&&t[3]===ft}catch(t){r=!1}return r}var ct="function"==typeof Int8Array?Int8Array:void 0,ht=st()?ct:function(){throw new Error("not implemented")};function pt(r){return"number"==typeof r}var gt=Number,yt=gt.prototype.toString,mt=X();function dt(r){return"object"==typeof r&&(r instanceof gt||(mt?function(r){try{return yt.call(r),!0}catch(r){return!1}}(r):"[object Number]"===nr(r)))}function vt(r){return pt(r)||dt(r)}N(vt,"isPrimitive",pt),N(vt,"isObject",dt);var wt=gt.NEGATIVE_INFINITY,bt=Math.floor;function Et(r){return bt(r)===r}function _t(r){return r<vr&&r>wt&&Et(r)}function Tt(r){return pt(r)&&_t(r)}function xt(r){return dt(r)&&_t(r.valueOf())}function Vt(r){return Tt(r)||xt(r)}function At(r){return Tt(r)&&r>=0}function St(r){return xt(r)&&r.valueOf()>=0}function Ft(r){return At(r)||St(r)}N(Vt,"isPrimitive",Tt),N(Vt,"isObject",xt),N(Ft,"isPrimitive",At),N(Ft,"isObject",St);var jt=4294967295;function kt(r){return"object"==typeof r&&null!==r&&"number"==typeof r.length&&Et(r.length)&&r.length>=0&&r.length<=jt}var Lt=9007199254740991;function It(r){return"object"==typeof r&&null!==r&&"number"==typeof r.length&&Et(r.length)&&r.length>=0&&r.length<=Lt}var Ot="function"==typeof ArrayBuffer;function Rt(r){return Ot&&r instanceof ArrayBuffer||"[object ArrayBuffer]"===nr(r)}function Bt(r){return"object"==typeof r&&null!==r&&!ir(r)}function Mt(r){return"string"==typeof r}var Pt=String.prototype.valueOf,Ct=X();function Nt(r){return"object"==typeof r&&(r instanceof String||(Ct?function(r){try{return Pt.call(r),!0}catch(r){return!1}}(r):"[object String]"===nr(r)))}function Ut(r){return Mt(r)||Nt(r)}N(Ut,"isPrimitive",Mt),N(Ut,"isObject",Nt);var Dt=or(Ut.isPrimitive),Yt=or(Ut.isObject),Wt=or(Ut);N(Wt,"primitives",Dt),N(Wt,"objects",Yt);var zt=/./;function qt(r){return"boolean"==typeof r}var Gt=Boolean,$t=Boolean.prototype.toString,Ht=X();function Jt(r){return"object"==typeof r&&(r instanceof Gt||(Ht?function(r){try{return $t.call(r),!0}catch(r){return!1}}(r):"[object Boolean]"===nr(r)))}function Qt(r){return qt(r)||Jt(r)}N(Qt,"isPrimitive",qt),N(Qt,"isObject",Jt);var Xt="object"==typeof self?self:null,Zt="object"==typeof window?window:null,Kt="object"==typeof globalThis?globalThis:null,re=function(r){if(arguments.length){if(!qt(r))throw new TypeError(j("invalid argument. Must provide a boolean. Value: `%s`.",r));if(r)return new Function("return this;")()}if(Kt)return Kt;if(Xt)return Xt;if(Zt)return Zt;throw new Error("unexpected error. Unable to resolve global object.")}(),te=re.document&&re.document.childNodes,ee=Int8Array,ne="function"==typeof zt||"object"==typeof ee||"function"==typeof te?function(r){return sr(r).toLowerCase()}:function(r){var t;return null===r?"null":"object"==(t=typeof r)?sr(r).toLowerCase():t};function ie(r){return"function"===ne(r)}function oe(r,t){if(!(this instanceof oe))throw new TypeError("invalid invocation. Constructor must be called with the `new` keyword.");if(!pt(r))throw new TypeError(j("invalid argument. Real component must be a number. Value: `%s`.",r));if(!pt(t))throw new TypeError(j("invalid argument. Imaginary component must be a number. Value: `%s`.",t));return P(this,"re",{configurable:!1,enumerable:!0,writable:!1,value:r}),P(this,"im",{configurable:!1,enumerable:!0,writable:!1,value:t}),this}N(oe,"BYTES_PER_ELEMENT",8),N(oe.prototype,"BYTES_PER_ELEMENT",8),N(oe.prototype,"byteLength",16),N(oe.prototype,"toString",(function(){var r=""+this.re;return this.im<0?r+=" - "+-this.im:r+=" + "+this.im,r+="i"})),N(oe.prototype,"toJSON",(function(){var r={type:"Complex128"};return r.re=this.re,r.im=this.im,r}));var ae="function"==typeof Math.fround?Math.fround:null,ue="function"==typeof Float32Array?Float32Array:void 0,fe=br()?ue:function(){throw new Error("not implemented")},le=new fe(1),se="function"==typeof ae?ae:function(r){return le[0]=r,le[0]};function ce(r,t){if(!(this instanceof ce))throw new TypeError("invalid invocation. Constructor must be called with the `new` keyword.");if(!pt(r))throw new TypeError(j("invalid argument. Real component must be a number. Value: `%s`.",r));if(!pt(t))throw new TypeError(j("invalid argument. Imaginary component must be a number. Value: `%s`.",t));return P(this,"re",{configurable:!1,enumerable:!0,writable:!1,value:se(r)}),P(this,"im",{configurable:!1,enumerable:!0,writable:!1,value:se(t)}),this}function he(r){return r instanceof oe||r instanceof ce||"object"==typeof r&&null!==r&&"number"==typeof r.re&&"number"==typeof r.im}function pe(r){return Et(r/2)}N(ce,"BYTES_PER_ELEMENT",4),N(ce.prototype,"BYTES_PER_ELEMENT",4),N(ce.prototype,"byteLength",8),N(ce.prototype,"toString",(function(){var r=""+this.re;return this.im<0?r+=" - "+-this.im:r+=" + "+this.im,r+="i"})),N(ce.prototype,"toJSON",(function(){var r={type:"Complex64"};return r.re=this.re,r.im=this.im,r}));var ge=8;function ye(r){return"object"==typeof r&&null!==r&&"Complex64Array"===r.constructor.name&&r.BYTES_PER_ELEMENT===ge}var me=16;function de(r){return"object"==typeof r&&null!==r&&"Complex128Array"===r.constructor.name&&r.BYTES_PER_ELEMENT===me}function ve(){return"function"==typeof tr&&"symbol"==typeof tr("foo")&&rr(tr,"iterator")&&"symbol"==typeof tr.iterator}var we=ve()?Symbol.iterator:null;function be(r,t,e){P(r,t,{configurable:!1,enumerable:!1,get:e})}function Ee(r){return r.re}function _e(r){return r.im}function Te(r,t){return new fe(r.buffer,r.byteOffset+r.BYTES_PER_ELEMENT*t,2*(r.length-t))}var xe="function"==typeof Float64Array?Float64Array:void 0,Ve=gr()?xe:function(){throw new Error("not implemented")};function Ae(r,t){return new Ve(r.buffer,r.byteOffset+r.BYTES_PER_ELEMENT*t,2*(r.length-t))}function Se(r){var t,e,n;for(t=[];!(e=r.next()).done;)if(kt(n=e.value)&&n.length>=2)t.push(n[0],n[1]);else{if(!he(n))return new TypeError(j("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(Ee(n),_e(n))}return t}var Fe=2*_r.BYTES_PER_ELEMENT,je=ve();function ke(r){return r instanceof Oe||"object"==typeof r&&null!==r&&("Complex64Array"===r.constructor.name||"Complex128Array"===r.constructor.name)&&"number"==typeof r._length&&"object"==typeof r._buffer}function Le(r){return r===Oe||"Complex128Array"===r.name}function Ie(r,t){return new ce(r[t*=2],r[t+1])}function Oe(){var r,t,e,n;if(t=arguments.length,!(this instanceof Oe))return 0===t?new Oe:1===t?new Oe(arguments[0]):2===t?new Oe(arguments[0],arguments[1]):new Oe(arguments[0],arguments[1],arguments[2]);if(0===t)e=new _r(0);else if(1===t)if(At(arguments[0]))e=new _r(2*arguments[0]);else if(It(arguments[0]))if((n=(e=arguments[0]).length)&&ir(e)&&he(e[0])){if(e=function(r,t){var e,n,i,o;for(e=t.length,o=0,i=0;i<e;i++){if(!he(n=t[i]))return null;r[o]=Ee(n),r[o+1]=_e(n),o+=2}return r}(new _r(2*n),e),null===e){if(!pe(n))throw new RangeError(j("invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.",n));e=new _r(arguments[0])}}else{if(ye(e))e=Te(e,0);else if(de(e))e=Ae(e,0);else if(!pe(n))throw new RangeError(j("invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.",n));e=new _r(e)}else if(Rt(arguments[0])){if(!Et((e=arguments[0]).byteLength/Fe))throw new RangeError(j("invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.",Fe,e.byteLength));e=new _r(e)}else{if(!Bt(arguments[0]))throw new TypeError(j("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",arguments[0]));if(e=arguments[0],!1===je)throw new TypeError(j("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.",e));if(!ie(e[we]))throw new TypeError(j("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",e));if(!ie((e=e[we]()).next))throw new TypeError(j("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",e));if((e=Se(e))instanceof Error)throw e;e=new _r(e)}else{if(!Rt(e=arguments[0]))throw new TypeError(j("invalid argument. First argument must be an ArrayBuffer. Value: `%s`.",e));if(!At(r=arguments[1]))throw new TypeError(j("invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.",r));if(!Et(r/Fe))throw new RangeError(j("invalid argument. Byte offset must be a multiple of %u. Value: `%u`.",Fe,r));if(2===t){if(!Et((n=e.byteLength-r)/Fe))throw new RangeError(j("invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.",Fe,n));e=new _r(e,r)}else{if(!At(n=arguments[2]))throw new TypeError(j("invalid argument. Length must be a nonnegative integer. Value: `%s`.",n));if(n*Fe>e.byteLength-r)throw new RangeError(j("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*Fe));e=new _r(e,r,2*n)}}return N(this,"_buffer",e),N(this,"_length",e.length/2),this}function Re(r){return r.re}function Be(r){return r.im}function Me(r){var t,e,n;for(t=[];!(e=r.next()).done;)if(kt(n=e.value)&&n.length>=2)t.push(n[0],n[1]);else{if(!he(n))return new TypeError(j("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(Re(n),Be(n))}return t}N(Oe,"BYTES_PER_ELEMENT",Fe),N(Oe,"name","Complex64Array"),N(Oe,"from",(function(r){var t,e,n,i,o,a,u,f,l,s,c,h;if(!ie(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Le(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((e=arguments.length)>1){if(!ie(n=arguments[1]))throw new TypeError(j("invalid argument. Second argument must be a function. Value: `%s`.",n));e>2&&(t=arguments[2])}if(ke(r)){if(f=r.length,n){for(o=(i=new this(f))._buffer,h=0,c=0;c<f;c++){if(he(s=n.call(t,r.get(c),c)))o[h]=Ee(s),o[h+1]=_e(s);else{if(!(kt(s)&&s.length>=2))throw new TypeError(j("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",s));o[h]=s[0],o[h+1]=s[1]}h+=2}return i}return new this(r)}if(It(r)){if(n){for(f=r.length,u=r.get&&r.set?$("default"):W("default"),c=0;c<f;c++)if(!he(u(r,c))){l=!0;break}if(l){if(!pe(f))throw new RangeError(j("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,c=0;c<f;c++)o[c]=n.call(t,u(r,c),c);return i}for(o=(i=new this(f))._buffer,h=0,c=0;c<f;c++){if(he(s=n.call(t,u(r,c),c)))o[h]=Ee(s),o[h+1]=_e(s);else{if(!(kt(s)&&s.length>=2))throw new TypeError(j("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",s));o[h]=s[0],o[h+1]=s[1]}h+=2}return i}return new this(r)}if(Bt(r)&&je&&ie(r[we])){if(!ie((o=r[we]()).next))throw new TypeError(j("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,kt(o=t.call(e,i.value,a))&&o.length>=2)n.push(o[0],o[1]);else{if(!he(o))return new TypeError(j("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",o));n.push(Ee(o),_e(o))}return n}(o,n,t):Se(o),a instanceof Error)throw a;for(o=(i=new this(f=a.length/2))._buffer,c=0;c<f;c++)o[c]=a[c];return i}throw new TypeError(j("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r))})),N(Oe,"of",(function(){var r,t;if(!ie(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Le(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(Oe.prototype,"at",(function(r){if(!ke(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Et(r))throw new TypeError(j("invalid argument. Must provide an integer. Value: `%s`.",r));if(r<0&&(r+=this._length),!(r<0||r>=this._length))return Ie(this._buffer,r)})),be(Oe.prototype,"buffer",(function(){return this._buffer.buffer})),be(Oe.prototype,"byteLength",(function(){return this._buffer.byteLength})),be(Oe.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),N(Oe.prototype,"BYTES_PER_ELEMENT",Oe.BYTES_PER_ELEMENT),N(Oe.prototype,"copyWithin",(function(r,t){if(!ke(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(Oe.prototype,"entries",(function(){var r,t,e,n,i,o;if(!ke(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,Ie(n,o)],done:!1}})),N(t,"return",(function(r){return i=!0,arguments.length?{value:r,done:!0}:{done:!0}})),we&&N(t,we,(function(){return r.entries()})),t})),N(Oe.prototype,"every",(function(r,t){var e,n;if(!ke(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ie(r))throw new TypeError(j("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,Ie(e,n),n,this))return!1;return!0})),N(Oe.prototype,"fill",(function(r,t,e){var n,i,o,a,u,f;if(!ke(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!he(r))throw new TypeError(j("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(n=this._buffer,i=this._length,arguments.length>1){if(!Et(t))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",t));if(t<0&&(t+=i)<0&&(t=0),arguments.length>2){if(!Et(e))throw new TypeError(j("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=Ee(r),u=_e(r),f=t;f<e;f++)n[o=2*f]=a,n[o+1]=u;return this})),N(Oe.prototype,"filter",(function(r,t){var e,n,i,o;if(!ke(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ie(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=[],i=0;i<this._length;i++)o=Ie(e,i),r.call(t,o,i,this)&&n.push(o);return new this.constructor(n)})),N(Oe.prototype,"find",(function(r,t){var e,n,i;if(!ke(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ie(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)if(i=Ie(e,n),r.call(t,i,n,this))return i})),N(Oe.prototype,"findIndex",(function(r,t){var e,n,i;if(!ke(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ie(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)if(i=Ie(e,n),r.call(t,i,n,this))return n;return-1})),N(Oe.prototype,"findLast",(function(r,t){var e,n,i;if(!ke(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ie(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=this._length-1;n>=0;n--)if(i=Ie(e,n),r.call(t,i,n,this))return i})),N(Oe.prototype,"findLastIndex",(function(r,t){var e,n,i;if(!ke(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ie(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=this._length-1;n>=0;n--)if(i=Ie(e,n),r.call(t,i,n,this))return n;return-1})),N(Oe.prototype,"forEach",(function(r,t){var e,n,i;if(!ke(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ie(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)i=Ie(e,n),r.call(t,i,n,this)})),N(Oe.prototype,"get",(function(r){if(!ke(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!At(r))throw new TypeError(j("invalid argument. Must provide a nonnegative integer. Value: `%s`.",r));if(!(r>=this._length))return Ie(this._buffer,r)})),N(Oe.prototype,"includes",(function(r,t){var e,n,i,o,a;if(!ke(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!he(r))throw new TypeError(j("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!Et(t))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length)<0&&(t=0)}else t=0;for(i=Ee(r),o=_e(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(Oe.prototype,"indexOf",(function(r,t){var e,n,i,o,a;if(!ke(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!he(r))throw new TypeError(j("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!Et(t))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length)<0&&(t=0)}else t=0;for(i=Ee(r),o=_e(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(Oe.prototype,"join",(function(r){var t,e,n,i;if(!ke(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(0===arguments.length)n=",";else{if(!Mt(r))throw new TypeError(j("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(Ie(e,i).toString());return t.join(n)})),N(Oe.prototype,"keys",(function(){var r,t,e,n,i;if(!ke(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}})),we&&N(t,we,(function(){return r.keys()})),t})),N(Oe.prototype,"lastIndexOf",(function(r,t){var e,n,i,o,a;if(!ke(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!he(r))throw new TypeError(j("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!Et(t))throw new TypeError(j("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=Ee(r),o=_e(r),e=this._buffer,a=t;a>=0;a--)if(i===e[n=2*a]&&o===e[n+1])return a;return-1})),be(Oe.prototype,"length",(function(){return this._length})),N(Oe.prototype,"map",(function(r,t){var e,n,i,o,a;if(!ke(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ie(r))throw new TypeError(j("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(he(a=r.call(t,Ie(n,o),o,this)))e[2*o]=Ee(a),e[2*o+1]=_e(a);else{if(!kt(a)||2!==a.length)throw new TypeError(j("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(Oe.prototype,"reduce",(function(r,t){var e,n,i,o;if(!ke(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ie(r))throw new TypeError(j("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=Ie(e,0),o=1}for(;o<i;o++)n=r(n,Ie(e,o),o,this);return n})),N(Oe.prototype,"reduceRight",(function(r,t){var e,n,i,o;if(!ke(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ie(r))throw new TypeError(j("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=Ie(e,i-1),o=i-2}for(;o>=0;o--)n=r(n,Ie(e,o),o,this);return n})),N(Oe.prototype,"reverse",(function(){var r,t,e,n,i,o;if(!ke(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(e=this._length,r=this._buffer,n=bt(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(Oe.prototype,"set",(function(r){var t,e,n,i,o,a,u,f,l;if(!ke(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,arguments.length>1){if(!At(e=arguments[1]))throw new TypeError(j("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",e))}else e=0;if(he(r)){if(e>=this._length)throw new RangeError(j("invalid argument. Index argument is out-of-bounds. Value: `%u`.",e));return n[e*=2]=Ee(r),void(n[e+1]=_e(r))}if(ke(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,l=n.byteOffset+e*Fe,t.buffer===n.buffer&&t.byteOffset<l&&t.byteOffset+t.byteLength>l){for(i=new _r(t.length),f=0;f<t.length;f++)i[f]=t[f];t=i}for(e*=2,l=0,f=0;f<a;f++)n[e]=t[l],n[e+1]=t[l+1],e+=2,l+=2}else{if(!It(r))throw new TypeError(j("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(!he(r[f])){o=!0;break}if(o){if(!pe(a))throw new RangeError(j("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,l=n.byteOffset+e*Fe,t.buffer===n.buffer&&t.byteOffset<l&&t.byteOffset+t.byteLength>l){for(i=new _r(a),f=0;f<a;f++)i[f]=t[f];t=i}for(e*=2,a/=2,l=0,f=0;f<a;f++)n[e]=t[l],n[e+1]=t[l+1],e+=2,l+=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]=Ee(u),n[e+1]=_e(u),e+=2}})),N(Oe.prototype,"slice",(function(r,t){var e,n,i,o,a,u,f;if(!ke(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(!Et(r))throw new TypeError(j("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(!Et(t))throw new TypeError(j("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(Oe.prototype,"some",(function(r,t){var e,n;if(!ke(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ie(r))throw new TypeError(j("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,Ie(e,n),n,this))return!0;return!1})),N(Oe.prototype,"sort",(function(r){var t,e,n,i,o;if(!ke(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ie(r))throw new TypeError(j("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(Ie(e,i));for(t.sort(r),i=0;i<n;i++)e[o=2*i]=Ee(t[i]),e[o+1]=_e(t[i]);return this})),N(Oe.prototype,"subarray",(function(r,t){var e,n,i;if(!ke(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(!Et(r))throw new TypeError(j("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(!Et(t))throw new TypeError(j("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*Fe):(i=t-r,e=n.byteOffset+r*Fe),new this.constructor(n.buffer,e,i<0?0:i)})),N(Oe.prototype,"toLocaleString",(function(r,t){var e,n,i,o,a;if(!ke(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(0===arguments.length)n=[];else{if(!Mt(r)&&!Dt(r))throw new TypeError(j("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(!Bt(t))throw new TypeError(j("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(Ie(o,a).toLocaleString(n,e));return i.join(",")})),N(Oe.prototype,"toReversed",(function(){var r,t,e,n,i,o;if(!ke(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(Oe.prototype,"toSorted",(function(r){var t,e,n,i;if(!ke(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ie(r))throw new TypeError(j("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(Ie(e,i));return t.sort(r),new Oe(t)})),N(Oe.prototype,"toString",(function(){var r,t,e;if(!ke(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(Ie(t,e).toString());return r.join(",")})),N(Oe.prototype,"values",(function(){var r,t,e,n,i,o;if(!ke(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:Ie(i,o),done:!1}})),N(r,"return",(function(r){return n=!0,arguments.length?{value:r,done:!0}:{done:!0}})),we&&N(r,we,(function(){return t.values()})),r})),N(Oe.prototype,"with",(function(r,t){var e,n,i;if(!ke(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Et(r))throw new TypeError(j("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(j("invalid argument. Index argument is out-of-bounds. Value: `%s`.",r));if(!he(t))throw new TypeError(j("invalid argument. Second argument must be a complex number. Value: `%s`.",t));return(e=(n=new this.constructor(this._buffer))._buffer)[2*r]=Ee(t),e[2*r+1]=_e(t),n}));var Pe=2*mr.BYTES_PER_ELEMENT,Ce=ve();function Ne(r){return r instanceof Ye||"object"==typeof r&&null!==r&&("Complex64Array"===r.constructor.name||"Complex128Array"===r.constructor.name)&&"number"==typeof r._length&&"object"==typeof r._buffer}function Ue(r){return r===Ye||"Complex64Array"===r.name}function De(r,t){return new oe(r[t*=2],r[t+1])}function Ye(){var r,t,e,n;if(t=arguments.length,!(this instanceof Ye))return 0===t?new Ye:1===t?new Ye(arguments[0]):2===t?new Ye(arguments[0],arguments[1]):new Ye(arguments[0],arguments[1],arguments[2]);if(0===t)e=new mr(0);else if(1===t)if(At(arguments[0]))e=new mr(2*arguments[0]);else if(It(arguments[0]))if((n=(e=arguments[0]).length)&&ir(e)&&he(e[0])){if(e=function(r,t){var e,n,i,o;for(e=t.length,o=0,i=0;i<e;i++){if(!he(n=t[i]))return null;r[o]=Re(n),r[o+1]=Be(n),o+=2}return r}(new mr(2*n),e),null===e){if(!pe(n))throw new RangeError(j("invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.",n));e=new mr(arguments[0])}}else{if(ye(e))e=Te(e,0);else if(de(e))e=Ae(e,0);else if(!pe(n))throw new RangeError(j("invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.",n));e=new mr(e)}else if(Rt(arguments[0])){if(!Et((e=arguments[0]).byteLength/Pe))throw new RangeError(j("invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.",Pe,e.byteLength));e=new mr(e)}else{if(!Bt(arguments[0]))throw new TypeError(j("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",arguments[0]));if(e=arguments[0],!1===Ce)throw new TypeError(j("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.",e));if(!ie(e[we]))throw new TypeError(j("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",e));if(!ie((e=e[we]()).next))throw new TypeError(j("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",e));if((e=Me(e))instanceof Error)throw e;e=new mr(e)}else{if(!Rt(e=arguments[0]))throw new TypeError(j("invalid argument. First argument must be an ArrayBuffer. Value: `%s`.",e));if(!At(r=arguments[1]))throw new TypeError(j("invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.",r));if(!Et(r/Pe))throw new RangeError(j("invalid argument. Byte offset must be a multiple of %u. Value: `%u`.",Pe,r));if(2===t){if(!Et((n=e.byteLength-r)/Pe))throw new RangeError(j("invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.",Pe,n));e=new mr(e,r)}else{if(!At(n=arguments[2]))throw new TypeError(j("invalid argument. Length must be a nonnegative integer. Value: `%s`.",n));if(n*Pe>e.byteLength-r)throw new RangeError(j("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*Pe));e=new mr(e,r,2*n)}}return N(this,"_buffer",e),N(this,"_length",e.length/2),this}function We(r){var t,e;for(t=[];!(e=r.next()).done;)t.push(Gt(e.value));return t}N(Ye,"BYTES_PER_ELEMENT",Pe),N(Ye,"name","Complex128Array"),N(Ye,"from",(function(r){var t,e,n,i,o,a,u,f,l,s,c,h;if(!ie(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Ue(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((e=arguments.length)>1){if(!ie(n=arguments[1]))throw new TypeError(j("invalid argument. Second argument must be a function. Value: `%s`.",n));e>2&&(t=arguments[2])}if(Ne(r)){if(f=r.length,n){for(o=(i=new this(f))._buffer,h=0,c=0;c<f;c++){if(he(s=n.call(t,r.get(c),c)))o[h]=Re(s),o[h+1]=Be(s);else{if(!(kt(s)&&s.length>=2))throw new TypeError(j("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",s));o[h]=s[0],o[h+1]=s[1]}h+=2}return i}return new this(r)}if(It(r)){if(n){for(f=r.length,u=r.get&&r.set?$("default"):W("default"),c=0;c<f;c++)if(!he(u(r,c))){l=!0;break}if(l){if(!pe(f))throw new RangeError(j("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,c=0;c<f;c++)o[c]=n.call(t,u(r,c),c);return i}for(o=(i=new this(f))._buffer,h=0,c=0;c<f;c++){if(he(s=n.call(t,u(r,c),c)))o[h]=Re(s),o[h+1]=Be(s);else{if(!(kt(s)&&s.length>=2))throw new TypeError(j("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",s));o[h]=s[0],o[h+1]=s[1]}h+=2}return i}return new this(r)}if(Bt(r)&&Ce&&ie(r[we])){if(!ie((o=r[we]()).next))throw new TypeError(j("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,kt(o=t.call(e,i.value,a))&&o.length>=2)n.push(o[0],o[1]);else{if(!he(o))return new TypeError(j("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",o));n.push(Re(o),Be(o))}return n}(o,n,t):Me(o),a instanceof Error)throw a;for(o=(i=new this(f=a.length/2))._buffer,c=0;c<f;c++)o[c]=a[c];return i}throw new TypeError(j("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r))})),N(Ye,"of",(function(){var r,t;if(!ie(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Ue(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(Ye.prototype,"at",(function(r){if(!Ne(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Et(r))throw new TypeError(j("invalid argument. Must provide an integer. Value: `%s`.",r));if(r<0&&(r+=this._length),!(r<0||r>=this._length))return De(this._buffer,r)})),be(Ye.prototype,"buffer",(function(){return this._buffer.buffer})),be(Ye.prototype,"byteLength",(function(){return this._buffer.byteLength})),be(Ye.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),N(Ye.prototype,"BYTES_PER_ELEMENT",Ye.BYTES_PER_ELEMENT),N(Ye.prototype,"copyWithin",(function(r,t){if(!Ne(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(Ye.prototype,"entries",(function(){var r,t,e,n,i,o,a;if(!Ne(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 oe(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}})),we&&N(e,we,(function(){return t.entries()})),e})),N(Ye.prototype,"every",(function(r,t){var e,n;if(!Ne(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ie(r))throw new TypeError(j("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,De(e,n),n,this))return!1;return!0})),N(Ye.prototype,"fill",(function(r,t,e){var n,i,o,a,u,f;if(!Ne(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!he(r))throw new TypeError(j("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(n=this._buffer,i=this._length,arguments.length>1){if(!Et(t))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",t));if(t<0&&(t+=i)<0&&(t=0),arguments.length>2){if(!Et(e))throw new TypeError(j("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=Re(r),u=Be(r),f=t;f<e;f++)n[o=2*f]=a,n[o+1]=u;return this})),N(Ye.prototype,"filter",(function(r,t){var e,n,i,o;if(!Ne(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ie(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=[],i=0;i<this._length;i++)o=De(e,i),r.call(t,o,i,this)&&n.push(o);return new this.constructor(n)})),N(Ye.prototype,"find",(function(r,t){var e,n,i;if(!Ne(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ie(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)if(i=De(e,n),r.call(t,i,n,this))return i})),N(Ye.prototype,"findIndex",(function(r,t){var e,n,i;if(!Ne(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ie(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)if(i=De(e,n),r.call(t,i,n,this))return n;return-1})),N(Ye.prototype,"findLast",(function(r,t){var e,n,i;if(!Ne(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ie(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=this._length-1;n>=0;n--)if(i=De(e,n),r.call(t,i,n,this))return i})),N(Ye.prototype,"findLastIndex",(function(r,t){var e,n,i;if(!Ne(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ie(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=this._length-1;n>=0;n--)if(i=De(e,n),r.call(t,i,n,this))return n;return-1})),N(Ye.prototype,"forEach",(function(r,t){var e,n,i;if(!Ne(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ie(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)i=De(e,n),r.call(t,i,n,this)})),N(Ye.prototype,"get",(function(r){if(!Ne(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!At(r))throw new TypeError(j("invalid argument. Must provide a nonnegative integer. Value: `%s`.",r));if(!(r>=this._length))return De(this._buffer,r)})),be(Ye.prototype,"length",(function(){return this._length})),N(Ye.prototype,"includes",(function(r,t){var e,n,i,o,a;if(!Ne(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!he(r))throw new TypeError(j("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!Et(t))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length)<0&&(t=0)}else t=0;for(i=Re(r),o=Be(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(Ye.prototype,"indexOf",(function(r,t){var e,n,i,o,a;if(!Ne(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!he(r))throw new TypeError(j("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!Et(t))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length)<0&&(t=0)}else t=0;for(i=Re(r),o=Be(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(Ye.prototype,"join",(function(r){var t,e,n,i;if(!Ne(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(0===arguments.length)n=",";else{if(!Ut(r))throw new TypeError(j("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(De(e,i).toString());return t.join(n)})),N(Ye.prototype,"keys",(function(){var r,t,e,n,i;if(!Ne(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}})),we&&N(t,we,(function(){return r.keys()})),t})),N(Ye.prototype,"lastIndexOf",(function(r,t){var e,n,i,o,a;if(!Ne(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!he(r))throw new TypeError(j("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!Et(t))throw new TypeError(j("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=Re(r),o=Be(r),e=this._buffer,a=t;a>=0;a--)if(i===e[n=2*a]&&o===e[n+1])return a;return-1})),N(Ye.prototype,"map",(function(r,t){var e,n,i,o,a;if(!Ne(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ie(r))throw new TypeError(j("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(he(a=r.call(t,De(n,o),o,this)))e[2*o]=Re(a),e[2*o+1]=Be(a);else{if(!kt(a)||2!==a.length)throw new TypeError(j("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(Ye.prototype,"reduce",(function(r,t){var e,n,i,o;if(!Ne(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ie(r))throw new TypeError(j("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=De(e,0),o=1}for(;o<i;o++)n=r(n,De(e,o),o,this);return n})),N(Ye.prototype,"reduceRight",(function(r,t){var e,n,i,o;if(!Ne(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ie(r))throw new TypeError(j("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=De(e,i-1),o=i-2}for(;o>=0;o--)n=r(n,De(e,o),o,this);return n})),N(Ye.prototype,"reverse",(function(){var r,t,e,n,i,o;if(!Ne(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(e=this._length,r=this._buffer,n=bt(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(Ye.prototype,"set",(function(r){var t,e,n,i,o,a,u,f,l;if(!Ne(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,arguments.length>1){if(!At(e=arguments[1]))throw new TypeError(j("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",e))}else e=0;if(he(r)){if(e>=this._length)throw new RangeError(j("invalid argument. Index argument is out-of-bounds. Value: `%u`.",e));return n[e*=2]=Re(r),void(n[e+1]=Be(r))}if(Ne(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,l=n.byteOffset+e*Pe,t.buffer===n.buffer&&t.byteOffset<l&&t.byteOffset+t.byteLength>l){for(i=new mr(t.length),f=0;f<t.length;f++)i[f]=t[f];t=i}for(e*=2,l=0,f=0;f<a;f++)n[e]=t[l],n[e+1]=t[l+1],e+=2,l+=2}else{if(!It(r))throw new TypeError(j("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(!he(r[f])){o=!0;break}if(o){if(!pe(a))throw new RangeError(j("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,l=n.byteOffset+e*Pe,t.buffer===n.buffer&&t.byteOffset<l&&t.byteOffset+t.byteLength>l){for(i=new mr(a),f=0;f<a;f++)i[f]=t[f];t=i}for(e*=2,a/=2,l=0,f=0;f<a;f++)n[e]=t[l],n[e+1]=t[l+1],e+=2,l+=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]=Re(u),n[e+1]=Be(u),e+=2}})),N(Ye.prototype,"slice",(function(r,t){var e,n,i,o,a,u,f;if(!Ne(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(!Et(r))throw new TypeError(j("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(!Et(t))throw new TypeError(j("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(Ye.prototype,"some",(function(r,t){var e,n;if(!Ne(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ie(r))throw new TypeError(j("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,De(e,n),n,this))return!0;return!1})),N(Ye.prototype,"sort",(function(r){var t,e,n,i,o;if(!Ne(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ie(r))throw new TypeError(j("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(De(e,i));for(t.sort(r),i=0;i<n;i++)e[o=2*i]=Re(t[i]),e[o+1]=Be(t[i]);return this})),N(Ye.prototype,"subarray",(function(r,t){var e,n,i;if(!Ne(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(!Et(r))throw new TypeError(j("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(!Et(t))throw new TypeError(j("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*Pe):(i=t-r,e=n.byteOffset+r*Pe),new this.constructor(n.buffer,e,i<0?0:i)})),N(Ye.prototype,"toLocaleString",(function(r,t){var e,n,i,o,a;if(!Ne(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(0===arguments.length)n=[];else{if(!Ut(r)&&!Dt(r))throw new TypeError(j("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(!Bt(t))throw new TypeError(j("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(De(o,a).toLocaleString(n,e));return i.join(",")})),N(Ye.prototype,"toReversed",(function(){var r,t,e,n,i,o;if(!Ne(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(Ye.prototype,"toSorted",(function(r){var t,e,n,i;if(!Ne(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ie(r))throw new TypeError(j("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(De(e,i));return t.sort(r),new Ye(t)})),N(Ye.prototype,"toString",(function(){var r,t,e;if(!Ne(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(De(t,e).toString());return r.join(",")})),N(Ye.prototype,"values",(function(){var r,t,e,n,i,o;if(!Ne(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:De(i,o),done:!1}})),N(r,"return",(function(r){return n=!0,arguments.length?{value:r,done:!0}:{done:!0}})),we&&N(r,we,(function(){return t.values()})),r})),N(Ye.prototype,"with",(function(r,t){var e,n,i;if(!Ne(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Et(r))throw new TypeError(j("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(j("invalid argument. Index argument is out-of-bounds. Value: `%s`.",r));if(!he(t))throw new TypeError(j("invalid argument. Second argument must be a complex number. Value: `%s`.",t));return(e=(n=new this.constructor(this._buffer))._buffer)[2*r]=Re(t),e[2*r+1]=Be(t),n}));var ze=rt.BYTES_PER_ELEMENT,qe=ve();function Ge(r){return"object"==typeof r&&null!==r&&"BooleanArray"===r.constructor.name&&r.BYTES_PER_ELEMENT===ze}function $e(r){return r===He}function He(){var r,t,e,n,i;if(t=arguments.length,!(this instanceof He))return 0===t?new He:1===t?new He(arguments[0]):2===t?new He(arguments[0],arguments[1]):new He(arguments[0],arguments[1],arguments[2]);if(0===t)e=new rt(0);else if(1===t)if(At(i=arguments[0]))e=new rt(i);else if(It(i))e=function(r,t){var e,n;for(e=t.length,n=0;n<e;n++)r[n]=Gt(t[n]);return r}(new rt(i.length),i);else if(Rt(i))e=new rt(i);else{if(!Bt(i))throw new TypeError(j("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",i));if(!1===qe)throw new TypeError(j("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.",i));if(!ie(i[we]))throw new TypeError(j("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",i));if(!ie((e=i[we]()).next))throw new TypeError(j("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",i));e=new rt(We(e))}else{if(!Rt(e=arguments[0]))throw new TypeError(j("invalid argument. First argument must be an ArrayBuffer. Value: `%s`.",e));if(!At(r=arguments[1]))throw new TypeError(j("invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.",r));if(2===t)e=new rt(e,r);else{if(!At(n=arguments[2]))throw new TypeError(j("invalid argument. Length must be a nonnegative integer. Value: `%s`.",n));if(n*ze>e.byteLength-r)throw new RangeError(j("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*ze));e=new rt(e,r,n)}}return N(this,"_buffer",e),N(this,"_length",e.length),this}N(He,"BYTES_PER_ELEMENT",ze),N(He,"name","BooleanArray"),N(He,"from",(function(r){var t,e,n,i,o,a,u,f,l;if(!ie(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!$e(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if((e=arguments.length)>1){if(!ie(n=arguments[1]))throw new TypeError(j("invalid argument. Second argument must be a function. Value: `%s`.",n));e>2&&(t=arguments[2])}if(It(r)){if(n){for(f=r.length,u=r.get&&r.set?$("default"):W("default"),o=(i=new this(f))._buffer,l=0;l<f;l++)o[l]=Gt(n.call(t,u(r,l),l));return i}return new this(r)}if(Bt(r)&&qe&&ie(r[we])){if(!ie((o=r[we]()).next))throw new TypeError(j("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(Gt(t.call(e,i.value,o)));return n}(o,n,t):We(o),o=(i=new this(f=a.length))._buffer,l=0;l<f;l++)o[l]=a[l];return i}throw new TypeError(j("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r))})),N(He,"of",(function(){var r,t;if(!ie(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!$e(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(He.prototype,"at",(function(r){var t,e;if(!Ge(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Tt(r))throw new TypeError(j("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 Gt(t[r])})),be(He.prototype,"buffer",(function(){return this._buffer.buffer})),be(He.prototype,"byteLength",(function(){return this._buffer.byteLength})),be(He.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),N(He.prototype,"BYTES_PER_ELEMENT",He.BYTES_PER_ELEMENT),N(He.prototype,"copyWithin",(function(r,t){if(!Ge(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(He.prototype,"entries",(function(){var r,t,e,n,i,o;if(!Ge(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,Gt(n[o])],done:!1}})),N(t,"return",(function(r){return i=!0,arguments.length?{value:r,done:!0}:{done:!0}})),we&&N(t,we,(function(){return r.entries()})),t})),N(He.prototype,"every",(function(r,t){var e,n;if(!Ge(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!ie(r))throw new TypeError(j("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,Gt(e[n]),n,this))return!1;return!0})),N(He.prototype,"fill",(function(r,t,e){var n,i,o,a;if(!Ge(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!qt(r))throw new TypeError(j("invalid argument. First argument must be a boolean. Value: `%s`.",r));if(n=this._buffer,i=this._length,arguments.length>1){if(!Tt(t))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",t));if(t<0&&(t+=i)<0&&(t=0),arguments.length>2){if(!Tt(e))throw new TypeError(j("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(He.prototype,"filter",(function(r,t){var e,n,i,o;if(!Ge(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!ie(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=[],i=0;i<this._length;i++)o=Gt(e[i]),r.call(t,o,i,this)&&n.push(o);return new this.constructor(n)})),N(He.prototype,"find",(function(r,t){var e,n,i;if(!Ge(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!ie(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,i=0;i<this._length;i++)if(n=Gt(e[i]),r.call(t,n,i,this))return n})),N(He.prototype,"findIndex",(function(r,t){var e,n,i;if(!Ge(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!ie(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,i=0;i<this._length;i++)if(n=Gt(e[i]),r.call(t,n,i,this))return i;return-1})),N(He.prototype,"findLast",(function(r,t){var e,n,i;if(!Ge(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!ie(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,i=this._length-1;i>=0;i--)if(n=Gt(e[i]),r.call(t,n,i,this))return n})),N(He.prototype,"findLastIndex",(function(r,t){var e,n,i;if(!Ge(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!ie(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,i=this._length-1;i>=0;i--)if(n=Gt(e[i]),r.call(t,n,i,this))return i;return-1})),N(He.prototype,"forEach",(function(r,t){var e,n;if(!Ge(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!ie(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)r.call(t,Gt(e[n]),n,this)})),N(He.prototype,"get",(function(r){if(!Ge(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!At(r))throw new TypeError(j("invalid argument. Must provide a nonnegative integer. Value: `%s`.",r));if(!(r>=this._length))return Gt(this._buffer[r])})),N(He.prototype,"includes",(function(r,t){var e,n;if(!Ge(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!qt(r))throw new TypeError(j("invalid argument. First argument must be a boolean. Value: `%s`.",r));if(arguments.length>1){if(!Tt(t))throw new TypeError(j("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===Gt(e[n]))return!0;return!1})),N(He.prototype,"indexOf",(function(r,t){var e,n;if(!Ge(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!qt(r))throw new TypeError(j("invalid argument. First argument must be a boolean. Value: `%s`.",r));if(arguments.length>1){if(!Tt(t))throw new TypeError(j("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===Gt(e[n]))return n;return-1})),N(He.prototype,"join",(function(r){var t,e,n;if(!Ge(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(arguments.length>0){if(!Mt(r))throw new TypeError(j("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(He.prototype,"keys",(function(){var r,t,e,n,i;if(!Ge(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}})),we&&N(t,we,(function(){return r.keys()})),t})),N(He.prototype,"lastIndexOf",(function(r,t){var e,n;if(!Ge(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!qt(r))throw new TypeError(j("invalid argument. First argument must be a boolean. Value: `%s`.",r));if(arguments.length>1){if(!Tt(t))throw new TypeError(j("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===Gt(e[n]))return n;return-1})),be(He.prototype,"length",(function(){return this._length})),N(He.prototype,"map",(function(r,t){var e,n,i,o;if(!Ge(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!ie(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]=Gt(r.call(t,Gt(i[o]),o,this));return n})),N(He.prototype,"reduce",(function(r,t){var e,n,i,o;if(!Ge(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!ie(r))throw new TypeError(j("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=Gt(e[0]),o=1}for(;o<n;o++)i=r(i,Gt(e[o]),o,this);return i})),N(He.prototype,"reduceRight",(function(r,t){var e,n,i,o;if(!Ge(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!ie(r))throw new TypeError(j("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=Gt(e[n-1]),o=n-2}for(;o>=0;o--)i=r(i,Gt(e[o]),o,this);return i})),N(He.prototype,"reverse",(function(){var r,t,e,n,i,o;if(!Ge(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");for(r=this._buffer,e=this._length,n=bt(e/2),i=0;i<n;i++)o=e-i-1,t=r[i],r[i]=r[o],r[o]=t;return this})),N(He.prototype,"set",(function(r){var t,e,n,i,o,a,u;if(!Ge(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(n=this._buffer,arguments.length>1){if(!At(e=arguments[1]))throw new TypeError(j("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",e))}else e=0;if(It(r)){if(e+(o=r.length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(t=Ge(r)?r._buffer:r,u=n.byteOffset+e*ze,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(j("invalid argument. Index argument is out-of-bounds. Value: `%u`.",e));n[e]=r?1:0}})),N(He.prototype,"slice",(function(r,t){var e,n,i,o,a,u;if(!Ge(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(!Tt(r))throw new TypeError(j("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(!Tt(t))throw new TypeError(j("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(He.prototype,"some",(function(r,t){var e,n;if(!Ge(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!ie(r))throw new TypeError(j("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,Gt(e[n]),n,this))return!0;return!1})),N(He.prototype,"sort",(function(r){var t;if(!Ge(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(t=this._buffer,0===arguments.length)return t.sort(),this;if(!ie(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));return t.sort((function(t,e){return r(Gt(t),Gt(e))})),this})),N(He.prototype,"subarray",(function(r,t){var e,n,i;if(!Ge(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(!Tt(r))throw new TypeError(j("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(!Tt(t))throw new TypeError(j("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*ze):(i=t-r,e=n.byteOffset+r*ze),new this.constructor(n.buffer,e,i<0?0:i)})),N(He.prototype,"toLocaleString",(function(r,t){var e,n,i,o,a;if(!Ge(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(0===arguments.length)n=[];else{if(!Mt(r)&&!Dt(r))throw new TypeError(j("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(!Bt(t))throw new TypeError(j("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(Gt(o[a]).toLocaleString(n,e));return i.join(",")})),N(He.prototype,"toReversed",(function(){var r,t,e,n,i;if(!Ge(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(He.prototype,"toSorted",(function(r){var t,e,n,i,o;if(!Ge(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(!ie(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));return t.sort((function(t,e){return r(Gt(t),Gt(e))})),e})),N(He.prototype,"toString",(function(){var r,t,e;if(!Ge(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(He.prototype,"values",(function(){var r,t,e,n,i,o;if(!Ge(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:Gt(i[o]),done:!1}})),N(r,"return",(function(r){return n=!0,arguments.length?{value:r,done:!0}:{done:!0}})),we&&N(r,we,(function(){return t.values()})),r})),N(He.prototype,"with",(function(r,t){var e,n;if(!Ge(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Tt(r))throw new TypeError(j("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(j("invalid argument. Index argument is out-of-bounds. Value: `%s`.",r));if(!qt(t))throw new TypeError(j("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 Je=[mr,_r,Br,Fr,Hr,Dr,ht,rt,ot,Oe,Ye,He],Qe=["float64","float32","int32","uint32","int16","uint16","int8","uint8","uint8c","complex64","complex128","bool"],Xe=Qe.length;function Ze(r){var t;if(ir(r))return"generic";if(ur(r))return null;for(t=0;t<Xe;t++)if(r instanceof Je[t])return Qe[t];return cr[sr(r)]||null}function Ke(r){var t=Ze(r);return D(r)?{accessorProtocol:!0,accessors:[$(t),J(t)]}:{accessorProtocol:!1,accessors:[W(t),q(t)]}}function rn(r){var t;if(!(this instanceof rn))return new rn(r);if(!It(r))throw new TypeError(j("invalid argument. Must provide an array-like object. Value: `%s`.",r));return t=Ke(r),this._buffer=r,this._getter=t.accessors[0],this._setter=t.accessors[1],this}N(rn,"name","AccessorArray"),function(r,t,e,n){P(r,t,{configurable:!1,enumerable:!1,get:e,set:n})}(rn.prototype,"length",(function(){return this._buffer.length}),(function(r){this._buffer.length=r})),N(rn.prototype,"get",(function(r){return this._getter(this._buffer,r)})),N(rn.prototype,"set",(function(r,t){arguments.length<2?this._setter(this._buffer,0,r):this._setter(this._buffer,t,r)}));var tn=1;function en(r){return"object"==typeof r&&null!==r&&"BooleanArray"===r.constructor.name&&r.BYTES_PER_ELEMENT===tn}function nn(r){var t=Ze(r);return D(r)?{data:r,dtype:t,accessorProtocol:!0,accessors:[$(t),J(t)]}:{data:r,dtype:t,accessorProtocol:!1,accessors:[W(t),q(t)]}}var on="function"==typeof Uint8Array?Uint8Array:void 0,an=Zr()?on:function(){throw new Error("not implemented")};function un(r,t){return new an(r.buffer,r.byteOffset+r.BYTES_PER_ELEMENT*t,r.length-t)}function fn(r){var t;for(t=0;t<r.length;t++)if(r[t])return!0;return!1}function ln(r,t){var e,n,i,o;for(i=Ze(r),n=D(r)?$(i):W(i),e=r.length,o=0;o<e;o++)if(n(r,o)===t)return!0;return!1}function sn(r){var t,e,n;if(!It(r))throw new TypeError(j("invalid argument. Must provide an array-like object. Value: `%s`.",r));return n=Ze(r),D(r)&&(t=$(n)),e=r.length,void 0===t?function(t){var n;for(n=0;n<e;n++)if(r[n]===t)return!0;return!1}:function(n){var i;for(i=0;i<e;i++)if(t(r,i)===n)return!0;return!1}}function cn(r,t){var e;for(e=0;e<r.length;e++)if(r[e]!==t[e])return!1;return!0}function hn(r,t){var e,n,i,o,a;for(e=r.data,n=t.data,i=r.accessors[0],o=t.accessors[0],a=0;a<e.length;a++)if(i(e,a)!==o(n,a))return!1;return!0}function pn(r,t){return r===t?0!==r||1/r==1/t:r!=r&&t!=t}function gn(r){var t=new Ve(2);return t[0]=r.re,t[1]=r.im,t}function yn(r,t){return r===t?0!==r||1/r==1/t:r!=r&&t!=t||!(!he(r)||!he(t))&&(e=t,n=gn(r),i=gn(e),pn(n[0],i[0])&&pn(n[1],i[1]));var e,n,i}function mn(r,t){var e;for(e=0;e<r.length;e++)if(!yn(r[e],t[e]))return!1;return!0}function dn(r,t){var e,n,i,o,a;for(e=r.data,n=t.data,i=r.accessors[0],o=t.accessors[0],a=0;a<e.length;a++)if(!yn(i(e,a),o(n,a)))return!1;return!0}function vn(r,t,e){return r.replace(t,e)}N(ln,"factory",sn);var wn={all:["bool","complex64","complex128","float32","float64","generic","int16","int32","int8","uint16","uint32","uint8","uint8c"],typed:["bool","complex64","complex128","float32","float64","int16","int32","int8","uint16","uint32","uint8","uint8c"],floating_point:["complex64","complex128","float32","float64"],real_floating_point:["float32","float64"],complex_floating_point:["complex64","complex128"],boolean:["bool"],integer:["int16","int32","int8","uint16","uint32","uint8","uint8c"],signed_integer:["int16","int32","int8"],unsigned_integer:["uint16","uint32","uint8","uint8c"],real:["float32","float64","int16","int32","int8","uint16","uint32","uint8","uint8c"],numeric:["complex64","complex128","float32","float64","int16","int32","int8","uint16","uint32","uint8","uint8c"],index:["int32","uint8","bool","generic"],integer_index:["int32"],boolean_index:["bool"],mask_index:["uint8"],typed_index:["int32","uint8","bool"]},bn=/_and_generic$/;function En(){var r,t,e;return 0===arguments.length?wn.all.slice():(e=!1,r=arguments[0],bn.test(r)&&"all"!==(r=vn(r,bn,""))&&"index"!==r&&(e=!0),t=(t=wn[r])?t.slice():[],e&&t.length>0&&t.push("generic"),t)}var _n=sn(En("boolean")),Tn=["little-endian","big-endian"];function xn(){return Tn.slice()}var Vn=sn(xn()),An=sn(En("complex_floating_point")),Sn=8,Fn=16;function jn(r){return"object"==typeof r&&null!==r&&("Complex128Array"===r.constructor.name&&r.BYTES_PER_ELEMENT===Fn||"Complex64Array"===r.constructor.name&&r.BYTES_PER_ELEMENT===Sn)}var kn=sn(En()),Ln=sn(En("floating_point")),In=sn(En("integer"));function On(r){return Object.keys(Object(r))}var Rn,Bn=void 0!==Object.keys;function Mn(r){return"[object Arguments]"===nr(r)}Rn=function(){return Mn(arguments)}();var Pn=Rn;function Cn(r){return r!=r}function Nn(r){return pt(r)&&Cn(r)}function Un(r){return dt(r)&&Cn(r.valueOf())}function Dn(r){return Nn(r)||Un(r)}N(Dn,"isPrimitive",Nn),N(Dn,"isObject",Un);var Yn=Object.prototype.propertyIsEnumerable,Wn=!Yn.call("beep","0");function zn(r,t){var e;return null!=r&&(!(e=Yn.call(r,t))&&Wn&&Ut(r)?!Nn(t=+t)&&Tt(t)&&t>=0&&t<r.length:e)}var qn=Pn?Mn:function(r){return null!==r&&"object"==typeof r&&!ir(r)&&"number"==typeof r.length&&Et(r.length)&&r.length>=0&&r.length<=xr&&rr(r,"callee")&&!zn(r,"callee")},Gn=Array.prototype.slice,$n=zn((function(){}),"prototype"),Hn=!zn({toString:null},"toString");function Jn(r,t,e){var n,i;if(!It(r)&&!Mt(r))throw new TypeError(j("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if(0===(n=r.length))return-1;if(3===arguments.length){if(!Tt(e))throw new TypeError(j("invalid argument. Third argument must be an integer. Value: `%s`.",e));if(e>=0){if(e>=n)return-1;i=e}else(i=n+e)<0&&(i=0)}else i=0;if(Dn(t)){for(;i<n;i++)if(Dn(r[i]))return i}else for(;i<n;i++)if(r[i]===t)return i;return-1}function Qn(r){return r.constructor&&r.constructor.prototype===r}var Xn,Zn=["console","external","frame","frameElement","frames","innerHeight","innerWidth","outerHeight","outerWidth","pageXOffset","pageYOffset","parent","scrollLeft","scrollTop","scrollX","scrollY","self","webkitIndexedDB","webkitStorageInfo","window"],Kn="undefined"==typeof window?void 0:window,ri=function(){var r;if("undefined"===ne(Kn))return!1;for(r in Kn)try{-1===Jn(Zn,r)&&rr(Kn,r)&&null!==Kn[r]&&"object"===ne(Kn[r])&&Qn(Kn[r])}catch(r){return!0}return!1}(),ti="undefined"!=typeof window,ei=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];Xn=Bn?function(){return 2!==(On(arguments)||"").length}(1,2)?function(r){return qn(r)?On(Gn.call(r)):On(r)}:On:function(r){var t,e,n,i,o,a,u;if(i=[],qn(r)){for(u=0;u<r.length;u++)i.push(u.toString());return i}if("string"==typeof r){if(r.length>0&&!rr(r,"0"))for(u=0;u<r.length;u++)i.push(u.toString())}else{if(0==(n="function"==typeof r)&&!ar(r))return i;e=$n&&n}for(o in r)e&&"prototype"===o||!rr(r,o)||i.push(String(o));if(Hn)for(t=function(r){if(!1===ti&&!ri)return Qn(r);try{return Qn(r)}catch(r){return!1}}(r),u=0;u<ei.length;u++)a=ei[u],t&&"constructor"===a||!rr(r,a)||i.push(String(a));return i};var ni,ii=Xn,oi=Object,ai=Object.getPrototypeOf;ni=ie(Object.getPrototypeOf)?ai:function(r){var t=function(r){return r.__proto__}(r);return t||null===t?t:"[object Function]"===nr(r.constructor)?r.constructor.prototype:r instanceof oi?oi.prototype:null};var ui=ni;function fi(r){return null==r?null:(r=oi(r),ui(r))}var li=Object.prototype;function si(r){var t;return!!Bt(r)&&(!(t=fi(r))||!rr(r,"constructor")&&rr(t,"constructor")&&ie(t.constructor)&&"[object Function]"===nr(t.constructor)&&rr(t,"isPrototypeOf")&&ie(t.isPrototypeOf)&&(t===li||function(r){var t;for(t in r)if(!rr(r,t))return!1;return!0}(r)))}var ci=["binary","bool","complex64","complex128","float32","float64","generic","int16","int32","int8","uint16","uint32","uint8","uint8c"];function hi(){return ci.slice()}var pi={all:["binary","bool","complex64","complex128","float32","float64","generic","int16","int32","int8","uint16","uint32","uint8","uint8c"],typed:["binary","bool","complex64","complex128","float32","float64","int16","int32","int8","uint16","uint32","uint8","uint8c"],floating_point:["complex64","complex128","float32","float64"],real_floating_point:["float32","float64"],complex_floating_point:["complex64","complex128"],boolean:["bool"],integer:["int16","int32","int8","uint16","uint32","uint8","uint8c"],signed_integer:["int16","int32","int8"],unsigned_integer:["uint16","uint32","uint8","uint8c"],real:["float32","float64","int16","int32","int8","uint16","uint32","uint8","uint8c"],numeric:["complex64","complex128","float32","float64","int16","int32","int8","uint16","uint32","uint8","uint8c"],index:["int32","uint8","bool","generic"],integer_index:["int32"],boolean_index:["bool"],mask_index:["uint8"],typed_index:["int32","uint8","bool"]},gi=/_and_generic$/;function yi(){var r,t,e;return 0===arguments.length?pi.all.slice():(e=!1,r=arguments[0],gi.test(r)&&"all"!==(r=vn(r,gi,""))&&"index"!==r&&(e=!0),t=(t=pi[r])?t.slice():[],e&&t.length>0&&t.push("generic"),t)}function mi(){return{bool:0,int8:1,uint8:2,uint8c:3,int16:4,uint16:5,int32:6,uint32:7,int64:8,uint64:9,float32:10,float64:11,complex64:12,complex128:13,binary:14,generic:15,notype:17,userdefined_type:256}}N(yi,"enum",mi),function(r,t){var e,n,i;for(e=ii(t),i=0;i<e.length;i++)C(r,n=e[i],t[n])}(yi,{bool:0,int8:1,uint8:2,uint8c:3,int16:4,uint16:5,int32:6,uint32:7,int64:8,uint64:9,float32:10,float64:11,complex64:12,complex128:13,binary:14,generic:15,notype:17,userdefined_type:256});var di={bool:0,int8:1,uint8:2,uint8c:3,int16:4,uint16:5,int32:6,uint32:7,int64:8,uint64:9,float32:10,float64:11,complex64:12,complex128:13,binary:14,generic:15,notype:17,userdefined_type:256};function vi(){return{bool:di.bool,int8:di.int8,uint8:di.uint8,uint8c:di.uint8c,int16:di.int16,uint16:di.uint16,int32:di.int32,uint32:di.uint32,int64:di.int64,uint64:di.uint64,float32:di.float32,float64:di.float64,complex64:di.complex64,complex128:di.complex128,binary:di.binary,generic:di.generic,notype:di.notype,userdefined_type:di.userdefined_type}}N(hi,"enum",vi),function(r,t){var e,n,i;for(e=ii(t),i=0;i<e.length;i++)C(r,n=e[i],t[n])}(hi,vi());var wi=function(r,t){var e,n,i,o,a,u,f,l=!0;if(!ar(r))throw new TypeError(j("invalid argument. First argument must be an object (except null). Value: `%s`.",r));if(arguments.length>1){if(!si(t))throw new TypeError(j("invalid argument. Options argument must be an object. Value: `%s`.",t));if(rr(t,"duplicates")&&!qt(l=t.duplicates))throw new TypeError(j("invalid option. `%s` option must be a boolean. Option: `%s`.","duplicates",l))}if(n=(e=ii(r)).length,a={},l)for(f=0;f<n;f++)rr(a,o=r[i=e[f]])?(u=a[o],ir(u)?a[o].push(i):a[o]=[u,i]):a[o]=i;else for(f=0;f<n;f++)a[r[i=e[f]]]=i;return a}(vi(),{duplicates:!1}),bi=vi();function Ei(r){var t=typeof r;return"string"===t?null===function(r){var t=bi[r];return"number"==typeof t?t:null}(r)?null:r:"number"===t?function(r){var t=wi[r];return"string"==typeof t?t:null}(r):null}var _i,Ti={float64:{float64:1,float32:1,int32:0,int16:0,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,bool:0,generic:1},float32:{float64:1,float32:1,int32:0,int16:0,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,bool:0,generic:1},int32:{float64:1,float32:0,int32:1,int16:0,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:0,bool:0,generic:1},int16:{float64:1,float32:1,int32:1,int16:1,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,bool:0,generic:1},int8:{float64:1,float32:1,int32:1,int16:1,int8:1,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,bool:0,generic:1},uint32:{float64:1,float32:0,int32:0,int16:0,int8:0,uint32:1,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:0,bool:0,generic:1},uint16:{float64:1,float32:1,int32:1,int16:0,int8:0,uint32:1,uint16:1,uint8:0,uint8c:0,complex128:1,complex64:1,bool:0,generic:1},uint8:{float64:1,float32:1,int32:1,int16:1,int8:0,uint32:1,uint16:1,uint8:1,uint8c:1,complex128:1,complex64:1,bool:0,generic:1},uint8c:{float64:1,float32:1,int32:1,int16:1,int8:0,uint32:1,uint16:1,uint8:1,uint8c:1,complex128:1,complex64:1,bool:0,generic:1},complex128:{float64:0,float32:0,int32:0,int16:0,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,bool:0,generic:1},complex64:{float64:0,float32:0,int32:0,int16:0,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,bool:0,generic:1},bool:{float64:0,float32:0,int32:0,int16:0,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:0,complex64:0,bool:1,generic:1},generic:{float64:0,float32:0,int32:0,int16:0,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:0,complex64:0,bool:0,generic:1}};function xi(r){return 0===arguments.length?function(){var r,t,e,n,i,o,a,u,f;for(e={},t=(r=ii(Ti)).length,f=0;f<t;f++){for(i=r[f],a=Ti[i],n={},u=0;u<t;u++)n[o=r[u]]=a[o];e[i]=n}return e}():(void 0===_i&&(_i=function(){var r,t,e,n,i,o,a,u,f;for(e={},t=(r=ii(Ti)).length,f=0;f<t;f++){for(i=r[f],a=Ti[i],n=[],u=0;u<t;u++)1===a[o=r[u]]&&n.push(o);e[i]=n}return e}()),r=Ei(r),rr(_i,r)?_i[r].slice():null)}var Vi=xi();function Ai(r,t){return r===t||Vi[r][t]>0}var Si,Fi=sn(En("numeric")),ji=sn(En("real")),ki=sn(En("real_floating_point")),Li={float64:{float64:1,float32:0,int32:0,int16:0,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:0,bool:0,generic:1},float32:{float64:1,float32:1,int32:0,int16:0,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,bool:0,generic:1},int32:{float64:1,float32:0,int32:1,int16:0,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:0,bool:0,generic:1},int16:{float64:1,float32:1,int32:1,int16:1,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,bool:0,generic:1},int8:{float64:1,float32:1,int32:1,int16:1,int8:1,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,bool:0,generic:1},uint32:{float64:1,float32:0,int32:0,int16:0,int8:0,uint32:1,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:0,bool:0,generic:1},uint16:{float64:1,float32:1,int32:1,int16:0,int8:0,uint32:1,uint16:1,uint8:0,uint8c:0,complex128:1,complex64:1,bool:0,generic:1},uint8:{float64:1,float32:1,int32:1,int16:1,int8:0,uint32:1,uint16:1,uint8:1,uint8c:1,complex128:1,complex64:1,bool:0,generic:1},uint8c:{float64:1,float32:1,int32:1,int16:1,int8:0,uint32:1,uint16:1,uint8:1,uint8c:1,complex128:1,complex64:1,bool:0,generic:1},complex128:{float64:0,float32:0,int32:0,int16:0,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:0,bool:0,generic:1},complex64:{float64:0,float32:0,int32:0,int16:0,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,bool:0,generic:1},bool:{float64:0,float32:0,int32:0,int16:0,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:0,complex64:0,bool:1,generic:1},generic:{float64:0,float32:0,int32:0,int16:0,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:0,complex64:0,bool:0,generic:1}};function Ii(r){return 0===arguments.length?function(){var r,t,e,n,i,o,a,u,f;for(e={},t=(r=ii(Li)).length,f=0;f<t;f++){for(i=r[f],a=Li[i],n={},u=0;u<t;u++)n[o=r[u]]=a[o];e[i]=n}return e}():(void 0===Si&&(Si=function(){var r,t,e,n,i,o,a,u,f;for(e={},t=(r=ii(Li)).length,f=0;f<t;f++){for(i=r[f],a=Li[i],n=[],u=0;u<t;u++)1===a[o=r[u]]&&n.push(o);e[i]=n}return e}()),r=Ei(r),rr(Si,r)?Si[r].slice():null)}var Oi=Ii();function Ri(r,t){return r===t||Oi[r][t]>0}var Bi,Mi={float64:{float64:1,float32:1,int32:0,int16:0,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:0,bool:0,generic:1},float32:{float64:1,float32:1,int32:0,int16:0,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,bool:0,generic:1},int32:{float64:1,float32:0,int32:1,int16:1,int8:1,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:0,bool:0,generic:1},int16:{float64:1,float32:1,int32:1,int16:1,int8:1,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,bool:0,generic:1},int8:{float64:1,float32:1,int32:1,int16:1,int8:1,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,bool:0,generic:1},uint32:{float64:1,float32:0,int32:0,int16:0,int8:0,uint32:1,uint16:1,uint8:1,uint8c:1,complex128:1,complex64:0,bool:0,generic:1},uint16:{float64:1,float32:1,int32:1,int16:0,int8:0,uint32:1,uint16:1,uint8:1,uint8c:1,complex128:1,complex64:1,bool:0,generic:1},uint8:{float64:1,float32:1,int32:1,int16:1,int8:0,uint32:1,uint16:1,uint8:1,uint8c:1,complex128:1,complex64:1,bool:0,generic:1},uint8c:{float64:1,float32:1,int32:1,int16:1,int8:0,uint32:1,uint16:1,uint8:1,uint8c:1,complex128:1,complex64:1,bool:0,generic:1},complex128:{float64:0,float32:0,int32:0,int16:0,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,bool:0,generic:0},complex64:{float64:0,float32:0,int32:0,int16:0,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,bool:0,generic:0},bool:{float64:0,float32:0,int32:0,int16:0,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:0,complex64:0,bool:1,generic:1},generic:{float64:0,float32:0,int32:0,int16:0,int8:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:0,complex64:0,bool:0,generic:1}};function Pi(r){return 0===arguments.length?function(){var r,t,e,n,i,o,a,u,f;for(e={},t=(r=ii(Mi)).length,f=0;f<t;f++){for(i=r[f],a=Mi[i],n={},u=0;u<t;u++)n[o=r[u]]=a[o];e[i]=n}return e}():(void 0===Bi&&(Bi=function(){var r,t,e,n,i,o,a,u,f;for(e={},t=(r=ii(Mi)).length,f=0;f<t;f++){for(i=r[f],a=Mi[i],n=[],u=0;u<t;u++)1===a[o=r[u]]&&n.push(o);e[i]=n}return e}()),r=Ei(r),rr(Bi,r)?Bi[r].slice():null)}var Ci=Pi(),Ni=sn(En("signed_integer")),Ui=sn(En("unsigned_integer")),Di={};function Yi(r){var t=Ze(r);return D(r)?$(t):W(t)}function Wi(r,t){return r>t?r:t}function zi(r,t){return r<t?r:t}function qi(r,t){var e,n;for(e=[],n=0;n<t;n++)e.push(r);return e}function Gi(r,t){var e,n,i,o;for(n=t[1],i=t[0],e=[],o=0;o<i;o++)e.push(qi(r,n));return e}function $i(r){return Gi(0,r)}C(Di,"contains",ln),C(Di,"hasEqualValues",(function(r,t){var e,n,i,o,a;return r.length===t.length&&(n=nn(r),i=nn(t),n.accessorProtocol||i.accessorProtocol?(e=2,en(r)?en(t)?cn(un(r,0),un(t,0)):hn(n,i):(de(r)?(o=Ae(r,0),e-=1):ye(r)&&(o=Te(r,0),e-=1),de(t)?(a=Ae(t,0),e-=1):ye(t)&&(a=Te(t,0),e-=1),0===e?cn(o,a):hn(n,i))):cn(r,t))})),C(Di,"hasEqualValuesIndexed",(function(r,t){var e;if(r.length!==t.length)return!1;for(e=0;e<r.length;e++)if(r[e]!==t[e])return!1;return!0})),C(Di,"hasSameValues",(function(r,t){var e,n,i,o,a;return r.length===t.length&&(n=nn(r),i=nn(t),n.accessorProtocol||i.accessorProtocol?(e=2,en(r)?en(t)?mn(un(r,0),un(t,0)):dn(n,i):(de(r)?(o=Ae(r,0),e-=1):ye(r)&&(o=Te(r,0),e-=1),de(t)?(a=Ae(t,0),e-=1):ye(t)&&(a=Te(t,0),e-=1),0===e?mn(o,a):dn(n,i))):mn(r,t))})),C(Di,"isAccessorArray",D),C(Di,"isBooleanDataType",_n),C(Di,"isBooleanArray",en),C(Di,"isByteOrder",Vn),C(Di,"isComplexFloatingPointDataType",An),C(Di,"isComplexTypedArray",jn),C(Di,"isComplex64Array",ye),C(Di,"isComplex128Array",de),C(Di,"isDataType",kn),C(Di,"isFloatingPointDataType",Ln),C(Di,"isIntegerDataType",In),C(Di,"isMostlySafeDataTypeCast",Ai),C(Di,"isNumericDataType",Fi),C(Di,"isRealDataType",ji),C(Di,"isRealFloatingPointDataType",ki),C(Di,"isSafeDataTypeCast",Ri),C(Di,"isSameKindDataTypeCast",(function(r,t){return r===t||Ci[r][t]>0})),C(Di,"isSignedIntegerDataType",Ni),C(Di,"isSortedAscending",(function(r){var t,e,n,i,o,a;if(n=Ze(r),e=D(r)?$(n):W(n),0===(t=r.length))return!1;for(i=e(r,0),a=1;a<t;a++){if(i>(o=e(r,a)))return!1;i=o}return!0})),C(Di,"isUnsignedIntegerDataType",Ui);var Hi={};function Ji(r,t,e,n,i,o,a){var u,f,l;if(u=i[o],(f=o+1)!==n)for(l=0;l<u;l++)Ji(r[l],t[l],e[l],n,i,f,a);else for(l=0;l<u;l++)e[l]=a(r[l],t[l])}function Qi(r){var t,e,n;for(e=r.length,t=[],n=0;n<e;n++)t.push(r[n]);return t}function Xi(r){return qi(0,r)}function Zi(r,t,e){var n,i,o,a,u,f,l,s;if((a=e.length)<(u=t.length))throw new Error("invalid argument. Cannot broadcast an array to a shape having fewer dimensions. Arrays can only be broadcasted to shapes having the same or more dimensions.");for(n=r,l=u;l<a;l++)n=[n];for(o=Xi(a),l=a-1;l>=0;l--)if(!((s=u-a+l)<0)){if(f=t[s],0!==(i=e[l])&&i<f)throw new Error(j("invalid argument. Input array cannot be broadcast to the specified shape, as the specified shape has a dimension whose size is less than the size of the corresponding dimension in the input array. Array shape: (%s). Desired shape: (%s). Dimension: %u.",Qi(t).join(", "),Qi(e).join(", "),l));if(f===i)o[l]=1;else{if(1!==f)throw new Error(j("invalid argument. Input array and the specified shape are broadcast incompatible. Array shape: (%s). Desired shape: (%s). Dimension: %u.",Qi(t).join(", "),Qi(e).join(", "),l));o[l]=0}}return{ref:r,data:n,shape:Qi(e),strides:o}}function Ki(r){return pe(r>0?r-1:r+1)}function ro(r){return r===vr||r===wt}C(Hi,"filled2dBy",(function(r,t,e,n,i,o){var a,u,f,l,s,c;for(l=r[0],f=r[1],a=[],c=0;c<l;c++){for(u=[],s=0;s<f;s++)s>=c&&s<=c+t||s<=c&&c<=s+e?u.push(i.call(o,[c,s])):u.push(n);a.push(u)}return a})),C(Hi,"toCompact",(function(r,t,e,n){var i,o,a,u,f,l,s;if(a=r.length,u=r[0].length,n){for(i=$i([u,t+e+1]),l=0;l<u;l++)for(o=i[l],s=t-l,f=Wi(0,l-t);f<zi(a,l+e+1);f++)o[s+f]=r[f][l];return i}for(i=$i([t+e+1,u]),l=0;l<u;l++)for(s=t-l,f=Wi(0,l-t);f<zi(a,l+e+1);f++)i[s+f][l]=r[f][l];return i}));var to=Math.sqrt;function eo(r){return Math.abs(r)}var no,io="function"==typeof Uint32Array?Uint32Array:void 0,oo=Ar()?io:function(){throw new Error("not implemented")},ao="function"==typeof Uint16Array?Uint16Array:void 0,uo=Nr()?ao:function(){throw new Error("not implemented")},fo={uint16:uo,uint8:an};(no=new fo.uint16(1))[0]=4660;var lo,so,co=52===new fo.uint8(no.buffer)[0];!0===co?(lo=1,so=0):(lo=0,so=1);var ho={HIGH:lo,LOW:so},po=new Ve(1),go=new oo(po.buffer),yo=ho.HIGH,mo=ho.LOW;function vo(r,t,e,n){return po[0]=r,t[n]=go[yo],t[n+e]=go[mo],t}function wo(r){return vo(r,[0,0],1,0)}N(wo,"assign",vo);var bo=!0===co?0:1,Eo=new Ve(1),_o=new oo(Eo.buffer);function To(r,t){return Eo[0]=r,_o[bo]=t>>>0,Eo[0]}function xo(r){return 0|r}var Vo,Ao,So=2147483647,Fo=2147483648,jo=!0===co?1:0,ko=new Ve(1),Lo=new oo(ko.buffer);function Io(r){return ko[0]=r,Lo[jo]}!0===co?(Vo=1,Ao=0):(Vo=0,Ao=1);var Oo={HIGH:Vo,LOW:Ao},Ro=new Ve(1),Bo=new oo(Ro.buffer),Mo=Oo.HIGH,Po=Oo.LOW;function Co(r,t){return Bo[Mo]=r,Bo[Po]=t,Ro[0]}var No=[0,0];function Uo(r,t){var e,n;return wo.assign(r,No,1,0),e=No[0],e&=So,n=Io(t),Co(e|=n&=Fo,No[1])}var Do=1072693247,Yo=1e300,Wo=1e-300,zo=!0===co?1:0,qo=new Ve(1),Go=new oo(qo.buffer);function $o(r,t){return qo[0]=r,Go[zo]=t>>>0,qo[0]}var Ho=1023,Jo=20,Qo=1048575,Xo=1048576,Zo=1072693248,Ko=536870912,ra=524288,ta=9007199254740992,ea=.9617966939259756,na=.9617967009544373,ia=-7.028461650952758e-9,oa=[1,1.5],aa=[0,.5849624872207642],ua=[0,1.350039202129749e-8],fa=1.4426950408889634,la=1.4426950216293335,sa=1.9259629911266175e-8,ca=1023,ha=-1023,pa=-1074,ga=22250738585072014e-324,ya=4503599627370496;function ma(r,t,e,n){return Cn(r)||ro(r)?(t[n]=r,t[n+e]=0,t):0!==r&&eo(r)<ga?(t[n]=r*ya,t[n+e]=-52,t):(t[n]=r,t[n+e]=0,t)}N((function(r){return ma(r,[0,0],1,0)}),"assign",ma);var da=2146435072,va=2220446049250313e-31,wa=2148532223,ba=[0,0],Ea=[0,0];function _a(r,t){var e,n;return 0===t||0===r||Cn(r)||ro(r)?r:(ma(r,ba,1,0),r=ba[0],t+=ba[1],t+=function(r){var t=Io(r);return(t=(t&da)>>>20)-Ho|0}(r),t<pa?Uo(0,r):t>ca?r<0?wt:vr:(t<=ha?(t+=52,n=va):n=1,wo.assign(r,Ea,1,0),e=Ea[0],e&=wa,n*Co(e|=t+Ho<<20,Ea[1])))}var Ta=.6931471805599453,xa=1048575,Va=1048576,Aa=1071644672,Sa=.6931471824645996,Fa=-1.904654299957768e-9,ja=1072693247,ka=1105199104,La=1139802112,Ia=1083179008,Oa=1072693248,Ra=1083231232,Ba=3230714880,Ma=31,Pa=1e300,Ca=1e-300,Na=8008566259537294e-32,Ua=[0,0],Da=[0,0];function Ya(r,t){var e,n,i,o,a,u,f,l,s,c,h,p,g,y;if(Cn(r)||Cn(t))return NaN;if(wo.assign(t,Ua,1,0),a=Ua[0],0===Ua[1]){if(0===t)return 1;if(1===t)return r;if(-1===t)return 1/r;if(.5===t)return to(r);if(-.5===t)return 1/to(r);if(2===t)return r*r;if(3===t)return r*r*r;if(4===t)return(r*=r)*r;if(ro(t))return function(r,t){return-1===r?(r-r)/(r-r):1===r?1:eo(r)<1==(t===vr)?0:vr}(r,t)}if(wo.assign(r,Ua,1,0),o=Ua[0],0===Ua[1]){if(0===o)return function(r,t){return t===wt?vr:t===vr?0:t>0?Ki(t)?r:0:Ki(t)?Uo(vr,r):vr}(r,t);if(1===r)return 1;if(-1===r&&Ki(t))return-1;if(ro(r))return r===wt?Ya(-0,-t):t<0?0:vr}if(r<0&&!1===Et(t))return(r-r)/(r-r);if(i=eo(r),e=o&So|0,n=a&So|0,f=a>>>Ma|0,u=(u=o>>>Ma|0)&&Ki(t)?-1:1,n>ka){if(n>La)return function(r,t){return(Io(r)&So)<=Do?t<0?Yo*Yo:Wo*Wo:t>0?Yo*Yo:Wo*Wo}(r,t);if(e<ja)return 1===f?u*Pa*Pa:u*Ca*Ca;if(e>Oa)return 0===f?u*Pa*Pa:u*Ca*Ca;h=function(r,t){var e,n,i,o,a,u,f;return o=(i=t-1)*i*(0===(f=i)?.5:.5+f*(.25*f-.3333333333333333)),e=(u=i*sa-o*fa)-((n=To(n=(a=la*i)+u,0))-a),r[0]=n,r[1]=e,r}(Da,i)}else h=function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_,T;return b=0,e<Xo&&(b-=53,e=Io(t*=ta)),b+=(e>>Jo)-Ho|0,e=(E=e&Qo|0)|Zo|0,E<=235662?_=0:E<767610?_=1:(_=0,b+=1,e-=Xo),a=To(i=(v=(t=$o(t,e))-(l=oa[_]))*(w=1/(t+l)),0),n=(e>>1|Ko)+ra,f=$o(0,n+=_<<18),d=(o=i*i)*o*(0===(T=o)?.5999999999999946:.5999999999999946+T*(.4285714285785502+T*(.33333332981837743+T*(.272728123808534+T*(.23066074577556175+.20697501780033842*T))))),f=To(f=3+(o=a*a)+(d+=(u=w*(v-a*f-a*(t-(f-l))))*(a+i)),0),c=To(c=(v=a*f)+(w=u*f+(d-(f-3-o))*i),0),h=na*c,y=(p=ia*c+(w-(c-v))*ea+ua[_])-((g=To(g=h+p+(s=aa[_])+(m=b),0))-m-s-h),r[0]=g,r[1]=y,r}(Da,i,e);if(p=(c=(t-(l=To(t,0)))*h[0]+t*h[1])+(s=l*h[0]),wo.assign(p,Ua,1,0),g=xo(Ua[0]),y=xo(Ua[1]),g>=Ia){if(0!=(g-Ia|y))return u*Pa*Pa;if(c+Na>p-s)return u*Pa*Pa}else if((g&So)>=Ra){if(0!=(g-Ba|y))return u*Ca*Ca;if(c<=p-s)return u*Ca*Ca}return p=function(r,t,e){var n,i,o,a,u,f,l,s,c,h;return c=((s=r&So|0)>>Jo)-Ho|0,l=0,s>Aa&&(i=$o(0,((l=r+(Va>>c+1)>>>0)&~(xa>>(c=((l&So)>>Jo)-Ho|0)))>>>0),l=(l&xa|Va)>>Jo-c>>>0,r<0&&(l=-l),t-=i),r=xo(r=Io(f=1-((f=(o=(i=To(i=e+t,0))*Sa)+(a=(e-(i-t))*Ta+i*Fa))*(n=f-(i=f*f)*(0===(h=i)?.16666666666666602:.16666666666666602+h*(h*(6613756321437934e-20+h*(4.1381367970572385e-8*h-16533902205465252e-22))-.0027777777777015593)))/(n-2)-((u=a-(f-o))+f*u)-f))),(r+=l<<Jo>>>0)>>Jo<=0?_a(f,l):$o(f,r)}(g,s,c),u*p}function Wa(r,t){var e,n,i,o,a,u,f,l,s,c;if((u=r.length)<=0||t<=0)return[];for(e=Yi(r),a=Ya(u,t),o=[],l=0;l<t;l++)o.push(0);for(n=[],l=0;l<a;l++){for(c=l,s=t-1;s>=0;s--)c-=f=c%u,c/=u,o[s]=f;for(i=[],s=0;s<t;s++)i.push(e(r,o[s]));n.push(i)}return n}function za(r,t){var e,n,i,o,a,u,f,l;for(e=Yi(r),n=Yi(t),o=r.length,a=t.length,i=[],f=0;f<o;f++)for(u=e(r,f),l=0;l<a;l++)i.push([u,n(t,l)]);return i}function qa(r){var t,e,n,i,o,a;for(t=Yi(r),n=r.length,e=[],o=0;o<n;o++)for(i=t(r,o),a=0;a<n;a++)e.push([i,t(r,a)]);return e}function Ga(r){var t,e,n,i;for(n=Yi(r),e=r.length,t=[],i=0;i<e;i++)t.push(n(r,i));return t}var $a=16;function Ha(r){return"object"==typeof r&&null!==r&&"Complex128Array"===r.constructor.name&&r.BYTES_PER_ELEMENT===$a}var Ja=8;function Qa(r){return"object"==typeof r&&null!==r&&"Complex64Array"===r.constructor.name&&r.BYTES_PER_ELEMENT===Ja}function Xa(r,t){if(Ha(r))return Ae(r,t);if(Qa(r))return Te(r,t);throw new TypeError(j("invalid argument. First argument must be a complex-valued floating-point array. Value: `%s`.",r))}function Za(r){var t,e;for(t=0,e=0;e<r.length;e++)r[e]||(t+=1);return t}function Ka(r){return D(r)?en(r)?Za(un(r,0)):jn(r)?function(r){var t,e,n;for(t=Xa(r,0),e=0,n=0;n<t.length;n+=2)0===t[n]&&0===t[n+1]&&(e+=1);return e}(r):function(r){var t,e,n;for(t=Yi(r),e=0,n=0;n<r.length;n++)t(r,n)||(e+=1);return e}(r):Za(r)}function ru(r){var t,e;if(t=[],r<=0)return t;for(e=0;e<r;e++)t.push(e);return t}function tu(r,t,e,n){var i,o,a;for(o=2*e,a=2*n,i=0;a>=0&&a<t.length;)t[a]=i,t[a+1]=0,a+=o,i+=1;return r}function eu(r,t,e){var n,i,o,a,u;for(n=r.data,i=r.accessors[0],u=0,o=0;o<t.length;o++)e(i(n,a=t[o]),a,n)&&(t[u]=a,u+=1);return t.length=u,t}function nu(r,t,e){var n,i,o;for(o=0,n=0;n<t.length;n++)e(r[i=t[n]],i,r)&&(t[o]=i,o+=1);return t.length=o,t}function iu(r,t){return r===t||r!=r&&t!=t}function ou(r,t){return r===t||r!=r&&t!=t||!(!he(r)||!he(t))&&(e=t,n=gn(r),i=gn(e),iu(n[0],i[0])&&iu(n[1],i[1]));var e,n,i}function au(r){var t,e;for(t=0,e=0;e<r.length;e++)r[e]&&(t+=1);return t}function uu(r){return D(r)?en(r)?au(un(r,0)):jn(r)?function(r){var t,e,n;for(t=Xa(r,0),e=0,n=0;n<t.length;n+=2)(t[n]||t[n+1])&&(e+=1);return e}(r):function(r){var t,e,n;for(t=Yi(r),e=0,n=0;n<r.length;n++)t(r,n)&&(e+=1);return e}(r):au(r)}function fu(r,t,e,n){var i,o,a,u,f;for(o=t.accessors[1],i=t.data,a=!1,u=n,f=0;f<r.length;f+=2)!1===a&&(r[f]||r[f+1])&&(a=!0),o(i,u,a),u+=e;return i}function lu(r,t,e,n){var i=nn(r),o=nn(t);return i.accessorProtocol||o.accessorProtocol?(de(r)?fu(Ae(r,0),o,e,n):ye(r)?fu(Te(r,0),o,e,n):en(r)?function(r,t,e,n){var i,o,a,u,f;for(o=t.accessors[1],i=t.data,a=!1,u=n,f=0;f<r.length;f++)!1===a&&r[f]&&(a=!0),o(i,u,a),u+=e}(un(r,0),o,e,n):function(r,t,e,n){var i,o,a,u,f,l,s;for(i=r.data,o=t.data,a=r.accessors[0],u=t.accessors[1],f=!1,l=n,s=0;s<i.length;s++)!1===f&&a(i,s)&&(f=!0),u(o,l,f),l+=e}(i,o,e,n),t):(function(r,t,e,n){var i,o,a;for(i=!1,o=n,a=0;a<r.length;a++)!1===i&&r[a]&&(i=!0),t[o]=i,o+=e}(r,t,e,n),t)}function su(r){return lu(r,qi(!1,r.length),1,0)}function cu(r,t,e,n){var i,o,a,u,f;for(o=t.accessors[1],i=t.data,a=!0,u=n,f=0;f<r.length;f+=2)!0!==a||r[f]||r[f+1]||(a=!1),o(i,u,a),u+=e;return i}function hu(r,t,e,n){var i=nn(r),o=nn(t);return i.accessorProtocol||o.accessorProtocol?(de(r)?cu(Ae(r,0),o,e,n):ye(r)?cu(Te(r,0),o,e,n):en(r)?function(r,t,e,n){var i,o,a,u,f;for(o=t.accessors[1],i=t.data,a=!0,u=n,f=0;f<r.length;f++)!0!==a||r[f]||(a=!1),o(i,u,a),u+=e}(un(r,0),o,e,n):function(r,t,e,n){var i,o,a,u,f,l,s;for(i=r.data,o=t.data,a=r.accessors[0],u=t.accessors[1],f=!0,l=n,s=0;s<i.length;s++)!0!==f||a(i,s)||(f=!1),u(o,l,f),l+=e}(i,o,e,n),t):(function(r,t,e,n){var i,o,a;for(i=!0,o=n,a=0;a<r.length;a++)!0!==i||r[a]||(i=!1),t[o]=i,o+=e}(r,t,e,n),t)}function pu(r){return hu(r,qi(!0,r.length),1,0)}function gu(r,t,e,n){var i,o,a,u,f;for(o=t.accessors[1],i=t.data,a=!0,u=n,f=0;f<r.length;f+=2)!0===a&&(r[f]||r[f+1])&&(a=!1),o(i,u,a),u+=e;return i}function yu(r,t,e,n){var i=nn(r),o=nn(t);return i.accessorProtocol||o.accessorProtocol?(de(r)?gu(Ae(r,0),o,e,n):ye(r)?gu(Te(r,0),o,e,n):en(r)?function(r,t,e,n){var i,o,a,u,f;for(o=t.accessors[1],i=t.data,a=!0,u=n,f=0;f<r.length;f++)!0===a&&r[f]&&(a=!1),o(i,u,a),u+=e}(un(r,0),o,e,n):function(r,t,e,n){var i,o,a,u,f,l,s;for(i=r.data,o=t.data,a=r.accessors[0],u=t.accessors[1],f=!0,l=n,s=0;s<i.length;s++)!0===f&&a(i,s)&&(f=!1),u(o,l,f),l+=e}(i,o,e,n),t):(function(r,t,e,n){var i,o,a;for(i=!0,o=n,a=0;a<r.length;a++)!0===i&&r[a]&&(i=!1),t[o]=i,o+=e}(r,t,e,n),t)}function mu(r){return yu(r,qi(!0,r.length),1,0)}function du(r){var t;for(t=0;t<r.length;t++)if(!r[t])return!1;return!0}function vu(r){var t;for(t=0;t<r.length;t+=2)if(!r[t]&&!r[t+1])return!1;return!0}function wu(r){return Tt(r)||function(r){return null===r}(r)||function(r){return void 0===r}(r)}function bu(){var r,t,e,n;if(0===(r=arguments.length)?(t=null,e=null,n=null):1===r?(t=null,e=arguments[0],n=null):2===r?(t=arguments[0],e=arguments[1],n=null):(t=arguments[0],e=arguments[1],n=arguments[2]),!(this instanceof bu))return new bu(t,e,n);if(!wu(t))throw new TypeError(j("invalid argument. First argument must be an integer, null, or undefined. Value: `%s`.",t));if(!wu(e))throw new TypeError(j("invalid argument. Second argument must be an integer, null, or undefined. Value: `%s`.",e));if(!wu(n))throw new TypeError(j("invalid argument. Third argument must be an integer, null, or undefined. Value: `%s`.",n));if(0===n)throw new RangeError(j("invalid argument. Third argument cannot be zero. Value: `%s`.",n));return this._start=void 0===t?null:t,this._stop=void 0===e?null:e,this._step=void 0===n?null:n,this}function Eu(r,t,e){var n,i,o;if(n=r.start,i=r.stop,null===(o=r.step)&&(o=1),null===n)n=o>0?0:t-1;else if(n<0){if((n=t+n)<0){if(e)return{code:"ERR_SLICE_OUT_OF_BOUNDS"};n=0}}else if(n>=t){if(e)return{code:"ERR_SLICE_OUT_OF_BOUNDS"};n=o<0?t-1:t}if(null===i)i=o>0?t:null;else if(i<0){if((i=t+i)<0)if(o>0){if(e)return{code:"ERR_SLICE_OUT_OF_BOUNDS"};i=0}else{if(e&&i<-1)return{code:"ERR_SLICE_OUT_OF_BOUNDS"};i=null}}else if(i>t){if(e)return{code:"ERR_SLICE_OUT_OF_BOUNDS"};i=t}return new bu(n,i,o)}N(ru,"assign",(function(r,t,e){var n=nn(r);return n.accessorProtocol?"complex128"===n.dtype?tu(r,Ae(r,0),t,e):"complex64"===n.dtype?tu(r,Te(r,0),t,e):function(r,t,e){var n,i,o,a;for(n=r.data,i=r.accessors[1],a=e,o=0;a>=0&&a<n.length;)i(n,a,o),a+=t,o+=1;return n}(n,t,e):function(r,t,e){var n,i;for(i=e,n=0;i>=0&&i<r.length;)r[i]=n,i+=t,n+=1;return r}(r,t,e)})),N(su,"assign",lu),N(pu,"assign",hu),N(mu,"assign",yu),N(bu,"name","Slice"),be(bu.prototype,"start",(function(){return this._start})),be(bu.prototype,"stop",(function(){return this._stop})),be(bu.prototype,"step",(function(){return this._step})),N(bu.prototype,"toString",(function(){return"Slice("+this._start+","+this._stop+","+this.step+")"})),N(bu.prototype,"toJSON",(function(){return{type:"Slice",data:[this._start,this._stop,this._step]}}));var _u=Math.ceil;function Tu(r){var t,e,n;return e=r.start,null===(n=r.stop)&&(n=-1),(t=r.step)>0&&e>=n||t<0&&e<=n?0:_u((n-e)/t)}var xu="function";function Vu(r){return typeof r.get===xu&&typeof r.set===xu}var Au={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 Su(r){var t=Au[r];return"function"==typeof t?t:Au.default}var Fu={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 ju(r){var t=Fu[r];return"function"==typeof t?t:Fu.default}var ku={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 Lu(r){var t=ku[r];return"function"==typeof t?t:ku.default}var Iu={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 Ou(r){var t=Iu[r];return"function"==typeof t?t:Iu.default}var Ru={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"},Bu="function"==typeof Int32Array?Int32Array:void 0,Mu=Or()?Bu:function(){throw new Error("not implemented")},Pu="function"==typeof Int16Array?Int16Array:void 0,Cu=Gr()?Pu:function(){throw new Error("not implemented")},Nu="function"==typeof Uint8ClampedArray?Uint8ClampedArray:void 0,Uu=nt()?Nu:function(){throw new Error("not implemented")},Du="function"==typeof Int8Array?Int8Array:void 0,Yu=st()?Du:function(){throw new Error("not implemented")};function Wu(r){var t,e,n;for(t=[];!(e=r.next()).done;)if(kt(n=e.value)&&n.length>=2)t.push(n[0],n[1]);else{if(!he(n))return new TypeError(j("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(Ee(n),_e(n))}return t}var zu=2*fe.BYTES_PER_ELEMENT,qu=ve();function Gu(r){return r instanceof Ju||"object"==typeof r&&null!==r&&("Complex64Array"===r.constructor.name||"Complex128Array"===r.constructor.name)&&"number"==typeof r._length&&"object"==typeof r._buffer}function $u(r){return r===Ju||"Complex128Array"===r.name}function Hu(r,t){return new ce(r[t*=2],r[t+1])}function Ju(){var r,t,e,n;if(t=arguments.length,!(this instanceof Ju))return 0===t?new Ju:1===t?new Ju(arguments[0]):2===t?new Ju(arguments[0],arguments[1]):new Ju(arguments[0],arguments[1],arguments[2]);if(0===t)e=new fe(0);else if(1===t)if(At(arguments[0]))e=new fe(2*arguments[0]);else if(It(arguments[0]))if((n=(e=arguments[0]).length)&&ir(e)&&he(e[0])){if(e=function(r,t){var e,n,i,o;for(e=t.length,o=0,i=0;i<e;i++){if(!he(n=t[i]))return null;r[o]=Ee(n),r[o+1]=_e(n),o+=2}return r}(new fe(2*n),e),null===e){if(!pe(n))throw new RangeError(j("invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.",n));e=new fe(arguments[0])}}else{if(Qa(e))e=Te(e,0);else if(Ha(e))e=Ae(e,0);else if(!pe(n))throw new RangeError(j("invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.",n));e=new fe(e)}else if(Rt(arguments[0])){if(!Et((e=arguments[0]).byteLength/zu))throw new RangeError(j("invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.",zu,e.byteLength));e=new fe(e)}else{if(!Bt(arguments[0]))throw new TypeError(j("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",arguments[0]));if(e=arguments[0],!1===qu)throw new TypeError(j("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.",e));if(!ie(e[we]))throw new TypeError(j("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",e));if(!ie((e=e[we]()).next))throw new TypeError(j("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",e));if((e=Wu(e))instanceof Error)throw e;e=new fe(e)}else{if(!Rt(e=arguments[0]))throw new TypeError(j("invalid argument. First argument must be an ArrayBuffer. Value: `%s`.",e));if(!At(r=arguments[1]))throw new TypeError(j("invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.",r));if(!Et(r/zu))throw new RangeError(j("invalid argument. Byte offset must be a multiple of %u. Value: `%u`.",zu,r));if(2===t){if(!Et((n=e.byteLength-r)/zu))throw new RangeError(j("invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.",zu,n));e=new fe(e,r)}else{if(!At(n=arguments[2]))throw new TypeError(j("invalid argument. Length must be a nonnegative integer. Value: `%s`.",n));if(n*zu>e.byteLength-r)throw new RangeError(j("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*zu));e=new fe(e,r,2*n)}}return N(this,"_buffer",e),N(this,"_length",e.length/2),this}function Qu(r){var t,e,n;for(t=[];!(e=r.next()).done;)if(kt(n=e.value)&&n.length>=2)t.push(n[0],n[1]);else{if(!he(n))return new TypeError(j("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(Re(n),Be(n))}return t}N(Ju,"BYTES_PER_ELEMENT",zu),N(Ju,"name","Complex64Array"),N(Ju,"from",(function(r){var t,e,n,i,o,a,u,f,l,s,c,h;if(!ie(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!$u(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((e=arguments.length)>1){if(!ie(n=arguments[1]))throw new TypeError(j("invalid argument. Second argument must be a function. Value: `%s`.",n));e>2&&(t=arguments[2])}if(Gu(r)){if(f=r.length,n){for(o=(i=new this(f))._buffer,h=0,c=0;c<f;c++){if(he(s=n.call(t,r.get(c),c)))o[h]=Ee(s),o[h+1]=_e(s);else{if(!(kt(s)&&s.length>=2))throw new TypeError(j("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",s));o[h]=s[0],o[h+1]=s[1]}h+=2}return i}return new this(r)}if(It(r)){if(n){for(f=r.length,u=r.get&&r.set?Lu("default"):Su("default"),c=0;c<f;c++)if(!he(u(r,c))){l=!0;break}if(l){if(!pe(f))throw new RangeError(j("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,c=0;c<f;c++)o[c]=n.call(t,u(r,c),c);return i}for(o=(i=new this(f))._buffer,h=0,c=0;c<f;c++){if(he(s=n.call(t,u(r,c),c)))o[h]=Ee(s),o[h+1]=_e(s);else{if(!(kt(s)&&s.length>=2))throw new TypeError(j("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",s));o[h]=s[0],o[h+1]=s[1]}h+=2}return i}return new this(r)}if(Bt(r)&&qu&&ie(r[we])){if(!ie((o=r[we]()).next))throw new TypeError(j("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,kt(o=t.call(e,i.value,a))&&o.length>=2)n.push(o[0],o[1]);else{if(!he(o))return new TypeError(j("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",o));n.push(Ee(o),_e(o))}return n}(o,n,t):Wu(o),a instanceof Error)throw a;for(o=(i=new this(f=a.length/2))._buffer,c=0;c<f;c++)o[c]=a[c];return i}throw new TypeError(j("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r))})),N(Ju,"of",(function(){var r,t;if(!ie(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!$u(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(Ju.prototype,"at",(function(r){if(!Gu(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Et(r))throw new TypeError(j("invalid argument. Must provide an integer. Value: `%s`.",r));if(r<0&&(r+=this._length),!(r<0||r>=this._length))return Hu(this._buffer,r)})),be(Ju.prototype,"buffer",(function(){return this._buffer.buffer})),be(Ju.prototype,"byteLength",(function(){return this._buffer.byteLength})),be(Ju.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),N(Ju.prototype,"BYTES_PER_ELEMENT",Ju.BYTES_PER_ELEMENT),N(Ju.prototype,"copyWithin",(function(r,t){if(!Gu(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(Ju.prototype,"entries",(function(){var r,t,e,n,i,o;if(!Gu(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,Hu(n,o)],done:!1}})),N(t,"return",(function(r){return i=!0,arguments.length?{value:r,done:!0}:{done:!0}})),we&&N(t,we,(function(){return r.entries()})),t})),N(Ju.prototype,"every",(function(r,t){var e,n;if(!Gu(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ie(r))throw new TypeError(j("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,Hu(e,n),n,this))return!1;return!0})),N(Ju.prototype,"fill",(function(r,t,e){var n,i,o,a,u,f;if(!Gu(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!he(r))throw new TypeError(j("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(n=this._buffer,i=this._length,arguments.length>1){if(!Et(t))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",t));if(t<0&&(t+=i)<0&&(t=0),arguments.length>2){if(!Et(e))throw new TypeError(j("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=Ee(r),u=_e(r),f=t;f<e;f++)n[o=2*f]=a,n[o+1]=u;return this})),N(Ju.prototype,"filter",(function(r,t){var e,n,i,o;if(!Gu(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ie(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=[],i=0;i<this._length;i++)o=Hu(e,i),r.call(t,o,i,this)&&n.push(o);return new this.constructor(n)})),N(Ju.prototype,"find",(function(r,t){var e,n,i;if(!Gu(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ie(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)if(i=Hu(e,n),r.call(t,i,n,this))return i})),N(Ju.prototype,"findIndex",(function(r,t){var e,n,i;if(!Gu(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ie(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)if(i=Hu(e,n),r.call(t,i,n,this))return n;return-1})),N(Ju.prototype,"findLast",(function(r,t){var e,n,i;if(!Gu(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ie(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=this._length-1;n>=0;n--)if(i=Hu(e,n),r.call(t,i,n,this))return i})),N(Ju.prototype,"findLastIndex",(function(r,t){var e,n,i;if(!Gu(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ie(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=this._length-1;n>=0;n--)if(i=Hu(e,n),r.call(t,i,n,this))return n;return-1})),N(Ju.prototype,"forEach",(function(r,t){var e,n,i;if(!Gu(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ie(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)i=Hu(e,n),r.call(t,i,n,this)})),N(Ju.prototype,"get",(function(r){if(!Gu(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!At(r))throw new TypeError(j("invalid argument. Must provide a nonnegative integer. Value: `%s`.",r));if(!(r>=this._length))return Hu(this._buffer,r)})),N(Ju.prototype,"includes",(function(r,t){var e,n,i,o,a;if(!Gu(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!he(r))throw new TypeError(j("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!Et(t))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length)<0&&(t=0)}else t=0;for(i=Ee(r),o=_e(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(Ju.prototype,"indexOf",(function(r,t){var e,n,i,o,a;if(!Gu(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!he(r))throw new TypeError(j("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!Et(t))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length)<0&&(t=0)}else t=0;for(i=Ee(r),o=_e(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(Ju.prototype,"join",(function(r){var t,e,n,i;if(!Gu(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(0===arguments.length)n=",";else{if(!Mt(r))throw new TypeError(j("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(Hu(e,i).toString());return t.join(n)})),N(Ju.prototype,"keys",(function(){var r,t,e,n,i;if(!Gu(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}})),we&&N(t,we,(function(){return r.keys()})),t})),N(Ju.prototype,"lastIndexOf",(function(r,t){var e,n,i,o,a;if(!Gu(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!he(r))throw new TypeError(j("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!Et(t))throw new TypeError(j("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=Ee(r),o=_e(r),e=this._buffer,a=t;a>=0;a--)if(i===e[n=2*a]&&o===e[n+1])return a;return-1})),be(Ju.prototype,"length",(function(){return this._length})),N(Ju.prototype,"map",(function(r,t){var e,n,i,o,a;if(!Gu(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ie(r))throw new TypeError(j("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(he(a=r.call(t,Hu(n,o),o,this)))e[2*o]=Ee(a),e[2*o+1]=_e(a);else{if(!kt(a)||2!==a.length)throw new TypeError(j("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(Ju.prototype,"reduce",(function(r,t){var e,n,i,o;if(!Gu(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ie(r))throw new TypeError(j("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=Hu(e,0),o=1}for(;o<i;o++)n=r(n,Hu(e,o),o,this);return n})),N(Ju.prototype,"reduceRight",(function(r,t){var e,n,i,o;if(!Gu(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ie(r))throw new TypeError(j("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=Hu(e,i-1),o=i-2}for(;o>=0;o--)n=r(n,Hu(e,o),o,this);return n})),N(Ju.prototype,"reverse",(function(){var r,t,e,n,i,o;if(!Gu(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(e=this._length,r=this._buffer,n=bt(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(Ju.prototype,"set",(function(r){var t,e,n,i,o,a,u,f,l;if(!Gu(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,arguments.length>1){if(!At(e=arguments[1]))throw new TypeError(j("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",e))}else e=0;if(he(r)){if(e>=this._length)throw new RangeError(j("invalid argument. Index argument is out-of-bounds. Value: `%u`.",e));return n[e*=2]=Ee(r),void(n[e+1]=_e(r))}if(Gu(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,l=n.byteOffset+e*zu,t.buffer===n.buffer&&t.byteOffset<l&&t.byteOffset+t.byteLength>l){for(i=new fe(t.length),f=0;f<t.length;f++)i[f]=t[f];t=i}for(e*=2,l=0,f=0;f<a;f++)n[e]=t[l],n[e+1]=t[l+1],e+=2,l+=2}else{if(!It(r))throw new TypeError(j("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(!he(r[f])){o=!0;break}if(o){if(!pe(a))throw new RangeError(j("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,l=n.byteOffset+e*zu,t.buffer===n.buffer&&t.byteOffset<l&&t.byteOffset+t.byteLength>l){for(i=new fe(a),f=0;f<a;f++)i[f]=t[f];t=i}for(e*=2,a/=2,l=0,f=0;f<a;f++)n[e]=t[l],n[e+1]=t[l+1],e+=2,l+=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]=Ee(u),n[e+1]=_e(u),e+=2}})),N(Ju.prototype,"slice",(function(r,t){var e,n,i,o,a,u,f;if(!Gu(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(!Et(r))throw new TypeError(j("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(!Et(t))throw new TypeError(j("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(Ju.prototype,"some",(function(r,t){var e,n;if(!Gu(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ie(r))throw new TypeError(j("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,Hu(e,n),n,this))return!0;return!1})),N(Ju.prototype,"sort",(function(r){var t,e,n,i,o;if(!Gu(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ie(r))throw new TypeError(j("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(Hu(e,i));for(t.sort(r),i=0;i<n;i++)e[o=2*i]=Ee(t[i]),e[o+1]=_e(t[i]);return this})),N(Ju.prototype,"subarray",(function(r,t){var e,n,i;if(!Gu(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(!Et(r))throw new TypeError(j("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(!Et(t))throw new TypeError(j("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*zu):(i=t-r,e=n.byteOffset+r*zu),new this.constructor(n.buffer,e,i<0?0:i)})),N(Ju.prototype,"toLocaleString",(function(r,t){var e,n,i,o,a;if(!Gu(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(0===arguments.length)n=[];else{if(!Mt(r)&&!Dt(r))throw new TypeError(j("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(!Bt(t))throw new TypeError(j("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(Hu(o,a).toLocaleString(n,e));return i.join(",")})),N(Ju.prototype,"toReversed",(function(){var r,t,e,n,i,o;if(!Gu(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(Ju.prototype,"toSorted",(function(r){var t,e,n,i;if(!Gu(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ie(r))throw new TypeError(j("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(Hu(e,i));return t.sort(r),new Ju(t)})),N(Ju.prototype,"toString",(function(){var r,t,e;if(!Gu(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(Hu(t,e).toString());return r.join(",")})),N(Ju.prototype,"values",(function(){var r,t,e,n,i,o;if(!Gu(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:Hu(i,o),done:!1}})),N(r,"return",(function(r){return n=!0,arguments.length?{value:r,done:!0}:{done:!0}})),we&&N(r,we,(function(){return t.values()})),r})),N(Ju.prototype,"with",(function(r,t){var e,n,i;if(!Gu(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Et(r))throw new TypeError(j("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(j("invalid argument. Index argument is out-of-bounds. Value: `%s`.",r));if(!he(t))throw new TypeError(j("invalid argument. Second argument must be a complex number. Value: `%s`.",t));return(e=(n=new this.constructor(this._buffer))._buffer)[2*r]=Ee(t),e[2*r+1]=_e(t),n}));var Xu=2*Ve.BYTES_PER_ELEMENT,Zu=ve();function Ku(r){return r instanceof ef||"object"==typeof r&&null!==r&&("Complex64Array"===r.constructor.name||"Complex128Array"===r.constructor.name)&&"number"==typeof r._length&&"object"==typeof r._buffer}function rf(r){return r===ef||"Complex64Array"===r.name}function tf(r,t){return new oe(r[t*=2],r[t+1])}function ef(){var r,t,e,n;if(t=arguments.length,!(this instanceof ef))return 0===t?new ef:1===t?new ef(arguments[0]):2===t?new ef(arguments[0],arguments[1]):new ef(arguments[0],arguments[1],arguments[2]);if(0===t)e=new Ve(0);else if(1===t)if(At(arguments[0]))e=new Ve(2*arguments[0]);else if(It(arguments[0]))if((n=(e=arguments[0]).length)&&ir(e)&&he(e[0])){if(e=function(r,t){var e,n,i,o;for(e=t.length,o=0,i=0;i<e;i++){if(!he(n=t[i]))return null;r[o]=Re(n),r[o+1]=Be(n),o+=2}return r}(new Ve(2*n),e),null===e){if(!pe(n))throw new RangeError(j("invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.",n));e=new Ve(arguments[0])}}else{if(Qa(e))e=Te(e,0);else if(Ha(e))e=Ae(e,0);else if(!pe(n))throw new RangeError(j("invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.",n));e=new Ve(e)}else if(Rt(arguments[0])){if(!Et((e=arguments[0]).byteLength/Xu))throw new RangeError(j("invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.",Xu,e.byteLength));e=new Ve(e)}else{if(!Bt(arguments[0]))throw new TypeError(j("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",arguments[0]));if(e=arguments[0],!1===Zu)throw new TypeError(j("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.",e));if(!ie(e[we]))throw new TypeError(j("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",e));if(!ie((e=e[we]()).next))throw new TypeError(j("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",e));if((e=Qu(e))instanceof Error)throw e;e=new Ve(e)}else{if(!Rt(e=arguments[0]))throw new TypeError(j("invalid argument. First argument must be an ArrayBuffer. Value: `%s`.",e));if(!At(r=arguments[1]))throw new TypeError(j("invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.",r));if(!Et(r/Xu))throw new RangeError(j("invalid argument. Byte offset must be a multiple of %u. Value: `%u`.",Xu,r));if(2===t){if(!Et((n=e.byteLength-r)/Xu))throw new RangeError(j("invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.",Xu,n));e=new Ve(e,r)}else{if(!At(n=arguments[2]))throw new TypeError(j("invalid argument. Length must be a nonnegative integer. Value: `%s`.",n));if(n*Xu>e.byteLength-r)throw new RangeError(j("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*Xu));e=new Ve(e,r,2*n)}}return N(this,"_buffer",e),N(this,"_length",e.length/2),this}function nf(r){var t,e;for(t=[];!(e=r.next()).done;)t.push(Gt(e.value));return t}N(ef,"BYTES_PER_ELEMENT",Xu),N(ef,"name","Complex128Array"),N(ef,"from",(function(r){var t,e,n,i,o,a,u,f,l,s,c,h;if(!ie(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!rf(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((e=arguments.length)>1){if(!ie(n=arguments[1]))throw new TypeError(j("invalid argument. Second argument must be a function. Value: `%s`.",n));e>2&&(t=arguments[2])}if(Ku(r)){if(f=r.length,n){for(o=(i=new this(f))._buffer,h=0,c=0;c<f;c++){if(he(s=n.call(t,r.get(c),c)))o[h]=Re(s),o[h+1]=Be(s);else{if(!(kt(s)&&s.length>=2))throw new TypeError(j("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",s));o[h]=s[0],o[h+1]=s[1]}h+=2}return i}return new this(r)}if(It(r)){if(n){for(f=r.length,u=r.get&&r.set?Lu("default"):Su("default"),c=0;c<f;c++)if(!he(u(r,c))){l=!0;break}if(l){if(!pe(f))throw new RangeError(j("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,c=0;c<f;c++)o[c]=n.call(t,u(r,c),c);return i}for(o=(i=new this(f))._buffer,h=0,c=0;c<f;c++){if(he(s=n.call(t,u(r,c),c)))o[h]=Re(s),o[h+1]=Be(s);else{if(!(kt(s)&&s.length>=2))throw new TypeError(j("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",s));o[h]=s[0],o[h+1]=s[1]}h+=2}return i}return new this(r)}if(Bt(r)&&Zu&&ie(r[we])){if(!ie((o=r[we]()).next))throw new TypeError(j("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,kt(o=t.call(e,i.value,a))&&o.length>=2)n.push(o[0],o[1]);else{if(!he(o))return new TypeError(j("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",o));n.push(Re(o),Be(o))}return n}(o,n,t):Qu(o),a instanceof Error)throw a;for(o=(i=new this(f=a.length/2))._buffer,c=0;c<f;c++)o[c]=a[c];return i}throw new TypeError(j("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r))})),N(ef,"of",(function(){var r,t;if(!ie(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!rf(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(ef.prototype,"at",(function(r){if(!Ku(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Et(r))throw new TypeError(j("invalid argument. Must provide an integer. Value: `%s`.",r));if(r<0&&(r+=this._length),!(r<0||r>=this._length))return tf(this._buffer,r)})),be(ef.prototype,"buffer",(function(){return this._buffer.buffer})),be(ef.prototype,"byteLength",(function(){return this._buffer.byteLength})),be(ef.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),N(ef.prototype,"BYTES_PER_ELEMENT",ef.BYTES_PER_ELEMENT),N(ef.prototype,"copyWithin",(function(r,t){if(!Ku(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(ef.prototype,"entries",(function(){var r,t,e,n,i,o,a;if(!Ku(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 oe(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}})),we&&N(e,we,(function(){return t.entries()})),e})),N(ef.prototype,"every",(function(r,t){var e,n;if(!Ku(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ie(r))throw new TypeError(j("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,tf(e,n),n,this))return!1;return!0})),N(ef.prototype,"fill",(function(r,t,e){var n,i,o,a,u,f;if(!Ku(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!he(r))throw new TypeError(j("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(n=this._buffer,i=this._length,arguments.length>1){if(!Et(t))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",t));if(t<0&&(t+=i)<0&&(t=0),arguments.length>2){if(!Et(e))throw new TypeError(j("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=Re(r),u=Be(r),f=t;f<e;f++)n[o=2*f]=a,n[o+1]=u;return this})),N(ef.prototype,"filter",(function(r,t){var e,n,i,o;if(!Ku(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ie(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=[],i=0;i<this._length;i++)o=tf(e,i),r.call(t,o,i,this)&&n.push(o);return new this.constructor(n)})),N(ef.prototype,"find",(function(r,t){var e,n,i;if(!Ku(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ie(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)if(i=tf(e,n),r.call(t,i,n,this))return i})),N(ef.prototype,"findIndex",(function(r,t){var e,n,i;if(!Ku(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ie(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)if(i=tf(e,n),r.call(t,i,n,this))return n;return-1})),N(ef.prototype,"findLast",(function(r,t){var e,n,i;if(!Ku(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ie(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=this._length-1;n>=0;n--)if(i=tf(e,n),r.call(t,i,n,this))return i})),N(ef.prototype,"findLastIndex",(function(r,t){var e,n,i;if(!Ku(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ie(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=this._length-1;n>=0;n--)if(i=tf(e,n),r.call(t,i,n,this))return n;return-1})),N(ef.prototype,"forEach",(function(r,t){var e,n,i;if(!Ku(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ie(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)i=tf(e,n),r.call(t,i,n,this)})),N(ef.prototype,"get",(function(r){if(!Ku(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!At(r))throw new TypeError(j("invalid argument. Must provide a nonnegative integer. Value: `%s`.",r));if(!(r>=this._length))return tf(this._buffer,r)})),be(ef.prototype,"length",(function(){return this._length})),N(ef.prototype,"includes",(function(r,t){var e,n,i,o,a;if(!Ku(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!he(r))throw new TypeError(j("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!Et(t))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length)<0&&(t=0)}else t=0;for(i=Re(r),o=Be(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(ef.prototype,"indexOf",(function(r,t){var e,n,i,o,a;if(!Ku(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!he(r))throw new TypeError(j("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!Et(t))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length)<0&&(t=0)}else t=0;for(i=Re(r),o=Be(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(ef.prototype,"join",(function(r){var t,e,n,i;if(!Ku(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(0===arguments.length)n=",";else{if(!Ut(r))throw new TypeError(j("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(tf(e,i).toString());return t.join(n)})),N(ef.prototype,"keys",(function(){var r,t,e,n,i;if(!Ku(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}})),we&&N(t,we,(function(){return r.keys()})),t})),N(ef.prototype,"lastIndexOf",(function(r,t){var e,n,i,o,a;if(!Ku(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!he(r))throw new TypeError(j("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!Et(t))throw new TypeError(j("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=Re(r),o=Be(r),e=this._buffer,a=t;a>=0;a--)if(i===e[n=2*a]&&o===e[n+1])return a;return-1})),N(ef.prototype,"map",(function(r,t){var e,n,i,o,a;if(!Ku(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ie(r))throw new TypeError(j("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(he(a=r.call(t,tf(n,o),o,this)))e[2*o]=Re(a),e[2*o+1]=Be(a);else{if(!kt(a)||2!==a.length)throw new TypeError(j("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(ef.prototype,"reduce",(function(r,t){var e,n,i,o;if(!Ku(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ie(r))throw new TypeError(j("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=tf(e,0),o=1}for(;o<i;o++)n=r(n,tf(e,o),o,this);return n})),N(ef.prototype,"reduceRight",(function(r,t){var e,n,i,o;if(!Ku(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ie(r))throw new TypeError(j("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=tf(e,i-1),o=i-2}for(;o>=0;o--)n=r(n,tf(e,o),o,this);return n})),N(ef.prototype,"reverse",(function(){var r,t,e,n,i,o;if(!Ku(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(e=this._length,r=this._buffer,n=bt(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(ef.prototype,"set",(function(r){var t,e,n,i,o,a,u,f,l;if(!Ku(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,arguments.length>1){if(!At(e=arguments[1]))throw new TypeError(j("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",e))}else e=0;if(he(r)){if(e>=this._length)throw new RangeError(j("invalid argument. Index argument is out-of-bounds. Value: `%u`.",e));return n[e*=2]=Re(r),void(n[e+1]=Be(r))}if(Ku(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,l=n.byteOffset+e*Xu,t.buffer===n.buffer&&t.byteOffset<l&&t.byteOffset+t.byteLength>l){for(i=new Ve(t.length),f=0;f<t.length;f++)i[f]=t[f];t=i}for(e*=2,l=0,f=0;f<a;f++)n[e]=t[l],n[e+1]=t[l+1],e+=2,l+=2}else{if(!It(r))throw new TypeError(j("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(!he(r[f])){o=!0;break}if(o){if(!pe(a))throw new RangeError(j("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,l=n.byteOffset+e*Xu,t.buffer===n.buffer&&t.byteOffset<l&&t.byteOffset+t.byteLength>l){for(i=new Ve(a),f=0;f<a;f++)i[f]=t[f];t=i}for(e*=2,a/=2,l=0,f=0;f<a;f++)n[e]=t[l],n[e+1]=t[l+1],e+=2,l+=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]=Re(u),n[e+1]=Be(u),e+=2}})),N(ef.prototype,"slice",(function(r,t){var e,n,i,o,a,u,f;if(!Ku(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(!Et(r))throw new TypeError(j("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(!Et(t))throw new TypeError(j("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(ef.prototype,"some",(function(r,t){var e,n;if(!Ku(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ie(r))throw new TypeError(j("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,tf(e,n),n,this))return!0;return!1})),N(ef.prototype,"sort",(function(r){var t,e,n,i,o;if(!Ku(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ie(r))throw new TypeError(j("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(tf(e,i));for(t.sort(r),i=0;i<n;i++)e[o=2*i]=Re(t[i]),e[o+1]=Be(t[i]);return this})),N(ef.prototype,"subarray",(function(r,t){var e,n,i;if(!Ku(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(!Et(r))throw new TypeError(j("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(!Et(t))throw new TypeError(j("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*Xu):(i=t-r,e=n.byteOffset+r*Xu),new this.constructor(n.buffer,e,i<0?0:i)})),N(ef.prototype,"toLocaleString",(function(r,t){var e,n,i,o,a;if(!Ku(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(0===arguments.length)n=[];else{if(!Ut(r)&&!Dt(r))throw new TypeError(j("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(!Bt(t))throw new TypeError(j("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(tf(o,a).toLocaleString(n,e));return i.join(",")})),N(ef.prototype,"toReversed",(function(){var r,t,e,n,i,o;if(!Ku(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(ef.prototype,"toSorted",(function(r){var t,e,n,i;if(!Ku(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ie(r))throw new TypeError(j("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(tf(e,i));return t.sort(r),new ef(t)})),N(ef.prototype,"toString",(function(){var r,t,e;if(!Ku(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(tf(t,e).toString());return r.join(",")})),N(ef.prototype,"values",(function(){var r,t,e,n,i,o;if(!Ku(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:tf(i,o),done:!1}})),N(r,"return",(function(r){return n=!0,arguments.length?{value:r,done:!0}:{done:!0}})),we&&N(r,we,(function(){return t.values()})),r})),N(ef.prototype,"with",(function(r,t){var e,n,i;if(!Ku(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Et(r))throw new TypeError(j("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(j("invalid argument. Index argument is out-of-bounds. Value: `%s`.",r));if(!he(t))throw new TypeError(j("invalid argument. Second argument must be a complex number. Value: `%s`.",t));return(e=(n=new this.constructor(this._buffer))._buffer)[2*r]=Re(t),e[2*r+1]=Be(t),n}));var of=an.BYTES_PER_ELEMENT,af=ve();function uf(r){return"object"==typeof r&&null!==r&&"BooleanArray"===r.constructor.name&&r.BYTES_PER_ELEMENT===of}function ff(r){return r===lf}function lf(){var r,t,e,n,i;if(t=arguments.length,!(this instanceof lf))return 0===t?new lf:1===t?new lf(arguments[0]):2===t?new lf(arguments[0],arguments[1]):new lf(arguments[0],arguments[1],arguments[2]);if(0===t)e=new an(0);else if(1===t)if(At(i=arguments[0]))e=new an(i);else if(It(i))e=function(r,t){var e,n;for(e=t.length,n=0;n<e;n++)r[n]=Gt(t[n]);return r}(new an(i.length),i);else if(Rt(i))e=new an(i);else{if(!Bt(i))throw new TypeError(j("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",i));if(!1===af)throw new TypeError(j("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.",i));if(!ie(i[we]))throw new TypeError(j("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",i));if(!ie((e=i[we]()).next))throw new TypeError(j("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",i));e=new an(nf(e))}else{if(!Rt(e=arguments[0]))throw new TypeError(j("invalid argument. First argument must be an ArrayBuffer. Value: `%s`.",e));if(!At(r=arguments[1]))throw new TypeError(j("invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.",r));if(2===t)e=new an(e,r);else{if(!At(n=arguments[2]))throw new TypeError(j("invalid argument. Length must be a nonnegative integer. Value: `%s`.",n));if(n*of>e.byteLength-r)throw new RangeError(j("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*of));e=new an(e,r,n)}}return N(this,"_buffer",e),N(this,"_length",e.length),this}N(lf,"BYTES_PER_ELEMENT",of),N(lf,"name","BooleanArray"),N(lf,"from",(function(r){var t,e,n,i,o,a,u,f,l;if(!ie(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!ff(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if((e=arguments.length)>1){if(!ie(n=arguments[1]))throw new TypeError(j("invalid argument. Second argument must be a function. Value: `%s`.",n));e>2&&(t=arguments[2])}if(It(r)){if(n){for(f=r.length,u=r.get&&r.set?Lu("default"):Su("default"),o=(i=new this(f))._buffer,l=0;l<f;l++)o[l]=Gt(n.call(t,u(r,l),l));return i}return new this(r)}if(Bt(r)&&af&&ie(r[we])){if(!ie((o=r[we]()).next))throw new TypeError(j("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(Gt(t.call(e,i.value,o)));return n}(o,n,t):nf(o),o=(i=new this(f=a.length))._buffer,l=0;l<f;l++)o[l]=a[l];return i}throw new TypeError(j("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r))})),N(lf,"of",(function(){var r,t;if(!ie(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!ff(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(lf.prototype,"at",(function(r){var t,e;if(!uf(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Tt(r))throw new TypeError(j("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 Gt(t[r])})),be(lf.prototype,"buffer",(function(){return this._buffer.buffer})),be(lf.prototype,"byteLength",(function(){return this._buffer.byteLength})),be(lf.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),N(lf.prototype,"BYTES_PER_ELEMENT",lf.BYTES_PER_ELEMENT),N(lf.prototype,"copyWithin",(function(r,t){if(!uf(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(lf.prototype,"entries",(function(){var r,t,e,n,i,o;if(!uf(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,Gt(n[o])],done:!1}})),N(t,"return",(function(r){return i=!0,arguments.length?{value:r,done:!0}:{done:!0}})),we&&N(t,we,(function(){return r.entries()})),t})),N(lf.prototype,"every",(function(r,t){var e,n;if(!uf(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!ie(r))throw new TypeError(j("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,Gt(e[n]),n,this))return!1;return!0})),N(lf.prototype,"fill",(function(r,t,e){var n,i,o,a;if(!uf(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!qt(r))throw new TypeError(j("invalid argument. First argument must be a boolean. Value: `%s`.",r));if(n=this._buffer,i=this._length,arguments.length>1){if(!Tt(t))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",t));if(t<0&&(t+=i)<0&&(t=0),arguments.length>2){if(!Tt(e))throw new TypeError(j("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(lf.prototype,"filter",(function(r,t){var e,n,i,o;if(!uf(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!ie(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=[],i=0;i<this._length;i++)o=Gt(e[i]),r.call(t,o,i,this)&&n.push(o);return new this.constructor(n)})),N(lf.prototype,"find",(function(r,t){var e,n,i;if(!uf(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!ie(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,i=0;i<this._length;i++)if(n=Gt(e[i]),r.call(t,n,i,this))return n})),N(lf.prototype,"findIndex",(function(r,t){var e,n,i;if(!uf(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!ie(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,i=0;i<this._length;i++)if(n=Gt(e[i]),r.call(t,n,i,this))return i;return-1})),N(lf.prototype,"findLast",(function(r,t){var e,n,i;if(!uf(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!ie(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,i=this._length-1;i>=0;i--)if(n=Gt(e[i]),r.call(t,n,i,this))return n})),N(lf.prototype,"findLastIndex",(function(r,t){var e,n,i;if(!uf(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!ie(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,i=this._length-1;i>=0;i--)if(n=Gt(e[i]),r.call(t,n,i,this))return i;return-1})),N(lf.prototype,"forEach",(function(r,t){var e,n;if(!uf(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!ie(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)r.call(t,Gt(e[n]),n,this)})),N(lf.prototype,"get",(function(r){if(!uf(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!At(r))throw new TypeError(j("invalid argument. Must provide a nonnegative integer. Value: `%s`.",r));if(!(r>=this._length))return Gt(this._buffer[r])})),N(lf.prototype,"includes",(function(r,t){var e,n;if(!uf(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!qt(r))throw new TypeError(j("invalid argument. First argument must be a boolean. Value: `%s`.",r));if(arguments.length>1){if(!Tt(t))throw new TypeError(j("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===Gt(e[n]))return!0;return!1})),N(lf.prototype,"indexOf",(function(r,t){var e,n;if(!uf(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!qt(r))throw new TypeError(j("invalid argument. First argument must be a boolean. Value: `%s`.",r));if(arguments.length>1){if(!Tt(t))throw new TypeError(j("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===Gt(e[n]))return n;return-1})),N(lf.prototype,"join",(function(r){var t,e,n;if(!uf(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(arguments.length>0){if(!Mt(r))throw new TypeError(j("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(lf.prototype,"keys",(function(){var r,t,e,n,i;if(!uf(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}})),we&&N(t,we,(function(){return r.keys()})),t})),N(lf.prototype,"lastIndexOf",(function(r,t){var e,n;if(!uf(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!qt(r))throw new TypeError(j("invalid argument. First argument must be a boolean. Value: `%s`.",r));if(arguments.length>1){if(!Tt(t))throw new TypeError(j("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===Gt(e[n]))return n;return-1})),be(lf.prototype,"length",(function(){return this._length})),N(lf.prototype,"map",(function(r,t){var e,n,i,o;if(!uf(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!ie(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]=Gt(r.call(t,Gt(i[o]),o,this));return n})),N(lf.prototype,"reduce",(function(r,t){var e,n,i,o;if(!uf(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!ie(r))throw new TypeError(j("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=Gt(e[0]),o=1}for(;o<n;o++)i=r(i,Gt(e[o]),o,this);return i})),N(lf.prototype,"reduceRight",(function(r,t){var e,n,i,o;if(!uf(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!ie(r))throw new TypeError(j("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=Gt(e[n-1]),o=n-2}for(;o>=0;o--)i=r(i,Gt(e[o]),o,this);return i})),N(lf.prototype,"reverse",(function(){var r,t,e,n,i,o;if(!uf(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");for(r=this._buffer,e=this._length,n=bt(e/2),i=0;i<n;i++)o=e-i-1,t=r[i],r[i]=r[o],r[o]=t;return this})),N(lf.prototype,"set",(function(r){var t,e,n,i,o,a,u;if(!uf(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(n=this._buffer,arguments.length>1){if(!At(e=arguments[1]))throw new TypeError(j("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",e))}else e=0;if(It(r)){if(e+(o=r.length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(t=uf(r)?r._buffer:r,u=n.byteOffset+e*of,t.buffer===n.buffer&&t.byteOffset<u&&t.byteOffset+t.byteLength>u){for(i=new an(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(j("invalid argument. Index argument is out-of-bounds. Value: `%u`.",e));n[e]=r?1:0}})),N(lf.prototype,"slice",(function(r,t){var e,n,i,o,a,u;if(!uf(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(!Tt(r))throw new TypeError(j("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(!Tt(t))throw new TypeError(j("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(lf.prototype,"some",(function(r,t){var e,n;if(!uf(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!ie(r))throw new TypeError(j("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,Gt(e[n]),n,this))return!0;return!1})),N(lf.prototype,"sort",(function(r){var t;if(!uf(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(t=this._buffer,0===arguments.length)return t.sort(),this;if(!ie(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));return t.sort((function(t,e){return r(Gt(t),Gt(e))})),this})),N(lf.prototype,"subarray",(function(r,t){var e,n,i;if(!uf(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(!Tt(r))throw new TypeError(j("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(!Tt(t))throw new TypeError(j("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*of):(i=t-r,e=n.byteOffset+r*of),new this.constructor(n.buffer,e,i<0?0:i)})),N(lf.prototype,"toLocaleString",(function(r,t){var e,n,i,o,a;if(!uf(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(0===arguments.length)n=[];else{if(!Mt(r)&&!Dt(r))throw new TypeError(j("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(!Bt(t))throw new TypeError(j("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(Gt(o[a]).toLocaleString(n,e));return i.join(",")})),N(lf.prototype,"toReversed",(function(){var r,t,e,n,i;if(!uf(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(lf.prototype,"toSorted",(function(r){var t,e,n,i,o;if(!uf(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(!ie(r))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",r));return t.sort((function(t,e){return r(Gt(t),Gt(e))})),e})),N(lf.prototype,"toString",(function(){var r,t,e;if(!uf(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(lf.prototype,"values",(function(){var r,t,e,n,i,o;if(!uf(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:Gt(i[o]),done:!1}})),N(r,"return",(function(r){return n=!0,arguments.length?{value:r,done:!0}:{done:!0}})),we&&N(r,we,(function(){return t.values()})),r})),N(lf.prototype,"with",(function(r,t){var e,n;if(!uf(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Tt(r))throw new TypeError(j("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(j("invalid argument. Index argument is out-of-bounds. Value: `%s`.",r));if(!qt(t))throw new TypeError(j("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 sf=[Ve,fe,Mu,oo,Cu,uo,Yu,an,Uu,Ju,ef,lf],cf=["float64","float32","int32","uint32","int16","uint16","int8","uint8","uint8c","complex64","complex128","bool"],hf=cf.length;function pf(r){var t;if(ir(r))return"generic";if(ur(r))return null;for(t=0;t<hf;t++)if(r instanceof sf[t])return cf[t];return Ru[sr(r)]||null}function gf(r){var t=pf(r);return Vu(r)?{data:r,dtype:t,accessorProtocol:!0,accessors:[Lu(t),Ou(t)]}:{data:r,dtype:t,accessorProtocol:!1,accessors:[Su(t),ju(t)]}}function yf(r,t,e,n,i,o,a){var u,f,l,s,c,h,p;for(u=t.data,f=i.data,s=t.accessors[0],l=i.accessors[1],c=n,h=a,p=0;p<r;p++)l(f,h,s(u,c)),c+=e,h+=o;return t}var mf=8;function df(r,t,e,n,i){var o,a,u,f,l,s;if(r<=0)return n;if(u=gf(t),f=gf(n),u.accessorProtocol||f.accessorProtocol)return yf(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((l=r%mf)>0)for(s=0;s<l;s++)n[s]=t[s];if(r<mf)return n;for(s=l;s<r;s+=mf)n[s]=t[s],n[s+1]=t[s+1],n[s+2]=t[s+2],n[s+3]=t[s+3],n[s+4]=t[s+4],n[s+5]=t[s+5],n[s+6]=t[s+6],n[s+7]=t[s+7];return n}for(o=e<0?(1-r)*e:0,a=i<0?(1-r)*i:0,s=0;s<r;s++)n[a]=t[o],o+=e,a+=i;return n}var vf=8;function wf(r,t,e,n,i,o,a){var u,f,l,s,c,h;if(r<=0)return i;if(l=gf(t),s=gf(i),l.accessorProtocol||s.accessorProtocol)return yf(r,l,e,n,s,o,a),s.data;if(u=n,f=a,1===e&&1===o){if((c=r%vf)>0)for(h=0;h<c;h++)i[f]=t[u],u+=e,f+=o;if(r<vf)return i;for(h=c;h<r;h+=vf)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+=vf,f+=vf;return i}for(h=0;h<r;h++)i[f]=t[u],u+=e,f+=o;return i}function bf(r,t,e){var n,i,o,a,u;if((o=Eu(t,i=r.length,!0)).code){if(e)throw new RangeError(j("invalid argument. Slice exceeds array bounds. Array length: %d.",i));o=Eu(t,i,!1)}return u=Tu(o),n="generic"===(a=Ze(r))||null===a?Xi(u):new r.constructor(u),wf(u,r,o.step,o.start,n,1,0),n}N(df,"ndarray",wf);var Ef={float64:mr,float32:_r,generic:Array,int16:Hr,int32:Br,int8:ht,uint16:Dr,uint32:Fr,uint8:rt,uint8c:ot,complex64:Oe,complex128:Ye,bool:He};function _f(r){return Ef[r]||null}function Tf(r){return"complex64"===r}function xf(r){return"complex128"===r}function Vf(r){return"bool"===r}function Af(r,t){var e,n,i,o,a,u,f,l,s;if(!It(r))throw new TypeError(j("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if("generic"===t)return Ga(r);if(null===(n=_f(t)))throw new TypeError(j("invalid argument. Second argument must be a recognized array data type. Value: `%s`.",t));if(f=r.length,e=Tf(l=Ze(r)),u=new n(f),e||xf(l)){if(i=e?Te(r,0):Ae(r,0),Tf(t))return df(2*f,i,1,o=Te(u,0),1),u;if(xf(t))return df(2*f,i,1,o=Ae(u,0),1),u;if(Vf(t)){for(o=un(u,0),s=0;s<f;s++)i[2*s]||i[2*s+1]?o[s]=1:o[s]=0;return u}return df(f,i,2,u,1),u}if(Vf(l))return i=un(r,0),Vf(t)?(df(f,i,1,o=un(u,0),1),u):Tf(t)?(df(f,i,1,o=Te(u,0),2),u):xf(t)?(df(f,i,1,o=Ae(u,0),2),u):(df(f,i,1,u,1),u);if((e=Tf(t))||xf(t))return df(f,r,1,o=e?Te(u,0):Ae(u,0),2),u;if(Vf(t)){for(o=un(u,0),a=Yi(r),s=0;s<f;s++)a(r,s)?o[s]=1:o[s]=0;return u}return df(f,r,1,u,1),u}function Sf(r,t,e,n){var i,o,a,u,f,l,s;if(a=Ze(r)||"generic",u=Ze(t)||"generic",i=r.length,o=t.length,!Ai(a,u))throw new TypeError(j("invalid argument. Input array values cannot be safely cast to the output array data type. Data types: [%s, %s].",a,u));if(An(u)&&ji(a)&&(r=Af(r,u)),(f=Eu(e,o,!0)).code){if(n)throw new RangeError(j("invalid argument. Slice exceeds array bounds. Array length: %d.",o));f=Eu(e,o,!1)}if(s=Tu(f),1===i)l=0;else{if(i!==s)throw new Error(j("invalid argument. Input array and the output array slice are broadcast incompatible. Array length: %u. Desired length: %u.",i,s));l=1}return wf(s,r,l,0,t,f.step,f.start),t}function Ff(r,t,e){var n,i;for(n=[],i=0;i<r;i++)n.push(t.call(e,i));return n}function jf(r,t){var e,n,i,o,a,u,f;for(i=t[2],o=t[1],a=t[0],e=[],u=0;u<a;u++){for(n=[],f=0;f<o;f++)n.push(qi(r,i));e.push(n)}return e}function kf(r,t){var e,n,i,o,a,u,f,l,s,c;for(o=t[3],a=t[2],u=t[1],f=t[0],e=[],c=0;c<f;c++){for(i=[],s=0;s<u;s++){for(n=[],l=0;l<a;l++)n.push(qi(r,o));i.push(n)}e.push(i)}return e}function Lf(r,t){var e,n,i,o,a,u,f,l,s,c,h,p,g;for(a=t[4],u=t[3],f=t[2],l=t[1],s=t[0],e=[],g=0;g<s;g++){for(o=[],p=0;p<l;p++){for(i=[],h=0;h<f;h++){for(n=[],c=0;c<u;c++)n.push(qi(r,a));i.push(n)}o.push(i)}e.push(o)}return e}function If(r,t,e,n,i){var o,a,u;if(o=e[n],(a=n+1)===t)return qi(r,o);for(u=0;u<o;u++)i.push(If(r,t,e,a,[]));return i}function Of(r,t){return If(r,t.length,t,0,[])}function Rf(r,t,e,n,i,o,a){var u,f,l,s,c;for(f=(s=e+1)===r,l=t[e],c=0;c<l;c++)(u=n.slice()).push(c),f?i.push(o.call(a,u)):i.push(Rf(r,t,s,u,[],o,a));return i}function Bf(r){var t,e,n;if(0===(t=r.length))return 0;for(e=1,n=0;n<t;n++)e*=r[n];return e}function Mf(r,t){return"column-major"===t?function(r){var t,e,n;for(t=[],e=1,n=0;n<r.length;n++)t.push(e),e*=r[n];return t}(r):function(r){var t,e,n,i;for(t=r.length,e=[],i=0;i<t;i++)e.push(0);for(n=1,i=t-1;i>=0;i--)e[i]=n,n*=r[i];return e}(r)}function Pf(r,t,e,n,i,o){var a,u,f,l,s;for(a=r.length,u=1,s=0;s<a;s++)u*=r[s];if("clamp"===o)i<0?i=0:i>=u&&(i=u-1);else if("wrap"===o)i<0?(i+=u)<0&&0!=(i%=u)&&(i+=u):i>=u&&(i-=u)>=u&&(i%=u);else if("normalize"===o&&i<0&&(i+=u),i<0||i>=u)throw new RangeError(j("invalid argument. Linear index must not exceed array dimensions. Number of array elements: `%u`. Value: `%d`.",u,i));if(f=e,"column-major"===n){for(s=0;s<a;s++)i-=l=i%r[s],i/=r[s],f+=l*t[s];return f}for(s=a-1;s>=0;s--)i-=l=i%r[s],i/=r[s],f+=l*t[s];return f}function Cf(r,t){return t>0?0:(1-r)*t}N(Mf,"assign",(function(r,t,e){return"column-major"===t?function(r,t){var e,n;for(e=1,n=0;n<r.length;n++)t[n]=e,e*=r[n];return t}(r,e):function(r,t){var e,n;for(e=1,n=r.length-1;n>=0;n--)t[n]=e,e*=r[n];return t}(r,e)}));var Nf=3;function Uf(r,t,e,n){var i,o,a,u,f,l,s;if(r<=0)return t;if((u=gf(t)).accessorProtocol)return function(r,t,e,n){var i,o,a,u,f,l,s,c;for(i=t.data,a=t.accessors[0],o=t.accessors[1],s=bt(r/2),l=(f=n)+(r-1)*e,c=0;c<s;c++)u=a(i,f),o(i,f,a(i,l)),o(i,l,u),f+=e,l-=e}(r,u,e,n),u.data;if(l=bt(r/2),o=n,1===e){if(a=o+r-1,(f=l%Nf)>0)for(s=0;s<f;s++)i=t[o],t[o]=t[a],t[a]=i,o+=e,a-=e;if(l<Nf)return t;for(s=f;s<l;s+=Nf)i=t[o],t[o]=t[a],t[a]=i,i=t[o+1],t[o+1]=t[a-1],t[a-1]=i,i=t[o+2],t[o+2]=t[a-2],t[a-2]=i,o+=Nf,a-=Nf;return t}for(a=o+(r-1)*e,s=0;s<l;s++)i=t[o],t[o]=t[a],t[a]=i,o+=e,a-=e;return t}function Df(r,t,e){return Uf(r,t,e,Cf(r,e))}N(Df,"ndarray",Uf);var Yf="throw";function Wf(r,t,e,n,i){var o;for(o=0;o<t;o++)e[i]=r[o],i+=n}function zf(r,t,e,n,i,o,a){var u,f,l,s;for(u=(l=n+1)===t,f=e[n],s=0;s<f;s++)u?(i[a]=r[s],a+=o):a=zf(r[s],t,e,l,i,o,a);return a}function qf(r,t,e,n,i,o){var a=t.length;return 0===a?n:1===a?(Wf(r,t[0],n,i,o),n):e?(function(r,t,e,n,i,o){var a,u,f,l,s,c,h;for(zf(r,t,e,0,u=Xi(a=Bf(e)),1,0),s=Mf(e,f="row-major"),Wf(e,t,l=Xi(t),1,0),Df(t,l,1),Df(t,s,1),h=0;h<a;h++)c=Pf(l,s,0,f,h,Yf),n[o]=u[c],o+=i}(r,a,t,n,i,o),n):(zf(r,a,t,0,n,i,o),n)}function Gf(r,t,e){return qf(r,t,e,Xi(Bf(t)),1,0)}N(Gf,"assign",qf);var $f="throw";function Hf(r,t,e,n,i,o,a,u,f,l,s){var c,h,p,g,y;for(c=(g=i+1)===e,p=n[i],y=0;y<p;y++)(h=o.slice()).push(y),c?(a[f]=l.call(s,t[y],h,r),f+=u):f=Hf(r,t[y],e,n,g,h,a,u,f,l,s);return f}function Jf(r,t,e,n,i,o,a,u){var f=t.length;return 0===f?n:1===f?(function(r,t,e,n,i,o,a){var u;for(u=0;u<t;u++)e[i]=o.call(a,r[u],[u],r),i+=n}(r,t[0],n,i,o,a,u),n):e?(function(r,t,e,n,i,o,a,u){var f,l,s,c,h,p,g;for(Hf(r,r,t,e,0,[],l=Xi(f=Bf(e)),1,0,a,u),h=Mf(e,s="row-major"),Df(t,c=Qi(e),1),Df(t,h,1),g=0;g<f;g++)p=Pf(c,h,0,s,g,$f),n[o]=l[p],o+=i}(r,f,t,n,i,o,a,u),n):(Hf(r,r,f,t,0,[],n,i,o,a,u),n)}function Qf(r,t,e,n,i){return Jf(r,t,e,Xi(Bf(t)),1,0,n,i)}function Xf(r,t,e){var n,i,o,a,u,f;if(i=t[1],o=t[0],n=[],e){for(a=0;a<i;a++)for(u=0;u<o;u++)n.push(r[u][a]);return n}for(u=0;u<o;u++)for(f=r[u],a=0;a<i;a++)n.push(f[a]);return n}function Zf(r,t,e,n,i){var o,a,u,f,l,s;if(a=t[1],u=t[0],o=[],e){for(f=0;f<a;f++)for(l=0;l<u;l++)o.push(n.call(i,r[l][f],[l,f],r));return o}for(l=0;l<u;l++)for(s=r[l],f=0;f<a;f++)o.push(n.call(i,s[f],[l,f],r));return o}function Kf(r,t,e){var n,i,o,a,u,f,l,s,c;if(i=t[2],o=t[1],a=t[0],n=[],e){for(u=0;u<i;u++)for(f=0;f<o;f++)for(l=0;l<a;l++)n.push(r[l][f][u]);return n}for(l=0;l<a;l++)for(c=r[l],f=0;f<o;f++)for(s=c[f],u=0;u<i;u++)n.push(s[u]);return n}function rl(r,t,e,n,i){var o,a,u,f,l,s,c,h,p;if(a=t[2],u=t[1],f=t[0],o=[],e){for(l=0;l<a;l++)for(s=0;s<u;s++)for(c=0;c<f;c++)o.push(n.call(i,r[c][s][l],[c,s,l],r));return o}for(c=0;c<f;c++)for(p=r[c],s=0;s<u;s++)for(h=p[s],l=0;l<a;l++)o.push(n.call(i,h[l],[c,s,l],r));return o}function tl(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g;if(i=t[3],o=t[2],a=t[1],u=t[0],n=[],e){for(f=0;f<i;f++)for(l=0;l<o;l++)for(s=0;s<a;s++)for(c=0;c<u;c++)n.push(r[c][s][l][f]);return n}for(c=0;c<u;c++)for(g=r[c],s=0;s<a;s++)for(p=g[s],l=0;l<o;l++)for(h=p[l],f=0;f<i;f++)n.push(h[f]);return n}function el(r,t,e,n,i){var o,a,u,f,l,s,c,h,p,g,y,m;if(a=t[3],u=t[2],f=t[1],l=t[0],o=[],e){for(s=0;s<a;s++)for(c=0;c<u;c++)for(h=0;h<f;h++)for(p=0;p<l;p++)o.push(n.call(i,r[p][h][c][s],[p,h,c,s],r));return o}for(p=0;p<l;p++)for(m=r[p],h=0;h<f;h++)for(y=m[h],c=0;c<u;c++)for(g=y[c],s=0;s<a;s++)o.push(n.call(i,g[s],[p,h,c,s],r));return o}function nl(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d;if(i=t[4],o=t[3],a=t[2],u=t[1],f=t[0],n=[],e){for(l=0;l<i;l++)for(s=0;s<o;s++)for(c=0;c<a;c++)for(h=0;h<u;h++)for(p=0;p<f;p++)n.push(r[p][h][c][s][l]);return n}for(p=0;p<f;p++)for(d=r[p],h=0;h<u;h++)for(m=d[h],c=0;c<a;c++)for(y=m[c],s=0;s<o;s++)for(g=y[s],l=0;l<i;l++)n.push(g[l]);return n}function il(r,t,e,n,i){var o,a,u,f,l,s,c,h,p,g,y,m,d,v,w;if(a=t[4],u=t[3],f=t[2],l=t[1],s=t[0],o=[],e){for(c=0;c<a;c++)for(h=0;h<u;h++)for(p=0;p<f;p++)for(g=0;g<l;g++)for(y=0;y<s;y++)o.push(n.call(i,r[y][g][p][h][c],[y,g,p,h,c],r));return o}for(y=0;y<s;y++)for(w=r[y],g=0;g<l;g++)for(v=w[g],p=0;p<f;p++)for(d=v[p],h=0;h<u;h++)for(m=d[h],c=0;c<a;c++)o.push(n.call(i,m[c],[y,g,p,h,c],r));return o}function ol(r){var t,e,n,i,o;for(t=[],i=0;i<r.length;i++){for(n=[],o=(e=r[i]).length-1;o>=0;o--)n.push(e[o]);t.push(n)}return t}function al(r){var t,e;for(t=[],e=0;e<r.length;e++)t.push(ol(r[e]));return t}function ul(r){var t,e;for(t=[],e=0;e<r.length;e++)t.push(al(r[e]));return t}function fl(r){var t,e;for(t=[],e=r.length-1;e>=0;e--)t.push(r[e]);return t}function ll(r){var t,e;for(t=[],e=0;e<r.length;e++)t.push(fl(r[e]));return t}function sl(r){var t,e;for(t=[],e=0;e<r.length;e++)t.push(ll(r[e]));return t}function cl(r,t,e){var n,i,o;if((i=_u((t-r)/e))<=1)return[r];for(n=[r],o=1;o<i;o++)n.push(r+e*o);return n}function hl(r){return It(r)&&ie(r.get)&&ie(r.set)}function pl(r){return null==r}function gl(r,t,e){var n,i,o,a;if(0===e)return[];for(o=(t-r)/(i=e-1),n=[Ya(10,r)],a=1;a<i;a++)n.push(Ya(10,r+o*a));return n.push(Ya(10,t)),n}function yl(r,t,e,n){var i,o,a,u,f,l,s;for(i=t[1],o=t[0],s=[],u=0;u<o;u++){for(f=r[u],l=[],a=0;a<i;a++)l.push(e.call(n,f[a],[u,a],r));s.push(l)}return s}function ml(r,t,e,n){var i,o,a,u,f,l,s,c,h,p,g;for(i=t[2],o=t[1],a=t[0],g=[],l=0;l<a;l++){for(h=r[l],p=[],f=0;f<o;f++){for(s=h[f],c=[],u=0;u<i;u++)c.push(e.call(n,s[u],[l,f,u],r));p.push(c)}g.push(p)}return g}function dl(r,t,e,n){var i,o,a,u,f,l,s,c,h,p,g,y,m,d,v;for(i=t[3],o=t[2],a=t[1],u=t[0],v=[],c=0;c<u;c++){for(m=r[c],d=[],s=0;s<a;s++){for(g=m[s],y=[],l=0;l<o;l++){for(h=g[l],p=[],f=0;f<i;f++)p.push(e.call(n,h[f],[c,s,l,f],r));y.push(p)}d.push(y)}v.push(d)}return v}function vl(r,t,e,n){var i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_;for(i=t[4],o=t[3],a=t[2],u=t[1],f=t[0],_=[],p=0;p<f;p++){for(b=r[p],E=[],h=0;h<u;h++){for(v=b[h],w=[],c=0;c<a;c++){for(m=v[c],d=[],s=0;s<o;s++){for(g=m[s],y=[],l=0;l<i;l++)y.push(e.call(n,g[l],[p,h,c,s,l],r));d.push(y)}w.push(d)}E.push(w)}_.push(E)}return _}function wl(r){return r<0?r>=ft?"int8":r>=zr?"int16":r>=Lr?"int32":"float64":r<=ut?"int8":r<=Wr?"int16":r<=kr?"int32":"float64"}function bl(r,t){var e,n,i,o;for(e=Yi(r),n=Yi(t),i=[],o=0;o<r.length;o++)n(t,o)&&i.push(e(r,o));return i}function El(r,t,e,n){var i,o,a,u;for(i=Yi(r),o=Yi(t),a=[],u=0;u<r.length;u++)o(t,u)&&a.push(e.call(n,i(r,u),u,r));return a}function _l(r,t,e,n){var i,o,a,u;if(u=e.length,"strict"===n){if(Ka(t)!==u)throw new Error("invalid arguments. Number of values does not equal the number of falsy values in the mask array.")}else if("broadcast"===n){if(1!==u&&Ka(t)>u)throw new Error("invalid arguments. Insufficient values to satisfy mask array.")}else if("strict_broadcast"===n){if(1!==u&&Ka(t)!==u)throw new Error("invalid arguments. Number of values does not equal the number of falsy values in the mask array.")}else if("non_strict"===n&&Ka(t)>u)throw new Error("invalid arguments. Insufficient values to satisfy mask array.");return i=nn(r),o=nn(t),a=nn(e),i.accessorProtocol||o.accessorProtocol||a.accessorProtocol?An(i.dtype)&&An(a.dtype)?(function(r,t,e){var n,i,o,a,u;for(n=t.data,i=t.accessors[0],a=e.length,o=0,u=0;u<r.length;u+=2)i(n,u/2)||(r[u]=e[o],r[u+1]=e[o+1],o=(o+2)%a)}(Xa(r,0),o,Xa(e,0)),r):_n(i.dtype)&&_n(a.dtype)?(function(r,t,e){var n,i,o,a,u;for(n=t.data,i=t.accessors[0],a=e.length,o=0,u=0;u<r.length;u++)i(n,u)||(r[u]=e[o],o=(u+1)%a)}(un(r,0),o,un(e,0)),r):(function(r,t,e){var n,i,o,a,u,f,l,s,c;for(n=r.data,i=t.data,o=e.data,a=r.accessors[1],u=t.accessors[0],f=e.accessors[0],s=o.length,l=0,c=0;c<n.length;c++)u(i,c)||(a(n,c,f(o,l)),l=(l+1)%s)}(i,o,a),r):(function(r,t,e){var n,i,o;for(i=e.length,n=0,o=0;o<r.length;o++)t[o]||(r[o]=e[n],n=(n+1)%i)}(r,t,e),r)}function Tl(r,t){var e,n,i,o;for(e=Yi(r),n=Yi(t),i=[],o=0;o<r.length;o++)n(t,o)||i.push(e(r,o));return i}function xl(r){var t;for(t=0;t<r.length;t++)if(r[t])return!1;return!0}function Vl(r){var t,e;if(t=[],r<=0)return t;for(e=1;e<r+1;e++)t.push(e);return t}function Al(r,t,e,n){var i,o,a;for(o=2*e,a=2*n,i=1;a>=0&&a<t.length;)t[a]=i,t[a+1]=0,a+=o,i+=1;return r}function Sl(r,t,e,n){var i,o,a,u;if(u=e.length,"strict"===n){if(uu(t)!==u)throw new Error("invalid arguments. Number of values does not equal the number of truthy values in the mask array.")}else if("broadcast"===n){if(1!==u&&uu(t)>u)throw new Error("invalid arguments. Insufficient values to satisfy mask array.")}else if("strict_broadcast"===n){if(1!==u&&uu(t)!==u)throw new Error("invalid arguments. Number of values does not equal the number of truthy values in the mask array.")}else if("non_strict"===n&&uu(t)>u)throw new Error("invalid arguments. Insufficient values to satisfy mask array.");return i=nn(r),o=nn(t),a=nn(e),i.accessorProtocol||o.accessorProtocol||a.accessorProtocol?An(i.dtype)&&An(a.dtype)?(function(r,t,e){var n,i,o,a,u;for(n=t.data,i=t.accessors[0],a=e.length,o=0,u=0;u<r.length;u+=2)i(n,u/2)&&(r[u]=e[o],r[u+1]=e[o+1],o=(o+2)%a)}(Xa(r,0),o,Xa(e,0)),r):_n(i.dtype)&&_n(a.dtype)?(function(r,t,e){var n,i,o,a,u;for(n=t.data,i=t.accessors[0],a=e.length,o=0,u=0;u<r.length;u++)i(n,u)&&(r[u]=e[o],o=(u+1)%a)}(un(r,0),o,un(e,0)),r):(function(r,t,e){var n,i,o,a,u,f,l,s,c;for(n=r.data,i=t.data,o=e.data,a=r.accessors[1],u=t.accessors[0],f=e.accessors[0],s=o.length,l=0,c=0;c<n.length;c++)u(i,c)&&(a(n,c,f(o,l)),l=(l+1)%s)}(i,o,a),r):(function(r,t,e){var n,i,o;for(i=e.length,n=0,o=0;o<r.length;o++)t[o]&&(r[o]=e[n],n=(n+1)%i)}(r,t,e),r)}function Fl(r,t){return r<0?0:r>t?t:r}function jl(r,t){var e=t+1;return r<0?((r+=e)<0&&0!=(r%=e)&&(r+=e),r):r>t?((r-=e)>t&&(r%=e),r):r}function kl(r,t){return r<0?(r+=t+1)<0?-1:r:r>t?-1:r}function Ll(r){var t,e,n;if(!It(r))throw new TypeError(j("invalid argument. Must provide an array-like object. Value: `%s`.",r));return n=pf(r),Vu(r)&&(t=Lu(n)),e=r.length,void 0===t?function(t){var n;for(n=0;n<e;n++)if(r[n]===t)return!0;return!1}:function(n){var i;for(i=0;i<e;i++)if(t(r,i)===n)return!0;return!1}}N(Qf,"assign",Jf),N(Xf,"assign",(function(r,t,e,n,i,o){var a,u,f,l,s,c;if(a=t[1],u=t[0],c=o,e){for(f=0;f<a;f++)for(l=0;l<u;l++)n[c]=r[l][f],c+=i;return n}for(l=0;l<u;l++)for(s=r[l],f=0;f<a;f++)n[c]=s[f],c+=i;return n})),N(Zf,"assign",(function(r,t,e,n,i,o,a,u){var f,l,s,c,h,p;if(f=t[1],l=t[0],p=o,e){for(s=0;s<f;s++)for(c=0;c<l;c++)n[p]=a.call(u,r[c][s],[c,s],r),p+=i;return n}for(c=0;c<l;c++)for(h=r[c],s=0;s<f;s++)n[p]=a.call(u,h[s],[c,s],r),p+=i;return n})),N(Kf,"assign",(function(r,t,e,n,i,o){var a,u,f,l,s,c,h,p,g;if(a=t[2],u=t[1],f=t[0],g=o,e){for(l=0;l<a;l++)for(s=0;s<u;s++)for(c=0;c<f;c++)n[g]=r[c][s][l],g+=i;return n}for(c=0;c<f;c++)for(p=r[c],s=0;s<u;s++)for(h=p[s],l=0;l<a;l++)n[g]=h[l],g+=i;return n})),N(rl,"assign",(function(r,t,e,n,i,o,a,u){var f,l,s,c,h,p,g,y,m;if(f=t[2],l=t[1],s=t[0],m=o,e){for(c=0;c<f;c++)for(h=0;h<l;h++)for(p=0;p<s;p++)n[m]=a.call(u,r[p][h][c],[p,h,c],r),m+=i;return n}for(p=0;p<s;p++)for(y=r[p],h=0;h<l;h++)for(g=y[h],c=0;c<f;c++)n[m]=a.call(u,g[c],[p,h,c],r),m+=i;return n})),N(tl,"assign",(function(r,t,e,n,i,o){var a,u,f,l,s,c,h,p,g,y,m,d;if(a=t[3],u=t[2],f=t[1],l=t[0],d=o,e){for(s=0;s<a;s++)for(c=0;c<u;c++)for(h=0;h<f;h++)for(p=0;p<l;p++)n[d]=r[p][h][c][s],d+=i;return n}for(p=0;p<l;p++)for(m=r[p],h=0;h<f;h++)for(y=m[h],c=0;c<u;c++)for(g=y[c],s=0;s<a;s++)n[d]=g[s],d+=i;return n})),N(el,"assign",(function(r,t,e,n,i,o,a,u){var f,l,s,c,h,p,g,y,m,d,v,w;if(f=t[3],l=t[2],s=t[1],c=t[0],w=o,e){for(h=0;h<f;h++)for(p=0;p<l;p++)for(g=0;g<s;g++)for(y=0;y<c;y++)n[w]=a.call(u,r[y][g][p][h],[y,g,p,h],r),w+=i;return n}for(y=0;y<c;y++)for(v=r[y],g=0;g<s;g++)for(d=v[g],p=0;p<l;p++)for(m=d[p],h=0;h<f;h++)n[w]=a.call(u,m[h],[y,g,p,h],r),w+=i;return n})),N(nl,"assign",(function(r,t,e,n,i,o){var a,u,f,l,s,c,h,p,g,y,m,d,v,w,b;if(a=t[4],u=t[3],f=t[2],l=t[1],s=t[0],b=o,e){for(c=0;c<a;c++)for(h=0;h<u;h++)for(p=0;p<f;p++)for(g=0;g<l;g++)for(y=0;y<s;y++)n[b]=r[y][g][p][h][c],b+=i;return n}for(y=0;y<s;y++)for(w=r[y],g=0;g<l;g++)for(v=w[g],p=0;p<f;p++)for(d=v[p],h=0;h<u;h++)for(m=d[h],c=0;c<a;c++)n[b]=m[c],b+=i;return n})),N(il,"assign",(function(r,t,e,n,i,o,a,u){var f,l,s,c,h,p,g,y,m,d,v,w,b,E,_;if(f=t[4],l=t[3],s=t[2],c=t[1],h=t[0],_=o,e){for(p=0;p<f;p++)for(g=0;g<l;g++)for(y=0;y<s;y++)for(m=0;m<c;m++)for(d=0;d<h;d++)n[_]=a.call(u,r[d][m][y][g][p],[d,m,y,g,p],r),_+=i;return n}for(d=0;d<h;d++)for(E=r[d],m=0;m<c;m++)for(b=E[m],y=0;y<s;y++)for(w=b[y],g=0;g<l;g++)for(v=w[g],p=0;p<f;p++)n[_]=a.call(u,v[p],[d,m,y,g,p],r),_+=i;return n})),N(yl,"assign",(function(r,t,e,n,i){var o,a,u,f,l,s;if(o=e[1],a=e[0],o<=0||a<=0)return t;for(f=0;f<a;f++)for(l=r[f],s=t[f],u=0;u<o;u++)s[u]=n.call(i,l[u],[f,u],r);return t})),N(ml,"assign",(function(r,t,e,n,i){var o,a,u,f,l,s,c,h,p,g;if(o=e[2],a=e[1],u=e[0],o<=0||a<=0||u<=0)return t;for(s=0;s<u;s++)for(p=r[s],g=t[s],l=0;l<a;l++)for(c=p[l],h=g[l],f=0;f<o;f++)h[f]=n.call(i,c[f],[s,l,f],r);return t})),N(dl,"assign",(function(r,t,e,n,i){var o,a,u,f,l,s,c,h,p,g,y,m,d,v;if(o=e[3],a=e[2],u=e[1],f=e[0],o<=0||a<=0||u<=0||f<=0)return t;for(h=0;h<f;h++)for(d=r[h],v=t[h],c=0;c<u;c++)for(y=d[c],m=v[c],s=0;s<a;s++)for(p=y[s],g=m[s],l=0;l<o;l++)g[l]=n.call(i,p[l],[h,c,s,l],r);return t})),N(vl,"assign",(function(r,t,e,n,i){var o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_;if(o=e[4],a=e[3],u=e[2],f=e[1],l=e[0],o<=0||a<=0||u<=0||f<=0||l<=0)return t;for(g=0;g<l;g++)for(E=r[g],_=t[g],p=0;p<f;p++)for(w=E[p],b=_[p],h=0;h<u;h++)for(d=w[h],v=b[h],c=0;c<a;c++)for(y=d[c],m=v[c],s=0;s<o;s++)m[s]=n.call(i,y[s],[g,p,h,c,s],r);return t})),N(bl,"assign",(function(r,t,e,n,i){var o,a,u;return o=nn(r),a=nn(t),u=nn(e),o.accessorProtocol||a.accessorProtocol||u.accessorProtocol?An(o.dtype)&&An(u.dtype)?(function(r,t,e,n,i){var o,a,u,f,l,s;for(o=t.data,a=t.accessors[0],f=2*n,u=2*i,l=0;l<o.length;l++)a(o,l)&&(s=2*l,e[u]=r[s],e[u+1]=r[s+1],u+=f)}(Xa(r,0),a,Xa(e,0),n,i),e):_n(o.dtype)&&_n(u.dtype)?(function(r,t,e,n,i){var o,a,u,f;for(o=t.data,a=t.accessors[0],u=i,f=0;f<o.length;f++)a(o,f)&&(e[u]=r[f],u+=n)}(un(r,0),a,un(e,0),n,i),e):(function(r,t,e,n,i){var o,a,u,f,l,s,c,h;for(o=r.data,a=t.data,u=e.data,f=r.accessors[0],l=t.accessors[0],s=e.accessors[1],c=i,h=0;h<o.length;h++)l(a,h)&&(s(u,c,f(o,h)),c+=n)}(o,a,u,n,i),e):(function(r,t,e,n,i){var o,a;for(o=i,a=0;a<r.length;a++)t[a]&&(e[o]=r[a],o+=n)}(r,t,e,n,i),e)})),N(El,"assign",(function(r,t,e,n,i,o,a){var u,f,l;return u=nn(r),f=nn(t),l=nn(e),u.accessorProtocol||f.accessorProtocol||l.accessorProtocol?(function(r,t,e,n,i,o,a){var u,f,l,s,c,h,p,g;for(u=r.data,f=t.data,l=e.data,s=r.accessors[0],c=t.accessors[0],h=e.accessors[1],p=i,g=0;g<u.length;g++)c(f,g)&&(h(l,p,o.call(a,s(u,g),g,u)),p+=n)}(u,f,l,n,i,o,a),e):(function(r,t,e,n,i,o,a){var u,f;for(u=i,f=0;f<r.length;f++)t[f]&&(e[u]=o.call(a,r[f],f,r),u+=n)}(r,t,e,n,i,o,a),e)})),N(Tl,"assign",(function(r,t,e,n,i){var o,a,u;return o=nn(r),a=nn(t),u=nn(e),o.accessorProtocol||a.accessorProtocol||u.accessorProtocol?An(o.dtype)&&An(u.dtype)?(function(r,t,e,n,i){var o,a,u,f,l,s;for(o=t.data,a=t.accessors[0],f=2*n,u=2*i,l=0;l<o.length;l++)a(o,l)||(s=2*l,e[u]=r[s],e[u+1]=r[s+1],u+=f)}(Xa(r,0),a,Xa(e,0),n,i),e):_n(o.dtype)&&_n(u.dtype)?(function(r,t,e,n,i){var o,a,u,f;for(o=t.data,a=t.accessors[0],u=i,f=0;f<o.length;f++)a(o,f)||(e[u]=r[f],u+=n)}(un(r,0),a,un(e,0),n,i),e):(function(r,t,e,n,i){var o,a,u,f,l,s,c,h;for(o=r.data,a=t.data,u=e.data,f=r.accessors[0],l=t.accessors[0],s=e.accessors[1],c=i,h=0;h<o.length;h++)l(a,h)||(s(u,c,f(o,h)),c+=n)}(o,a,u,n,i),e):(function(r,t,e,n,i){var o,a;for(o=i,a=0;a<r.length;a++)t[a]||(e[o]=r[a],o+=n)}(r,t,e,n,i),e)})),N(Vl,"assign",(function(r,t,e){var n=nn(r);return n.accessorProtocol?de(r)?Al(r,Ae(r,0),t,e):ye(r)?Al(r,Te(r,0),t,e):function(r,t,e){var n,i,o,a;for(n=r.data,i=r.accessors[1],a=e,o=1;a>=0&&a<n.length;)i(n,a,o),a+=t,o+=1;return n}(n,t,e):function(r,t,e){var n,i;for(i=e,n=1;i>=0&&i<r.length;)r[i]=n,i+=t,n+=1;return r}(r,t,e)})),N((function(r,t){var e,n,i,o;for(i=pf(r),n=Vu(r)?Lu(i):Su(i),e=r.length,o=0;o<e;o++)if(n(r,o)===t)return!0;return!1}),"factory",Ll);var Il=["throw","normalize","clamp","wrap"];function Ol(){return Il.slice()}N(Ol,"enum",(function(){return{throw:1,clamp:2,wrap:3,normalize:4}}));var Rl=Ll(Ol()),Bl={wrap:jl,clamp:Fl,normalize:function(r,t){var e=kl(r,t);if(e<0||e>t)throw new RangeError(j("invalid argument. Index must resolve to a value on the interval: [0, %d]. Value: `%d`.",t,r));return e},throw:function(r,t){if(r<0||r>t)throw new RangeError(j("invalid argument. Index must resolve to a value on the interval: [0, %d]. Value: `%d`.",t,r));return r}};function Ml(r){if(!Rl(r))throw new TypeError(j("invalid argument. First argument must be a recognized index mode. Value: `%s`.",r));return Bl[r]}function Pl(r,t,e,n){var i,o,a,u,f,l;if(t.length>0)if(e.length===t.length)o=1;else{if(1!==e.length)throw new Error(j("invalid argument. The third argument must be broadcast compatible with the second argument. Array shape: (%d). Desired shape: (%d).",e.length,t.length));o=0}return i=Ml(n),a=r.length-1,u=nn(r),f=nn(t),l=nn(e),u.accessorProtocol||f.accessorProtocol||l.accessorProtocol?An(u.dtype)&&An(l.dtype)?(function(r,t,e,n,i,o){var a,u,f,l,s,c;for(a=t.data,u=t.accessors[0],l=2*n,f=0,s=0;s<a.length;s++)r[c=2*i(u(a,s),o)]=e[f],r[c+1]=e[f+1],f+=l}(Xa(r,0),f,Xa(e,0),o,i,a),r):_n(u.dtype)&&_n(l.dtype)?(function(r,t,e,n,i,o){var a,u,f,l;for(a=t.data,u=t.accessors[0],f=0,l=0;l<a.length;l++)r[i(u(a,l),o)]=e[f],f+=n}(un(r,0),f,un(e,0),o,i,a),r):(function(r,t,e,n,i,o){var a,u,f,l,s,c,h,p;for(a=r.data,u=t.data,f=e.data,l=r.accessors[1],s=t.accessors[0],c=e.accessors[0],h=0,p=0;p<u.length;p++)l(a,i(s(u,p),o),c(f,h)),h+=n}(u,f,l,o,i,a),r):(function(r,t,e,n,i,o){var a,u;for(a=0,u=0;u<t.length;u++)r[i(t[u],o)]=e[a],a+=n}(r,t,e,o,i,a),r)}N((function(r,t,e){var n;if("clamp"===e)return Fl(r,t);if("wrap"===e)return jl(r,t);if(n=r,"normalize"===e&&(n=kl(n,t)),n<0||n>t)throw new RangeError(j("invalid argument. Index must resolve to a value on the interval: [0, %d]. Value: `%d`.",t,r));return n}),"factory",Ml);var Cl=Array.prototype.slice;function Nl(r,t,e){var n;return function(r,t){return"function"==typeof r[t]}(r,"slice")?r.slice(t,e):(n=nn(r)).accessorProtocol?function(r,t,e){var n,i,o,a;for(n=r.data,i=r.accessors[0],o=[],a=t;a<e;a++)o.push(i(n,a));return o}(n,t,e):function(r,t,e){return Cl.call(r,t,e)}(r,t,e)}function Ul(r,t,e,n,i){var o,a,u,f,l,s;if(l=e[n],n===t-1)return Nl(r,i,i+l);for(o=1,s=f=n+1;s<e.length;s++)o*=e[s];for(u=[],s=0;s<l;s++)a=Ul(r,t,e,f,i),u.push(a),i+=o;return u}function Dl(r){var t=Ze(r);return D(r)?J(t):q(t)}var Yl={};C(Yl,"filled2dBy",(function(r,t,e){var n,i,o,a;for(n=[],o=0;o<r;o++){for(i=[],a=0;a<r;a++)o>a?i.push(n[a][o]):i.push(t.call(e,[o,a]));n.push(i)}return n}));var Wl={};function zl(r,t,e){var n,i,o,a,u,f,l;for(i=Yi(r),o=Yi(t),n=Ml(e),u=r.length-1,a=[],f=0;f<t.length;f++)l=n(o(t,f),u),a.push(i(r,l));return a}C(Wl,"filled2dBy",(function(r,t,e,n,i){var o,a,u,f;for(o=[],u=0;u<r;u++){for(a=[],f=0;f<r;f++)f>=u&&f<=u+t?a.push(n.call(i,[u,f])):f<u?a.push(o[f][u]):a.push(e);o.push(a)}return o})),C(Wl,"toCompact",(function(r,t,e,n){var i,o,a,u,f,l,s;if(u=t.length,n){if(i=$i([u,e+1]),"upper"===r){for(f=0;f<u;f++)for(o=i[f],a=t[f],l=f;l<zi(u,f+e+1);l++)o[l-f]=a[l];return i}for(f=0;f<u;f++)for(o=i[f],a=t[f],s=Wi(0,e-f),l=Wi(0,f-e);l<=f;l++)o[s]=a[l],s+=1;return i}if(i=$i([e+1,u]),"upper"===r){for(l=0;l<u;l++)for(s=e-l,f=Wi(0,l-e);f<=l;f++)i[s+f][l]=t[f][l];return i}for(l=0;l<u;l++)for(s=-l,f=l;f<zi(u,l+e+1);f++)i[s+f][l]=t[f][l];return i})),N(zl,"assign",(function(r,t,e,n,i,o){var a,u,f;return a=nn(r),u=nn(t),f=nn(n),a.accessorProtocol||u.accessorProtocol||f.accessorProtocol?An(a.dtype)&&An(f.dtype)?(function(r,t,e,n,i,o){var a,u,f,l,s,c,h,p;for(u=t.data,f=t.accessors[0],a=Ml(e),l=r.length/2-1,c=2*i,s=2*o,h=0;h<u.length;h++)p=2*a(f(u,h),l),n[s]=r[p],n[s+1]=r[p+1],s+=c}(Xa(r,0),u,e,Xa(n,0),i,o),n):_n(a.dtype)&&_n(f.dtype)?(function(r,t,e,n,i,o){var a,u,f,l,s,c,h;for(u=t.data,f=t.accessors[0],a=Ml(e),l=r.length-1,s=o,c=0;c<u.length;c++)h=a(f(u,c),l),n[s]=r[h],s+=i}(un(r,0),u,e,un(n,0),i,o),n):(function(r,t,e,n,i,o){var a,u,f,l,s,c,h,p,g,y;for(u=r.data,f=t.data,l=n.data,s=r.accessors[0],c=t.accessors[0],h=n.accessors[1],a=Ml(e),p=u.length-1,g=o,y=0;y<f.length;y++)h(l,g,s(u,a(c(f,y),p))),g+=i}(a,u,e,f,i,o),n):(function(r,t,e,n,i,o){var a,u,f,l,s;for(a=Ml(e),u=r.length-1,f=o,l=0;l<t.length;l++)s=a(t[l],u),n[f]=r[s],f+=i}(r,t,e,n,i,o),n)}));var ql=2;function Gl(r,t,e,n){var i,o,a,u,f,l,s,c,h;if(-1===(a=kl(e,ql-1)))throw new RangeError(j("invalid argument. Third argument exceeds the number of dimensions. Number of dimensions: %d. Value: `%d`.",ql,e));if(u=Ml(n),o=[],0===a){for(i=r.length-1,s=0;s<t.length;s++)f=u(t[s],i),o.push(r[f]);return o}for(s=0;s<r.length;s++){for(h=[],i=(c=r[s]).length-1,l=0;l<t.length;l++)f=u(t[l],i),h.push(c[f]);o.push(h)}return o}function $l(r,t,e,n,i,o){var a,u,f;if(a=n[i],(u=i+1)!==e)for(f=0;f<a;f++)$l(r[f],t[f],e,n,u,o);else for(f=0;f<a;f++)t[f]=o(r[f])}function Hl(r){return 0===r&&1/r===vr}function Jl(r,t){if(1===r)return 0;if(r===t)return 1;throw new Error("invalid arguments. Input arguments are not broadcast compatible.")}function Ql(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m;if(0===(a=[r.length,t.length,e.length])[0])return[];for(g=function(r,t){var e,n,i,o;if(2===(e=arguments.length))return Cn(r)||Cn(t)?NaN:r===vr||t===vr?vr:r===t&&0===r?Hl(r)?r:t:r>t?r:t;for(n=wt,o=0;o<e;o++){if(Cn(i=arguments[o])||i===vr)return i;(i>n||i===n&&0===i&&Hl(i))&&(n=i)}return n}(a[0],a[1],a[2]),s=Jl(a[0],g),f=Jl(a[1],g),l=Jl(a[2],g),o=Yi(r),n=Yi(t),i=Yi(e),p=0,c=0,h=0,u=[],m=0;m<g;m++)y=o(r,p)?n(t,c):i(e,h),u.push(y),p+=s,c+=f,h+=l;return u}function Xl(r,t,e,n,i,o,a){var u,f,l,s,c,h,p,g;for(l=Jl(t.length,r),u=Jl(e.length,r),f=Jl(n.length,r),h=0,s=0,c=0,p=a,g=0;g<r;g++)i[p]=t[h]?e[s]:n[c],h+=l,s+=u,c+=f,p+=o;return i}function Zl(r,t,e,n,i,o){var a,u,f,l,s;return 0===r.length?n:(s=function(r,t,e){return _u(t<0?(e+1)/-t:(r-e)/t)}(n.length,i,o),a=nn(r),_n(a.dtype)&&(a=nn(r=un(r,0))),u=nn(t),f=nn(e),l=nn(n),a.accessorProtocol||u.accessorProtocol||f.accessorProtocol||l.accessorProtocol?!1===a.accessorProtocol&&_n(u.dtype)&&_n(f.dtype)&&_n(l.dtype)?(Xl(s,r,un(t,0),un(e,0),un(n,0),i,o),n):An(u.dtype)&&An(f.dtype)&&An(l.dtype)?(function(r,t,e,n,i,o,a){var u,f,l,s,c,h,p,g,y,m,d;for(u=t.data,f=t.accessors[0],c=Jl(u.length,r),l=2*Jl(e.length/2,r),s=2*Jl(n.length/2,r),h=2*o,y=0,p=0,g=0,m=2*a,d=0;d<r;d++)f(u,y)?(i[m]=e[p],i[m+1]=e[p+1]):(i[m]=n[g],i[m+1]=n[g+1]),y+=c,p+=l,g+=s,m+=h}(s,a,Xa(t,0),Xa(e,0),Xa(n,0),i,o),n):(function(r,t,e,n,i,o,a){var u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_;for(l=t.data,u=e.data,f=n.data,s=i.data,p=t.accessors[0],c=e.accessors[0],h=n.accessors[0],g=i.accessors[1],d=Jl(l.length,r),y=Jl(u.length,r),m=Jl(f.length,r),b=0,v=0,w=0,E=a,_=0;_<r;_++)g(s,E,p(l,b)?c(u,v):h(f,w)),b+=d,v+=y,w+=m,E+=o}(s,a,u,f,l,i,o),n):(Xl(s,r,t,e,n,i,o),n))}function Kl(r,t,e){var n;if(function(r,t){return"function"==typeof r[t]}(r,"with"))return r.with(t,e);if((t=kl(t,r.length-1))<0)throw new RangeError(j("invalid argument. Index argument is out-of-bounds. Value: `%d`.",t));return Dl(n=Nl(r,0,r.length))(n,t,e),n}function rs(r,t,e,n,i,o){var a,u;for(a=o,u=0;u<r.length;u++)n[a]=r[u],a+=i;return n[o+t*i]=e,n}function ts(){return{dtypes:{default:"float64",numeric:"float64",real:"float64",floating_point:"float64",real_floating_point:"float64",complex_floating_point:"complex128",integer:"int32",signed_integer:"int32",unsigned_integer:"uint32",boolean:"bool",index:"int32",integer_index:"int32",boolean_index:"bool",mask_index:"uint8"}}}N(Ql,"assign",Zl),N(Kl,"assign",(function(r,t,e,n,i,o){var a,u;if((t=kl(t,r.length-1))<0)throw new RangeError(j("invalid argument. Index argument is out-of-bounds. Value: `%d`.",t));return a=nn(r),u=nn(n),a.accessorProtocol||u.accessorProtocol?An(a.dtype)&&An(u.dtype)&&he(e)?(function(r,t,e,n,i,o){var a,u,f,l;for(a=2*i,u=2*o,f=0;f<r.length/2;f++)l=2*f,n[u]=r[l],n[u+1]=r[l+1],u+=a;n[u=2*(o+t*i)]=Re(e),n[u+1]=Be(e)}(Xa(r,0),t,e,Xa(n,0),i,o),n):_n(a.dtype)&&_n(u.dtype)?(rs(un(r,0),t,Gt(e),un(n,0),i,o),n):(function(r,t,e,n,i,o){var a,u,f,l,s,c;for(a=r.data,u=n.data,f=r.accessors[0],l=n.accessors[1],s=o,c=0;c<a.length;c++)l(u,s,f(a,c)),s+=i;l(u,o+t*i,e)}(a,t,e,u,i,o),n):(rs(r,t,e,n,i,o),n)}));var es={dtypes:{default:"float64",numeric:"float64",real:"float64",floating_point:"float64",real_floating_point:"float64",complex_floating_point:"complex128",integer:"int32",signed_integer:"int32",unsigned_integer:"uint32",boolean:"bool",index:"int32",integer_index:"int32",boolean_index:"bool",mask_index:"uint8"}},ns={"dtypes.default":es.dtypes.default,"dtypes.numeric":es.dtypes.numeric,"dtypes.real":es.dtypes.real,"dtypes.floating_point":es.dtypes.floating_point,"dtypes.real_floating_point":es.dtypes.real_floating_point,"dtypes.complex_floating_point":es.dtypes.complex_floating_point,"dtypes.integer":es.dtypes.integer,"dtypes.signed_integer":es.dtypes.signed_integer,"dtypes.unsigned_integer":es.dtypes.unsigned_integer,"dtypes.boolean":es.dtypes.boolean,"dtypes.index":es.dtypes.index,"dtypes.integer_index":es.dtypes.integer_index,"dtypes.boolean_index":es.dtypes.boolean_index,"dtypes.mask_index":es.dtypes.mask_index};N(ts,"get",(function(r){var t=ns[r];return void 0===t?null:t}));var is=ts.get("dtypes.default");function os(r){var t,e;if(!At(r))throw new TypeError(j("invalid argument. First argument must be a nonnegative integer. Value: `%s`.",r));if("generic"===(t=arguments.length>1?arguments[1]:is))return Xi(r);if(null===(e=_f(t)))throw new TypeError(j("invalid argument. Second argument must be a recognized data type. Value: `%s`.",t));return new e(r)}function as(r,t,e,n,i){var o,a;for(o=i,a=0;a<r.length;a++)a!==t&&(e[o]=r[a],o+=n);return e}function us(r,t,e,n,i){var o,a;if((t=kl(t,r.length-1))<0)throw new RangeError(j("invalid argument. Index argument is out-of-bounds. Value: `%d`.",t));return o=nn(r),a=nn(e),o.accessorProtocol||a.accessorProtocol?An(o.dtype)&&An(a.dtype)?(function(r,t,e,n,i){var o,a,u,f;for(o=2*n,a=2*i,u=0;u<r.length/2;u++)u!==t&&(f=2*u,e[a]=r[f],e[a+1]=r[f+1],a+=o)}(Xa(r,0),t,Xa(e,0),n,i),e):_n(o.dtype)&&_n(a.dtype)?(as(un(r,0),t,un(e,0),n,i),e):(function(r,t,e,n,i){var o,a,u,f,l,s;for(o=r.data,a=e.data,u=r.accessors[0],f=e.accessors[1],l=i,s=0;s<o.length;s++)s!==t&&(f(a,l,u(o,s)),l+=n)}(o,t,a,n,i),e):(as(r,t,e,n,i),e)}function fs(r,t){var e;if((t=kl(t,r.length-1))<0)throw new RangeError(j("invalid argument. Index argument is out-of-bounds. Value: `%d`.",t));return us(r,t,e=os(r.length-1,Ze(r)||"generic"),1,0),e}N(fs,"assign",us);var ls={};C(ls,"AccessorArray",rn),C(ls,"accessorGetter",$),C(ls,"accessorSetter",J),C(ls,"accessors",Ke),C(ls,"any",(function(r){var t=nn(r);return t.accessorProtocol?de(r)?fn(Ae(r,0)):ye(r)?fn(Te(r,0)):en(r)?fn(un(r,0)):function(r){var t,e,n;for(t=r.data,e=r.accessors[0],n=0;n<t.length;n++)if(e(t,n))return!0;return!1}(t):fn(r)})),C(ls,"anyBy",(function(r,t,e){var n;return function(r,t){return"function"==typeof r[t]}(r,"some")?r.some(t,e):(n=nn(r)).accessorProtocol?function(r,t,e){var n,i,o;for(n=r.data,i=r.accessors[0],o=0;o<n.length;o++)if(t.call(e,i(n,o),o,n))return!0;return!1}(n,t,e):function(r,t,e){var n;for(n=0;n<r.length;n++)if(t.call(e,r[n],n,r))return!0;return!1}(r,t,e)})),C(ls,"anyByRight",(function(r,t,e){var n=nn(r);return n.accessorProtocol?function(r,t,e){var n,i,o;for(n=r.data,i=r.accessors[0],o=n.length-1;o>=0;o--)if(t.call(e,i(n,o),o,n))return!0;return!1}(n,t,e):function(r,t,e){var n;for(n=r.length-1;n>=0;n--)if(t.call(e,r[n],n,r))return!0;return!1}(r,t,e)})),C(ls,"arraylike2object",nn),C(ls,"assert",Di),C(ls,"at",(function(r,t){if(function(r,t){return"function"==typeof r[t]}(r,"at"))return r.at(t);if(t<0){if((t+=r.length)<0)return}else if(t>=r.length)return;return Yi(r)(r,t)})),C(ls,"at2d",(function(r,t,e){var n,i;if(i=r.length,t<0&&(t+=i),!(t<0||t>=i||(i=(n=r[t]).length,e<0&&(e+=i),e<0||e>=i)))return n[e]})),C(ls,"at3d",(function(r,t,e,n){var i,o,a;if(a=r.length,t<0&&(t+=a),!(t<0||t>=a||(a=(i=r[t]).length,e<0&&(e+=a),e<0||e>=a||(a=(o=i[e]).length,n<0&&(n+=a),n<0||n>=a))))return o[n]})),C(ls,"at4d",(function(r,t,e,n,i){var o,a,u,f,l;for(a=[t,e,n,i],o=r,f=0;f<a.length;f++){if(l=a[f],u=o.length,l<0&&(l+=u),l<0||l>=u)return;o=o[l]}return o})),C(ls,"at5d",(function(r,t,e,n,i,o){var a,u,f,l,s;for(u=[t,e,n,i,o],a=r,l=0;l<u.length;l++){if(s=u[l],f=a.length,s<0&&(s+=f),s<0||s>=f)return;a=a[s]}return a})),C(ls,"atnd",(function(r,t){var e,n,i,o,a;for(n=[t],o=2;o<arguments.length;o++)n.push(arguments[o]);for(e=r,o=0;o<n.length;o++){if(a=n[o],i=e.length,a<0&&(a+=i),a<0||a>=i)return;e=e[a]}return e})),C(ls,"banded",Hi),C(ls,"bifurcateEntries",(function(r,t){var e,n,i,o,a,u;if(i=r.length,t.length!==i)throw new RangeError("invalid argument. The first and second arguments must have the same length.");if(0===i)return[];for(e=Yi(r),n=Yi(t),o=[[],[]],u=0;u<i;u++)a=e(r,u),n(t,u)?o[0].push([u,a]):o[1].push([u,a]);return o})),C(ls,"bifurcateEntriesBy",(function(r,t,e){var n,i,o,a,u;if(0===(i=r.length))return[];for(n=Yi(r),o=[[],[]],u=0;u<i;u++)a=n(r,u),t.call(e,a,u,r)?o[0].push([u,a]):o[1].push([u,a]);return o})),C(ls,"bifurcateIndices",(function(r,t){var e,n,i,o;if(n=r.length,t.length!==n)throw new RangeError("invalid argument. The first and second arguments must have the same length.");if(0===n)return[];for(e=Yi(t),i=[[],[]],o=0;o<n;o++)e(t,o)?i[0].push(o):i[1].push(o);return i})),C(ls,"bifurcateIndicesBy",(function(r,t,e){var n,i,o,a;if(0===(i=r.length))return[];for(n=Yi(r),o=[[],[]],a=0;a<i;a++)t.call(e,n(r,a),a,r)?o[0].push(a):o[1].push(a);return o})),C(ls,"bifurcateValues",(function(r,t){var e,n,i,o,a,u;if(i=r.length,t.length!==i)throw new RangeError("invalid argument. The first and second arguments must have the same length.");if(0===i)return[];for(e=Yi(r),n=Yi(t),o=[[],[]],u=0;u<i;u++)a=e(r,u),n(t,u)?o[0].push(a):o[1].push(a);return o})),C(ls,"bifurcateValuesBy",(function(r,t,e){var n,i,o,a,u;if(0===(i=r.length))return[];for(n=Yi(r),o=[[],[]],u=0;u<i;u++)a=n(r,u),t.call(e,a,u,r)?o[0].push(a):o[1].push(a);return o})),C(ls,"binary2d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h;if(n=t[1],i=t[0],!(n<=0||i<=0))for(s=r[0],c=r[1],h=r[2],a=0;a<i;a++)for(u=s[a],f=c[a],l=h[a],o=0;o<n;o++)l[o]=e(u[o],f[o])})),C(ls,"binary3d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d;if(n=t[2],i=t[1],o=t[0],!(n<=0||i<=0||o<=0))for(y=r[0],m=r[1],d=r[2],f=0;f<o;f++)for(s=y[f],h=m[f],g=d[f],u=0;u<i;u++)for(l=s[u],c=h[u],p=g[u],a=0;a<n;a++)p[a]=e(l[a],c[a])})),C(ls,"binary4d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_;if(n=t[3],i=t[2],o=t[1],a=t[0],!(n<=0||i<=0||o<=0||a<=0))for(b=r[0],E=r[1],_=r[2],s=0;s<a;s++)for(p=b[s],m=E[s],w=_[s],l=0;l<o;l++)for(h=p[l],y=m[l],v=w[l],f=0;f<i;f++)for(c=h[f],g=y[f],d=v[f],u=0;u<n;u++)d[u]=e(c[u],g[u])})),C(ls,"binary5d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_,T,x,V,A,S;if(n=t[4],i=t[3],o=t[2],a=t[1],u=t[0],!(n<=0||i<=0||o<=0||a<=0||u<=0))for(V=r[0],A=r[1],S=r[2],h=0;h<u;h++)for(m=V[h],b=A[h],x=S[h],c=0;c<a;c++)for(y=m[c],w=b[c],T=x[c],s=0;s<o;s++)for(g=y[s],v=w[s],_=T[s],l=0;l<i;l++)for(p=g[l],d=v[l],E=_[l],f=0;f<n;f++)E[f]=e(p[f],d[f])})),C(ls,"binarynd",(function(r,t,e){return Ji(r[0],r[1],r[2],t.length,t,0,e)})),C(ls,"broadcastArray",Zi),C(ls,"bbinary2d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_,T;if(u=(v=t[2])[1],f=v[0],!(u<=0||f<=0))for(E=(b=Zi(r[0],t[0],v)).data,n=(w=b.strides)[1],i=w[0],_=(b=Zi(r[1],t[1],v)).data,o=(w=b.strides)[1],a=w[0],T=r[2],h=0,g=0,s=0;s<f;s++){for(c=0,p=0,y=E[h],m=_[g],d=T[s],l=0;l<u;l++)d[l]=e(y[c],m[p]),c+=n,p+=o;h+=i,g+=a}})),C(ls,"bbinary3d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_,T,x,V,A,S,F,j,k,L,I;if(l=(S=t[2])[2],s=S[1],c=S[0],!(l<=0||s<=0||c<=0))for(k=(j=Zi(r[0],t[0],S)).data,n=(F=j.strides)[2],i=F[1],o=F[0],L=(j=Zi(r[1],t[1],S)).data,a=(F=j.strides)[2],u=F[1],f=F[0],I=r[2],d=0,b=0,g=0;g<c;g++){for(m=0,w=0,_=k[d],x=L[b],A=I[g],p=0;p<s;p++){for(y=0,v=0,E=_[m],T=x[w],V=A[p],h=0;h<l;h++)V[h]=e(E[y],T[v]),y+=n,v+=a;m+=i,w+=u}d+=o,b+=f}})),C(ls,"bbinary4d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_,T,x,V,A,S,F,j,k,L,I,O,R,B,M,P,C,N,U,D;if(c=(M=t[2])[3],h=M[2],p=M[1],g=M[0],!(c<=0||h<=0||p<=0||g<=0))for(N=(C=Zi(r[0],t[0],M)).data,n=(P=C.strides)[3],i=P[2],o=P[1],a=P[0],U=(C=Zi(r[1],t[1],M)).data,u=(P=C.strides)[3],f=P[2],l=P[1],s=P[0],D=r[2],_=0,A=0,v=0;v<g;v++){for(E=0,V=0,j=N[_],I=U[A],B=D[v],d=0;d<p;d++){for(b=0,x=0,F=j[E],L=I[V],R=B[d],m=0;m<h;m++){for(w=0,T=0,S=F[b],k=L[x],O=R[m],y=0;y<c;y++)O[y]=e(S[w],k[T]),w+=n,T+=u;b+=i,x+=f}E+=o,V+=l}_+=a,A+=s}})),C(ls,"bbinary5d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_,T,x,V,A,S,F,j,k,L,I,O,R,B,M,P,C,N,U,D,Y,W,z,q,G,$,H,J,Q;if(p=(q=t[2])[4],g=q[3],y=q[2],m=q[1],d=q[0],!(p<=0||g<=0||y<=0||m<=0||d<=0))for(H=($=Zi(r[0],t[0],q)).data,n=(G=$.strides)[4],i=G[3],o=G[2],a=G[1],u=G[0],J=($=Zi(r[1],t[1],q)).data,f=(G=$.strides)[4],l=G[3],s=G[2],c=G[1],h=G[0],Q=r[2],S=0,I=0,_=0;_<d;_++){for(A=0,L=0,M=H[S],U=J[I],z=Q[_],E=0;E<m;E++){for(V=0,k=0,B=M[A],N=U[L],W=z[E],b=0;b<y;b++){for(x=0,j=0,R=B[V],C=N[k],Y=W[b],w=0;w<g;w++){for(T=0,F=0,O=R[x],P=C[j],D=Y[w],v=0;v<p;v++)D[v]=e(O[T],P[F]),T+=n,F+=f;x+=i,j+=l}V+=o,k+=s}A+=a,L+=c}S+=u,I+=h}})),C(ls,"bquaternary2d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_,T,x,V,A,S,F,j,k,L,I,O,R,B;if(c=(F=t[4])[1],h=F[0],!(c<=0||h<=0))for(L=(k=Zi(r[0],t[0],F)).data,n=(j=k.strides)[1],i=j[0],I=(k=Zi(r[1],t[1],F)).data,o=(j=k.strides)[1],a=j[0],O=(k=Zi(r[2],t[2],F)).data,u=(j=k.strides)[1],f=j[0],R=(k=Zi(r[3],t[3],F)).data,l=(j=k.strides)[1],s=j[0],B=r[4],m=0,v=0,b=0,_=0,g=0;g<h;g++){for(y=0,d=0,w=0,E=0,T=L[m],x=I[v],V=O[b],A=R[_],S=B[g],p=0;p<c;p++)S[p]=e(T[y],x[d],V[w],A[E]),y+=n,d+=o,w+=u,E+=l;m+=i,v+=a,b+=f,_+=s}})),C(ls,"bquaternary3d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_,T,x,V,A,S,F,j,k,L,I,O,R,B,M,P,C,N,U,D,Y,W,z,q,G,$,H,J,Q;if(y=(W=t[4])[2],m=W[1],d=W[0],!(y<=0||m<=0||d<=0))for(G=(q=Zi(r[0],t[0],W)).data,n=(z=q.strides)[2],i=z[1],o=z[0],$=(q=Zi(r[1],t[1],W)).data,a=(z=q.strides)[2],u=z[1],f=z[0],H=(q=Zi(r[2],t[2],W)).data,l=(z=q.strides)[2],s=z[1],c=z[0],J=(q=Zi(r[3],t[3],W)).data,h=(z=q.strides)[2],p=z[1],g=z[0],Q=r[4],T=0,A=0,j=0,I=0,b=0;b<d;b++){for(_=0,V=0,F=0,L=0,R=G[T],M=$[A],C=H[j],U=J[I],Y=Q[b],w=0;w<m;w++){for(E=0,x=0,S=0,k=0,O=R[_],B=M[V],P=C[F],N=U[L],D=Y[w],v=0;v<y;v++)D[v]=e(O[E],B[x],P[S],N[k]),E+=n,x+=a,S+=l,k+=h;_+=i,V+=u,F+=s,L+=p}T+=o,A+=f,j+=c,I+=g}})),C(ls,"bquaternary4d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_,T,x,V,A,S,F,j,k,L,I,O,R,B,M,P,C,N,U,D,Y,W,z,q,G,$,H,J,Q,X,Z,K,rr,tr,er,nr,ir,or,ar,ur,fr,lr,sr,cr;if(w=(ir=t[4])[3],b=ir[2],E=ir[1],_=ir[0],!(w<=0||b<=0||E<=0||_<=0))for(ur=(ar=Zi(r[0],t[0],ir)).data,n=(or=ar.strides)[3],i=or[2],o=or[1],a=or[0],fr=(ar=Zi(r[1],t[1],ir)).data,u=(or=ar.strides)[3],f=or[2],l=or[1],s=or[0],lr=(ar=Zi(r[2],t[2],ir)).data,c=(or=ar.strides)[3],h=or[2],p=or[1],g=or[0],sr=(ar=Zi(r[3],t[3],ir)).data,y=(or=ar.strides)[3],m=or[2],d=or[1],v=or[0],cr=r[4],k=0,R=0,C=0,Y=0,A=0;A<_;A++){for(j=0,O=0,P=0,D=0,q=ur[k],H=fr[R],X=lr[C],rr=sr[Y],nr=cr[A],V=0;V<E;V++){for(F=0,I=0,M=0,U=0,z=q[j],$=H[O],Q=X[P],K=rr[D],er=nr[V],x=0;x<b;x++){for(S=0,L=0,B=0,N=0,W=z[F],G=$[I],J=Q[M],Z=K[U],tr=er[x],T=0;T<w;T++)tr[T]=e(W[S],G[L],J[B],Z[N]),S+=n,L+=u,B+=c,N+=y;F+=i,I+=f,M+=h,U+=m}j+=o,O+=l,P+=p,D+=d}k+=a,R+=s,C+=g,Y+=v}})),C(ls,"bquaternary5d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_,T,x,V,A,S,F,j,k,L,I,O,R,B,M,P,C,N,U,D,Y,W,z,q,G,$,H,J,Q,X,Z,K,rr,tr,er,nr,ir,or,ar,ur,fr,lr,sr,cr,hr,pr,gr,yr,mr,dr,vr,wr,br,Er,_r,Tr,xr,Vr,Ar;if(T=(wr=t[4])[4],x=wr[3],V=wr[2],A=wr[1],S=wr[0],!(T<=0||x<=0||V<=0||A<=0||S<=0))for(_r=(Er=Zi(r[0],t[0],wr)).data,n=(br=Er.strides)[4],i=br[3],o=br[2],a=br[1],u=br[0],Tr=(Er=Zi(r[1],t[1],wr)).data,f=(br=Er.strides)[4],l=br[3],s=br[2],c=br[1],h=br[0],xr=(Er=Zi(r[2],t[2],wr)).data,p=(br=Er.strides)[4],g=br[3],y=br[2],m=br[1],d=br[0],Vr=(Er=Zi(r[3],t[3],wr)).data,v=(br=Er.strides)[4],w=br[3],b=br[2],E=br[1],_=br[0],Ar=r[4],P=0,Y=0,$=0,Z=0,I=0;I<S;I++){for(M=0,D=0,G=0,X=0,er=_r[P],ar=Tr[Y],sr=xr[$],gr=Vr[Z],vr=Ar[I],L=0;L<A;L++){for(B=0,U=0,q=0,Q=0,tr=er[M],or=ar[D],lr=sr[G],pr=gr[X],dr=vr[L],k=0;k<V;k++){for(R=0,N=0,z=0,J=0,rr=tr[B],ir=or[U],fr=lr[q],hr=pr[Q],mr=dr[k],j=0;j<x;j++){for(O=0,C=0,W=0,H=0,K=rr[R],nr=ir[N],ur=fr[z],cr=hr[J],yr=mr[j],F=0;F<T;F++)yr[F]=e(K[O],nr[C],ur[W],cr[H]),O+=n,C+=f,W+=p,H+=v;R+=i,N+=l,z+=g,J+=w}B+=o,U+=s,q+=y,Q+=b}M+=a,D+=c,G+=m,X+=E}P+=u,Y+=h,$+=d,Z+=_}})),C(ls,"bquinary2d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_,T,x,V,A,S,F,j,k,L,I,O,R,B,M,P,C,N,U,D;if(p=(O=t[5])[1],g=O[0],!(p<=0||g<=0))for(M=(B=Zi(r[0],t[0],O)).data,n=(R=B.strides)[1],i=R[0],P=(B=Zi(r[1],t[1],O)).data,o=(R=B.strides)[1],a=R[0],C=(B=Zi(r[2],t[2],O)).data,u=(R=B.strides)[1],f=R[0],N=(B=Zi(r[3],t[3],O)).data,l=(R=B.strides)[1],s=R[0],U=(B=Zi(r[4],t[4],O)).data,c=(R=B.strides)[1],h=R[0],D=r[5],v=0,b=0,_=0,x=0,A=0,m=0;m<g;m++){for(d=0,w=0,E=0,T=0,V=0,S=M[v],F=P[b],j=C[_],k=N[x],L=U[A],I=D[m],y=0;y<p;y++)I[y]=e(S[d],F[w],j[E],k[T],L[V]),d+=n,w+=o,E+=u,T+=l,V+=c;v+=i,b+=a,_+=f,x+=s,A+=h}})),C(ls,"bquinary4d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_,T,x,V,A,S,F,j,k,L,I,O,R,B,M,P,C,N,U,D,Y,W,z,q,G,$,H,J,Q,X,Z,K,rr,tr,er,nr,ir,or,ar,ur,fr,lr,sr,cr,hr,pr,gr,yr,mr,dr,vr,wr,br,Er,_r,Tr;if(T=(yr=t[5])[3],x=yr[2],V=yr[1],A=yr[0],!(T<=0||x<=0||V<=0||A<=0))for(vr=(dr=Zi(r[0],t[0],yr)).data,n=(mr=dr.strides)[3],i=mr[2],o=mr[1],a=mr[0],wr=(dr=Zi(r[1],t[1],yr)).data,u=(mr=dr.strides)[3],f=mr[2],l=mr[1],s=mr[0],br=(dr=Zi(r[2],t[2],yr)).data,c=(mr=dr.strides)[3],h=mr[2],p=mr[1],g=mr[0],Er=(dr=Zi(r[3],t[3],yr)).data,y=(mr=dr.strides)[3],m=mr[2],d=mr[1],v=mr[0],_r=(dr=Zi(r[4],t[4],yr)).data,w=(mr=dr.strides)[3],b=mr[2],E=mr[1],_=mr[0],Tr=r[5],R=0,C=0,Y=0,G=0,Q=0,k=0;k<A;k++){for(O=0,P=0,D=0,q=0,J=0,K=vr[R],er=wr[C],or=br[Y],fr=Er[G],cr=_r[Q],gr=Tr[k],j=0;j<V;j++){for(I=0,M=0,U=0,z=0,H=0,Z=K[O],tr=er[P],ir=or[D],ur=fr[q],sr=cr[J],pr=gr[j],F=0;F<x;F++){for(L=0,B=0,N=0,W=0,$=0,X=Z[I],rr=tr[M],nr=ir[U],ar=ur[z],lr=sr[H],hr=pr[F],S=0;S<T;S++)hr[S]=e(X[L],rr[B],nr[N],ar[W],lr[$]),L+=n,B+=u,N+=c,W+=y,$+=w;I+=i,M+=f,U+=h,z+=m,H+=b}O+=o,P+=l,D+=p,q+=d,J+=E}R+=a,C+=s,Y+=g,G+=v,Q+=_}})),C(ls,"bternary2d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_,T,x,V,A,S,F,j;if(l=(T=t[3])[1],s=T[0],!(l<=0||s<=0))for(A=(V=Zi(r[0],t[0],T)).data,n=(x=V.strides)[1],i=x[0],S=(V=Zi(r[1],t[1],T)).data,o=(x=V.strides)[1],a=x[0],F=(V=Zi(r[2],t[2],T)).data,u=(x=V.strides)[1],f=x[0],j=r[3],g=0,m=0,v=0,h=0;h<s;h++){for(p=0,y=0,d=0,w=A[g],b=S[m],E=F[v],_=j[h],c=0;c<l;c++)_[c]=e(w[p],b[y],E[d]),p+=n,y+=o,d+=u;g+=i,m+=a,v+=f}})),C(ls,"bternary3d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_,T,x,V,A,S,F,j,k,L,I,O,R,B,M,P,C,N,U,D;if(h=(O=t[3])[2],p=O[1],g=O[0],!(h<=0||p<=0||g<=0))for(C=(P=Zi(r[0],t[0],O)).data,n=(R=P.strides)[2],i=R[1],o=R[0],N=(P=Zi(r[1],t[1],O)).data,a=(R=P.strides)[2],u=R[1],f=R[0],U=(P=Zi(r[2],t[2],O)).data,l=(R=P.strides)[2],s=R[1],c=R[0],D=r[3],b=0,T=0,A=0,d=0;d<g;d++){for(w=0,_=0,V=0,F=C[b],k=N[T],I=U[A],M=D[d],m=0;m<p;m++){for(v=0,E=0,x=0,S=F[w],j=k[_],L=I[V],B=M[m],y=0;y<h;y++)B[y]=e(S[v],j[E],L[x]),v+=n,E+=a,x+=l;w+=i,_+=u,V+=s}b+=o,T+=f,A+=c}})),C(ls,"bternary4d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_,T,x,V,A,S,F,j,k,L,I,O,R,B,M,P,C,N,U,D,Y,W,z,q,G,$,H,J,Q,X,Z,K;if(y=(z=t[3])[3],m=z[2],d=z[1],v=z[0],!(y<=0||m<=0||d<=0||v<=0))for(Q=(J=Zi(r[0],t[0],z)).data,n=(q=J.strides)[3],i=q[2],o=q[1],a=q[0],X=(J=Zi(r[1],t[1],z)).data,u=(q=J.strides)[3],f=q[2],l=q[1],s=q[0],Z=(J=Zi(r[2],t[2],z)).data,c=(q=J.strides)[3],h=q[2],p=q[1],g=q[0],K=r[3],A=0,k=0,R=0,_=0;_<v;_++){for(V=0,j=0,O=0,P=Q[A],U=X[k],W=Z[R],H=K[_],E=0;E<d;E++){for(x=0,F=0,I=0,M=P[V],N=U[j],Y=W[O],$=H[E],b=0;b<m;b++){for(T=0,S=0,L=0,B=M[x],C=N[F],D=Y[I],G=$[b],w=0;w<y;w++)G[w]=e(B[T],C[S],D[L]),T+=n,S+=u,L+=c;x+=i,F+=f,I+=h}V+=o,j+=l,O+=p}A+=a,k+=s,R+=g}})),C(ls,"bternary5d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_,T,x,V,A,S,F,j,k,L,I,O,R,B,M,P,C,N,U,D,Y,W,z,q,G,$,H,J,Q,X,Z,K,rr,tr,er,nr,ir,or,ar,ur,fr,lr,sr,cr;if(v=(tr=t[3])[4],w=tr[3],b=tr[2],E=tr[1],_=tr[0],!(v<=0||w<=0||b<=0||E<=0||_<=0))for(fr=(ur=Zi(r[0],t[0],tr)).data,n=(er=ur.strides)[4],i=er[3],o=er[2],a=er[1],u=er[0],lr=(ur=Zi(r[1],t[1],tr)).data,f=(er=ur.strides)[4],l=er[3],s=er[2],c=er[1],h=er[0],sr=(ur=Zi(r[2],t[2],tr)).data,p=(er=ur.strides)[4],g=er[3],y=er[2],m=er[1],d=er[0],cr=r[3],I=0,P=0,Y=0,S=0;S<_;S++){for(L=0,M=0,D=0,G=fr[I],Q=lr[P],rr=sr[Y],ar=cr[S],A=0;A<E;A++){for(k=0,B=0,U=0,q=G[L],J=Q[M],K=rr[D],or=ar[A],V=0;V<b;V++){for(j=0,R=0,N=0,z=q[k],H=J[B],Z=K[U],ir=or[V],x=0;x<w;x++){for(F=0,O=0,C=0,W=z[j],$=H[R],X=Z[N],nr=ir[x],T=0;T<v;T++)nr[T]=e(W[F],$[O],X[C]),F+=n,O+=f,C+=p;j+=i,R+=l,N+=g}k+=o,B+=s,U+=y}L+=a,M+=c,D+=m}I+=u,P+=h,Y+=d}})),C(ls,"bunary2d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d;if(o=(p=t[1])[1],a=p[0],!(o<=0||a<=0))for(m=(y=Zi(r[0],t[0],p)).data,n=(g=y.strides)[1],i=g[0],d=r[1],s=0,f=0;f<a;f++){for(l=0,c=m[s],h=d[f],u=0;u<o;u++)h[u]=e(c[l]),l+=n;s+=i}})),C(ls,"bunary3d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_,T;if(a=(w=t[1])[2],u=w[1],f=w[0],!(a<=0||u<=0||f<=0))for(_=(E=Zi(r[0],t[0],w)).data,n=(b=E.strides)[2],i=b[1],o=b[0],T=r[1],g=0,c=0;c<f;c++){for(p=0,m=_[g],v=T[c],s=0;s<u;s++){for(h=0,y=m[p],d=v[s],l=0;l<a;l++)d[l]=e(y[h]),h+=n;p+=i}g+=o}})),C(ls,"bunary4d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_,T,x,V,A,S,F,j;if(u=(V=t[1])[3],f=V[2],l=V[1],s=V[0],!(u<=0||f<=0||l<=0||s<=0))for(F=(S=Zi(r[0],t[0],V)).data,n=(A=S.strides)[3],i=A[2],o=A[1],a=A[0],j=r[1],v=0,g=0;g<s;g++){for(d=0,E=F[v],x=j[g],p=0;p<l;p++){for(m=0,b=E[d],T=x[p],h=0;h<f;h++){for(y=0,w=b[m],_=T[h],c=0;c<u;c++)_[c]=e(w[y]),y+=n;m+=i}d+=o}v+=a}})),C(ls,"bunary5d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_,T,x,V,A,S,F,j,k,L,I,O,R,B;if(f=(L=t[1])[4],l=L[3],s=L[2],c=L[1],h=L[0],!(f<=0||l<=0||s<=0||c<=0||h<=0))for(R=(O=Zi(r[0],t[0],L)).data,n=(I=O.strides)[4],i=I[3],o=I[2],a=I[1],u=I[0],B=r[1],_=0,d=0;d<h;d++){for(E=0,A=R[_],k=B[d],m=0;m<c;m++){for(b=0,V=A[E],j=k[m],y=0;y<s;y++){for(w=0,x=V[b],F=j[y],g=0;g<l;g++){for(v=0,T=x[w],S=F[g],p=0;p<f;p++)S[p]=e(T[v]),v+=n;w+=i}b+=o}E+=a}_+=u}})),C(ls,"cartesianPower",Wa),C(ls,"cartesianProduct",za),C(ls,"cartesianSquare",qa),C(ls,"copy",Ga),C(ls,"copyIndexed",Qi),C(ls,"countFalsy",Ka),C(ls,"countIf",(function(r,t,e){return D(r)?function(r,t,e){var n,i,o;for(n=Yi(r),i=0,o=0;o<r.length;o++)t.call(e,n(r,o),o,r)&&(i+=1);return i}(r,t,e):function(r,t,e){var n,i;for(n=0,i=0;i<r.length;i++)t.call(e,r[i],i,r)&&(n+=1);return n}(r,t,e)})),C(ls,"countIfs",(function(){var r,t,e,n,i;for(t=[],r=[],i=0;i<arguments.length;i+=2)t.push(nn(arguments[i])),r.push(arguments[i+1]);for(e=ru(arguments[0].length),i=0;i<t.length;i++)e=(n=t[i]).accessorProtocol?eu(n,e,r[i]):nu(n.data,e,r[i]);return e.length})),C(ls,"countSameValue",(function(r,t){return D(r)?jn(r)?function(r,t){var e,n,i,o,a;if(!he(t))return 0;for(n=Re(t),i=Be(t),e=Xa(r,0),o=0,a=0;a<e.length;a+=2)yn(e[a],n)&&yn(e[a+1],i)&&(o+=1);return o}(r,t):en(r)?function(r,t){var e,n,i,o;if(!qt(t))return 0;for(e=un(r,0),i=t?1:0,n=0,o=0;o<e.length;o++)e[o]===i&&(n+=1);return n}(r,t):function(r,t){var e,n,i;for(e=Yi(r),n=0,i=0;i<r.length;i++)yn(e(r,i),t)&&(n+=1);return n}(r,t):function(r,t){var e,n;for(e=0,n=0;n<r.length;n++)yn(r[n],t)&&(e+=1);return e}(r,t)})),C(ls,"countSameValueZero",(function(r,t){return D(r)?jn(r)?function(r,t){var e,n,i,o,a;if(!he(t))return 0;for(n=Re(t),i=Be(t),e=Xa(r,0),o=0,a=0;a<e.length;a+=2)ou(e[a],n)&&ou(e[a+1],i)&&(o+=1);return o}(r,t):en(r)?function(r,t){var e,n,i,o;if(!qt(t))return 0;for(e=un(r,0),i=t?1:0,n=0,o=0;o<e.length;o++)e[o]===i&&(n+=1);return n}(r,t):function(r,t){var e,n,i;for(e=Yi(r),n=0,i=0;i<r.length;i++)ou(e(r,i),t)&&(n+=1);return n}(r,t):function(r,t){var e,n;for(e=0,n=0;n<r.length;n++)ou(r[n],t)&&(e+=1);return e}(r,t)})),C(ls,"countTruthy",uu),C(ls,"cuany",su),C(ls,"cuevery",pu),C(ls,"cunone",mu),C(ls,"dedupe",(function(r,t,e){return e?function(r,t){var e,n,i,o,a,u,f;if(0===(i=r.length))return r;for(a=!1,Cn(n=r[0])&&(a=!0),e=1,o=1,f=1;f<i;f++)(u=r[f])===n||a&&Cn(u)?(e+=1)<=t&&(r[o]=n,o+=1):(n=u,e=1,r[o]=n,o+=1,a=!1,Cn(n)&&(a=!0));return r.length=o,r}(r,t):function(r,t){var e,n,i,o,a,u;if(0===(i=r.length))return r;for(n=r[0],e=1,o=1,u=1;u<i;u++)(a=r[u])===n?(e+=1)<=t&&(r[o]=n,o+=1):(n=a,e=1,r[o]=n,o+=1);return r.length=o,r}(r,t)})),C(ls,"every",(function(r){var t=nn(r);return t.accessorProtocol?de(r)?vu(Ae(r,0)):ye(r)?vu(Te(r,0)):en(r)?du(un(r,0)):function(r){var t,e,n;for(t=r.data,e=r.accessors[0],n=0;n<t.length;n++)if(!e(t,n))return!1;return!0}(t):du(r)})),C(ls,"everyBy",(function(r,t,e){var n;return function(r,t){return"function"==typeof r[t]}(r,"every")?r.every(t,e):(n=nn(r)).accessorProtocol?function(r,t,e){var n,i,o;for(n=r.data,i=r.accessors[0],o=0;o<n.length;o++)if(!t.call(e,i(n,o),o,n))return!1;return!0}(n,t,e):function(r,t,e){var n;for(n=0;n<r.length;n++)if(!t.call(e,r[n],n,r))return!1;return!0}(r,t,e)})),C(ls,"everyByRight",(function(r,t,e){var n=nn(r);return n.accessorProtocol?function(r,t,e){var n,i,o;for(n=r.data,i=r.accessors[0],o=n.length-1;o>=0;o--)if(!t.call(e,i(n,o),o,n))return!1;return!0}(n,t,e):function(r,t,e){var n;for(n=r.length-1;n>=0;n--)if(!t.call(e,r[n],n,r))return!1;return!0}(r,t,e)})),C(ls,"fancySlice",bf),C(ls,"fancySliceAssign",Sf),C(ls,"fill",(function(r,t,e,n){var i;return function(r,t){return"function"==typeof r[t]}(r,"fill")?r.fill(t,e,n):(e<0&&(e+=r.length)<0&&(e=0),n<0?n+=r.length:n>r.length&&(n=r.length),(i=nn(r)).accessorProtocol?function(r,t,e,n){var i,o,a;for(i=r.data,o=r.accessors[1],a=e;a<n;a++)o(i,a,t);return i}(i,t,e,n):function(r,t,e,n){var i;for(i=e;i<n;i++)r[i]=t;return r}(r,t,e,n))})),C(ls,"fillBy",(function(r,t,e,n,i){var o;return t<0&&(t+=r.length)<0&&(t=0),e<0?e+=r.length:e>r.length&&(e=r.length),(o=nn(r)).accessorProtocol?function(r,t,e,n,i){var o,a,u,f;for(o=r.data,a=r.accessors[0],u=r.accessors[1],f=t;f<e;f++)u(o,f,n.call(i,a(o,f),f,o));return o}(o,t,e,n,i):function(r,t,e,n,i){var o;for(o=t;o<e;o++)r[o]=n.call(i,r[o],o,r);return r}(r,t,e,n,i)})),C(ls,"filled",qi),C(ls,"filledBy",Ff),C(ls,"filled2d",Gi),C(ls,"filled2dBy",(function(r,t,e){var n,i,o,a,u,f;for(o=r[1],a=r[0],n=[],u=0;u<a;u++){for(i=[],f=0;f<o;f++)i.push(t.call(e,[u,f]));n.push(i)}return n})),C(ls,"filled3d",jf),C(ls,"filled3dBy",(function(r,t,e){var n,i,o,a,u,f,l,s,c;for(a=r[2],u=r[1],f=r[0],n=[],c=0;c<f;c++){for(o=[],s=0;s<u;s++){for(i=[],l=0;l<a;l++)i.push(t.call(e,[c,s,l]));o.push(i)}n.push(o)}return n})),C(ls,"filled4d",kf),C(ls,"filled4dBy",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g;for(u=r[3],f=r[2],l=r[1],s=r[0],n=[],g=0;g<s;g++){for(a=[],p=0;p<l;p++){for(o=[],h=0;h<f;h++){for(i=[],c=0;c<u;c++)i.push(t.call(e,[g,p,h,c]));o.push(i)}a.push(o)}n.push(a)}return n})),C(ls,"filled5d",Lf),C(ls,"filled5dBy",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d;for(f=r[4],l=r[3],s=r[2],c=r[1],h=r[0],n=[],d=0;d<h;d++){for(u=[],m=0;m<c;m++){for(a=[],y=0;y<s;y++){for(o=[],g=0;g<l;g++){for(i=[],p=0;p<f;p++)i.push(t.call(e,[d,m,y,g,p]));o.push(i)}a.push(o)}u.push(a)}n.push(u)}return n})),C(ls,"fillednd",Of),C(ls,"filledndBy",(function(r,t,e){return Rf(r.length,r,0,[],[],t,e)})),C(ls,"filter",(function(r,t,e){var n;return function(r,t){return"function"==typeof r[t]}(r,"filter")?r.filter(t,e):(n=nn(r)).accessorProtocol?function(r,t,e){var n,i,o,a,u;for(n=r.data,i=r.accessors[0],o=[],u=0;u<n.length;u++)a=i(n,u),t.call(e,a,u,n)&&o.push(a);return o}(n,t,e):function(r,t,e){var n,i,o;for(n=[],o=0;o<r.length;o++)i=r[o],t.call(e,i,o,r)&&n.push(i);return n}(r,t,e)})),C(ls,"first",(function(r){if(0!==r.length)return Yi(r)(r,0)})),C(ls,"flatten",Gf),C(ls,"flattenBy",Qf),C(ls,"flatten2d",Xf),C(ls,"flatten2dBy",Zf),C(ls,"flatten3d",Kf),C(ls,"flatten3dBy",rl),C(ls,"flatten4d",tl),C(ls,"flatten4dBy",el),C(ls,"flatten5d",nl),C(ls,"flatten5dBy",il),C(ls,"fliplr2d",ol),C(ls,"fliplr3d",al),C(ls,"fliplr4d",ul),C(ls,"fliplr5d",(function(r){var t,e;for(t=[],e=0;e<r.length;e++)t.push(ul(r[e]));return t})),C(ls,"flipud2d",fl),C(ls,"flipud3d",ll),C(ls,"flipud4d",sl),C(ls,"flipud5d",(function(r){var t,e;for(t=[],e=0;e<r.length;e++)t.push(sl(r[e]));return t})),C(ls,"strided2array",(function(r,t,e,n){var i,o,a,u;for(o=Yi(t),a=n,i=[],u=0;u<r;u++)i.push(o(t,a)),a+=e;return i})),C(ls,"getter",W),C(ls,"groupEntries",(function(r,t){var e,n,i,o,a,u,f,l;if(i=r.length,t.length!==i)throw new RangeError("invalid argument. The first and second arguments must have the same length.");for(e=Yi(r),n=Yi(t),o={},l=0;l<i;l++)f=e(r,l),u=o[a=n(t,l).toString()],ir(u)?u.push([l,f]):o[a]=[[l,f]];return o})),C(ls,"groupEntriesBy",(function(r,t,e){var n,i,o,a,u,f,l;for(i=r.length,n=Yi(r),o={},l=0;l<i;l++)f=n(r,l),u=o[a=t.call(e,f,l,r)],ir(u)?u.push([l,f]):o[a]=[[l,f]];return o})),C(ls,"groupIndices",(function(r,t){var e,n,i,o,a,u;if(n=r.length,t.length!==n)throw new RangeError("invalid argument. The first and second arguments must have the same length.");for(e=Yi(t),i={},u=0;u<n;u++)a=i[o=e(t,u).toString()],ir(a)?a.push(u):i[o]=[u];return i})),C(ls,"groupIndicesBy",(function(r,t,e){var n,i,o,a,u,f;for(i=r.length,n=Yi(r),o={},f=0;f<i;f++)u=o[a=t.call(e,n(r,f),f,r)],ir(u)?u.push(f):o[a]=[f];return o})),C(ls,"groupValues",(function(r,t){var e,n,i,o,a,u,f,l;if(i=r.length,t.length!==i)throw new RangeError("invalid argument. The first and second arguments must have the same length.");for(e=Yi(r),n=Yi(t),o={},l=0;l<i;l++)f=e(r,l),u=o[a=n(t,l).toString()],ir(u)?u.push(f):o[a]=[f];return o})),C(ls,"groupValuesBy",(function(r,t,e){var n,i,o,a,u,f,l;for(i=r.length,n=Yi(r),o={},l=0;l<i;l++)f=n(r,l),u=o[a=t.call(e,f,l,r)],ir(u)?u.push(f):o[a]=[f];return o})),C(ls,"incrspace",cl),C(ls,"indexOf",(function(r,t,e){return function(r,t){return"function"==typeof r[t]}(r,"indexOf")?r.indexOf(t,e):(e<0&&(e+=r.length)<0&&(e=0),hl(r)?function(r,t,e){var n,i;for(n=Yi(r),i=e;i<r.length;i++)if(t===n(r,i))return i;return-1}(r,t,e):function(r,t,e){var n;for(n=e;n<r.length;n++)if(t===r[n])return n;return-1}(r,t,e))})),C(ls,"indexOfSameValue",(function(r,t,e){return e<0&&(e+=r.length)<0&&(e=0),hl(r)?jn(r)?function(r,t,e){var n,i,o,a;if(!he(t))return-1;for(n=Xa(r,0),i=Re(t),o=Be(t),a=2*e;a<n.length;a+=2)if(yn(n[a],i)&&yn(n[a+1],o))return a/2;return-1}(r,t,e):en(r)?function(r,t,e){var n,i,o;if(!qt(t))return-1;for(n=un(r,0),i=t?1:0,o=e;o<n.length;o++)if(n[o]===i)return o;return-1}(r,t,e):function(r,t,e){var n,i;for(n=Yi(r),i=e;i<r.length;i++)if(yn(t,n(r,i)))return i;return-1}(r,t,e):function(r,t,e){var n;for(n=e;n<r.length;n++)if(yn(t,r[n]))return n;return-1}(r,t,e)})),C(ls,"indicesComplement",(function(r,t){var e,n,i;for(e={},i=0;i<t.length;i++)e[t[i]]=!0;for(n=[],i=0;i<r;i++)void 0===e[i]&&n.push(i);return n})),C(ls,"join",(function(r,t){var e;return function(r,t){return"function"==typeof r[t]}(r,"join")?r.join(t):(e=nn(r)).accessorProtocol?function(r,t){var e,n,i,o,a,u;for(e=r.data,i=r.accessors[0],o=e.length-1,n="",u=0;u<=o;u++)pl(a=i(e,u))||(n+=String(a)),u<o&&(n+=t);return n}(e,t):function(r,t){var e,n,i,o;for(n=r.length-1,e="",o=0;o<=n;o++)pl(i=r[o])||(e+=String(i)),o<n&&(e+=t);return e}(r,t)})),C(ls,"last",(function(r){var t,e;if(t=Yi(r),!((e=r.length-1)<0))return t(r,e)})),C(ls,"lastIndexOf",(function(r,t,e){if(function(r,t){return"function"==typeof r[t]}(r,"lastIndexOf"))return r.lastIndexOf(t,e);if(e<0){if((e+=r.length)<0)return-1}else e>r.length&&(e=r.length-1);return hl(r)?function(r,t,e){var n,i;for(n=Yi(r),i=e;i>=0;i--)if(t===n(r,i))return i;return-1}(r,t,e):function(r,t,e){var n;for(n=e;n>=0;n--)if(t===r[n])return n;return-1}(r,t,e)})),C(ls,"lastIndexOfSameValue",(function(r,t,e){if(e<0){if((e+=r.length)<0)return-1}else e>r.length&&(e=r.length-1);return hl(r)?jn(r)?function(r,t,e){var n,i,o,a;if(!he(t))return-1;for(n=Xa(r,0),i=Re(t),o=Be(t),a=2*e;a>=0;a-=2)if(yn(n[a],i)&&yn(n[a+1],o))return a/2;return-1}(r,t,e):en(r)?function(r,t,e){var n,i,o;if(!qt(t))return-1;for(n=un(r,0),i=t?1:0,o=e;o>=0;o--)if(n[o]===i)return o;return-1}(r,t,e):function(r,t,e){var n,i;for(n=Yi(r),i=e;i>=0;i--)if(yn(t,n(r,i)))return i;return-1}(r,t,e):function(r,t,e){var n;for(n=e;n>=0;n--)if(yn(t,r[n]))return n;return-1}(r,t,e)})),C(ls,"linspace",(function(r,t,e){var n,i,o,a;if(0===e)return[];for(o=(t-r)/(i=e-1),n=[r],a=1;a<i;a++)n.push(r+o*a);return n.push(t),n})),C(ls,"linspace2d",(function(r,t,e,n){var i,o,a,u,f,l,s,c,h,p,g;if(0==(g=(l=e[1])*(c=e[0])))return[];for(p=(t-r)/(g-1),n?o=1-l*(i=c):(i=1,o=0),a=[],f=0,h=0;h<c;h++){for(u=[],s=0;s<l;s++)u.push(r+f*p),f+=i;a.push(u),f+=o}return a})),C(ls,"logspace",gl),C(ls,"map2d",yl),C(ls,"map3d",ml),C(ls,"map4d",dl),C(ls,"map5d",vl),C(ls,"minSignedIntegerDataType",wl),C(ls,"minUnsignedIntegerDataType",(function(r){return r<=Qr?"uint8":r<=Pr?"uint16":r<=xr?"uint32":"float64"})),C(ls,"mskbinary2d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g;if(n=t[1],i=t[0],!(n<=0||i<=0))for(c=r[0],h=r[1],p=r[3],g=r[2],a=0;a<i;a++)for(u=c[a],f=h[a],l=p[a],s=g[a],o=0;o<n;o++)0===s[o]&&(l[o]=e(u[o],f[o]))})),C(ls,"mskbinary3d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b;if(n=t[2],i=t[1],o=t[0],!(n<=0||i<=0||o<=0))for(d=r[0],v=r[1],w=r[3],b=r[2],f=0;f<o;f++)for(p=d[f],g=v[f],y=w[f],m=b[f],u=0;u<i;u++)for(l=p[u],s=g[u],c=y[u],h=m[u],a=0;a<n;a++)0===h[a]&&(c[a]=e(l[a],s[a]))})),C(ls,"mskbinary4d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_,T,x,V,A;if(n=t[3],i=t[2],o=t[1],a=t[0],!(n<=0||i<=0||o<=0||a<=0))for(T=r[0],x=r[1],A=r[2],V=r[3],s=0;s<a;s++)for(p=T[s],m=x[s],w=V[s],_=A[s],l=0;l<o;l++)for(h=p[l],y=m[l],v=w[l],E=_[l],f=0;f<i;f++)for(c=h[f],g=y[f],d=v[f],b=E[f],u=0;u<n;u++)0===b[u]&&(d[u]=e(c[u],g[u]))})),C(ls,"mskbinary5d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_,T,x,V,A,S,F,j,k,L,I;if(n=t[4],i=t[3],o=t[2],a=t[1],u=t[0],!(n<=0||i<=0||o<=0||a<=0||u<=0))for(j=r[0],k=r[1],I=r[2],L=r[3],h=0;h<u;h++)for(m=j[h],b=k[h],x=L[h],F=I[h],c=0;c<a;c++)for(y=m[c],w=b[c],T=x[c],S=F[c],s=0;s<o;s++)for(g=y[s],v=w[s],_=T[s],A=S[s],l=0;l<i;l++)for(p=g[l],d=v[l],E=_[l],V=A[l],f=0;f<n;f++)0===V[f]&&(E[f]=e(p[f],d[f]))})),C(ls,"mskfilter",bl),C(ls,"mskfilterMap",El),C(ls,"mskfilter2",(function(r,t,e){var n,i,o,a,u,f;for(n=Yi(r),i=Yi(t),o=Yi(e),a=[],u=[],f=0;f<r.length;f++)o(e,f)&&(a.push(n(r,f)),u.push(i(t,f)));return[a,u]})),C(ls,"mskfiltern",(function(){var r,t,e,n,i,o,a,u;for(e=arguments.length,n=Yi(i=arguments[e-=1]),r=[],t=[],o=[],a=0;a<e;a++)t.push(arguments[a]),r.push(Yi(t[a])),o.push([]);for(a=0;a<i.length;a++)if(n(i,a))for(u=0;u<e;u++)o[u].push(r[u](t[u],a));return o})),C(ls,"mskput",_l),C(ls,"mskreject",Tl),C(ls,"mskunary2d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h;if(n=t[1],i=t[0],!(n<=0||i<=0))for(s=r[0],c=r[2],h=r[1],a=0;a<i;a++)for(u=s[a],f=c[a],l=h[a],o=0;o<n;o++)0===l[o]&&(f[o]=e(u[o]))})),C(ls,"mskunary3d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d;if(n=t[2],i=t[1],o=t[0],!(n<=0||i<=0||o<=0))for(y=r[0],m=r[2],d=r[1],f=0;f<o;f++)for(s=y[f],h=m[f],g=d[f],u=0;u<i;u++)for(l=s[u],c=h[u],p=g[u],a=0;a<n;a++)0===p[a]&&(c[a]=e(l[a]))})),C(ls,"mskunary4d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_;if(n=t[3],i=t[2],o=t[1],a=t[0],!(n<=0||i<=0||o<=0||a<=0))for(b=r[0],E=r[2],_=r[1],s=0;s<a;s++)for(p=b[s],m=E[s],w=_[s],l=0;l<o;l++)for(h=p[l],y=m[l],v=w[l],f=0;f<i;f++)for(c=h[f],g=y[f],d=v[f],u=0;u<n;u++)0===d[u]&&(g[u]=e(c[u]))})),C(ls,"mskunary5d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_,T,x,V,A,S;if(n=t[4],i=t[3],o=t[2],a=t[1],u=t[0],!(n<=0||i<=0||o<=0||a<=0||u<=0))for(V=r[0],A=r[2],S=r[1],h=0;h<u;h++)for(m=V[h],b=A[h],x=S[h],c=0;c<a;c++)for(y=m[c],w=b[c],T=x[c],s=0;s<o;s++)for(g=y[s],v=w[s],_=T[s],l=0;l<i;l++)for(p=g[l],d=v[l],E=_[l],f=0;f<n;f++)0===E[f]&&(d[f]=e(p[f]))})),C(ls,"nCartesianProduct",(function(r,t){var e,n,i,o,a,u,f,l,s,c,h,p;for(e=arguments.length,i=[r,t],f=[0,0],l=(n=[r.length,t.length])[0]*n[1],c=2;c<e;c++)u=arguments[c],i.push(u),n.push(u.length),f.push(0),l*=n[c];for(o=[],c=0;c<l;c++){for(p=c,h=e-1;h>=0;h--)p-=s=p%n[h],p/=n[h],f[h]=s;for(a=[],h=0;h<e;h++)a.push(i[h][f[h]]);o.push(a)}return o})),C(ls,"none",(function(r){var t=nn(r);return t.accessorProtocol?de(r)?xl(Ae(r,0)):ye(r)?xl(Te(r,0)):en(r)?xl(un(r,0)):function(r){var t,e,n;for(t=r.data,e=r.accessors[0],n=0;n<t.length;n++)if(e(t,n))return!1;return!0}(t):xl(r)})),C(ls,"noneBy",(function(r,t,e){var n=nn(r);return n.accessorProtocol?function(r,t,e){var n,i,o;for(n=r.data,i=r.accessors[0],o=0;o<n.length;o++)if(t.call(e,i(n,o),o,n))return!1;return!0}(n,t,e):function(r,t,e){var n;for(n=0;n<r.length;n++)if(t.call(e,r[n],n,r))return!1;return!0}(r,t,e)})),C(ls,"noneByRight",(function(r,t,e){var n=nn(r);return n.accessorProtocol?function(r,t,e){var n,i,o;for(n=r.data,i=r.accessors[0],o=n.length-1;o>=0;o--)if(t.call(e,i(n,o),o,n))return!1;return!0}(n,t,e):function(r,t,e){var n;for(n=r.length-1;n>=0;n--)if(t.call(e,r[n],n,r))return!1;return!0}(r,t,e)})),C(ls,"nulls",(function(r){return qi(null,r)})),C(ls,"oneTo",Vl),C(ls,"ones",(function(r){return qi(1,r)})),C(ls,"ones2d",(function(r){return Gi(1,r)})),C(ls,"ones3d",(function(r){return jf(1,r)})),C(ls,"ones4d",(function(r){return kf(1,r)})),C(ls,"ones5d",(function(r){return Lf(1,r)})),C(ls,"onesnd",(function(r){return Of(1,r)})),C(ls,"place",Sl),C(ls,"put",Pl),C(ls,"quaternary2d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m;if(n=t[1],i=t[0],!(n<=0||i<=0))for(h=r[0],p=r[1],g=r[2],y=r[3],m=r[4],a=0;a<i;a++)for(u=h[a],f=p[a],l=g[a],s=y[a],c=m[a],o=0;o<n;o++)c[o]=e(u[o],f[o],l[o],s[o])})),C(ls,"quaternary3d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_,T;if(n=t[2],i=t[1],o=t[0],!(n<=0||i<=0||o<=0))for(w=r[0],b=r[1],E=r[2],_=r[3],T=r[4],f=0;f<o;f++)for(g=w[f],y=b[f],m=E[f],d=_[f],v=T[f],u=0;u<i;u++)for(l=g[u],s=y[u],c=m[u],h=d[u],p=v[u],a=0;a<n;a++)p[a]=e(l[a],s[a],c[a],h[a])})),C(ls,"quaternary4d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_,T,x,V,A,S,F,j,k;if(n=t[3],i=t[2],o=t[1],a=t[0],!(n<=0||i<=0||o<=0||a<=0))for(A=r[0],S=r[1],F=r[2],j=r[3],k=r[4],s=0;s<a;s++)for(E=A[s],_=S[s],T=F[s],x=j[s],V=k[s],l=0;l<o;l++)for(m=E[l],d=_[l],v=T[l],w=x[l],b=V[l],f=0;f<i;f++)for(c=m[f],h=d[f],p=v[f],g=w[f],y=b[f],u=0;u<n;u++)y[u]=e(c[u],h[u],p[u],g[u])})),C(ls,"quaternary5d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_,T,x,V,A,S,F,j,k,L,I,O,R,B,M,P;if(n=t[4],i=t[3],o=t[2],a=t[1],u=t[0],!(n<=0||i<=0||o<=0||a<=0||u<=0))for(O=r[0],R=r[1],B=r[2],M=r[3],P=r[4],h=0;h<u;h++)for(F=O[h],j=R[h],k=B[h],L=M[h],I=P[h],c=0;c<a;c++)for(T=F[c],x=j[c],V=k[c],A=L[c],S=I[c],s=0;s<o;s++)for(v=T[s],w=x[s],b=V[s],E=A[s],_=S[s],l=0;l<i;l++)for(p=v[l],g=w[l],y=b[l],m=E[l],d=_[l],f=0;f<n;f++)d[f]=e(p[f],g[f],y[f],m[f])})),C(ls,"quinary2d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d,v;if(n=t[1],i=t[0],!(n<=0||i<=0))for(p=r[0],g=r[1],y=r[2],m=r[3],d=r[4],v=r[5],a=0;a<i;a++)for(u=p[a],f=g[a],l=y[a],s=m[a],c=d[a],h=v[a],o=0;o<n;o++)h[o]=e(u[o],f[o],l[o],s[o],c[o])})),C(ls,"quinary3d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_,T,x,V,A;if(n=t[2],i=t[1],o=t[0],!(n<=0||i<=0||o<=0))for(E=r[0],_=r[1],T=r[2],x=r[3],V=r[4],A=r[5],f=0;f<o;f++)for(y=E[f],m=_[f],d=T[f],v=x[f],w=V[f],b=A[f],u=0;u<i;u++)for(l=y[u],s=m[u],c=d[u],h=v[u],p=w[u],g=b[u],a=0;a<n;a++)g[a]=e(l[a],s[a],c[a],h[a],p[a])})),C(ls,"quinary4d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_,T,x,V,A,S,F,j,k,L,I,O,R;if(n=t[3],i=t[2],o=t[1],a=t[0],!(n<=0||i<=0||o<=0||a<=0))for(j=r[0],k=r[1],L=r[2],I=r[3],O=r[4],R=r[5],s=0;s<a;s++)for(T=j[s],x=k[s],V=L[s],A=I[s],S=O[s],F=R[s],l=0;l<o;l++)for(d=T[l],v=x[l],w=V[l],b=A[l],E=S[l],_=F[l],f=0;f<i;f++)for(c=d[f],h=v[f],p=w[f],g=b[f],y=E[f],m=_[f],u=0;u<n;u++)m[u]=e(c[u],h[u],p[u],g[u],y[u])})),C(ls,"quinary5d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_,T,x,V,A,S,F,j,k,L,I,O,R,B,M,P,C,N,U,D,Y;if(n=t[4],i=t[3],o=t[2],a=t[1],u=t[0],!(n<=0||i<=0||o<=0||a<=0||u<=0))for(P=r[0],C=r[1],N=r[2],U=r[3],D=r[4],Y=r[5],h=0;h<u;h++)for(L=P[h],I=C[h],O=N[h],R=U[h],B=D[h],M=Y[h],c=0;c<a;c++)for(V=L[c],A=I[c],S=O[c],F=R[c],j=B[c],k=M[c],s=0;s<o;s++)for(w=V[s],b=A[s],E=S[s],_=F[s],T=j[s],x=k[s],l=0;l<i;l++)for(p=w[l],g=b[l],y=E[l],m=_[l],d=T[l],v=x[l],f=0;f<n;f++)v[f]=e(p[f],g[f],y[f],m[f],d[f])})),C(ls,"reject",(function(r,t,e){var n=nn(r);return n.accessorProtocol?function(r,t,e){var n,i,o,a,u;for(n=r.data,i=r.accessors[0],o=[],u=0;u<n.length;u++)a=i(n,u),t.call(e,a,u,n)||o.push(a);return o}(n,t,e):function(r,t,e){var n,i,o;for(n=[],o=0;o<r.length;o++)i=r[o],t.call(e,i,o,r)||n.push(i);return n}(r,t,e)})),C(ls,"removeAt",(function(r,t){var e,n,i;if(e=r.length,t<0){if((t+=e)<0)return r}else if(t>=e)return r;for(i=t,n=t+1;n<e;n++)r[i]=r[n],i+=1;return r.length=i,r})),C(ls,"reshape",(function(r,t,e,n){return Ul(Gf(r,t,n),e.length,e,0,0)})),C(ls,"resolveGetter",Yi),C(ls,"resolveSetter",Dl),C(ls,"reverse",(function(r){var t;return function(r,t){return"function"==typeof r[t]}(r,"reverse")?r.reverse():(t=nn(r)).accessorProtocol?function(r){var t,e,n,i,o,a,u,f;for(t=r.data,e=r.accessors[0],n=r.accessors[1],o=bt(t.length/2),a=t.length-1,u=0;u<o;u++)f=a-u,i=e(t,u),n(t,u,e(t,f)),n(t,f,i);return t}(t):function(r){var t,e,n,i,o;for(e=bt(r.length/2),n=r.length-1,i=0;i<e;i++)o=n-i,t=r[i],r[i]=r[o],r[o]=t;return r}(r)})),C(ls,"scatterFilled",(function(r,t,e,n,i){return Pl(qi(r,t),e,n,i)})),C(ls,"scattered",(function(r,t,e,n){return Pl(Xi(r),t,e,n)})),C(ls,"setter",q),C(ls,"slice",Nl),C(ls,"strided2array2d",(function(r,t,e,n){var i,o,a,u,f,l,s,c,h,p;for(i=Yi(r),s=t[0],l=t[1],f=e[0],u=e[1],o=[],h=0;h<s;h++){for(a=[],p=n+f*h,c=0;c<l;c++)a.push(i(r,p)),p+=u;o.push(a)}return o})),C(ls,"strided2array3d",(function(r,t,e,n){var i,o,a,u,f,l,s,c,h,p,g,y,m,d,v;for(i=Yi(r),p=t[0],h=t[1],c=t[2],f=e[0],u=e[1],a=e[2],o=[],m=0;m<p;m++){for(d=[],l=n+f*m,y=0;y<h;y++){for(v=[],s=l+u*y,g=0;g<c;g++)v.push(i(r,s)),s+=a;d.push(v)}o.push(d)}return o})),C(ls,"strided2array4d",(function(r,t,e,n){var i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_,T;for(i=Yi(r),m=t[0],y=t[1],g=t[2],p=t[3],l=e[0],f=e[1],u=e[2],a=e[3],o=[],b=0;b<m;b++){for(E=[],s=n+l*b,w=0;w<y;w++){for(_=[],c=s+f*w,v=0;v<g;v++){for(T=[],h=c+u*v,d=0;d<p;d++)T.push(i(r,h)),h+=a;_.push(T)}E.push(_)}o.push(E)}return o})),C(ls,"strided2array5d",(function(r,t,e,n){var i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_,T,x,V,A,S,F;for(i=Yi(r),w=t[0],v=t[1],d=t[2],m=t[3],y=t[4],s=e[0],l=e[1],f=e[2],u=e[3],a=e[4],o=[],x=0;x<w;x++){for(V=[],c=n+s*x,T=0;T<v;T++){for(A=[],h=c+l*T,_=0;_<d;_++){for(S=[],p=h+f*_,E=0;E<m;E++){for(F=[],g=p+u*E,b=0;b<y;b++)F.push(i(r,g)),g+=a;S.push(F)}A.push(S)}V.push(A)}o.push(V)}return o})),C(ls,"symmetric",Yl),C(ls,"symmetricBanded",Wl),C(ls,"take",zl),C(ls,"takeIndexed",(function(r,t){var e,n;for(e=[],n=0;n<t.length;n++)e.push(r[t[n]]);return e})),C(ls,"takeIndexed2",(function(r,t,e){var n,i,o;for(n=[],i=[],o=0;o<e.length;o++)n.push(r[e[o]]),i.push(t[e[o]]);return[n,i]})),C(ls,"take2d",Gl),C(ls,"take3d",(function(r,t,e,n){var i,o,a,u,f,l;if(-1===(a=kl(e,2)))throw new RangeError(j("invalid argument. Third argument exceeds the number of dimensions. Number of dimensions: %d. Value: `%d`.",3,e));if(o=[],0===a){for(u=Ml(n),i=r.length-1,l=0;l<t.length;l++)f=u(t[l],i),o.push(r[f]);return o}for(a=e-1,l=0;l<r.length;l++)o.push(Gl(r[l],t,a,n));return o})),C(ls,"ternary2d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g;if(n=t[1],i=t[0],!(n<=0||i<=0))for(c=r[0],h=r[1],p=r[2],g=r[3],a=0;a<i;a++)for(u=c[a],f=h[a],l=p[a],s=g[a],o=0;o<n;o++)s[o]=e(u[o],f[o],l[o])})),C(ls,"ternary3d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b;if(n=t[2],i=t[1],o=t[0],!(n<=0||i<=0||o<=0))for(d=r[0],v=r[1],w=r[2],b=r[3],f=0;f<o;f++)for(p=d[f],g=v[f],y=w[f],m=b[f],u=0;u<i;u++)for(l=p[u],s=g[u],c=y[u],h=m[u],a=0;a<n;a++)h[a]=e(l[a],s[a],c[a])})),C(ls,"ternary4d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_,T,x,V,A;if(n=t[3],i=t[2],o=t[1],a=t[0],!(n<=0||i<=0||o<=0||a<=0))for(T=r[0],x=r[1],V=r[2],A=r[3],s=0;s<a;s++)for(w=T[s],b=x[s],E=V[s],_=A[s],l=0;l<o;l++)for(y=w[l],m=b[l],d=E[l],v=_[l],f=0;f<i;f++)for(c=y[f],h=m[f],p=d[f],g=v[f],u=0;u<n;u++)g[u]=e(c[u],h[u],p[u])})),C(ls,"ternary5d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_,T,x,V,A,S,F,j,k,L,I;if(n=t[4],i=t[3],o=t[2],a=t[1],u=t[0],!(n<=0||i<=0||o<=0||a<=0))for(j=r[0],k=r[1],L=r[2],I=r[3],h=0;h<u;h++)for(V=j[h],A=k[h],S=L[h],F=I[h],c=0;c<a;c++)for(E=V[c],_=A[c],T=S[c],x=F[c],s=0;s<o;s++)for(d=E[s],v=_[s],w=T[s],b=x[s],l=0;l<i;l++)for(p=d[l],g=v[l],y=w[l],m=b[l],f=0;f<n;f++)m[f]=e(p[f],g[f],y[f])})),C(ls,"toAccessorArray",(function(r){return r&&"object"==typeof r&&D(r)?r:new rn(r)})),C(ls,"toDeduped",(function(r,t,e){return e?function(r,t){var e,n,i,o,a,u,f;if(o=[],0===(i=r.length))return o;for(a=!1,n=NaN,e=0,f=0;f<i;f++)(u=r[f])===n||a&&Cn(u)?(e+=1)<=t&&o.push(n):(n=u,e=1,o.push(n),a=!1,Cn(n)&&(a=!0));return o}(r,t):function(r,t){var e,n,i,o,a,u;if(o=[],0===(i=r.length))return o;for(n=NaN,e=0,u=0;u<i;u++)(a=r[u])===n?(e+=1)<=t&&o.push(n):(n=a,e=1,o.push(n));return o}(r,t)})),C(ls,"toReversed",(function(r){var t;return function(r,t){return"function"==typeof r[t]}(r,"toReversed")?r.toReversed():(t=nn(r)).accessorProtocol?function(r){var t,e,n,i;for(t=r.data,e=r.accessors[0],n=[],i=t.length-1;i>=0;i--)n.push(e(t,i));return n}(t):function(r){var t,e;for(t=[],e=r.length-1;e>=0;e--)t.push(r[e]);return t}(r)})),C(ls,"unary2d",(function(r,t,e){var n,i,o,a,u,f,l,s;if(n=t[1],i=t[0],!(n<=0||i<=0))for(l=r[0],s=r[1],a=0;a<i;a++)for(u=l[a],f=s[a],o=0;o<n;o++)f[o]=e(u[o])})),C(ls,"unary2dBy",(function(r,t,e,n){var i,o,a,u,f,l,s,c,h,p;if(o=t[1],a=t[0],!(o<=0||a<=0))for(arguments.length>4&&(i=arguments[4]),c=r[0],h=r[1],f=0;f<a;f++)for(l=c[f],s=h[f],u=0;u<o;u++)void 0!==(p=n.call(i,l[u],[f,u],[c,h]))&&(s[u]=e(p))})),C(ls,"unary3d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g;if(n=t[2],i=t[1],o=t[0],!(n<=0||i<=0||o<=0))for(p=r[0],g=r[1],f=0;f<o;f++)for(s=p[f],h=g[f],u=0;u<i;u++)for(l=s[u],c=h[u],a=0;a<n;a++)c[a]=e(l[a])})),C(ls,"unary3dBy",(function(r,t,e,n){var i,o,a,u,f,l,s,c,h,p,g,y,m,d;if(o=t[2],a=t[1],u=t[0],!(o<=0||a<=0||u<=0))for(arguments.length>4&&(i=arguments[4]),y=r[0],m=r[1],s=0;s<u;s++)for(h=y[s],g=m[s],l=0;l<a;l++)for(c=h[l],p=g[l],f=0;f<o;f++)void 0!==(d=n.call(i,c[f],[s,l,f],[y,m]))&&(p[f]=e(d))})),C(ls,"unary4d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d,v;if(n=t[3],i=t[2],o=t[1],a=t[0],!(n<=0||i<=0||o<=0||a<=0))for(d=r[0],v=r[1],s=0;s<a;s++)for(p=d[s],m=v[s],l=0;l<o;l++)for(h=p[l],y=m[l],f=0;f<i;f++)for(c=h[f],g=y[f],u=0;u<n;u++)g[u]=e(c[u])})),C(ls,"unary4dBy",(function(r,t,e,n){var i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b,E;if(o=t[3],a=t[2],u=t[1],f=t[0],!(o<=0||a<=0||u<=0||f<=0))for(arguments.length>4&&(i=arguments[4]),w=r[0],b=r[1],h=0;h<f;h++)for(y=w[h],v=b[h],c=0;c<u;c++)for(g=y[c],d=v[c],s=0;s<a;s++)for(p=g[s],m=d[s],l=0;l<o;l++)void 0!==(E=n.call(i,p[l],[h,c,s,l],[w,b]))&&(m[l]=e(E))})),C(ls,"unary5d",(function(r,t,e){var n,i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_;if(n=t[4],i=t[3],o=t[2],a=t[1],u=t[0],!(n<=0||i<=0||o<=0||a<=0||u<=0))for(E=r[0],_=r[1],h=0;h<u;h++)for(m=E[h],b=_[h],c=0;c<a;c++)for(y=m[c],w=b[c],s=0;s<o;s++)for(g=y[s],v=w[s],l=0;l<i;l++)for(p=g[l],d=v[l],f=0;f<n;f++)d[f]=e(p[f])})),C(ls,"unary5dBy",(function(r,t,e,n){var i,o,a,u,f,l,s,c,h,p,g,y,m,d,v,w,b,E,_,T,x,V;if(o=t[4],a=t[3],u=t[2],f=t[1],l=t[0],!(o<=0||a<=0||u<=0||f<=0||l<=0))for(arguments.length>4&&(i=arguments[4]),T=r[0],x=r[1],g=0;g<l;g++)for(v=T[g],_=x[g],p=0;p<f;p++)for(d=v[p],E=_[p],h=0;h<u;h++)for(m=d[h],b=E[h],c=0;c<a;c++)for(y=m[c],w=b[c],s=0;s<o;s++)void 0!==(V=n.call(i,y[s],[g,p,h,c,s],[T,x]))&&(w[s]=e(V))})),C(ls,"unarynd",(function(r,t,e){return $l(r[0],r[1],t.length,t,0,e)})),C(ls,"unitspace",(function(r,t){var e,n,i;if((n=t-r)<=1)return[r];for(e=[r],i=1;i<n;i++)e.push(r+i);return e})),C(ls,"where",Ql),C(ls,"arrayWith",Kl),C(ls,"without",fs),C(ls,"zeroTo",ru),C(ls,"zeros",Xi),C(ls,"zeros2d",$i),C(ls,"zeros3d",(function(r){return jf(0,r)})),C(ls,"zeros4d",(function(r){return kf(0,r)})),C(ls,"zeros5d",(function(r){return Lf(0,r)})),C(ls,"zerosnd",(function(r){return Of(0,r)}));var ss="function"==typeof ArrayBuffer?ArrayBuffer:null;function cs(){var r,t,e;if("function"!=typeof ss)return!1;try{(r=Rt(e=new ss(16))&&"function"==typeof ss.isView)&&((t=new Ve(e))[0]=-3.14,t[1]=NaN,r=r&&ss.isView(t)&&16===e.byteLength&&-3.14===t[0]&&t[1]!=t[1])}catch(t){r=!1}return r}var hs,ps="function"==typeof ArrayBuffer?ArrayBuffer:void 0,gs=cs()?ps:function(){throw new Error("not implemented")},ys="function"==typeof DataView,ms="function"==typeof ArrayBuffer?ArrayBuffer:void 0,ds=cs()?ms:function(){throw new Error("not implemented")},vs="function"==typeof DataView?DataView:null,ws="function"==typeof DataView?DataView:void 0;hs=function(){var r,t,e,n;if("function"!=typeof vs)return!1;try{e=new ds(24),t=new vs(e,8),n=t,(r=(ys&&n instanceof DataView||"[object DataView]"===nr(n))&&"function"==typeof t.getFloat64&&"function"==typeof t.setFloat64)&&(t.setFloat64(0,-3.14),t.setFloat64(8,NaN),r=r&&t.buffer===e&&16===t.byteLength&&8===t.byteOffset&&-3.14===t.getFloat64(0)&&t.getFloat64(8)!=t.getFloat64(8))}catch(t){r=!1}return r}()?ws:function(){throw new Error("not implemented")};var bs=hs,Es=Math.round,_s=/^\d{10}$|^\d{13}$/,Ts=["floor","ceil","round"];function xs(r,t){var e;if("string"==(e=typeof r)){if((r=Date.parse(r))!=r)throw new Error(j("invalid argument. Unable to parse %s date.",t.toLowerCase()));r=new Date(r)}if("number"===e){if(!_s.test(r))throw new Error(j("invalid argument. Numeric %s date must be either a Unix or JavaScript timestamp.",t.toLowerCase()));10===r.toString().length&&(r*=1e3),r=new Date(r)}if(!(r instanceof Date))throw new TypeError(j("invalid argument. %s date must either be a date string, Date object, Unix timestamp, or JavaScript timestamp.",t));return r}function Vs(r){return arguments.length>1?os(r,arguments[1]):os(r)}var As=8;function Ss(r,t,e,n,i){var o,a,u,f;if(r<=0)return e;if((u=gf(e)).accessorProtocol)return function(r,t,e,n,i){var o,a,u,f;for(o=e.data,a=e.accessors[1],u=i,f=0;f<r;f++)a(o,u,t),u+=n}(r,t,u,n,i),u.data;if(o=i,1===n){if((a=r%As)>0)for(f=0;f<a;f++)e[o]=t,o+=n;if(r<As)return e;for(f=a;f<r;f+=As)e[o]=t,e[o+1]=t,e[o+2]=t,e[o+3]=t,e[o+4]=t,e[o+5]=t,e[o+6]=t,e[o+7]=t,o+=As;return e}for(f=0;f<r;f++)e[o]=t,o+=n;return e}function Fs(r,t,e,n){return Ss(r,t,e,n,Cf(r,n))}function js(r){var t=typeof r;return null!==r&&("object"===t||"function"===t)&&ie(r.next)}function ks(r){var t;if(!js(r))throw new TypeError(j("invalid argument. Must provide an iterator. Value: `%s`.",r));for(t=0;;){if(r.next().done)return t;t+=1}}N(Fs,"ndarray",Ss);var Ls=ve(),Is=ts.get("dtypes.default");function Os(r,t,e,n,i,o){var a,u,f;if(r<=0)return t;if((u=gf(t)).accessorProtocol)return function(r,t,e,n,i,o){var a,u,f,l,s;for(a=t.data,f=t.accessors[0],u=t.accessors[1],l=n,s=0;s<r;s++)u(a,l,i.call(o,f(a,l),s,l,t)),l+=e}(r,u,e,n,i,o),u.data;for(a=n,f=0;f<r;f++)t[a]=i.call(o,t[a],f,a,t),a+=e;return t}function Rs(r,t,e,n,i){return Os(r,t,e,Cf(r,e),n,i)}N(Rs,"ndarray",Os);var Bs=ve(),Ms=ts.get("dtypes.default"),Ps=Object.prototype.isPrototypeOf,Cs={binary:1,bool:1,complex64:8,complex128:16,float16:2,bfloat16:2,float32:4,float64:8,float128:16,generic:null,int8:1,int16:2,int32:4,int64:8,int128:16,int256:32,uint8:1,uint8c:1,uint16:2,uint32:4,uint64:8,uint128:16,uint256:32};function Ns(r){return Cs[r]||null}function Us(r){return""===r?"":r.charAt(0).toUpperCase()+r.slice(1)}function Ds(r){var t,e;for(t=[];!(e=r.next()).done;)t.push(e.value);return t}var Ys=ve(),Ws="little-endian",zs="big-endian",qs={float64:"setFloat64",float32:"setFloat32",int32:"setInt32",int16:"setInt16",uint32:"setUint32",uint16:"setUint16"},Gs={float64:"getFloat64",float32:"getFloat32",int32:"getInt32",int16:"getInt16",uint32:"getUint32",uint16:"getUint16"},$s={c:"a",f:"a",i:"an",u:"a",b:"a"},Hs=sn(["float64","float32","int32","int16","uint32","uint16"]);function Js(r){return Mt(r)?r.toLowerCase():null}function Qs(r){return r===Ws}function Xs(r){return r?Ws:zs}function Zs(r){var t,e,n,i;if(!Hs(r))throw new TypeError(j("invalid argument. First argument must be a supported data type. Value: `%s`.",r));function o(){var r,e,n,i,a,u,l,s;if(n=arguments.length,!(this instanceof o))return n<2?new o(arguments[0]):2===n?new o(arguments[0],arguments[1]):3===n?new o(arguments[0],arguments[1],arguments[2]):new o(arguments[0],arguments[1],arguments[2],arguments[3]);if(null===(e=Js(arguments[0]))||!Vn(e))throw new TypeError(j("invalid argument. First argument must be a supported byte order. Value: `%s`.",arguments[0]));if(i=Qs(e),0==(n-=1))a=new bs(new gs(0));else if(1===n)if(At(l=arguments[n]))a=new bs(new gs(l*t));else if(It(l))a=f(new bs(new gs(l.length*t)),l,i);else if(Rt(l))a=new bs(l);else{if(!Bt(l))throw new TypeError(j("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",l));if(!1===Ys)throw new TypeError(j("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.",l));if(!ie(l[we]))throw new TypeError(j("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",l));if(!ie((a=l[we]()).next))throw new TypeError(j("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",l));s=Ds(a),a=f(new bs(new gs(s.length*t)),s,i)}else{if(!Rt(a=arguments[1]))throw new TypeError(j("invalid argument. Must provide an ArrayBuffer. Value: `%s`.",a));if(!At(r=arguments[2]))throw new TypeError(j("invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.",r));if(2===n)a=new bs(a,r);else{if(!At(u=arguments[3]))throw new TypeError(j("invalid argument. Length must be a nonnegative integer. Value: `%s`.",u));if((u*=t)>a.byteLength-r)throw new RangeError(j("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",u));a=new bs(a,r,u)}}return N(this,"_buffer",a),N(this,"_length",a.byteLength/t),N(this,"_isLE",i),this}return t=Ns(r),e=function(r){return Us(r)+"ArrayFE"}(r),n=Gs[r],i=qs[r],N(o,"BYTES_PER_ELEMENT",t),N(o,"name",e),N(o,"from",(function(n,o){var u,f,l,s,c,h,p,g,y,m,d;if(!ie(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!a(this))throw new TypeError(j("invalid invocation. `this` is not %s %s.",$s[r[0]],e));if(null===(f=Js(n))||!Vn(f))throw new TypeError(j("invalid argument. First argument must be a supported byte order. Value: `%s`.",n));if(c=Qs(f),(l=arguments.length)>2){if(!ie(s=arguments[2]))throw new TypeError(j("invalid argument. Third argument must be a function. Value: `%s`.",s));l>3&&(u=arguments[3])}if(It(o)){if(s){for(m=o.length,y=o.get&&o.set?$("default"):W("default"),p=(h=new this(f,m))._buffer,d=0;d<m;d++)p[i](d*t,s.call(u,y(o,d),d),c);return h}return new this(f,o)}if(Bt(o)&&Ys&&ie(o[we])){if(!ie((p=o[we]()).next))throw new TypeError(j("invalid argument. Second argument must be an array-like object or an iterable. Value: `%s`.",o));for(g=s?function(r,t,e){var n,i,o;for(n=[],o=-1;!(i=r.next()).done;)o+=1,n.push(t.call(e,i.value,o));return n}(p,s,u):Ds(p),p=(h=new this(f,m=g.length))._buffer,d=0;d<m;d++)p[i](d*t,g[d],c);return h}throw new TypeError(j("invalid argument. Second argument must be an array-like object or an iterable. Value: `%s`.",o))})),N(o,"of",(function(t){var n,i,o;if(!ie(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!a(this))throw new TypeError(j("invalid invocation. `this` is not %s %s.",$s[r[0]],e));if(null===(n=Js(t))||!Vn(n))throw new TypeError(j("invalid argument. First argument must be a supported byte order. Value: `%s`.",t));for(i=[],o=1;o<arguments.length;o++)i.push(arguments[o]);return new this(n,i)})),N(o.prototype,"at",(function(i){var o;if(!u(this))throw new TypeError(j("invalid invocation. `this` is not %s %s.",$s[r[0]],e));if(!Tt(i))throw new TypeError(j("invalid argument. Must provide an integer. Value: `%s`.",i));if(o=this._length,i<0&&(i+=o),!(i<0||i>=o))return this._buffer[n](i*t,this._isLE)})),be(o.prototype,"buffer",(function(){return this._buffer.buffer})),be(o.prototype,"byteLength",(function(){return this._buffer.byteLength})),be(o.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),N(o.prototype,"BYTES_PER_ELEMENT",o.BYTES_PER_ELEMENT),N(o.prototype,"every",(function(i,o){var a,f;if(!u(this))throw new TypeError(j("invalid invocation. `this` is not %s %s.",$s[r[0]],e));if(!ie(i))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",i));for(a=this._buffer,f=0;f<this._length;f++)if(!i.call(o,a[n](f*t,this._isLE),f,this))return!1;return!0})),N(o.prototype,"filter",(function(i,o){var a,f,l,s;if(!u(this))throw new TypeError(j("invalid invocation. `this` is not %s %s.",$s[r[0]],e));if(!ie(i))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",i));for(a=this._buffer,f=[],l=0;l<this._length;l++)s=a[n](l*t,this._isLE),i.call(o,s,l,this)&&f.push(s);return new this.constructor(Xs(this._isLE),f)})),N(o.prototype,"forEach",(function(i,o){var a,f;if(!u(this))throw new TypeError(j("invalid invocation. `this` is not %s %s.",$s[r[0]],e));if(!ie(i))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",i));for(a=this._buffer,f=0;f<this._length;f++)i.call(o,a[n](f*t,this._isLE),f,this)})),N(o.prototype,"get",(function(i){if(!u(this))throw new TypeError(j("invalid invocation. `this` is not %s %s.",$s[r[0]],e));if(!At(i))throw new TypeError(j("invalid argument. Must provide a nonnegative integer. Value: `%s`.",i));if(!(i>=this._length))return this._buffer[n](i*t,this._isLE)})),N(o.prototype,"includes",(function(i,o){var a,f;if(!u(this))throw new TypeError(j("invalid invocation. `this` is not %s %s.",$s[r[0]],e));if(arguments.length>1){if(!Tt(o))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",o));o<0&&(o+=this._length)<0&&(o=0)}else o=0;for(a=this._buffer,f=o;f<this._length;f++)if(a[n](f*t,this._isLE)===i)return!0;return!1})),N(o.prototype,"indexOf",(function(i,o){var a,f;if(!u(this))throw new TypeError(j("invalid invocation. `this` is not %s %s.",$s[r[0]],e));if(arguments.length>1){if(!Tt(o))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",o));o<0&&(o+=this._length)<0&&(o=0)}else o=0;for(a=this._buffer,f=o;f<this._length;f++)if(a[n](f*t,this._isLE)===i)return f;return-1})),N(o.prototype,"join",(function(i){var o,a,f,l;if(!u(this))throw new TypeError(j("invalid invocation. `this` is not %s %s.",$s[r[0]],e));if(arguments.length>0){if(!Mt(i))throw new TypeError(j("invalid argument. First argument must be a string. Value: `%s`.",i));f=i}else f=",";for(o=[],a=this._buffer,l=0;l<this._length;l++)o.push(a[n](l*t,this._isLE));return o.join(f)})),N(o.prototype,"lastIndexOf",(function(i,o){var a,f;if(!u(this))throw new TypeError(j("invalid invocation. `this` is not %s %s.",$s[r[0]],e));if(arguments.length>1){if(!Tt(o))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",o));o>=this._length?o=this._length-1:o<0&&(o+=this._length)}else o=this._length-1;for(a=this._buffer,f=o;f>=0;f--)if(a[n](f*t,this._isLE)===i)return f;return-1})),be(o.prototype,"length",(function(){return this._length})),N(o.prototype,"map",(function(o,a){var f,l,s,c,h;if(!u(this))throw new TypeError(j("invalid invocation. `this` is not %s %s.",$s[r[0]],e));if(!ie(o))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",o));for(s=this._buffer,f=(l=new this.constructor(Xs(this._isLE),this._length))._buffer,c=0;c<this._length;c++)h=o.call(a,s[n](c*t,this._isLE),c,this),f[i](c*t,h,this._isLE);return l})),N(o.prototype,"reduce",(function(i,o){var a,f,l,s;if(!u(this))throw new TypeError(j("invalid invocation. `this` is not %s %s.",$s[r[0]],e));if(!ie(i))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",i));if(a=this._buffer,f=this._length,arguments.length>1)l=o,s=0;else{if(0===f)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");l=a[n](0*t,this._isLE),s=1}for(;s<f;s++)l=i(l,a[n](s*t,this._isLE),s,this);return l})),N(o.prototype,"reduceRight",(function(i,o){var a,f,l,s;if(!u(this))throw new TypeError(j("invalid invocation. `this` is not %s %s.",$s[r[0]],e));if(!ie(i))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",i));if(a=this._buffer,f=this._length,arguments.length>1)l=o,s=f-1;else{if(0===f)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");l=a[n]((f-1)*t,this._isLE),s=f-2}for(;s>=0;s--)l=i(l,a[n](s*t,this._isLE),s,this);return l})),N(o.prototype,"set",(function(n){var o,a,f,l,s,c,h,p;if(!u(this))throw new TypeError(j("invalid invocation. `this` is not %s %s.",$s[r[0]],e));if(f=this._buffer,arguments.length>1){if(!At(a=arguments[1]))throw new TypeError(j("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",a))}else a=0;if(It(n)){if(a+(c=n.length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(s=(o=n).get&&o.set?$("default"):W("default"),p=f.byteOffset+a*t,o.buffer===f.buffer&&o.byteOffset<p&&o.byteOffset+o.byteLength>p){for(l=[],h=0;h<n.length;h++)l.push(s(n,h));o=l,s=W("default")}for(h=0;h<c;a++,h++)f[i](a*t,s(o,h),this._isLE)}else{if(a>=this._length)throw new RangeError(j("invalid argument. Index argument is out-of-bounds. Value: `%u`.",a));f[i](a*t,n,this._isLE)}})),N(o.prototype,"some",(function(i,o){var a,f;if(!u(this))throw new TypeError(j("invalid invocation. `this` is not %s %s.",$s[r[0]],e));if(!ie(i))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",i));for(a=this._buffer,f=0;f<this._length;f++)if(i.call(o,a[n](f*t,this._isLE),f,this))return!0;return!1})),N(o.prototype,"toString",(function(){var i,o,a;if(!u(this))throw new TypeError(j("invalid invocation. `this` is not %s %s.",$s[r[0]],e));for(i=[],o=this._buffer,a=0;a<this._length;a++)i.push(o[n](a*t,this._isLE));return i.join(",")})),N(o.prototype,"with",(function(n,o){var a,f,l;if(!u(this))throw new TypeError(j("invalid invocation. `this` is not %s %s.",$s[r[0]],e));if(!Tt(n))throw new TypeError(j("invalid argument. First argument must be an integer. Value: `%s`.",n));if(l=this._length,a=this._buffer,n<0&&(n+=l),n<0||n>=l)throw new RangeError(j("invalid argument. Index argument is out-of-bounds. Value: `%s`.",n));return(f=new this.constructor(Xs(this._isLE),a.buffer))._buffer[i](n*t,o,this._isLE),f})),o;function a(r){return r===o}function u(r){return"object"==typeof r&&null!==r&&(r.constructor.name===e||function(r,t){var e=typeof t;if(null===t||"object"!==e&&"function"!==e)throw new TypeError(j("invalid argument. Second argument must be either an object (except null) or a function. Value: `%s`.",t));return e=typeof r,null!==r&&("object"===e||"function"===e)&&Ps.call(t,r)}(r,o.prototype))&&r.BYTES_PER_ELEMENT===t}function f(r,e,n){var o,a,u;for(o=e.length,a=e.get&&e.set?$("default"):W("default"),u=0;u<o;u++)r[i](u*t,a(e,u),n);return r}}var Ks=Zs("float32"),rc=Zs("float64"),tc={Complex64:"complex64",Complex128:"complex128"},ec={complex64:ce,complex128:oe};function nc(r){return ec[r]||null}var ic,oc=["complex64","complex128"].slice(),ac=[];for(ic=0;ic<oc.length;ic++)ac.push(nc(oc[ic]));var uc=oc.length;function fc(r){var t;for(t=0;t<uc;t++)if(r instanceof ac[t])return oc[t];return tc[sr(r)]||null}var lc=ts.get("dtypes.real_floating_point"),sc=ts.get("dtypes.complex_floating_point"),cc=ts.get("dtypes.boolean");function hc(r){var t,e,n,i;return t=pt(r),arguments.length<2?t?n=lc:qt(r)?n=cc:he(r)?null===(n=fc(r))&&(n=sc):n="generic":n=arguments[1],e=os(1,n),i=t&&An(n)?[r,0]:r,(D(e)?J(n):q(n))(e,0,i),e}var pc=ts.get("dtypes.default");function gc(r,t){var e,n,i;if(!At(r))throw new TypeError(j("invalid argument. First argument must be a nonnegative integer. Value: `%s`.",r));if("generic"===(e=arguments.length>2?arguments[2]:pc))return qi(t,r);if(null===(n=_f(e)))throw new TypeError(j("invalid argument. Third argument must be a recognized data type. Value: `%s`.",e));return Fs(r,t,i=new n(r),1),i}function yc(){}var mc="foo"===yc.name,dc=[Ve,fe,Mu,oo,Cu,uo,Yu,an,Uu],vc=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array"],wc=gr()?fi(Ve):bc;function bc(){}wc="TypedArray"===function(r){if(!1===ie(r))throw new TypeError(j("invalid argument. Must provide a function. Value: `%s`.",r));return mc?r.name:lr.exec(r.toString())[1]}(wc)?wc:bc;var Ec=[ef,Ju],_c=["Complex64Array","Complex128Array"];function Tc(r){return r instanceof lf||"BooleanArray"===sr(r)}function xc(r,t){if("function"!=typeof t)throw new TypeError(j("invalid argument. Second argument must be callable. Value: `%s`.",t));return r instanceof t}var Vc=[[mr,"Float64Array"],[_r,"Float32Array"],[Br,"Int32Array"],[Fr,"Uint32Array"],[Hr,"Int16Array"],[Dr,"Uint16Array"],[ht,"Int8Array"],[rt,"Uint8Array"],[ot,"Uint8ClampedArray"],[Oe,"Complex64Array"],[Ye,"Complex128Array"],[He,"BooleanArray"]];function Ac(r){var t,e;for(e=0;e<Vc.length;e++)if(xc(r,Vc[e][0]))return Vc[e][1];for(;r;){for(t=sr(r),e=0;e<Vc.length;e++)if(t===Vc[e][1])return Vc[e][1];r=fi(r)}}function Sc(r){var t,e,n;if(function(r){var t,e;if("object"!=typeof r||null===r)return!1;if(r instanceof wc)return!0;for(e=0;e<dc.length;e++)if(r instanceof dc[e])return!0;for(;r;){for(t=sr(r),e=0;e<vc.length;e++)if(vc[e]===t)return!0;r=fi(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<Ec.length;e++)if(r instanceof Ec[e])return!0;for(;r;){for(t=sr(r),e=0;e<_c.length;e++)if(_c[e]===t)return!0;r=fi(r)}return!1}(r))t=8===r.BYTES_PER_ELEMENT?Te(r,0):Ae(r,0);else{if(!Tc(r))throw new TypeError(j("invalid argument. Must provide a typed array. Value: `%s`.",r));t=un(r,0)}for(e={type:Ac(r),data:[]},n=0;n<t.length;n++)e.data.push(t[n]);return e}function Fc(r){return P(this,"next",{configurable:!1,enumerable:!0,get:function(){return this._next}}),this.value=r,P(this,"_next",{configurable:!1,enumerable:!1,writable:!0,value:null}),P(this,"_prev",{configurable:!1,enumerable:!1,writable:!0,value:null}),this}function jc(){return this instanceof jc?(this._length=0,this._first=null,this._last=null,this):new jc}N(jc.prototype,"clear",(function(){return this._length=0,this._first=null,this._last=null,this})),N(jc.prototype,"first",(function(){if(this._length)return this._first})),N(jc.prototype,"insert",(function(r,t){var e;if(r===this._last)return this.push(t);for(e=this._first;e!==this._last&&e!==r;)e=e._next;if(e===this._last)throw new Error("invalid argument. The list does not contain the provided list node.");return e=new Fc(t),r._next._prev=e,e._next=r._next,r._next=e,e._prev=r,this._length+=1,this})),N(jc.prototype,"iterator",(function(){var r,t,e,n,i;return e=this,i=-1,r=this.toArray(),N(t={},"next",(function(){return i+=1,n||i>=r.length?{done:!0}:{value:r[i],done:!1}})),N(t,"return",(function(r){return n=!0,arguments.length?{value:r,done:!0}:{done:!0}})),we&&N(t,we,(function(){return e.iterator()})),t})),N(jc.prototype,"last",(function(){if(this._length)return this._last})),be(jc.prototype,"length",(function(){return this._length})),N(jc.prototype,"pop",(function(){var r;return this._length&&(r=this._last.value,this._last._prev?(this._last=this._last._prev,this._last._next=null):(this._first=null,this._last=null),this._length-=1),r})),N(jc.prototype,"push",(function(r){var t;return t=new Fc(r),0===this._length?(this._first=t,this._last=t):(t._prev=this._last,this._last._next=t,this._last=t),this._length+=1,this})),N(jc.prototype,"remove",(function(r){var t,e;if(r===this._first)return this.shift();if(r===this._last)return this.pop();for(t=r.value,e=this._first;e!==this._last&&e!==r;)e=e._next;if(e===this._last)throw new Error("invalid argument. The list does not contain the provided list node.");return r._prev._next=r._next,r._next._prev=r._prev,this._length-=1,t})),N(jc.prototype,"shift",(function(){var r;return this._length&&(r=this._first.value,this._first._next?(this._first=this._first._next,this._first._prev=null):(this._first=null,this._last=null),this._length-=1),r})),N(jc.prototype,"toArray",(function(){var r,t,e;for(t=[],r=this._first,e=0;e<this._length;e++)t.push(r.value),r=r.next;return t})),N(jc.prototype,"toJSON",(function(){var r={type:"linked-list"};return r.data=this.toArray(),r})),N(jc.prototype,"unshift",(function(r){var t;return t=new Fc(r),0===this._length?(this._first=t,this._last=t):(t._next=this._first,this._first._prev=t,this._first=t),this._length+=1,this}));var kc=new jc;function Lc(r){for(var t=kc.first();t;){if(t.value.id===r)return t;t=t.next}return null}var Ic=-1;function Oc(r){var t,e,n,i,o;if(!(this instanceof Oc))return arguments.length>1?new Oc(r,arguments[1]):new Oc(r);if(!It(r))throw new TypeError(j("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if("generic"===(n=Ze(r))||null===n)if(r.length>0)if(qt(o=Yi(r)(r,0)))i="bool";else{if(!Tt(o))throw new TypeError("invalid argument. First argument must be a valid index array.");i="int"}else i="int";else if("int32"===n)i="int";else if("uint8"===n)i="mask";else{if("bool"!==n)throw new TypeError("invalid argument. First argument must be a valid index array.");i="bool"}if(t={persist:!1},arguments.length>1&&(e=function(r,t){return si(t)?rr(t,"persist")&&(r.persist=t.persist,!qt(r.persist))?new TypeError(j("invalid option. `%s` option must be a boolean. Option: `%s`.","persist",r.persist)):null:new TypeError(j("invalid argument. Options argument must be an object. Value: `%s`.",t))}(t,arguments[1]),e))throw e;return kc.push({id:(Ic+=1).toString(),ref:this,data:r,type:i,dtype:n,persist:t.persist}),N(this,"_node",kc.last()),function(r,t,e){P(r,t,{configurable:!0,enumerable:!1,writable:!0,value:e})}(this,"_invalidated",!1),this}N(Oc,"name","ArrayIndex"),N(Oc,"free",(function(r){var t,e;return null!==(t=Lc(r))&&(N((e=t.value).ref,"_invalidated",!0),kc.remove(t),e.data=null,!0)})),N(Oc,"get",(function(r){var t,e,n;return null===(t=Lc(r))?null:(e={data:(n=t.value).data,type:n.type,dtype:n.dtype},n.persist||Oc.free(r),e)})),be(Oc.prototype,"data",(function(){if(this._invalidated)throw new Error("invalid operation. This array index instance has already been freed and can no longer be used.");return this._node.value.data})),be(Oc.prototype,"dtype",(function(){if(this._invalidated)throw new Error("invalid operation. This array index instance has already been freed and can no longer be used.");return this._node.value.dtype})),be(Oc.prototype,"id",(function(){if(this._invalidated)throw new Error("invalid operation. This array index instance has already been freed and can no longer be used.");return this._node.value.id})),be(Oc.prototype,"isCached",(function(){return!this._invalidated})),be(Oc.prototype,"type",(function(){if(this._invalidated)throw new Error("invalid operation. This array index instance has already been freed and can no longer be used.");return this._node.value.type})),N(Oc.prototype,"toString",(function(){if(this._invalidated)throw new Error("invalid operation. This array index instance has already been freed and can no longer be used.");return"ArrayIndex<"+this._node.value.id+">"})),N(Oc.prototype,"toJSON",(function(){var r;if(this._invalidated)throw new Error("invalid operation. This array index instance has already been freed and can no longer be used.");return{type:"ArrayIndex",data:"generic"===(r=this._node.value).dtype||null===r.dtype?D(r.data)?Ga(r.data):r.data:Sc(r.data)}}));var Rc={float64:mr,float32:_r,complex128:Ye,complex64:Oe};function Bc(r){return Rc[r]||null}function Mc(r,t,e,n,i){var o,a,u;if(0===n)return r;if(1===n)return r[0]=i?e:t,r;for(r[0]=t,a=(e-t)/(o=i?n-1:n),u=1;u<o;u++)r[u]=t+a*u;return i&&(r[o]=e),r}function Pc(r,t,e,n,i,o,a){var u,f,l,s,c,h,p,g,y;if(0===o)return r;if("float64"===t?(u=e,l=0):"complex64"===t?(u=Ee(e),l=_e(e)):(u=Re(e),l=Be(e)),"float64"===n?(f=i,s=0):"complex64"===n?(f=Ee(i),s=_e(i)):(f=Re(i),s=Be(i)),1===o)return a?(r[0]=f,r[1]=s):(r[0]=u,r[1]=l),r;for(r[0]=u,r[1]=l,c=(f-u)/(p=a?o-1:o),h=(s-l)/p,y=2,g=1;g<p;g++)r[y]=u+c*g,r[y+1]=l+h*g,y+=2;return a&&(r[y]=f,r[y+1]=s),r}function Cc(r,t){return si(t)?rr(t,"dtype")&&(r.dtype=t.dtype,!Mt(r.dtype))?new TypeError(j("invalid option. `%s` option must be a string. Option: `%s`.","dtype",r.dtype)):rr(t,"endpoint")&&(r.endpoint=t.endpoint,!qt(r.endpoint))?new TypeError(j("invalid option. `%s` option must be a boolean. Option: `%s`.","endpoint",r.endpoint)):null:new TypeError(j("invalid argument. Options argument must be an object. Value: `%s`.",t))}var Nc=!0,Uc=ts.get("dtypes.complex_floating_point");function Dc(r,t,e){var n,i,o,a,u,f,l;if("object"==typeof r){if(null===(u=fc(r))){if(!he(r))throw new TypeError(j("invalid argument. First argument must be either a real or complex number. Value: `%s`.",r));u="complex128"}l=!0}else{if(!pt(r)||Cn(r))throw new TypeError(j("invalid argument. First argument must be either a real or complex number. Value: `%s`.",r));u="float64"}if("object"==typeof t){if(null===(f=fc(t))){if(!he(t))throw new TypeError(j("invalid argument. Second argument must be either a real or complex number. Value: `%s`.",t));f="complex128"}l=!0}else{if(!pt(t)||Cn(t))throw new TypeError(j("invalid argument. Second argument must be either a real or complex number. Value: `%s`.",t));f="float64"}if(!At(e))throw new TypeError(j("invalid argument. Third argument must be a nonnegative integer. Value: `%s`.",e));if((n={endpoint:Nc}).dtype=u===f?u:Uc,arguments.length>3&&(o=Cc(n,arguments[3])))throw o;if("generic"===n.dtype)return l?function(r,t,e,n,i,o){var a,u,f,l,s,c,h,p,g,y,m,d,v;if(0===i)return[];if(u=0,"float64"===r?(l=t,c=0):"complex64"===r?(u+=1,l=Ee(t),c=_e(t)):(l=Re(t),c=Be(t)),"float64"===e?(s=n,h=0):"complex64"===e?(u+=1,s=Ee(n),h=_e(n)):(s=Re(n),h=Be(n)),a=2===u?ce:oe,1===i)return o?[new a(s,h)]:[new a(l,c)];for(f=[new a(l,c)],y=(s-l)/(d=o?i-1:i),m=(h-c)/d,v=1;v<d;v++)p=l+y*v,g=c+m*v,f.push(new a(p,g));return o&&f.push(new a(s,h)),f}(u,r,f,t,e,n.endpoint):function(r,t,e,n){var i,o,a,u;if(0===e)return[];if(1===e)return n?[t]:[r];for(i=[r],a=(t-r)/(o=n?e-1:e),u=1;u<o;u++)i.push(r+a*u);return n&&i.push(t),i}(r,t,e,n.endpoint);if(null===(i=Bc(n.dtype)))throw new TypeError(j('invalid option. `%s` option must be a real or complex floating-point data type or "generic". Option: `%s`.',"dtype",n.dtype));if(a=new i(e),"complex64"===n.dtype)return Pc(Te(a,0),u,r,f,t,e,n.endpoint),a;if("complex128"===n.dtype)return Pc(Ae(a,0),u,r,f,t,e,n.endpoint),a;if(l)throw new TypeError('invalid arguments. If either of the first two arguments are complex numbers, the output array data type must be a complex number data type or "generic".');return Mc(a,r,t,e,n.endpoint)}function Yc(r){var t=typeof r;return null===r||"object"!==t&&"function"!==t?new TypeError(j("invalid argument. A provided constructor must be either an object (except null) or a function. Value: `%s`.",r)):null}N(Dc,"assign",(function(r,t,e){var n,i,o,a,u,f,l;if("object"==typeof r){if(null===(o=fc(r))){if(!he(r))throw new TypeError(j("invalid argument. First argument must be either a real or complex number. Value: `%s`.",r));o="complex128"}u=!0}else{if(!pt(r)||Cn(r))throw new TypeError(j("invalid argument. First argument must be either a real or complex number. Value: `%s`.",r));o="float64"}if("object"==typeof t){if(null===(a=fc(t))){if(!he(t))throw new TypeError(j("invalid argument. Second argument must be either a real or complex number. Value: `%s`.",t));a="complex128"}u=!0}else{if(!pt(t)||Cn(t))throw new TypeError(j("invalid argument. Second argument must be either a real or complex number. Value: `%s`.",t));a="float64"}if(!It(e))throw new TypeError(j("invalid argument. Third argument must be an array-like object. Value: `%s`.",e));if(n={endpoint:Nc},arguments.length>3&&(i=Cc(n,arguments[3])))throw i;if(null===(f=Ze(e))&&(f="generic"),"complex64"===f)return Pc(Te(e,0),o,r,a,t,e.length,n.endpoint),e;if("complex128"===f)return Pc(Ae(e,0),o,r,a,t,e.length,n.endpoint),e;if(u){if("generic"===f)return function(r,t,e,n,i,o,a){var u,f,l,s,c,h,p,g,y,m,d,v;if(0===o)return r;if(f=0,"float64"===t?(l=e,c=0):"complex64"===t?(f+=1,l=Ee(e),c=_e(e)):(l=Re(e),c=Be(e)),"float64"===n?(s=i,h=0):"complex64"===n?(f+=1,s=Ee(i),h=_e(i)):(s=Re(i),h=Be(i)),u=2===f?ce:oe,g=r.data,p=r.accessors[1],1===o)return p(g,0,a?new u(s,h):new u(l,c)),r;for(p(g,0,new u(l,c)),y=(s-l)/(d=a?o-1:o),m=(h-c)/d,v=1;v<d;v++)p(g,v,new u(l+y*v,c+m*v));a&&p(g,d,new u(s,h))}(l=nn(e),o,r,a,t,e.length,n.endpoint),e;throw new TypeError('invalid arguments. If either of the first two arguments are complex numbers, the output array must be a complex number array or a "generic" array-like object.')}return(l=nn(e)).accessorProtocol?(function(r,t,e,n,i){var o,a,u,f,l;if(0===n)return r;if(o=r.data,a=r.accessors[1],1===n)return a(o,0,i?e:t),r;for(a(o,0,t),f=(e-t)/(u=i?n-1:n),l=1;l<u;l++)a(o,l,t+f*l);i&&a(o,u,e)}(l,r,t,e.length,n.endpoint),e):(Mc(e,r,t,e.length,n.endpoint),e)}));var Wc=Object.create;function zc(){}var qc="function"==typeof Wc?Wc:function(r){return zc.prototype=r,new zc},Gc=ve(),$c="little-endian",Hc={float64:"setFloat64",float32:"setFloat32",int32:"setInt32",int16:"setInt16",uint32:"setUint32",uint16:"setUint16"},Jc={c:"a",f:"a",i:"an",u:"a",b:"a"};function Qc(r){var t,e,n,i;function o(){var r=arguments.length;return this instanceof o?(0===r?i.call(this,$c):1===r?i.call(this,$c,arguments[0]):2===r?i.call(this,$c,arguments[0],arguments[1]):3===r&&i.call(this,$c,arguments[0],arguments[1],arguments[2]),this):0===r?new o:1===r?new o(arguments[0]):2===r?new o(arguments[0],arguments[1]):new o(arguments[0],arguments[1],arguments[2])}return i=Zs(r),t=Ns(r),e=function(r){return Us(r)+"ArrayLE"}(r),n=Hc[r],N(o,"BYTES_PER_ELEMENT",t),N(o,"name",e),N(o,"from",(function(i){var o,u,f,l,s,c,h,p,g;if(!ie(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!a(this))throw new TypeError(j("invalid invocation. `this` is not %s %s.",Jc[r[0]],e));if((u=arguments.length)>1){if(!ie(f=arguments[1]))throw new TypeError(j("invalid argument. Second argument must be a function. Value: `%s`.",f));u>2&&(o=arguments[2])}if(It(i)){if(f){for(p=i.length,h=i.get&&i.set?$("default"):W("default"),s=(l=new this(p))._buffer,g=0;g<p;g++)s[n](g*t,f.call(o,h(i,g),g),!0);return l}return new this(i)}if(Bt(i)&&Gc&&ie(i[we])){if(!ie((s=i[we]()).next))throw new TypeError(j("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",i));for(c=f?function(r,t,e){var n,i,o;for(n=[],o=-1;!(i=r.next()).done;)o+=1,n.push(t.call(e,i.value,o));return n}(s,f,o):function(r){var t,e;for(t=[];!(e=r.next()).done;)t.push(e.value);return t}(s),s=(l=new this(p=c.length))._buffer,g=0;g<p;g++)s[n](g*t,c[g],!0);return l}throw new TypeError(j("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",i))})),N(o,"of",(function(){var t,n;if(!ie(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!a(this))throw new TypeError(j("invalid invocation. `this` is not %s %s.",Jc[r[0]],e));for(t=[],n=0;n<arguments.length;n++)t.push(arguments[n]);return new this(t)})),function(r,t){var e=Yc(r);if(e)throw e;if(e=Yc(t))throw e;if(void 0===t.prototype)throw new TypeError(j("invalid argument. Second argument must have a prototype from which another object can inherit. Value: `%s`.",t.prototype));r.prototype=qc(t.prototype),P(r.prototype,"constructor",{configurable:!0,enumerable:!1,writable:!0,value:r})}(o,i),o;function a(r){return r===o}}var Xc=Qc("float32"),Zc=Qc("float64");function Kc(r){return 0===r&&1/r===wt}var rh=1401298464324817e-60,th=16777215,eh=-16777215;function nh(r){return r!=r||r===vr||r===wt?"float32":Et(r)?r>=eh&&r<=th?"float32":"float64":r>-rh&&r<rh?"float64":"float32"}function ih(r){return pt(r)?r!=r||r===vr||r===wt?"float32":Et(r)?0===r&&Kc(r)?"float32":r<0?r>=ft?"int8":r>=zr?"int16":r>=Lr?"int32":"float64":r<=Qr?"uint8":r<=Pr?"uint16":r<=xr?"uint32":"float64":r>-rh&&r<rh?"float64":"float32":qt(r)?"bool":he(r)?"float64"===nh(r.re)||"float64"===nh(r.im)?"complex128":"complex64":"generic"}function oh(r,t){var e;if(!It(r))throw new TypeError(j("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if(!It(t))throw new TypeError(j("invalid argument. Second argument must be an array-like object. Value: `%s`.",t));if(r.length!==t.length)throw new Error(j("invalid arguments. Must provide equal length array-like objects."));return"generic"===(e=Ze(r))||null===e?bl(r,t):bl.assign(r,t,os(uu(t),e),1,0)}var ah=["strict","non_strict","strict_broadcast","broadcast","repeat"],uh=sn(ah);function fh(r,t){var e;if(!It(r))throw new TypeError(j("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if(!It(t))throw new TypeError(j("invalid argument. Second argument must be an array-like object. Value: `%s`.",t));if(r.length!==t.length)throw new Error(j("invalid arguments. Must provide equal length array-like objects."));return"generic"===(e=Ze(r))||null===e?Tl(r,t):Tl.assign(r,t,os(Ka(t),e),1,0)}var lh=new oe(NaN,NaN),sh=new ce(NaN,NaN),ch=En("floating_point_and_generic"),hh=sn(ch),ph=ts.get("dtypes.real_floating_point"),gh=new oe(NaN,NaN),yh=new ce(NaN,NaN),mh=["float64","float32","complex128","complex64","generic"],dh={float64:-1,float32:"float64",int32:-1,int16:"int32",int8:"int16",uint32:-1,uint16:"uint32",uint8:"uint16",uint8c:"uint16",generic:-1,bool:-1,complex64:"complex128",complex128:-1},vh=ts.get("dtypes.default");function wh(r){var t;if(!At(r))throw new TypeError(j("invalid argument. First argument must be a nonnegative integer. Value: `%s`.",r));if(arguments.length>1){if("generic"===(t=arguments[1]))return Vl(r)}else t=vh;return Vl.assign(os(r,t),1,0)}var bh=new oe(1,0),Eh=new ce(1,0),_h=ts.get("dtypes.default"),Th=new oe(1,0),xh=new ce(1,0),Vh=["strict","non_strict","strict_broadcast","broadcast","repeat"],Ah=sn(Vh);function Sh(r,t,e){var n,i,o,a;if(!It(r))throw new TypeError(j("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if(!It(t))throw new TypeError(j("invalid argument. Second argument must be an array-like object. Value: `%s`.",t));if(!It(e))throw new TypeError(j("invalid argument. Third argument must be an array-like object. Value: `%s`.",e));if(n={mode:"repeat"},arguments.length>3&&(i=function(r,t){return si(t)?rr(t,"mode")&&(r.mode=t.mode,!Ah(r.mode))?new TypeError(j('invalid option. `%s` option must be one of the following: "%s". Option: `%s`.',"mode",Vh.join('", "'),r.mode)):null:new TypeError(j("invalid argument. Options argument must be an object. Value: `%s`.",t))}(n,arguments[3]),i))throw i;if(o=Ze(r)||"generic",!Ai(a=Ze(e)||"generic",o))throw new TypeError(j("invalid argument. Third argument cannot be safely cast to the input array data type. Data types: [%s, %s].",a,o));return An(o)&&ji(a)&&(e=Af(e,o)),Sl(r,t,e,n.mode)}var Fh={float64:mr,float32:_r,int16:Hr,int32:Br,int8:ht,uint16:Dr,uint32:Fr,uint8:rt,uint8c:ot,complex64:Oe,complex128:Ye,bool:He};function jh(r){return Fh[r]||null}var kh=0x40000000000000,Lh=1.4426950407214463,Ih=1.6751713164886512e-10,Oh=2146435072,Rh=1048576,Bh=1072693248,Mh=[0,0];function Ph(r){var t,e,n,i,o,a,u,f,l,s,c,h,p;if(Cn(r)||r<0)return NaN;if(wo.assign(r,Mh,1,0),i=0|Mh[0],o=Mh[1],p=0,i<Rh){if(0==(i&So|o))return wt;p-=54,i=0|Io(r*=kh)}return i>=Oh?r+r:i===Bh&&0===o?0:(p+=(i>>20)-Ho|0,c=p+=(h=614244+(i&=xa)&Rh|0)>>20|0,n=.5*(f=(r=$o(r,i|h^Bh))-1)*f,l=function(r){var t,e,n,i,o,a;return t=(o=(i=(n=r/(2+r))*n)*i)*(0===(a=o)?.3999999999940942:.3999999999940942+a*(.22222198432149784+.15313837699209373*a)),e=i*function(r){return 0===r?.6666666666666735:.6666666666666735+r*(.2857142874366239+r*(.1818357216161805+.14798198605116586*r))}(o),n*(.5*r*r+(e+t))}(f),e=((u=f-(a=To(a=f-n,0))-n+l)+a)*Ih+u*Lh,(e+=c-(s=c+(t=a*Lh))+t)+(t=s))}var Ch={bool:1,float64:8,float32:4,int16:2,int32:4,int8:1,uint16:2,uint32:4,uint8:1,uint8c:1,complex64:8,complex128:16},Nh=ts.get("dtypes.default"),Uh=jh("complex64"),Dh=jh("complex128"),Yh=jh("bool");function Wh(r){return r instanceof Uh}function zh(r){return r instanceof Dh}function qh(r){return r instanceof Yh}function Gh(r){var t,e,n,i;if(n={highWaterMark:9007199254740992},arguments.length&&(i=function(r,t){return si(t)?rr(t,"highWaterMark")&&(r.highWaterMark=t.highWaterMark,!At(r.highWaterMark))?new TypeError(j("invalid option. `%s` option must be a nonnegative integer. Option: `%s`.","highWaterMark",r.highWaterMark)):null:new TypeError(j("invalid argument. Options argument must be an object. Value: `%s`.",t))}(n,r),i))throw i;return e=function(r){var t,e;for(t=[],e=0;e<r+1;e++)t.push([]);return t}(_u(Ph(n.highWaterMark))),t=0,N(a,"malloc",a),N(a,"calloc",(function(){var r,t,e,n;if(null!==(t=0===(r=arguments.length)?a():1===r?a(arguments[0]):a(arguments[0],arguments[1])))for(e=zh(t)?Ae(t,0):Wh(t)?Te(t,0):qh(t)?un(t,0):t,n=0;n<e.length;n++)e[n]=0;return t})),N(a,"free",(function(r){var t,n,i,o,a,u;if(null!==(o=r)&&"object"==typeof o&&At(o.length)&&o.length<=Lt&&"number"==typeof o.BYTES_PER_ELEMENT&&"number"==typeof o.byteOffset&&"number"==typeof o.byteLength&&r.buffer)r=r.buffer;else if(!Rt(r))throw new TypeError(j("invalid argument. Must provide a typed array or ArrayBuffer. Value: `%s`.",r));if(r.byteLength>0){for(t=bt(Ph(r.byteLength)),a=e.length-1,u=t,t=Cn(a)||Cn(u)?NaN:a===wt||u===wt?wt:a===u&&0===a?Kc(a)?a:u:a<u?a:u,n=e[t],i=0;i<n.length;i++)if(n[i]===r)return!1;n.push(r)}return!0})),N(a,"clear",(function(){var r;for(r=0;r<e.length;r++)e[r].length=0;t=0})),N(a,"highWaterMark",n.highWaterMark),be(a,"nbytes",(function(){return t})),a;function o(r,i,o){var a,u,f,l;return 0===i?new r(0):(a=function(r){var i,o;return(o=Ph(r))<e.length&&e[o].length?e[o].pop():t+r>n.highWaterMark?null:(i=new gs(r),t+=r,i)}((Cn(u=i)||ro(u)||0===u?u:(u<0?(u=-u,f=-1):f=1,(l=Ph(u))===pa?u:(l=-1===f?bt(l):_u(l))>ca?vr:f*Ya(2,l)))*Ch[o]),null===a?a:new r(a,0,i))}function a(){var r,t,e,n,i,a,u,f,l,s;if(null===(e=jh(t=(r=arguments.length)&&Mt(arguments[r-1])?arguments[r-=1]:Nh)))throw new TypeError(j("invalid argument. Must provide a recognized data type. Value: `%s`.",t));if(r<=0)return new e(0);if(At(arguments[0]))return o(e,arguments[0],t);if(It(arguments[0])){if(f=(n=arguments[0]).length,(s=n)instanceof ef||"Complex128Array"===sr(s)?n=Ae(n,0):function(r){return r instanceof Ju||"Complex64Array"===sr(r)}(n)?n=Te(n,0):Tc(n)?n=un(n,0):An(t)&&(f/=2),null===(i=o(e,f,t)))return i;if(zh(i)||Wh(i)||qh(i))return i.set(n),i;for(u=Yi(n),a=Dl(i),l=0;l<f;l++)a(i,l,u(n,l));return i}throw new TypeError(j("invalid argument. First argument must be either an array length or an array-like object. Value: `%s`.",arguments[0]))}}var $h=Gh();N($h,"factory",Gh);var Hh={float64:{float64:"float64",float32:"float64",int32:"float64",int16:"float64",int8:"float64",uint32:"float64",uint16:"float64",uint8:"float64",uint8c:"float64",complex64:"complex128",complex128:"complex128",bool:-1,generic:"generic"},float32:{float64:"float64",float32:"float32",int32:"float64",int16:"float32",int8:"float32",uint32:"float64",uint16:"float32",uint8:"float32",uint8c:"float32",complex64:"complex64",complex128:"complex128",bool:-1,generic:"generic"},int32:{float64:"float64",float32:"float64",int32:"int32",int16:"int32",int8:"int32",uint32:"float64",uint16:"int32",uint8:"int32",uint8c:"int32",complex64:"complex128",complex128:"complex128",bool:-1,generic:"generic"},int16:{float64:"float64",float32:"float32",int32:"int32",int16:"int16",int8:"int16",uint32:"float64",uint16:"int32",uint8:"int16",uint8c:"int16",complex64:"complex64",complex128:"complex128",bool:-1,generic:"generic"},int8:{float64:"float64",float32:"float32",int32:"int32",int16:"int16",int8:"int8",uint32:"float64",uint16:"int32",uint8:"int16",uint8c:"int16",complex64:"complex64",complex128:"complex128",bool:-1,generic:"generic"},uint32:{float64:"float64",float32:"float64",int32:"float64",int16:"float64",int8:"float64",uint32:"uint32",uint16:"uint32",uint8:"uint32",uint8c:"uint32",complex64:"complex128",complex128:"complex128",bool:-1,generic:"generic"},uint16:{float64:"float64",float32:"float32",int32:"int32",int16:"int32",int8:"int32",uint32:"uint32",uint16:"uint16",uint8:"uint16",uint8c:"uint16",complex64:"complex64",complex128:"complex128",bool:-1,generic:"generic"},uint8:{float64:"float64",float32:"float32",int32:"int32",int16:"int16",int8:"int16",uint32:"uint32",uint16:"uint16",uint8:"uint8",uint8c:"uint8",complex64:"complex64",complex128:"complex128",bool:-1,generic:"generic"},uint8c:{float64:"float64",float32:"float32",int32:"int32",int16:"int16",int8:"int16",uint32:"uint32",uint16:"uint16",uint8:"uint8",uint8c:"uint8",complex64:"complex64",complex128:"complex128",bool:-1,generic:"generic"},complex128:{float64:"complex128",float32:"complex128",int32:"complex128",int16:"complex128",int8:"complex128",uint32:"complex128",uint16:"complex128",uint8:"complex128",uint8c:"complex128",complex64:"complex128",complex128:"complex128",bool:-1,generic:"generic"},complex64:{float64:"complex128",float32:"complex64",int32:"complex128",int16:"complex64",int8:"complex64",uint32:"complex128",uint16:"complex64",uint8:"complex64",uint8c:"complex64",complex64:"complex64",complex128:"complex128",bool:-1,generic:"generic"},bool:{float64:-1,float32:-1,int32:-1,int16:-1,int8:-1,uint32:-1,uint16:-1,uint8:-1,uint8c:-1,complex64:-1,complex128:-1,bool:"bool",generic:"generic"},generic:{float64:"generic",float32:"generic",int32:"generic",int16:"generic",int8:"generic",uint32:"generic",uint16:"generic",uint8:"generic",uint8c:"generic",complex64:"generic",complex128:"generic",bool:"generic",generic:"generic"}};function Jh(r,t,e){var n,i,o,a;if(!It(r))throw new TypeError(j("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if(!It(t))throw new TypeError(j("invalid argument. Second argument must be an array-like object. Value: `%s`.",t));if(!It(e))throw new TypeError(j("invalid argument. Third argument must be an array-like object. Value: `%s`.",e));if(n={mode:"normalize"},arguments.length>3&&(i=function(r,t){return si(t)?rr(t,"mode")&&(r.mode=t.mode,!Rl(r.mode))?new TypeError(j('invalid option. `%s` option must be one of the following: "%s". Option: `%s`.',"mode",Ol().join('", "'),r.mode)):null:new TypeError(j("invalid argument. Options argument must be an object. Value: `%s`.",t))}(n,arguments[3]),i))throw i;if(o=Ze(r)||"generic",!Ai(a=Ze(e)||"generic",o))throw new TypeError(j("invalid argument. Third argument cannot be safely cast to the input array data type. Data types: [%s, %s].",a,o));return An(o)&&ji(a)&&(e=Af(e,o)),Pl(r,t,e,n.mode)}var Qh={Float64Array:mr,Float32Array:_r,Int32Array:Br,Uint32Array:Fr,Int16Array:Hr,Uint16Array:Dr,Int8Array:ht,Uint8Array:rt,Uint8ClampedArray:ot,Complex64Array:Oe,Complex128Array:Ye,BooleanArray:He};function Xh(r,t){var e=t[0];return kt(e)&&(r.push(e.length),Xh(r,e)),r}function Zh(r,t,e,n,i){var o,a,u;for(o=t[e],u=0;u<n.length;u++){if(!kt(a=n[u])||a.length!==o)return e;if(i&&(a=Zh(r,t,e+1,a,e+1<r-1))<r)return a}return r}var Kh="function"==typeof SharedArrayBuffer;function rp(r){return Kh&&r instanceof SharedArrayBuffer||"[object SharedArrayBuffer]"===nr(r)}var tp,ep="function"==typeof SharedArrayBuffer?SharedArrayBuffer:null,np="function"==typeof SharedArrayBuffer?SharedArrayBuffer:null;tp=function(){var r,t,e;if("function"!=typeof ep)return!1;try{e=(t=new ep(16)).slice(4,8),r=rp(t)&&rp(e)&&16===t.byteLength&&4===e.byteLength}catch(t){r=!1}return r}()?np:function(r){throw new Error("not supported. The current environment does not support SharedArrayBuffers, and, unfortunately, SharedArrayBuffers cannot be polyfilled. For shared memory applications, upgrade your runtime environment to one which supports SharedArrayBuffers.")};var ip=tp;function op(r,t){var e,n,i;if(!It(r))throw new TypeError(j("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if(!It(t))throw new TypeError(j("invalid argument. Second argument must be an array-like object. Value: `%s`.",t));if(e={mode:"normalize"},arguments.length>2&&(n=function(r,t){return si(t)?rr(t,"mode")&&(r.mode=t.mode,!Rl(r.mode))?new TypeError(j('invalid option. `%s` option must be one of the following: "%s". Option: `%s`.',"mode",Ol().join('", "'),r.mode)):null:new TypeError(j("invalid argument. Options argument must be an object. Value: `%s`.",t))}(e,arguments[2]),n))throw n;return"generic"===(i=Ze(r))||null===i?zl(r,t,e.mode):zl.assign(r,t,e.mode,os(t.length,i),1,0)}var ap,up=eval,fp="undefined"==typeof Proxy?null:Proxy;ap=function(){var r;try{up('"use strict"; var handler = { "get": function get( t, n ) { return t[ n ] * 100; } }; var target = { "beep": 3.14 }; var p = new Proxy( target, handler ); var x = p.beep; if ( x !== 314 ) { throw new Error( "native Proxy is not supported." ); }'),r=!0}catch(t){r=!1}return r}()?fp:function(r){return r};var lp,sp=ap,cp=ie(Object.assign),hp=Object.assign,pp=void 0!==Object.getOwnPropertySymbols,gp=oi.getOwnPropertySymbols,yp=pp?function(r){return gp(oi(r))}:function(){return[]};function mp(r){var t,e,n;for(t=ii(r),e=yp(r),n=0;n<e.length;n++)zn(r,e[n])&&t.push(e[n]);return t}lp=cp?hp:function(r){var t,e,n,i,o,a,u;if(null==r)throw new TypeError(j("invalid argument. First argument must be a non-null object. Value: `%s`.",r));for(o=oi(r),a=1;a<arguments.length;a++)if(null!=(t=arguments[a]))for(i=(e=mp(oi(t))).length,u=0;u<i;u++)o[n=e[u]]=t[n];return o};var dp=lp;function vp(r){return pt(r)?[r,0]:r}function wp(r){return An(r)?vp:null}function bp(r,t){return function(e){return r(e,t)}}var Ep="function"==typeof sp;function _p(r,t){return si(t)?rr(t,"strict")&&(r.strict=t.strict,!qt(r.strict))?new TypeError(j("invalid option. `%s` option must be a boolean. Option: `%s`.","strict",r.strict)):!rr(t,"cache")||(r.cache=t.cache,e=r.cache,n="get",null!=e&&(e=oi(e),"symbol"!=typeof n&&(n=String(n)),n in e&&ie(e[n])))?null:new TypeError(j("invalid option. `%s` option is missing a `%s` method. Option: `%s`.","cache","get",r.cache)):new TypeError(j("invalid argument. Options argument must be an object. Value: `%s`.",t));var e,n}function Tp(){return null}function xp(r,t){return qt(r)?null:new TypeError(j("invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].",typeof r,t))}function Vp(r,t){return pt(r)?null:he(r)?new TypeError(j("invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].",fc(r),t)):new TypeError(j("invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].",typeof r,t))}function Ap(r,t){return pt(r)||he(r)?null:new TypeError(j("invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].",typeof r,t))}function Sp(r,t){var e;return pt(r)?Tt(r)?Ri(e=wl(r),t)?null:new TypeError(j("invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].",e,t)):new TypeError(j("invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].",ih(r),t)):he(r)?new TypeError(j("invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].",fc(r),t)):new TypeError(j("invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].",typeof r,t))}function Fp(r,t){var e;return pt(r)?Ri(e=ih(r),t)?null:new TypeError(j("invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].",e,t)):he(r)?new TypeError(j("invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].",fc(r),t)):new TypeError(j("invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].",typeof r,t))}function jp(r){return"generic"===r||""===r?Tp:ki(r)?Vp:Ui(r)?Fp:Ni(r)?Sp:_n(r)?xp:Ap}function kp(r,t){return function(e,n){var i,o;switch((o=n).length){case 0:i=new e;break;case 1:i=new e(o[0]);break;case 2:i=new e(o[0],o[1]);break;case 3:i=new e(o[0],o[1],o[2]);break;case 4:i=new e(o[0],o[1],o[2],o[3]);break;case 5:i=new e(o[0],o[1],o[2],o[3],o[4]);break;case 6:i=new e(o[0],o[1],o[2],o[3],o[4],o[5]);break;case 7:i=new e(o[0],o[1],o[2],o[3],o[4],o[5],o[6]);break;case 8:i=new e(o[0],o[1],o[2],o[3],o[4],o[5],o[6],o[7]);break;case 9:i=new e(o[0],o[1],o[2],o[3],o[4],o[5],o[6],o[7],o[8]);break;case 10:i=new e(o[0],o[1],o[2],o[3],o[4],o[5],o[6],o[7],o[8],o[9]);break;default:i=e.apply(null,o)}return r(i,t)}}function Lp(r,t){return null!=r&&("symbol"==typeof t?t in Object(r):String(t)in Object(r))}var Ip=/^-?[0-9]+$/;function Op(r){return Mt(r)&&Ip.test(r)}var Rp=/\s*ArrayIndex<[^>]+>\s*/;function Bp(r){return Mt(r)&&Rp.test(r)}var Mp=void 0!==String.prototype.trim,Pp=String.prototype.trim,Cp=/^[\u0020\f\n\r\t\v\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]*([\S\s]*?)[\u0020\f\n\r\t\v\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]*$/,Np=Mp&&""===Pp.call(" \n\t\r\n\f\v \u2028\u2029 \ufeff")&&""===Pp.call("")?function(r){return Pp.call(r)}:function(r){return vn(r,Cp,"$1")};function Up(r,t){var e,n=t.get((e=Np(r)).substring(11,e.length-1));if(null===n)throw new Error(j("invalid operation. Unable to resolve array index. Value: `%s`.",r));return n}function Dp(r,t,e){var n,i;if(-1===(i=kl(n=parseInt(r,10),t-1))){if(e)throw new RangeError(j("invalid operation. Index exceeds array bounds."));return n}return i}function Yp(r){return vn(r,/^invalid arguments?/,"invalid operation")}var Wp=/(?:\s*-\s*)(?=\d+)(\d+)$/,zp=/(?:\s*\/\s*)(?=\d*\.?\d+)(\d*\.?\d+)$/;function qp(r,t,e,n){var i;if("end"===r)return t;if(i=r.match(Wp)){if((r=t-parseInt(i[1],10))<0){if(n)return-2;r=0}return r}return(i=r.match(zp))?(r=parseFloat(i[1]))<1?n?-2:-1:bt(e&&t>0&&1!==r?(t-1)/r:t/r):-1}var Gp=/\s*:\s*/,$p=/^[-+]?[0-9]+$/,Hp=/^end/;function Jp(r,t,e){var n,i,o;if((i=(n=Np(r).split(Gp)).length)<2||i>3)return{code:"ERR_SLICE_INVALID_SUBSEQUENCE"};if(3===i)if(0===(o=n[2]).length)n[2]=1;else{if(!1===$p.test(o))return{code:"ERR_SLICE_INVALID_SUBSEQUENCE"};if(0===(o=parseInt(o,10)))return{code:"ERR_SLICE_INVALID_INCREMENT"};n[2]=o}else n.push(1);if(0===(o=n[0]).length)n[2]<0&&t>0?n[0]=t-1:n[0]=0;else if(Hp.test(o)){if((o=qp(o,t,n[2]<0,e))<0)return-2===o?{code:"ERR_SLICE_OUT_OF_BOUNDS"}:{code:"ERR_SLICE_INVALID_SUBSEQUENCE"};n[2]<0&&o>=t&&(o-=1),n[0]=o}else{if(!$p.test(o))return{code:"ERR_SLICE_INVALID_SUBSEQUENCE"};if((o=parseInt(o,10))<0){if((o=t+o)<0){if(e)return{code:"ERR_SLICE_OUT_OF_BOUNDS"};o=0}}else if(o>=t){if(e)return{code:"ERR_SLICE_OUT_OF_BOUNDS"};o=n[2]<0?t-1:t}n[0]=o}if(0===(o=n[1]).length)n[2]<0?n[1]=null:n[1]=t;else if(Hp.test(o)){if((o=qp(o,t,n[2]<0,e))<0)return-2===o?{code:"ERR_SLICE_OUT_OF_BOUNDS"}:{code:"ERR_SLICE_INVALID_SUBSEQUENCE"};n[1]=o}else{if(!$p.test(o))return{code:"ERR_SLICE_INVALID_SUBSEQUENCE"};if((o=parseInt(o,10))<0){if((o=t+o)<0)if(n[2]>0){if(e)return{code:"ERR_SLICE_OUT_OF_BOUNDS"};o=0}else{if(e&&o<-1)return{code:"ERR_SLICE_OUT_OF_BOUNDS"};o=null}}else if(o>t){if(e)return{code:"ERR_SLICE_OUT_OF_BOUNDS"};o=t}n[1]=o}return 0===t?new bu(0,0,n[2]):new bu(n[0],n[1],n[2])}var Qp,Xp="Slice(",Zp=3,Kp=/\s*,\s*/,rg=/^-?[0-9]+$/,tg=void 0!==String.prototype.startsWith,eg=String.prototype.startsWith;Qp=tg?function(r,t,e){var n;return n=e<0?r.length+e:e,0===t.length||!(n<0||n+t.length>r.length)&&eg.call(r,t,n)}:function(r,t,e){var n,i;if(n=e<0?r.length+e:e,0===t.length)return!0;if(n<0||n+t.length>r.length)return!1;for(i=0;i<t.length;i++)if(r.charCodeAt(n+i)!==t.charCodeAt(i))return!1;return!0};var ng=Qp,ig=/:/;function og(r,t){var e=function(r){var t,e,n,i,o;if(r.substring(0,Xp.length)!==Xp)return null;if(")"!==r[n=r.length-1])return null;if((r=(r=Np(r.substring(Xp.length,n))).split(Kp)).length!==Zp)return null;for(t=[],o=0;o<Zp;o++){if("null"===(i=r[o]))e=null;else{if(!rg.test(i))return null;e=parseInt(i,10)}t.push(e)}return new bu(t[0],t[1],t[2])}(t);if(null===e)throw new Error(j("invalid operation. Unsupported slice operation. Value: `%s`.",r));return e}function ag(r,t,e){var n=Np(t);return function(r){return"S"===r[0]&&ng(r,"Slice(",0)&&")"===r[r.length-1]}(n)?og(t,n):function(r){return ig.test(r)}(n)?function(r,t,e,n){var i=Jp(t,e,!0);if(i.code){if("ERR_SLICE_INVALID_INCREMENT"===i.code)throw new Error(j("invalid operation. A subsequence increment must be a non-zero integer. Value: `%s`.",r));if("ERR_SLICE_INVALID_SUBSEQUENCE"===i.code)throw new Error(j("invalid operation. Unsupported slice operation. Value: `%s`.",r));if("ERR_SLICE_OUT_OF_BOUNDS"===i.code){if(n)throw new RangeError(j("invalid operation. Slice exceeds array bounds."));i=Jp(t,e,!1)}}return i}(t,n,r.length,e):null}function ug(r){return function(t,e,n){return Op(e)?function(r,t,e){return e.getter(r,Dp(t,r.length,e.strict))}(t,e,r):Lp(t,e)||!Mt(e)?function(r,t,e,n){var i=r[t];return ie(i)?i===r.constructor?n.ctor:function(){var t,n;for(t=[],n=0;n<arguments.length;n++)t.push(arguments[n]);return i.apply(this===e?r:this,t)}:i}(t,e,n,r):Bp(e)?function(r,t,e){var n=Up(t,e.cache);if("int"===n.type)return e.postGetArray(op(r,n.data));if("bool"===n.type)return e.postGetArray(oh(r,n.data));if("mask"===n.type)return e.postGetArray(fh(r,n.data));throw new Error(j("invalid operation. Unrecognized array index type. Value: `%s`.",n.type))}(t,e,r):function(r,t,e){var n=ag(r,t,e.strict);if(null!==n)try{return e.postGetArray(bf(r,n,e.strict))}catch(r){throw new r.constructor(Yp(r.message))}}(t,e,r)}}function fg(r,t,e){return r[t]=e,!0}function lg(r){return function(t,e,n,i){var o;return Op(e)?function(r,t,e,n){var i,o;if(i=n.validator(e,n.dtype))throw i;return o=n.preSetElement?n.preSetElement(e):e,n.setter(r,Dp(t,r.length,n.strict),o),!0}(t,e,n,r):Lp(t,e)||!Mt(e)?fg(t,e,n):Bp(e)?function(r,t,e,n){var i,o,a,u,f;if(a=Up(t,n.cache),i=n.dtype||"generic",It(e))f=e;else{if(u=n.validator(e,i))throw u;f=hc(f=n.preSetElement?n.preSetElement(e):e,i),o=i}if("int"===a.type){try{Jh(r,a.data,f)}catch(u){throw new u.constructor(Yp(u.message))}return!0}if("bool"===a.type){try{Sh(r,a.data,f,{mode:"strict_broadcast"})}catch(u){throw new u.constructor(Yp(u.message))}return!0}if(void 0===o&&(o=Ze(e)||"generic"),!Ai(o,i))throw new TypeError(j("invalid operation. Assigned value cannot be safely cast to the target array data type. Data types: [%s, %s].",o,i));if(An(i)&&ji(o)&&(f=Af(f,i)),"mask"===a.type){try{Zl(a.data,r,f,r,1,0)}catch(u){throw new u.constructor(Yp(u.message))}return!0}throw new Error(j("invalid operation. Unrecognized array index type. Value: `%s`.",a.type))}(t,e,n,r):(o=function(r,t,e,n,i){var o,a,u;if(null===(a=ag(r,t,i.strict)))return!1;if(It(e))u=e;else{if(o=i.validator(e,i.dtype))throw o;u=hc(e,i.dtype||"generic")}try{Sf(u,n,a,i.strict)}catch(o){throw new o.constructor(Yp(o.message))}return!0}(t,e,n,i,r),o||fg(t,e,n))}}function sg(){var r,t;if(r={cache:Oc,strict:!1},arguments.length&&(t=_p(r,arguments[0])))throw t;return function t(e){var n,i,o,a,u,f;if(!(null!=(f=e)&&"function"!=typeof f&&"number"==typeof f.length&&Et(f.length)&&f.length>=0&&f.length<=jt||It(e)))throw new TypeError(j("invalid argument. First argument must be array-like. Value: `%s`.",e));if(Ep){if(n=dp({},r),arguments.length>1&&(i=_p(n,arguments[1])))throw i;return u={ref:e,dtype:a=(o=nn(e)).dtype||"",getter:o.accessors[0],setter:o.accessors[1],preSetElement:wp(a),postGetArray:bp(t,n),cache:n.cache,strict:n.strict,validator:jp(a),array2fancy:t,ctor:new sp(e.constructor||Array,{construct:kp(t,n)})},new sp(e,{get:ug(u),set:lg(u)})}return console.warn("WARNING: Proxy objects are not supported in the current environment. Some `FancyArray` functionality may not be available."),e}}var cg=sg();N(cg,"factory",sg),N(cg,"idx",Oc);var hg=ts.get("dtypes.default"),pg=jh("complex64"),gg=jh("complex128"),yg=jh("bool"),mg={complex128:Ye,complex64:Oe};function dg(r){return mg[r]||null}var vg=ts.get("dtypes.complex_floating_point"),wg={int16:Hr,int32:Br,int8:ht,uint16:Dr,uint32:Fr,uint8:rt,uint8c:ot},bg=ts.get("dtypes.real"),Eg={float64:mr,float32:_r,int16:Hr,int32:Br,int8:ht,uint16:Dr,uint32:Fr,uint8:rt,uint8c:ot},_g={float64:mr,float32:_r},Tg={int16:Hr,int32:Br,int8:ht},xg={uint16:Dr,uint32:Fr,uint8:rt,uint8c:ot},Vg=ts.get("dtypes.default");function Ag(r){var t;if(!At(r))throw new TypeError(j("invalid argument. First argument must be a nonnegative integer. Value: `%s`.",r));if(arguments.length>1){if("generic"===(t=arguments[1]))return ru(r)}else t=Vg;return ru.assign(os(r,t),1,0)}var Sg={};C(Sg,"MAX_ARRAY_LENGTH",jt),C(Sg,"MAX_TYPED_ARRAY_LENGTH",Lt);var Fg={};return C(Fg,"base",ls),C(Fg,"BooleanArray",He),C(Fg,"ArrayBuffer",gs),C(Fg,"byteOrders",xn),C(Fg,"cartesianPower",(function(r,t){if(!It(r))throw new TypeError(j("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if(!At(t))throw new TypeError(j("invalid argument. Second argument must be a nonnegative integer. Value: `%s`.",t));return Wa(r,t)})),C(Fg,"cartesianProduct",(function(r,t){if(!It(r))throw new TypeError(j("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if(!It(t))throw new TypeError(j("invalid argument. Second argument must be an array-like object. Value: `%s`.",t));return za(r,t)})),C(Fg,"cartesianSquare",(function(r){if(!It(r))throw new TypeError(j("invalid argument. First argument must be an array-like object. Value: `%s`.",r));return qa(r)})),C(Fg,"Complex64Array",Oe),C(Fg,"Complex128Array",Ye),C(Fg,"convert",Af),C(Fg,"convertSame",(function(r,t){var e=Ze(t);if(null===e)throw new TypeError(j("invalid argument. Second argument must have a recognized/supported data type. Type: `%s`. Value: `%s`.",e,t));return Af(r,e)})),C(Fg,"ctors",_f),C(Fg,"DataView",bs),C(Fg,"datespace",(function(r,t,e,n){var i,o,a,u,f,l,s,c,h;if(o=100,a=!0,i={round:"floor"},r=xs(r,"Start"),t=xs(t,"Stop"),arguments.length>2){if(3===arguments.length?Bt(e)?i=e:(o=e,a=!1):(i=n,o=e),0===o)return[];if(!Vt(o)||o<0)throw new TypeError(j("invalid argument. Length must be a positive integer. Value: `%s`.",o));if(a){if(!Bt(i))throw new TypeError(j("invalid argument. Options argument must be an object. Value: `%s`.",i));if(rr(i,"round")){if(!Mt(i.round))throw new TypeError(j("invalid option. `%s` option must be a string. Option: `%s`.","round",i.round));if(-1===Ts.indexOf(i.round))throw new Error(j('invalid option. `%s` option must be one of the following: "%s". Option: `%s`.',"round",Ts.join('", "'),i.round))}}}switch(i.round){case"round":l=Es;break;case"ceil":l=_u;break;default:l=bt}for(f=o-1,c=(t.getTime()-r.getTime())/f,s=r,(u=new Array(o))[0]=s,s=s.getTime(),h=1;h<f;h++)s+=c,u[h]=new Date(l(s));return u[f]=t,u})),C(Fg,"defaults",ts),C(Fg,"dtype",Ze),C(Fg,"dtypes",En),C(Fg,"empty",Vs),C(Fg,"emptyLike",(function(r){var t=Ze(r);if(null===t)throw new TypeError(j("invalid argument. First argument must be either an array, typed array, or complex typed array. Value: `%s`.",r));return arguments.length>1&&(t=arguments[1]),Vs(r.length,t)})),C(Fg,"filled",(function(){var r,t,e,n,i,o,a;if(t=arguments.length,(t-=1)>=0&&Mt(arguments[t])?(e=arguments[t],t-=1):e=Is,null===(n=_f(e)))throw new TypeError(j("invalid argument. Must provide a recognized data type. Value: `%s`.",e));if("generic"===e){if(t<=0)return[];if(r=arguments[0],a=arguments[1],1===t){if(At(a)?o=a:It(a)&&(o=a.length),void 0!==o)return qi(r,o);if(Rt(a))throw new Error("invalid arguments. Creating a generic array from an ArrayBuffer is not supported.");if(Bt(a)){if(!1===Ls)throw new TypeError(j("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, typed array, or array-like object. Value: `%s`.",a));if(!ie(a[we]))throw new TypeError(j("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",a));if(!ie((a=a[we]()).next))throw new TypeError(j("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",a));return function(r,t){var e;for(e=[];!r.next().done;)e.push(t);return e}(a,r)}throw new TypeError(j("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",a))}if(Rt(a))throw new Error("invalid arguments. Creating a generic array from an ArrayBuffer is not supported.");throw new TypeError(j("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",a))}if(t<=0)return new n(0);if(1===t)if(It(a=arguments[1]))i=new n(a.length);else if(Rt(a))i=new n(a);else if(At(a))i=new n(a);else{if(!Bt(a))throw new TypeError(j("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",a));if(!1===Ls)throw new TypeError(j("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, typed array, or array-like object. Value: `%s`.",a));if(!ie(a[we]))throw new TypeError(j("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",a));if(!ie((a=a[we]()).next))throw new TypeError(j("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",a));i=new n(ks(a))}else i=2===t?new n(arguments[1],arguments[2]):new n(arguments[1],arguments[2],arguments[3]);return i.length>0&&(r=arguments[0],An(e)?function(r,t){var e;for(e=0;e<r.length;e++)r.set(t,e)}(i,r):_n(e)?Fs(i.length,r?1:0,un(i,0),1):Fs(i.length,r,i,1)),i})),C(Fg,"filledBy",(function(){var r,t,e,n,i,o,a,u;if(0===(t=arguments.length))return new(i=_f(Ms))(0);if(Mt(e=arguments[0])){if(t>1)throw new TypeError("invalid arguments. Must provide a length, typed array, array-like object, or an iterable.");if(null===(i=_f(e)))throw new TypeError(j("invalid argument. Must provide a recognized data type. Value: `%s`.",e));return new i(0)}if(t<2)throw new TypeError("invalid arguments. Must provide a length, typed array, array-like object, or an iterable.");if(ie(arguments[t-=1]))if(ie(arguments[t-1])){if(r=arguments[t],n=arguments[t-=1],0===t)throw new TypeError("invalid arguments. Must provide a length, typed array, array-like object, or an iterable.")}else n=arguments[t];else{if(!(t>=2))throw new TypeError("invalid arguments. Must provide a length, typed array, array-like object, or an iterable.");if(r=arguments[t],!ie(n=arguments[t-=1]))throw new TypeError(j("invalid argument. Callback argument must be a function. Value: `%s`.",n))}if((t-=1)>=0&&Mt(arguments[t])?(e=arguments[t],t-=1):e=Ms,null===(i=_f(e)))throw new TypeError(j("invalid argument. Must provide a recognized data type. Value: `%s`.",e));if("generic"===e){if(u=arguments[0],0===t){if(At(u)?a=u:It(u)&&(a=u.length),void 0!==a)return Ff(a,n,r);if(Rt(u))throw new Error("invalid arguments. Creating a generic array from an ArrayBuffer is not supported.");if(Bt(u)){if(!1===Bs)throw new TypeError(j("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, typed array, or array-like object. Value: `%s`.",u));if(!ie(u[we]))throw new TypeError(j("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",u));if(!ie((u=u[we]()).next))throw new TypeError(j("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",u));return function(r,t,e){var n,i;for(n=[],i=-1;!r.next().done;)i+=1,n.push(t.call(e,i));return n}(u,n,r)}throw new TypeError(j("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",u))}if(Rt(u))throw new Error("invalid arguments. Creating a generic array from an ArrayBuffer is not supported.");throw new TypeError(j("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",u))}if(0===t)if(It(u=arguments[0]))o=new i(u.length);else if(Rt(u))o=new i(u);else if(At(u))o=new i(u);else{if(!Bt(u))throw new TypeError(j("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",u));if(!1===Bs)throw new TypeError(j("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, typed array, or array-like object. Value: `%s`.",u));if(!ie(u[we]))throw new TypeError(j("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",u));if(!ie((u=u[we]()).next))throw new TypeError(j("invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `%s`.",u));o=new i(ks(u))}else o=1===t?new i(arguments[0],arguments[1]):new i(arguments[0],arguments[1],arguments[2]);return o.length>0&&(An(e)||_n(e)?function(r,t,e){var n;for(n=0;n<r.length;n++)r.set(t.call(e,n),n)}(o,n,r):Rs(o.length,o,1,(function(t,e){return n.call(r,e)}))),o})),C(Fg,"fixedEndianFactory",Zs),C(Fg,"Float32ArrayFE",Ks),C(Fg,"Float64ArrayFE",rc),C(Fg,"Float32Array",_r),C(Fg,"Float64Array",mr),C(Fg,"iterator2array",(function(){var r,t,e,n,i,o,a,u,f;if(r=arguments[0],arguments.length>1)if(It(arguments[1])){if(n=arguments[1],arguments.length>2){if(!ie(e=arguments[2]))throw new TypeError(j("invalid argument. Callback argument must be a function. Value: `%s`.",e));t=arguments[3]}}else{if(!ie(e=arguments[1]))throw new TypeError(j("invalid argument. Callback argument must be a function. Value: `%s`.",e));t=arguments[2]}if(!js(r))throw new TypeError(j("invalid argument. Iterator argument must be an iterator protocol-compliant object. Value: `%s`.",r));if(u=-1,void 0===n){if(n=[],e){for(;u+=1,!(f=r.next()).done;)n.push(e.call(t,f.value,u));return n}for(;!(f=r.next()).done;)n.push(f.value);return n}if(i=n.length,a=Ze(n),o=D(n)?J(a):q(a),e){for(;u<i-1&&(u+=1,!(f=r.next()).done);)o(n,u,e.call(t,f.value,u));return n}for(;u<i-1&&(u+=1,!(f=r.next()).done);)o(n,u,f.value);return n})),C(Fg,"scalar2array",hc),C(Fg,"full",gc),C(Fg,"fullLike",(function(r,t){var e,n;if(null===(e=Ze(r)))throw new TypeError(j("invalid argument. First argument must be either an array, typed array, or complex typed array. Value: `%s`.",r));return arguments.length>2&&(e=arguments[2]),n="number"==typeof t?"complex128"===e?new oe(t,0):"complex64"===e?new ce(t,0):t:t,gc(r.length,n,e)})),C(Fg,"incrspace",(function(r,t,e){var n;if(!pt(r)||Cn(r))throw new TypeError(j("invalid argument. Start must be numeric. Value: `%s`.",r));if(!pt(t)||Cn(t))throw new TypeError(j("invalid argument. Stop must be numeric. Value: `%s`.",t));if(arguments.length<3)n=1;else if(!pt(n=e)||Cn(n))throw new TypeError(j("invalid argument. Increment must be numeric. Value: `%s`.",n));if(_u((t-r)/n)>xr)throw new RangeError("invalid arguments. Generated array exceeds maximum array length.");return cl(r,t,n)})),C(Fg,"ArrayIndex",Oc),C(Fg,"Int8Array",ht),C(Fg,"Int16Array",Hr),C(Fg,"Int32Array",Br),C(Fg,"linspace",Dc),C(Fg,"littleEndianFactory",Qc),C(Fg,"Float32ArrayLE",Xc),C(Fg,"Float64ArrayLE",Zc),C(Fg,"logspace",(function(r,t,e){if(!pt(r)||Cn(r))throw new TypeError(j("invalid argument. Exponent of start value must be numeric. Value: `%s`.",r));if(!pt(t)||Cn(t))throw new TypeError(j("invalid argument. Exponent of stop value must be numeric. Value: `%s`.",t));if(arguments.length<3)e=10;else if(!At(e))throw new TypeError(j("invalid argument. Length must be a nonnegative integer. Value: `%s`.",e));return gl(r,t,e)})),C(Fg,"minDataType",ih),C(Fg,"mostlySafeCasts",xi),C(Fg,"mskfilter",oh),C(Fg,"mskput",(function(r,t,e){var n,i,o,a;if(!It(r))throw new TypeError(j("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if(!It(t))throw new TypeError(j("invalid argument. Second argument must be an array-like object. Value: `%s`.",t));if(!It(e))throw new TypeError(j("invalid argument. Third argument must be an array-like object. Value: `%s`.",e));if(n={mode:"repeat"},arguments.length>3&&(i=function(r,t){return si(t)?rr(t,"mode")&&(r.mode=t.mode,!uh(r.mode))?new TypeError(j('invalid option. `%s` option must be one of the following: "%s". Option: `%s`.',"mode",ah.join('", "'),r.mode)):null:new TypeError(j("invalid argument. Options argument must be an object. Value: `%s`.",t))}(n,arguments[3]),i))throw i;if(o=Ze(r)||"generic",!Ai(a=Ze(e)||"generic",o))throw new TypeError(j("invalid argument. Third argument cannot be safely cast to the input array data type. Data types: [%s, %s].",a,o));return An(o)&&ji(a)&&(e=Af(e,o)),_l(r,t,e,n.mode)})),C(Fg,"mskreject",fh),C(Fg,"nans",(function(r){var t;if(arguments.length>1){if(!hh(t=arguments[1]))throw new TypeError(j('invalid argument. Second argument must be one of the following: "%s". Value: `%s`.',ch.join('", "'),t))}else t=ph;return gc(r,"complex128"===t?lh:"complex64"===t?sh:NaN,t)})),C(Fg,"nansLike",(function(r){var t,e;if(null===(t=Ze(r)))throw new TypeError(j("invalid argument. First argument must be either an array, typed array, or complex typed array. Value: `%s`.",r));if(arguments.length>1){if(t=arguments[1],-1===mh.indexOf(t))throw new TypeError(j('invalid argument. Second argument must be one of the following: "%s". Value: `%s`.',mh.join('", "'),t))}else if(-1===mh.indexOf(t))throw new TypeError(j('invalid argument. First argument must be one of the following data types: "%s". Value: `%s`.',mh.join('", "'),t));return e="complex128"===t?gh:"complex64"===t?yh:NaN,gc(r.length,e,t)})),C(Fg,"nextDataType",(function(r){return 0===arguments.length?function(){var r,t,e,n;for(e={},t=(r=ii(dh)).length,n=0;n<t;n++)e[r[n]]=dh[r[n]];return e}():rr(dh,r)?dh[r]:null})),C(Fg,"oneTo",wh),C(Fg,"oneToLike",(function(r){var t=Ze(r);if(null===t)throw new TypeError(j("invalid argument. First argument must be either an array, typed array, or complex typed array. Value: `%s`.",r));return arguments.length>1&&(t=arguments[1]),wh(r.length,t)})),C(Fg,"ones",(function(r){var t;return gc(r,"complex128"===(t=arguments.length>1?arguments[1]:_h)?bh:"complex64"===t?Eh:1,t)})),C(Fg,"onesLike",(function(r){var t,e;if(null===(t=Ze(r)))throw new TypeError(j("invalid argument. First argument must be either an array, typed array, or complex typed array. Value: `%s`.",r));return arguments.length>1&&(t=arguments[1]),e="complex128"===t?Th:"complex64"===t?xh:1,gc(r.length,e,t)})),C(Fg,"place",Sh),C(Fg,"typedarraypool",$h),C(Fg,"promotionRules",(function(r,t){var e;return 0===arguments.length?function(){var r,t,e,n,i,o,a,u,f;for(e={},t=(r=ii(Hh)).length,f=0;f<t;f++){for(i=r[f],a=Hh[i],n={},u=0;u<t;u++)n[o=r[u]]=a[o];e[i]=n}return e}():(r=Ei(r),rr(Hh,r)&&rr(e=Hh[r],t=Ei(t))?e[t]:null)})),C(Fg,"put",Jh),C(Fg,"typedarrayReviver",(function(r,t){var e;return t&&t.type&&ir(t.data)&&(e=Qh[t.type])?new e(t.data):t})),C(Fg,"safeCasts",Ii),C(Fg,"sameKindCasts",Pi),C(Fg,"shape",(function(r){var t,e;if(!kt(r))throw new TypeError(j("invalid argument. Must provide an array-like object. Value: `%s`.",r));return Xh(t=[r.length],r),(e=t.length)>1&&(t.length=Zh(e,t,1,r,e>2)),t})),C(Fg,"SharedArrayBuffer",ip),C(Fg,"slice",(function(r){var t,e;if(!It(r))throw new TypeError(j("invalid argument. First argument must be an array-like object. Value: `%s`.",r));if(arguments.length>1){if(!Tt(t=arguments[1]))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",t));if(arguments.length>2){if(!Tt(e=arguments[2]))throw new TypeError(j("invalid argument. Third argument must be an integer. Value: `%s`.",e))}else e=r.length}else t=0,e=r.length;return Nl(r,t,e)})),C(Fg,"take",op),C(Fg,"circarray2iterator",(function r(t){var e,n,i,o,a,u,f,l,s,c;if(!It(t))throw new TypeError(j("invalid argument. First argument must be an array-like object. Value: `%s`.",t));if(o={iter:1e308,dir:1},arguments.length>1)if(si(arguments[1])){if(n=arguments[1],arguments.length>2){if(!ie(f=arguments[2]))throw new TypeError(j("invalid argument. Callback argument must be a function. Value: `%s`.",f));e=arguments[3]}if(rr(n,"iter")&&(o.iter=n.iter,!At(n.iter)))throw new TypeError(j("invalid option. `%s` option must be a nonnegative integer. Option: `%s`.","iter",n.iter));if(rr(n,"dir")&&(o.dir=n.dir,1!==n.dir&&-1!==n.dir))throw new TypeError(j("invalid option. `%s` option must be either `1` or `-1`. Option: `%s`.","dir",n.dir))}else{if(!ie(f=arguments[1]))throw new TypeError(j("invalid argument. Second argument must be either a function or an options object. Value: `%s`.",f));e=arguments[2]}return i=0,a={},f?1===o.dir?(c=-1,N(a,"next",(function(){return c=(c+1)%t.length,i+=1,u||i>o.iter||0===t.length?{done:!0}:{value:f.call(e,l(t,c),c,i,t),done:!1}}))):(c=t.length,N(a,"next",(function(){return(c-=1)<0&&(c+=t.length),i+=1,u||i>o.iter||0===t.length?{done:!0}:{value:f.call(e,l(t,c),c,i,t),done:!1}}))):1===o.dir?(c=-1,N(a,"next",(function(){return c=(c+1)%t.length,i+=1,u||i>o.iter||0===t.length?{done:!0}:{value:l(t,c),done:!1}}))):(c=t.length,N(a,"next",(function(){return(c-=1)<0&&(c+=t.length),i+=1,u||i>o.iter||0===t.length?{done:!0}:{value:l(t,c),done:!1}}))),N(a,"return",(function(r){return u=!0,arguments.length?{value:r,done:!0}:{done:!0}})),we&&N(a,we,(function(){return f?r(t,o,f,e):r(t,o)})),s=Ze(t),l=D(t)?$(s):W(s),a})),C(Fg,"array2fancy",cg),C(Fg,"array2iterator",(function r(t){var e,n,i,o,a,u,f;if(!It(t))throw new TypeError(j("invalid argument. First argument must be an array-like object. Value: `%s`.",t));if(arguments.length>1){if(!ie(o=arguments[1]))throw new TypeError(j("invalid argument. Second argument must be a function. Value: `%s`.",o));e=arguments[2]}return f=-1,N(n={},"next",o?function(){return f+=1,i||f>=t.length?{done:!0}:{value:o.call(e,a(t,f),f,t),done:!1}}:function(){return f+=1,i||f>=t.length?{done:!0}:{value:a(t,f),done:!1}}),N(n,"return",(function(r){return i=!0,arguments.length?{value:r,done:!0}:{done:!0}})),we&&N(n,we,(function(){return o?r(t,o,e):r(t)})),u=Ze(t),a=D(t)?$(u):W(u),n})),C(Fg,"array2iteratorRight",(function r(t){var e,n,i,o,a,u,f,l;if(!It(t))throw new TypeError(j("invalid argument. First argument must be an array-like object. Value: `%s`.",t));if(arguments.length>1){if(!ie(o=arguments[1]))throw new TypeError(j("invalid argument. Second argument must be a function. Value: `%s`.",o));e=arguments[2]}return a=t.length,l=a,N(n={},"next",o?function(){return l+=t.length-a-1,a=t.length,i||l<0?(i=!0,{done:!0}):{value:o.call(e,u(t,l),l,t),done:!1}}:function(){return l+=t.length-a-1,a=t.length,i||l<0?(i=!0,{done:!0}):{value:u(t,l),done:!1}}),N(n,"return",(function(r){return i=!0,arguments.length?{value:r,done:!0}:{done:!0}})),we&&N(n,we,(function(){return o?r(t,o,e):r(t)})),f=Ze(t),u=D(t)?$(f):W(f),n})),C(Fg,"typedarray2json",Sc),C(Fg,"sparsearray2iterator",(function r(t){var e,n,i,o,a,u,f;if(!It(t))throw new TypeError(j("invalid argument. First argument must be an array-like object. Value: `%s`.",t));if(arguments.length>1){if(!ie(o=arguments[1]))throw new TypeError(j("invalid argument. Second argument must be a function. Value: `%s`.",o));e=arguments[2]}return f=-1,N(n={},"next",o?function(){var r;if(i)return{done:!0};for(r=t.length,f+=1;f<r&&void 0===a(t,f);)f+=1;return f>=r?(i=!0,{done:!0}):{value:o.call(e,a(t,f),f,t),done:!1}}:function(){var r;if(i)return{done:!0};for(r=t.length,f+=1;f<r&&void 0===a(t,f);)f+=1;return f>=r?(i=!0,{done:!0}):{value:a(t,f),done:!1}}),N(n,"return",(function(r){return i=!0,arguments.length?{value:r,done:!0}:{done:!0}})),we&&N(n,we,(function(){return o?r(t,o,e):r(t)})),u=Ze(t),a=D(t)?$(u):W(u),n})),C(Fg,"sparsearray2iteratorRight",(function r(t){var e,n,i,o,a,u,f,l;if(!It(t))throw new TypeError(j("invalid argument. First argument must be an array-like object. Value: `%s`.",t));if(arguments.length>1){if(!ie(o=arguments[1]))throw new TypeError(j("invalid argument. Second argument must be a function. Value: `%s`.",o));e=arguments[2]}return a=t.length,l=a,N(n={},"next",o?function(){if(i)return{done:!0};for(l+=t.length-a-1,a=t.length;l>=0&&void 0===u(t,l);)l-=1;return l<0?(i=!0,{done:!0}):{value:o.call(e,u(t,l),l,t),done:!1}}:function(){if(i)return{done:!0};for(l+=t.length-a-1,a=t.length;l>=0&&void 0===u(t,l);)l-=1;return l<0?(i=!0,{done:!0}):{value:u(t,l),done:!1}}),N(n,"return",(function(r){return i=!0,arguments.length?{value:r,done:!0}:{done:!0}})),we&&N(n,we,(function(){return o?r(t,o,e):r(t)})),f=Ze(t),u=D(t)?$(f):W(f),n})),C(Fg,"stridedarray2iterator",(function r(t,e,n,i){var o,a,u,f,l,s,c,h;if(!At(t))throw new TypeError(j("invalid argument. First argument must be a nonnegative integer. Value: `%s`.",t));if(!It(e))throw new TypeError(j("invalid argument. Second argument must be an array-like object. Value: `%s`.",e));if(!Tt(n))throw new TypeError(j("invalid argument. Third argument must be an integer. Value: `%s`.",n));if(!At(i))throw new TypeError(j("invalid argument. Fourth argument must be a nonnegative integer. Value: `%s`.",i));if(arguments.length>4){if(!ie(f=arguments[4]))throw new TypeError(j("invalid argument. Fifth argument must be a function. Value: `%s`.",f));o=arguments[5]}return l=i,h=-1,N(a={},"next",f?function(){var r;return h+=1,u||h>=t?{done:!0}:(r=f.call(o,s(e,l),l,h,e),l+=n,{value:r,done:!1})}:function(){var r;return h+=1,u||h>=t?{done:!0}:(r=s(e,l),l+=n,{value:r,done:!1})}),N(a,"return",(function(r){return u=!0,arguments.length?{value:r,done:!0}:{done:!0}})),we&&N(a,we,(function(){return f?r(t,e,n,i,f,o):r(t,e,n,i)})),c=Ze(e),s=D(e)?$(c):W(c),a})),C(Fg,"arrayview2iterator",(function r(t){var e,n,i,o,a,u,f,l,s,c;if(!It(t))throw new TypeError(j("invalid argument. First argument must be an array-like object. Value: `%s`.",t));if(1===(i=arguments.length))n=0,f=t.length;else if(2===i)ie(arguments[1])?(n=0,u=arguments[1]):n=arguments[1],f=t.length;else if(3===i)ie(arguments[1])?(n=0,f=t.length,u=arguments[1],e=arguments[2]):ie(arguments[2])?(n=arguments[1],f=t.length,u=arguments[2]):(n=arguments[1],f=arguments[2]);else{if(n=arguments[1],f=arguments[2],!ie(u=arguments[3]))throw new TypeError(j("invalid argument. Fourth argument must be a function. Value: `%s`.",u));e=arguments[4]}if(!Tt(n))throw new TypeError(j("invalid argument. Second argument must be either an integer (starting index) or a function. Value: `%s`.",n));if(!Tt(f))throw new TypeError(j("invalid argument. Third argument must be either an integer (ending index) or a function. Value: `%s`.",f));return f<0?(f=t.length+f)<0&&(f=0):f>t.length&&(f=t.length),n<0&&(n=t.length+n)<0&&(n=0),c=n-1,N(o={},"next",u?function(){return c+=1,a||c>=f?{done:!0}:{value:u.call(e,l(t,c),c,c-n,t),done:!1}}:function(){return c+=1,a||c>=f?{done:!0}:{value:l(t,c),done:!1}}),N(o,"return",(function(r){return a=!0,arguments.length?{value:r,done:!0}:{done:!0}})),we&&N(o,we,(function(){return u?r(t,n,f,u,e):r(t,n,f)})),s=Ze(t),l=D(t)?$(s):W(s),o})),C(Fg,"arrayview2iteratorRight",(function r(t){var e,n,i,o,a,u,f,l,s,c;if(!It(t))throw new TypeError(j("invalid argument. First argument must be an array-like object. Value: `%s`.",t));if(1===(i=arguments.length))n=0,f=t.length;else if(2===i)ie(arguments[1])?(n=0,u=arguments[1]):n=arguments[1],f=t.length;else if(3===i)ie(arguments[1])?(n=0,f=t.length,u=arguments[1],e=arguments[2]):ie(arguments[2])?(n=arguments[1],f=t.length,u=arguments[2]):(n=arguments[1],f=arguments[2]);else{if(n=arguments[1],f=arguments[2],!ie(u=arguments[3]))throw new TypeError(j("invalid argument. Fourth argument must be a function. Value: `%s`.",u));e=arguments[4]}if(!Tt(n))throw new TypeError(j("invalid argument. Second argument must be either an integer (starting view index) or a function. Value: `%s`.",n));if(!Tt(f))throw new TypeError(j("invalid argument. Third argument must be either an integer (ending view index) or a function. Value: `%s`.",f));return f<0?(f=t.length+f)<0&&(f=0):f>t.length&&(f=t.length),n<0&&(n=t.length+n)<0&&(n=0),c=f,N(o={},"next",u?function(){return c-=1,a||c<n?{done:!0}:{value:u.call(e,l(t,c),c,f-c-1,t),done:!1}}:function(){return c-=1,a||c<n?{done:!0}:{value:l(t,c),done:!1}}),N(o,"return",(function(r){return a=!0,arguments.length?{value:r,done:!0}:{done:!0}})),we&&N(o,we,(function(){return u?r(t,n,f,u,e):r(t,n,f)})),s=Ze(t),l=D(t)?$(s):W(s),o})),C(Fg,"typedarray",(function(){var r,t,e,n;if(null===(e=jh(t=(r=arguments.length)&&Mt(arguments[r-1])?arguments[r-=1]:hg)))throw new TypeError(j("invalid argument. Must provide a recognized data type. Value: `%s`.",t));return r<=0?new e(0):1===r?((n=arguments[0])instanceof pg?n=Te(n,0):n instanceof gg?n=Ae(n,0):n instanceof yg&&(n=un(n,0)),new e(n)):2===r?new e(arguments[0],arguments[1]):new e(arguments[0],arguments[1],arguments[2])})),C(Fg,"complexarray",(function(){var r,t,e;if(null===(e=dg(t=(r=arguments.length)&&Mt(arguments[r-1])?arguments[r-=1]:vg)))throw new TypeError(j("invalid argument. Must provide a recognized data type. Value: `%s`.",t));return r<=0?new e(0):1===r?new e(arguments[0]):2===r?new e(arguments[0],arguments[1]):new e(arguments[0],arguments[1],arguments[2])})),C(Fg,"complexarrayCtors",dg),C(Fg,"complexarrayDataTypes",(function(){return En("complex_floating_point")})),C(Fg,"typedarrayCtors",jh),C(Fg,"typedarrayDataTypes",(function(){return En("typed")})),C(Fg,"floatarrayCtors",Bc),C(Fg,"floatarrayDataTypes",(function(){return En("floating_point")})),C(Fg,"intarrayCtors",(function(r){return wg[r]||null})),C(Fg,"intarrayDataTypes",(function(){return En("integer")})),C(Fg,"realarray",(function(){var r,t,e;if(null===(e=jh(t=(r=arguments.length)&&Mt(arguments[r-1])?arguments[r-=1]:bg)))throw new TypeError(j("invalid argument. Must provide a recognized data type. Value: `%s`.",t));return r<=0?new e(0):1===r?new e(arguments[0]):2===r?new e(arguments[0],arguments[1]):new e(arguments[0],arguments[1],arguments[2])})),C(Fg,"realarrayCtors",(function(r){return Eg[r]||null})),C(Fg,"realarrayDataTypes",(function(){return En("real")})),C(Fg,"realarrayFloatCtors",(function(r){return _g[r]||null})),C(Fg,"realarrayFloatDataTypes",(function(){return En("real_floating_point")})),C(Fg,"intarraySignedCtors",(function(r){return Tg[r]||null})),C(Fg,"intarraySignedDataTypes",(function(){return En("signed_integer")})),C(Fg,"intarrayUnsignedCtors",(function(r){return xg[r]||null})),C(Fg,"intarrayUnsignedDataTypes",(function(){return En("unsigned_integer")})),C(Fg,"Uint8Array",rt),C(Fg,"Uint8ClampedArray",ot),C(Fg,"Uint16Array",Dr),C(Fg,"Uint32Array",Fr),C(Fg,"zeroTo",Ag),C(Fg,"zeroToLike",(function(r){var t=Ze(r);if(null===t)throw new TypeError(j("invalid argument. First argument must be either an array, typed array, or complex typed array. Value: `%s`.",r));return arguments.length>1&&(t=arguments[1]),Ag(r.length,t)})),C(Fg,"zeros",os),C(Fg,"zerosLike",(function(r){var t=Ze(r);if(null===t)throw new TypeError(j("invalid argument. First argument must be either an array, typed array, or complex typed array. Value: `%s`.",r));return arguments.length>1&&(t=arguments[1]),os(r.length,t)})),C(Fg,"constants",Sg),Fg},"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(r="undefined"!=typeof globalThis?globalThis:r||self).ns=t();
//# sourceMappingURL=browser.js.map