-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbrowser.js
More file actions
3 lines (3 loc) · 189 KB
/
browser.js
File metadata and controls
3 lines (3 loc) · 189 KB
1
2
3
// Copyright (c) 2026 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).Uint16Vector=e()}(this,(function(){"use strict";var t="function"==typeof Object.defineProperty?Object.defineProperty:null;var e=Object.defineProperty;function n(t){return"number"==typeof t}function r(t){var e,n="";for(e=0;e<t;e++)n+="0";return n}function i(t,e,n){var i=!1,o=e-t.length;return o<0||(function(t){return"-"===t[0]}(t)&&(i=!0,t=t.substr(1)),t=n?t+r(o):r(o)+t,i&&(t="-"+t)),t}var o=String.prototype.toLowerCase,a=String.prototype.toUpperCase;function u(t){var e,r,u;switch(t.specifier){case"b":e=2;break;case"o":e=8;break;case"x":case"X":e=16;break;default:e=10}if(r=t.arg,u=parseInt(r,10),!isFinite(u)){if(!n(r))throw new Error("invalid integer. Value: "+r);u=0}return u<0&&("u"===t.specifier||10!==e)&&(u=4294967295+u+1),u<0?(r=(-u).toString(e),t.precision&&(r=i(r,t.precision,t.padRight)),r="-"+r):(r=u.toString(e),u||t.precision?t.precision&&(r=i(r,t.precision,t.padRight)):r="",t.sign&&(r=t.sign+r)),16===e&&(t.alternate&&(r="0x"+r),r=t.specifier===a.call(t.specifier)?a.call(r):o.call(r)),8===e&&t.alternate&&"0"!==r.charAt(0)&&(r="0"+r),r}var f=Math.abs,s=String.prototype.toLowerCase,l=String.prototype.toUpperCase,c=String.prototype.replace,h=/e\+(\d)$/,p=/e-(\d)$/,g=/^(\d+)$/,y=/^(\d+)e/,m=/\.0$/,d=/\.0*e/,b=/(\..*[^0])0*e/;function v(t,e){var n,r;switch(e.specifier){case"e":case"E":r=t.toExponential(e.precision);break;case"f":case"F":r=t.toFixed(e.precision);break;case"g":case"G":f(t)<1e-4?((n=e.precision)>0&&(n-=1),r=t.toExponential(n)):r=t.toPrecision(e.precision),e.alternate||(r=c.call(r,b,"$1e"),r=c.call(r,d,"e"),r=c.call(r,m,""));break;default:throw new Error("invalid double notation. Value: "+e.specifier)}return r=c.call(r,h,"e+0$1"),r=c.call(r,p,"e-0$1"),e.alternate&&(r=c.call(r,g,"$1."),r=c.call(r,y,"$1.e")),t>=0&&e.sign&&(r=e.sign+r),r=e.specifier===l.call(e.specifier)?l.call(r):s.call(r)}function w(t){var e,n="";for(e=0;e<t;e++)n+=" ";return n}var _=String.fromCharCode,E=Array.isArray;function x(t){return t!=t}function T(t){var e={};return e.specifier=t.specifier,e.precision=void 0===t.precision?1:t.precision,e.width=t.width,e.flags=t.flags||"",e.mapping=t.mapping,e}function A(t){var e,r,o,a,f,s,l,c,h,p,g,y,m,d;if(!E(t))throw new TypeError("invalid argument. First argument must be an array. Value: `"+t+"`.");for(s="",l=1,h=0;h<t.length;h++)if(o=t[h],"string"==typeof o)s+=o;else{if(e=void 0!==o.precision,!(o=T(o)).specifier)throw new TypeError("invalid argument. Token is missing `specifier` property. Index: `"+h+"`. Value: `"+o+"`.");for(o.mapping&&(l=o.mapping),r=o.flags,p=0;p<r.length;p++)switch(a=r.charAt(p)){case" ":o.sign=" ";break;case"+":o.sign="+";break;case"-":o.padRight=!0,o.padZeros=!1;break;case"0":o.padZeros=r.indexOf("-")<0;break;case"#":o.alternate=!0;break;default:throw new Error("invalid flag: "+a)}if("*"===o.width){if(o.width=parseInt(arguments[l],10),l+=1,x(o.width))throw new TypeError("the argument for * width at position "+l+" is not a number. Value: `"+o.width+"`.");o.width<0&&(o.padRight=!0,o.width=-o.width)}if(e&&"*"===o.precision){if(o.precision=parseInt(arguments[l],10),l+=1,x(o.precision))throw new TypeError("the argument for * precision at position "+l+" is not a number. Value: `"+o.precision+"`.");o.precision<0&&(o.precision=1,e=!1)}switch(o.arg=arguments[l],o.specifier){case"b":case"o":case"x":case"X":case"d":case"i":case"u":e&&(o.padZeros=!1),o.arg=u(o);break;case"s":o.maxWidth=e?o.precision:-1,o.arg=String(o.arg);break;case"c":if(!x(o.arg)){if((f=parseInt(o.arg,10))<0||f>127)throw new Error("invalid character code. Value: "+o.arg);o.arg=x(f)?String(o.arg):_(f)}break;case"e":case"E":case"f":case"F":case"g":case"G":if(e||(o.precision=6),c=parseFloat(o.arg),!isFinite(c)){if(!n(o.arg))throw new Error("invalid floating-point number. Value: "+s);c=o.arg,o.padZeros=!1}o.arg=v(c,o);break;default:throw new Error("invalid specifier: "+o.specifier)}o.maxWidth>=0&&o.arg.length>o.maxWidth&&(o.arg=o.arg.substring(0,o.maxWidth)),o.padZeros?o.arg=i(o.arg,o.width||o.precision,o.padRight):o.width&&(o.arg=(g=o.arg,y=o.width,m=o.padRight,d=void 0,(d=y-g.length)<0?g:g=m?g+w(d):w(d)+g)),s+=o.arg||"",l+=1}return s}var O=/%(?:([1-9]\d*)\$)?([0 +\-#]*)(\*|\d+)?(?:(\.)(\*|\d+)?)?[hlL]?([%A-Za-z])/g;function V(t){var e={mapping:t[1]?parseInt(t[1],10):void 0,flags:t[2],width:t[3],precision:t[5],specifier:t[6]};return"."===t[4]&&void 0===t[5]&&(e.precision="1"),e}function S(t){var e,n,r,i;for(n=[],i=0,r=O.exec(t);r;)(e=t.slice(i,O.lastIndex-r[0].length)).length&&n.push(e),"%"===r[6]?n.push("%"):n.push(V(r)),i=O.lastIndex,r=O.exec(t);return(e=t.slice(i)).length&&n.push(e),n}function j(t){var e,n;if("string"!=typeof t)throw new TypeError(j("invalid argument. First argument must be a string. Value: `%s`.",t));for(e=[S(t)],n=1;n<arguments.length;n++)e.push(arguments[n]);return A.apply(null,e)}var R,L=Object.prototype,B=L.toString,F=L.__defineGetter__,I=L.__defineSetter__,U=L.__lookupGetter__,P=L.__lookupSetter__;R=function(){try{return t({},"x",{}),!0}catch(t){return!1}}()?e:function(t,e,n){var r,i,o,a;if("object"!=typeof t||null===t||"[object Array]"===B.call(t))throw new TypeError(j("invalid argument. First argument must be an object. Value: `%s`.",t));if("object"!=typeof n||null===n||"[object Array]"===B.call(n))throw new TypeError(j("invalid argument. Property descriptor must be an object. Value: `%s`.",n));if((i="value"in n)&&(U.call(t,e)||P.call(t,e)?(r=t.__proto__,t.__proto__=L,delete t[e],t[e]=n.value,t.__proto__=r):t[e]=n.value),o="get"in n,a="set"in n,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&&F&&F.call(t,e,n.get),a&&I&&I.call(t,e,n.set),t};var k=R;function M(t,e,n){k(t,e,{configurable:!1,enumerable:!1,writable:!1,value:n})}function N(t){return"number"==typeof t}var C="function"==typeof Symbol&&"symbol"==typeof Symbol("foo");function Y(){return C&&"symbol"==typeof Symbol.toStringTag}var D=Object.prototype.toString;var z=Object.prototype.hasOwnProperty;function J(t,e){return null!=t&&z.call(t,e)}var W="function"==typeof Symbol?Symbol:void 0,$="function"==typeof W?W.toStringTag:"";var G=Y()?function(t){var e,n,r;if(null==t)return D.call(t);n=t[$],e=J(t,$);try{t[$]=void 0}catch(e){return D.call(t)}return r=D.call(t),e?t[$]=n:delete t[$],r}:function(t){return D.call(t)},q=Number,Z=q.prototype.toString;var X=Y();function H(t){return"object"==typeof t&&(t instanceof q||(X?function(t){try{return Z.call(t),!0}catch(t){return!1}}(t):"[object Number]"===G(t)))}function K(t){return N(t)||H(t)}M(K,"isPrimitive",N),M(K,"isObject",H);var Q=Number.POSITIVE_INFINITY,tt=q.NEGATIVE_INFINITY,et=Math.floor;function nt(t){return et(t)===t}function rt(t){return t<Q&&t>tt&&nt(t)}function it(t){return N(t)&&rt(t)}function ot(t){return H(t)&&rt(t.valueOf())}function at(t){return it(t)||ot(t)}function ut(t){return it(t)&&t>=0}function ft(t){return ot(t)&&t.valueOf()>=0}function st(t){return ut(t)||ft(t)}function lt(){return"function"==typeof W&&"symbol"==typeof W("foo")&&J(W,"iterator")&&"symbol"==typeof W.iterator}function ct(t){return function(){return t}}M(at,"isPrimitive",it),M(at,"isObject",ot),M(st,"isPrimitive",ut),M(st,"isObject",ft);var ht=/./;function pt(t){return"boolean"==typeof t}var gt=Boolean,yt=Boolean.prototype.toString;var mt=Y();function dt(t){return"object"==typeof t&&(t instanceof gt||(mt?function(t){try{return yt.call(t),!0}catch(t){return!1}}(t):"[object Boolean]"===G(t)))}function bt(t){return pt(t)||dt(t)}M(bt,"isPrimitive",pt),M(bt,"isObject",dt);var vt="object"==typeof self?self:null,wt="object"==typeof window?window:null,_t="object"==typeof globalThis?globalThis:null;function Et(t){if(arguments.length){if(!pt(t))throw new TypeError(j("invalid argument. Must provide a boolean. Value: `%s`.",t));if(t)return new Function("return this;")()}if(_t)return _t;if(vt)return vt;if(wt)return wt;throw new Error("unexpected error. Unable to resolve global object.")}var xt=Et(),Tt=xt.document&&xt.document.childNodes,At=Int8Array;function Ot(){return/^\s*function\s*([^(]*)/i}var Vt,St=/^\s*function\s*([^(]*)/i;M(Ot,"REGEXP",St),Vt=Array.isArray?Array.isArray:function(t){return"[object Array]"===G(t)};var jt=Vt;function Rt(t){if("function"!=typeof t)throw new TypeError(j("invalid argument. Must provide a function. Value: `%s`.",t));return function(e){var n,r;if(!jt(e))return!1;if(0===(n=e.length))return!1;for(r=0;r<n;r++)if(!1===t(e[r]))return!1;return!0}}function Lt(t){return null!==t&&"object"==typeof t}function Bt(t){return Lt(t)&&(t._isBuffer||t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t))}function Ft(t){var e,n,r;if(("Object"===(n=G(t).slice(8,-1))||"Error"===n)&&t.constructor){if("string"==typeof(r=t.constructor).name)return r.name;if(e=St.exec(r.toString()))return e[1]}return Bt(t)?"Buffer":n}M(Lt,"isObjectLikeArray",Rt(Lt));var It="function"==typeof ht||"object"==typeof At||"function"==typeof Tt?function(t){return Ft(t).toLowerCase()}:function(t){var e;return null===t?"null":"object"===(e=typeof t)?Ft(t).toLowerCase():e};function Ut(t){return"function"===It(t)}var Pt,kt=lt()?Symbol.iterator:null;function Mt(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)&&Ut(t.next)}Pt=lt()?function(t){var e;return!function(t){var e=typeof t;return"string"===e||"number"===e||"boolean"===e||"symbol"===e||"bigint"===e||null==t}(t)&&Ut(e=t[kt])&&0===e.length&&Mt(t[kt]())}:ct(!1);var Nt=Pt,Ct="function"==typeof ArrayBuffer;function Yt(t){return Ct&&t instanceof ArrayBuffer||"[object ArrayBuffer]"===G(t)}var Dt=9007199254740991;function zt(t){return"object"==typeof t&&null!==t&&"number"==typeof t.length&&nt(t.length)&&t.length>=0&&t.length<=Dt}var Jt="function";function Wt(t){return typeof t.get===Jt&&typeof t.set===Jt}var $t={complex128:function(t,e){return t.get(e)},complex64:function(t,e){return t.get(e)},default:function(t,e){return t.get(e)}};function Gt(t){var e=$t[t];return"function"==typeof e?e:$t.default}var qt={float64:function(t,e){return t[e]},float32:function(t,e){return t[e]},int32:function(t,e){return t[e]},int16:function(t,e){return t[e]},int8:function(t,e){return t[e]},uint32:function(t,e){return t[e]},uint16:function(t,e){return t[e]},uint8:function(t,e){return t[e]},uint8c:function(t,e){return t[e]},generic:function(t,e){return t[e]},default:function(t,e){return t[e]}};function Zt(t){var e=qt[t];return"function"==typeof e?e:qt.default}var Xt={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"},Ht="function"==typeof Float64Array;var Kt="function"==typeof Float64Array?Float64Array:null;function Qt(){var t,e,n;if("function"!=typeof Kt)return!1;try{e=new Kt([1,3.14,-3.14,NaN]),n=e,t=(Ht&&n instanceof Float64Array||"[object Float64Array]"===G(n))&&1===e[0]&&3.14===e[1]&&-3.14===e[2]&&e[3]!=e[3]}catch(e){t=!1}return t}var te="function"==typeof Float64Array?Float64Array:void 0;var ee=Qt()?te:function(){throw new Error("not implemented")},ne="function"==typeof Float32Array;var re="function"==typeof Float32Array?Float32Array:null;var ie,oe="function"==typeof Float32Array?Float32Array:void 0;ie=function(){var t,e,n;if("function"!=typeof re)return!1;try{e=new re([1,3.14,-3.14,5e40]),n=e,t=(ne&&n instanceof Float32Array||"[object Float32Array]"===G(n))&&1===e[0]&&3.140000104904175===e[1]&&-3.140000104904175===e[2]&&e[3]===Q}catch(e){t=!1}return t}()?oe:function(){throw new Error("not implemented")};var ae=ie,ue="function"==typeof Uint32Array;var fe=4294967295,se="function"==typeof Uint32Array?Uint32Array:null;var le,ce="function"==typeof Uint32Array?Uint32Array:void 0;le=function(){var t,e,n;if("function"!=typeof se)return!1;try{e=new se(e=[1,3.14,-3.14,fe+1,fe+2]),n=e,t=(ue&&n instanceof Uint32Array||"[object Uint32Array]"===G(n))&&1===e[0]&&3===e[1]&&e[2]===fe-2&&0===e[3]&&1===e[4]}catch(e){t=!1}return t}()?ce:function(){throw new Error("not implemented")};var he=le,pe="function"==typeof Int32Array;var ge=2147483647,ye=-2147483648,me="function"==typeof Int32Array?Int32Array:null;var de,be="function"==typeof Int32Array?Int32Array:void 0;de=function(){var t,e,n;if("function"!=typeof me)return!1;try{e=new me([1,3.14,-3.14,ge+1]),n=e,t=(pe&&n instanceof Int32Array||"[object Int32Array]"===G(n))&&1===e[0]&&3===e[1]&&-3===e[2]&&e[3]===ye}catch(e){t=!1}return t}()?be:function(){throw new Error("not implemented")};var ve=de,we="function"==typeof Uint16Array;var _e=65535,Ee="function"==typeof Uint16Array?Uint16Array:null;var xe,Te="function"==typeof Uint16Array?Uint16Array:void 0;xe=function(){var t,e,n;if("function"!=typeof Ee)return!1;try{e=new Ee(e=[1,3.14,-3.14,_e+1,_e+2]),n=e,t=(we&&n instanceof Uint16Array||"[object Uint16Array]"===G(n))&&1===e[0]&&3===e[1]&&e[2]===_e-2&&0===e[3]&&1===e[4]}catch(e){t=!1}return t}()?Te:function(){throw new Error("not implemented")};var Ae=xe,Oe="function"==typeof Int16Array;var Ve=32767,Se=-32768,je="function"==typeof Int16Array?Int16Array:null;var Re,Le="function"==typeof Int16Array?Int16Array:void 0;Re=function(){var t,e,n;if("function"!=typeof je)return!1;try{e=new je([1,3.14,-3.14,Ve+1]),n=e,t=(Oe&&n instanceof Int16Array||"[object Int16Array]"===G(n))&&1===e[0]&&3===e[1]&&-3===e[2]&&e[3]===Se}catch(e){t=!1}return t}()?Le:function(){throw new Error("not implemented")};var Be=Re,Fe="function"==typeof Uint8Array;var Ie=255,Ue="function"==typeof Uint8Array?Uint8Array:null;var Pe,ke="function"==typeof Uint8Array?Uint8Array:void 0;Pe=function(){var t,e,n;if("function"!=typeof Ue)return!1;try{e=new Ue(e=[1,3.14,-3.14,Ie+1,Ie+2]),n=e,t=(Fe&&n instanceof Uint8Array||"[object Uint8Array]"===G(n))&&1===e[0]&&3===e[1]&&e[2]===Ie-2&&0===e[3]&&1===e[4]}catch(e){t=!1}return t}()?ke:function(){throw new Error("not implemented")};var Me=Pe,Ne="function"==typeof Uint8ClampedArray;var Ce="function"==typeof Uint8ClampedArray?Uint8ClampedArray:null;var Ye,De="function"==typeof Uint8ClampedArray?Uint8ClampedArray:void 0;Ye=function(){var t,e,n;if("function"!=typeof Ce)return!1;try{e=new Ce([-1,0,1,3.14,4.99,255,256]),n=e,t=(Ne&&n instanceof Uint8ClampedArray||"[object Uint8ClampedArray]"===G(n))&&0===e[0]&&0===e[1]&&1===e[2]&&3===e[3]&&5===e[4]&&255===e[5]&&255===e[6]}catch(e){t=!1}return t}()?De:function(){throw new Error("not implemented")};var ze=Ye,Je="function"==typeof Int8Array;var We=127,$e=-128,Ge="function"==typeof Int8Array?Int8Array:null;var qe,Ze="function"==typeof Int8Array?Int8Array:void 0;qe=function(){var t,e,n;if("function"!=typeof Ge)return!1;try{e=new Ge([1,3.14,-3.14,We+1]),n=e,t=(Je&&n instanceof Int8Array||"[object Int8Array]"===G(n))&&1===e[0]&&3===e[1]&&-3===e[2]&&e[3]===$e}catch(e){t=!1}return t}()?Ze:function(){throw new Error("not implemented")};var Xe=qe,He=4294967295;function Ke(t){return"object"==typeof t&&null!==t&&"number"==typeof t.length&&nt(t.length)&&t.length>=0&&t.length<=He}function Qe(t){return"object"==typeof t&&null!==t&&!jt(t)}function tn(t){return"string"==typeof t}var en=String.prototype.valueOf;var nn=Y();function rn(t){return"object"==typeof t&&(t instanceof String||(nn?function(t){try{return en.call(t),!0}catch(t){return!1}}(t):"[object String]"===G(t)))}function on(t){return tn(t)||rn(t)}M(on,"isPrimitive",tn),M(on,"isObject",rn);var an=Rt(on.isPrimitive),un=Rt(on.isObject),fn=Rt(on);function sn(t,e,n){k(t,e,{configurable:!1,enumerable:!0,writable:!1,value:n})}function ln(t,e){if(!(this instanceof ln))throw new TypeError("invalid invocation. Constructor must be called with the `new` keyword.");if(!N(t))throw new TypeError(j("invalid argument. Real component must be a number. Value: `%s`.",t));if(!N(e))throw new TypeError(j("invalid argument. Imaginary component must be a number. Value: `%s`.",e));return sn(this,"re",t),sn(this,"im",e),this}M(fn,"primitives",an),M(fn,"objects",un),M(ln,"name","Complex128"),M(ln,"BYTES_PER_ELEMENT",8),M(ln.prototype,"BYTES_PER_ELEMENT",8),M(ln.prototype,"byteLength",16),M(ln.prototype,"toString",(function(){var t=""+this.re;return this.im<0?t+=" - "+-this.im:t+=" + "+this.im,t+="i"})),M(ln.prototype,"toJSON",(function(){var t={type:"Complex128"};return t.re=this.re,t.im=this.im,t}));var cn="function"==typeof Math.fround?Math.fround:null,hn=new ae(1);var pn="function"==typeof cn?cn:function(t){return hn[0]=t,hn[0]};function gn(t,e){if(!(this instanceof gn))throw new TypeError("invalid invocation. Constructor must be called with the `new` keyword.");if(!N(t))throw new TypeError(j("invalid argument. Real component must be a number. Value: `%s`.",t));if(!N(e))throw new TypeError(j("invalid argument. Imaginary component must be a number. Value: `%s`.",e));return sn(this,"re",pn(t)),sn(this,"im",pn(e)),this}function yn(t){return t instanceof ln||t instanceof gn||"object"==typeof t&&null!==t&&"number"==typeof t.re&&"number"==typeof t.im}function mn(t){return nt(t/2)}M(gn,"name","Complex64"),M(gn,"BYTES_PER_ELEMENT",4),M(gn.prototype,"BYTES_PER_ELEMENT",4),M(gn.prototype,"byteLength",8),M(gn.prototype,"toString",(function(){var t=""+this.re;return this.im<0?t+=" - "+-this.im:t+=" + "+this.im,t+="i"})),M(gn.prototype,"toJSON",(function(){var t={type:"Complex64"};return t.re=this.re,t.im=this.im,t}));var dn=8;function bn(t){return"object"==typeof t&&null!==t&&"Complex64Array"===t.constructor.name&&t.BYTES_PER_ELEMENT===dn}var vn=16;function wn(t){return"object"==typeof t&&null!==t&&"Complex128Array"===t.constructor.name&&t.BYTES_PER_ELEMENT===vn}function _n(t,e,n){k(t,e,{configurable:!1,enumerable:!1,get:n})}function En(t){return t.re}function xn(t){return t.im}function Tn(t,e){return new ae(t.buffer,t.byteOffset+t.BYTES_PER_ELEMENT*e,2*(t.length-e))}function An(t,e){return new ee(t.buffer,t.byteOffset+t.BYTES_PER_ELEMENT*e,2*(t.length-e))}function On(t){var e,n,r;for(e=[];!(n=t.next()).done;)if(Ke(r=n.value)&&r.length>=2)e.push(r[0],r[1]);else{if(!yn(r))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`.",r));e.push(En(r),xn(r))}return e}var Vn=2*ae.BYTES_PER_ELEMENT,Sn=lt();function jn(t){return t instanceof Bn||"object"==typeof t&&null!==t&&("Complex64Array"===t.constructor.name||"Complex128Array"===t.constructor.name)&&"number"==typeof t._length&&"object"==typeof t._buffer}function Rn(t){return t===Bn||"Complex128Array"===t.name}function Ln(t,e){return new gn(t[e*=2],t[e+1])}function Bn(){var t,e,n,r;if(e=arguments.length,!(this instanceof Bn))return 0===e?new Bn:1===e?new Bn(arguments[0]):2===e?new Bn(arguments[0],arguments[1]):new Bn(arguments[0],arguments[1],arguments[2]);if(0===e)n=new ae(0);else if(1===e)if(ut(arguments[0]))n=new ae(2*arguments[0]);else if(zt(arguments[0]))if((r=(n=arguments[0]).length)&&jt(n)&&yn(n[0])){if(n=function(t,e){var n,r,i,o;for(n=e.length,o=0,i=0;i<n;i++){if(!yn(r=e[i]))return null;t[o]=En(r),t[o+1]=xn(r),o+=2}return t}(new ae(2*r),n),null===n){if(!mn(r))throw new RangeError(j("invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.",r));n=new ae(arguments[0])}}else{if(bn(n))n=Tn(n,0);else if(wn(n))n=An(n,0);else if(!mn(r))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`.",r));n=new ae(n)}else if(Yt(arguments[0])){if(!nt((n=arguments[0]).byteLength/Vn))throw new RangeError(j("invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.",Vn,n.byteLength));n=new ae(n)}else{if(!Qe(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(n=arguments[0],!1===Sn)throw new TypeError(j("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.",n));if(!Ut(n[kt]))throw new TypeError(j("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",n));if(!Ut((n=n[kt]()).next))throw new TypeError(j("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",n));if((n=On(n))instanceof Error)throw n;n=new ae(n)}else{if(!Yt(n=arguments[0]))throw new TypeError(j("invalid argument. First argument must be an ArrayBuffer. Value: `%s`.",n));if(!ut(t=arguments[1]))throw new TypeError(j("invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.",t));if(!nt(t/Vn))throw new RangeError(j("invalid argument. Byte offset must be a multiple of %u. Value: `%u`.",Vn,t));if(2===e){if(!nt((r=n.byteLength-t)/Vn))throw new RangeError(j("invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.",Vn,r));n=new ae(n,t)}else{if(!ut(r=arguments[2]))throw new TypeError(j("invalid argument. Length must be a nonnegative integer. Value: `%s`.",r));if(r*Vn>n.byteLength-t)throw new RangeError(j("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",r*Vn));n=new ae(n,t,2*r)}}return M(this,"_buffer",n),M(this,"_length",n.length/2),this}function Fn(t){return t.re}function In(t){return t.im}function Un(t){var e,n,r;for(e=[];!(n=t.next()).done;)if(Ke(r=n.value)&&r.length>=2)e.push(r[0],r[1]);else{if(!yn(r))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`.",r));e.push(Fn(r),In(r))}return e}M(Bn,"BYTES_PER_ELEMENT",Vn),M(Bn,"name","Complex64Array"),M(Bn,"from",(function(t){var e,n,r,i,o,a,u,f,s,l,c,h;if(!Ut(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Rn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((n=arguments.length)>1){if(!Ut(r=arguments[1]))throw new TypeError(j("invalid argument. Second argument must be a function. Value: `%s`.",r));n>2&&(e=arguments[2])}if(jn(t)){if(f=t.length,r){for(o=(i=new this(f))._buffer,h=0,c=0;c<f;c++){if(yn(l=r.call(e,t.get(c),c)))o[h]=En(l),o[h+1]=xn(l);else{if(!(Ke(l)&&l.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`.",l));o[h]=l[0],o[h+1]=l[1]}h+=2}return i}return new this(t)}if(zt(t)){if(r){for(f=t.length,u=t.get&&t.set?Gt("default"):Zt("default"),c=0;c<f;c++)if(!yn(u(t,c))){s=!0;break}if(s){if(!mn(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]=r.call(e,u(t,c),c);return i}for(o=(i=new this(f))._buffer,h=0,c=0;c<f;c++){if(yn(l=r.call(e,u(t,c),c)))o[h]=En(l),o[h+1]=xn(l);else{if(!(Ke(l)&&l.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`.",l));o[h]=l[0],o[h+1]=l[1]}h+=2}return i}return new this(t)}if(Qe(t)&&Sn&&Ut(t[kt])){if(!Ut((o=t[kt]()).next))throw new TypeError(j("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",t));if(a=r?function(t,e,n){var r,i,o,a;for(r=[],a=-1;!(i=t.next()).done;)if(a+=1,Ke(o=e.call(n,i.value,a))&&o.length>=2)r.push(o[0],o[1]);else{if(!yn(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));r.push(En(o),xn(o))}return r}(o,r,e):On(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`.",t))})),M(Bn,"of",(function(){var t,e;if(!Ut(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Rn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(t=[],e=0;e<arguments.length;e++)t.push(arguments[e]);return new this(t)})),M(Bn.prototype,"at",(function(t){if(!jn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!nt(t))throw new TypeError(j("invalid argument. Must provide an integer. Value: `%s`.",t));if(t<0&&(t+=this._length),!(t<0||t>=this._length))return Ln(this._buffer,t)})),_n(Bn.prototype,"buffer",(function(){return this._buffer.buffer})),_n(Bn.prototype,"byteLength",(function(){return this._buffer.byteLength})),_n(Bn.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),M(Bn.prototype,"BYTES_PER_ELEMENT",Bn.BYTES_PER_ELEMENT),M(Bn.prototype,"copyWithin",(function(t,e){if(!jn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return 2===arguments.length?this._buffer.copyWithin(2*t,2*e):this._buffer.copyWithin(2*t,2*e,2*arguments[2]),this})),M(Bn.prototype,"entries",(function(){var t,e,n,r,i,o;if(!jn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return t=this,r=this._buffer,n=this._length,o=-1,M(e={},"next",(function(){if(o+=1,i||o>=n)return{done:!0};return{value:[o,Ln(r,o)],done:!1}})),M(e,"return",(function(t){if(i=!0,arguments.length)return{value:t,done:!0};return{done:!0}})),kt&&M(e,kt,(function(){return t.entries()})),e})),M(Bn.prototype,"every",(function(t,e){var n,r;if(!jn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ut(t))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",t));for(n=this._buffer,r=0;r<this._length;r++)if(!t.call(e,Ln(n,r),r,this))return!1;return!0})),M(Bn.prototype,"fill",(function(t,e,n){var r,i,o,a,u,f;if(!jn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!yn(t))throw new TypeError(j("invalid argument. First argument must be a complex number. Value: `%s`.",t));if(r=this._buffer,i=this._length,arguments.length>1){if(!nt(e))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",e));if(e<0&&(e+=i)<0&&(e=0),arguments.length>2){if(!nt(n))throw new TypeError(j("invalid argument. Third argument must be an integer. Value: `%s`.",n));n<0&&(n+=i)<0&&(n=0),n>i&&(n=i)}else n=i}else e=0,n=i;for(a=En(t),u=xn(t),f=e;f<n;f++)r[o=2*f]=a,r[o+1]=u;return this})),M(Bn.prototype,"filter",(function(t,e){var n,r,i,o;if(!jn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ut(t))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",t));for(n=this._buffer,r=[],i=0;i<this._length;i++)o=Ln(n,i),t.call(e,o,i,this)&&r.push(o);return new this.constructor(r)})),M(Bn.prototype,"find",(function(t,e){var n,r,i;if(!jn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ut(t))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",t));for(n=this._buffer,r=0;r<this._length;r++)if(i=Ln(n,r),t.call(e,i,r,this))return i})),M(Bn.prototype,"findIndex",(function(t,e){var n,r,i;if(!jn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ut(t))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",t));for(n=this._buffer,r=0;r<this._length;r++)if(i=Ln(n,r),t.call(e,i,r,this))return r;return-1})),M(Bn.prototype,"findLast",(function(t,e){var n,r,i;if(!jn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ut(t))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",t));for(n=this._buffer,r=this._length-1;r>=0;r--)if(i=Ln(n,r),t.call(e,i,r,this))return i})),M(Bn.prototype,"findLastIndex",(function(t,e){var n,r,i;if(!jn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ut(t))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",t));for(n=this._buffer,r=this._length-1;r>=0;r--)if(i=Ln(n,r),t.call(e,i,r,this))return r;return-1})),M(Bn.prototype,"forEach",(function(t,e){var n,r,i;if(!jn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ut(t))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",t));for(n=this._buffer,r=0;r<this._length;r++)i=Ln(n,r),t.call(e,i,r,this)})),M(Bn.prototype,"get",(function(t){if(!jn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ut(t))throw new TypeError(j("invalid argument. Must provide a nonnegative integer. Value: `%s`.",t));if(!(t>=this._length))return Ln(this._buffer,t)})),M(Bn.prototype,"includes",(function(t,e){var n,r,i,o,a;if(!jn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!yn(t))throw new TypeError(j("invalid argument. First argument must be a complex number. Value: `%s`.",t));if(arguments.length>1){if(!nt(e))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0&&(e+=this._length)<0&&(e=0)}else e=0;for(i=En(t),o=xn(t),n=this._buffer,a=e;a<this._length;a++)if(i===n[r=2*a]&&o===n[r+1])return!0;return!1})),M(Bn.prototype,"indexOf",(function(t,e){var n,r,i,o,a;if(!jn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!yn(t))throw new TypeError(j("invalid argument. First argument must be a complex number. Value: `%s`.",t));if(arguments.length>1){if(!nt(e))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0&&(e+=this._length)<0&&(e=0)}else e=0;for(i=En(t),o=xn(t),n=this._buffer,a=e;a<this._length;a++)if(i===n[r=2*a]&&o===n[r+1])return a;return-1})),M(Bn.prototype,"join",(function(t){var e,n,r,i;if(!jn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(0===arguments.length)r=",";else{if(!tn(t))throw new TypeError(j("invalid argument. First argument must be a string. Value: `%s`.",t));r=t}for(e=[],n=this._buffer,i=0;i<this._length;i++)e.push(Ln(n,i).toString());return e.join(r)})),M(Bn.prototype,"keys",(function(){var t,e,n,r,i;if(!jn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return t=this,n=this._length,i=-1,M(e={},"next",(function(){if(i+=1,r||i>=n)return{done:!0};return{value:i,done:!1}})),M(e,"return",(function(t){if(r=!0,arguments.length)return{value:t,done:!0};return{done:!0}})),kt&&M(e,kt,(function(){return t.keys()})),e})),M(Bn.prototype,"lastIndexOf",(function(t,e){var n,r,i,o,a;if(!jn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!yn(t))throw new TypeError(j("invalid argument. First argument must be a complex number. Value: `%s`.",t));if(arguments.length>1){if(!nt(e))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",e));e>=this._length?e=this._length-1:e<0&&(e+=this._length)}else e=this._length-1;for(i=En(t),o=xn(t),n=this._buffer,a=e;a>=0;a--)if(i===n[r=2*a]&&o===n[r+1])return a;return-1})),_n(Bn.prototype,"length",(function(){return this._length})),M(Bn.prototype,"map",(function(t,e){var n,r,i,o,a;if(!jn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ut(t))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",t));for(r=this._buffer,n=(i=new this.constructor(this._length))._buffer,o=0;o<this._length;o++)if(yn(a=t.call(e,Ln(r,o),o,this)))n[2*o]=En(a),n[2*o+1]=xn(a);else{if(!Ke(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));n[2*o]=a[0],n[2*o+1]=a[1]}return i})),M(Bn.prototype,"reduce",(function(t,e){var n,r,i,o;if(!jn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ut(t))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",t));if(n=this._buffer,i=this._length,arguments.length>1)r=e,o=0;else{if(0===i)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");r=Ln(n,0),o=1}for(;o<i;o++)r=t(r,Ln(n,o),o,this);return r})),M(Bn.prototype,"reduceRight",(function(t,e){var n,r,i,o;if(!jn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ut(t))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",t));if(n=this._buffer,i=this._length,arguments.length>1)r=e,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.");r=Ln(n,i-1),o=i-2}for(;o>=0;o--)r=t(r,Ln(n,o),o,this);return r})),M(Bn.prototype,"reverse",(function(){var t,e,n,r,i,o;if(!jn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(n=this._length,t=this._buffer,r=et(n/2),i=0;i<r;i++)o=n-i-1,e=t[2*i],t[2*i]=t[2*o],t[2*o]=e,e=t[2*i+1],t[2*i+1]=t[2*o+1],t[2*o+1]=e;return this})),M(Bn.prototype,"set",(function(t){var e,n,r,i,o,a,u,f,s;if(!jn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(r=this._buffer,arguments.length>1){if(!ut(n=arguments[1]))throw new TypeError(j("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",n))}else n=0;if(yn(t)){if(n>=this._length)throw new RangeError(j("invalid argument. Index argument is out-of-bounds. Value: `%u`.",n));return r[n*=2]=En(t),void(r[n+1]=xn(t))}if(jn(t)){if(n+(a=t._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(e=t._buffer,s=r.byteOffset+n*Vn,e.buffer===r.buffer&&e.byteOffset<s&&e.byteOffset+e.byteLength>s){for(i=new ae(e.length),f=0;f<e.length;f++)i[f]=e[f];e=i}for(n*=2,s=0,f=0;f<a;f++)r[n]=e[s],r[n+1]=e[s+1],n+=2,s+=2}else{if(!zt(t))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`.",t));for(a=t.length,f=0;f<a;f++)if(!yn(t[f])){o=!0;break}if(o){if(!mn(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(n+a/2>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(e=t,s=r.byteOffset+n*Vn,e.buffer===r.buffer&&e.byteOffset<s&&e.byteOffset+e.byteLength>s){for(i=new ae(a),f=0;f<a;f++)i[f]=e[f];e=i}for(n*=2,a/=2,s=0,f=0;f<a;f++)r[n]=e[s],r[n+1]=e[s+1],n+=2,s+=2;return}if(n+a>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(n*=2,f=0;f<a;f++)u=t[f],r[n]=En(u),r[n+1]=xn(u),n+=2}})),M(Bn.prototype,"slice",(function(t,e){var n,r,i,o,a,u,f;if(!jn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(a=this._buffer,u=this._length,0===arguments.length)t=0,e=u;else{if(!nt(t))throw new TypeError(j("invalid argument. First argument must be an integer. Value: `%s`.",t));if(t<0&&(t+=u)<0&&(t=0),1===arguments.length)e=u;else{if(!nt(e))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0?(e+=u)<0&&(e=0):e>u&&(e=u)}}for(n=t<e?e-t:0,r=(i=new this.constructor(n))._buffer,f=0;f<n;f++)o=2*(f+t),r[2*f]=a[o],r[2*f+1]=a[o+1];return i})),M(Bn.prototype,"some",(function(t,e){var n,r;if(!jn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ut(t))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",t));for(n=this._buffer,r=0;r<this._length;r++)if(t.call(e,Ln(n,r),r,this))return!0;return!1})),M(Bn.prototype,"sort",(function(t){var e,n,r,i,o;if(!jn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ut(t))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",t));for(n=this._buffer,r=this._length,e=[],i=0;i<r;i++)e.push(Ln(n,i));for(e.sort(t),i=0;i<r;i++)n[o=2*i]=En(e[i]),n[o+1]=xn(e[i]);return this})),M(Bn.prototype,"subarray",(function(t,e){var n,r,i;if(!jn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(r=this._buffer,i=this._length,0===arguments.length)t=0,e=i;else{if(!nt(t))throw new TypeError(j("invalid argument. First argument must be an integer. Value: `%s`.",t));if(t<0&&(t+=i)<0&&(t=0),1===arguments.length)e=i;else{if(!nt(e))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0?(e+=i)<0&&(e=0):e>i&&(e=i)}}return t>=i?(i=0,n=r.byteLength):t>=e?(i=0,n=r.byteOffset+t*Vn):(i=e-t,n=r.byteOffset+t*Vn),new this.constructor(r.buffer,n,i<0?0:i)})),M(Bn.prototype,"toLocaleString",(function(t,e){var n,r,i,o,a;if(!jn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(0===arguments.length)r=[];else{if(!tn(t)&&!an(t))throw new TypeError(j("invalid argument. First argument must be a string or an array of strings. Value: `%s`.",t));r=t}if(arguments.length<2)n={};else{if(!Qe(e))throw new TypeError(j("invalid argument. Options argument must be an object. Value: `%s`.",e));n=e}for(o=this._buffer,i=[],a=0;a<this._length;a++)i.push(Ln(o,a).toLocaleString(r,n));return i.join(",")})),M(Bn.prototype,"toReversed",(function(){var t,e,n,r,i,o;if(!jn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(n=this._length,e=new this.constructor(n),r=this._buffer,t=e._buffer,i=0;i<n;i++)o=n-i-1,t[2*i]=r[2*o],t[2*i+1]=r[2*o+1];return e})),M(Bn.prototype,"toSorted",(function(t){var e,n,r,i;if(!jn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ut(t))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",t));for(n=this._buffer,r=this._length,e=[],i=0;i<r;i++)e.push(Ln(n,i));return e.sort(t),new Bn(e)})),M(Bn.prototype,"toString",(function(){var t,e,n;if(!jn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(t=[],e=this._buffer,n=0;n<this._length;n++)t.push(Ln(e,n).toString());return t.join(",")})),M(Bn.prototype,"values",(function(){var t,e,n,r,i,o;if(!jn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return e=this,i=this._buffer,n=this._length,o=-1,M(t={},"next",(function(){if(o+=1,r||o>=n)return{done:!0};return{value:Ln(i,o),done:!1}})),M(t,"return",(function(t){if(r=!0,arguments.length)return{value:t,done:!0};return{done:!0}})),kt&&M(t,kt,(function(){return e.values()})),t})),M(Bn.prototype,"with",(function(t,e){var n,r,i;if(!jn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!nt(t))throw new TypeError(j("invalid argument. First argument must be an integer. Value: `%s`.",t));if(i=this._length,t<0&&(t+=i),t<0||t>=i)throw new RangeError(j("invalid argument. Index argument is out-of-bounds. Value: `%s`.",t));if(!yn(e))throw new TypeError(j("invalid argument. Second argument must be a complex number. Value: `%s`.",e));return(n=(r=new this.constructor(this._buffer))._buffer)[2*t]=En(e),n[2*t+1]=xn(e),r}));var Pn=2*ee.BYTES_PER_ELEMENT,kn=lt();function Mn(t){return t instanceof Yn||"object"==typeof t&&null!==t&&("Complex64Array"===t.constructor.name||"Complex128Array"===t.constructor.name)&&"number"==typeof t._length&&"object"==typeof t._buffer}function Nn(t){return t===Yn||"Complex64Array"===t.name}function Cn(t,e){return new ln(t[e*=2],t[e+1])}function Yn(){var t,e,n,r;if(e=arguments.length,!(this instanceof Yn))return 0===e?new Yn:1===e?new Yn(arguments[0]):2===e?new Yn(arguments[0],arguments[1]):new Yn(arguments[0],arguments[1],arguments[2]);if(0===e)n=new ee(0);else if(1===e)if(ut(arguments[0]))n=new ee(2*arguments[0]);else if(zt(arguments[0]))if((r=(n=arguments[0]).length)&&jt(n)&&yn(n[0])){if(n=function(t,e){var n,r,i,o;for(n=e.length,o=0,i=0;i<n;i++){if(!yn(r=e[i]))return null;t[o]=Fn(r),t[o+1]=In(r),o+=2}return t}(new ee(2*r),n),null===n){if(!mn(r))throw new RangeError(j("invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.",r));n=new ee(arguments[0])}}else{if(bn(n))n=Tn(n,0);else if(wn(n))n=An(n,0);else if(!mn(r))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`.",r));n=new ee(n)}else if(Yt(arguments[0])){if(!nt((n=arguments[0]).byteLength/Pn))throw new RangeError(j("invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.",Pn,n.byteLength));n=new ee(n)}else{if(!Qe(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(n=arguments[0],!1===kn)throw new TypeError(j("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.",n));if(!Ut(n[kt]))throw new TypeError(j("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",n));if(!Ut((n=n[kt]()).next))throw new TypeError(j("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",n));if((n=Un(n))instanceof Error)throw n;n=new ee(n)}else{if(!Yt(n=arguments[0]))throw new TypeError(j("invalid argument. First argument must be an ArrayBuffer. Value: `%s`.",n));if(!ut(t=arguments[1]))throw new TypeError(j("invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.",t));if(!nt(t/Pn))throw new RangeError(j("invalid argument. Byte offset must be a multiple of %u. Value: `%u`.",Pn,t));if(2===e){if(!nt((r=n.byteLength-t)/Pn))throw new RangeError(j("invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.",Pn,r));n=new ee(n,t)}else{if(!ut(r=arguments[2]))throw new TypeError(j("invalid argument. Length must be a nonnegative integer. Value: `%s`.",r));if(r*Pn>n.byteLength-t)throw new RangeError(j("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",r*Pn));n=new ee(n,t,2*r)}}return M(this,"_buffer",n),M(this,"_length",n.length/2),this}function Dn(t){var e,n;for(e=[];!(n=t.next()).done;)e.push(gt(n.value));return e}M(Yn,"BYTES_PER_ELEMENT",Pn),M(Yn,"name","Complex128Array"),M(Yn,"from",(function(t){var e,n,r,i,o,a,u,f,s,l,c,h;if(!Ut(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Nn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((n=arguments.length)>1){if(!Ut(r=arguments[1]))throw new TypeError(j("invalid argument. Second argument must be a function. Value: `%s`.",r));n>2&&(e=arguments[2])}if(Mn(t)){if(f=t.length,r){for(o=(i=new this(f))._buffer,h=0,c=0;c<f;c++){if(yn(l=r.call(e,t.get(c),c)))o[h]=Fn(l),o[h+1]=In(l);else{if(!(Ke(l)&&l.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`.",l));o[h]=l[0],o[h+1]=l[1]}h+=2}return i}return new this(t)}if(zt(t)){if(r){for(f=t.length,u=t.get&&t.set?Gt("default"):Zt("default"),c=0;c<f;c++)if(!yn(u(t,c))){s=!0;break}if(s){if(!mn(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]=r.call(e,u(t,c),c);return i}for(o=(i=new this(f))._buffer,h=0,c=0;c<f;c++){if(yn(l=r.call(e,u(t,c),c)))o[h]=Fn(l),o[h+1]=In(l);else{if(!(Ke(l)&&l.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`.",l));o[h]=l[0],o[h+1]=l[1]}h+=2}return i}return new this(t)}if(Qe(t)&&kn&&Ut(t[kt])){if(!Ut((o=t[kt]()).next))throw new TypeError(j("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",t));if(a=r?function(t,e,n){var r,i,o,a;for(r=[],a=-1;!(i=t.next()).done;)if(a+=1,Ke(o=e.call(n,i.value,a))&&o.length>=2)r.push(o[0],o[1]);else{if(!yn(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));r.push(Fn(o),In(o))}return r}(o,r,e):Un(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`.",t))})),M(Yn,"of",(function(){var t,e;if(!Ut(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Nn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(t=[],e=0;e<arguments.length;e++)t.push(arguments[e]);return new this(t)})),M(Yn.prototype,"at",(function(t){if(!Mn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!nt(t))throw new TypeError(j("invalid argument. Must provide an integer. Value: `%s`.",t));if(t<0&&(t+=this._length),!(t<0||t>=this._length))return Cn(this._buffer,t)})),_n(Yn.prototype,"buffer",(function(){return this._buffer.buffer})),_n(Yn.prototype,"byteLength",(function(){return this._buffer.byteLength})),_n(Yn.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),M(Yn.prototype,"BYTES_PER_ELEMENT",Yn.BYTES_PER_ELEMENT),M(Yn.prototype,"copyWithin",(function(t,e){if(!Mn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return 2===arguments.length?this._buffer.copyWithin(2*t,2*e):this._buffer.copyWithin(2*t,2*e,2*arguments[2]),this})),M(Yn.prototype,"entries",(function(){var t,e,n,r,i,o,a;if(!Mn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return e=this,t=this._buffer,r=this._length,o=-1,a=-2,M(n={},"next",(function(){var e;if(o+=1,i||o>=r)return{done:!0};return e=new ln(t[a+=2],t[a+1]),{value:[o,e],done:!1}})),M(n,"return",(function(t){if(i=!0,arguments.length)return{value:t,done:!0};return{done:!0}})),kt&&M(n,kt,(function(){return e.entries()})),n})),M(Yn.prototype,"every",(function(t,e){var n,r;if(!Mn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ut(t))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",t));for(n=this._buffer,r=0;r<this._length;r++)if(!t.call(e,Cn(n,r),r,this))return!1;return!0})),M(Yn.prototype,"fill",(function(t,e,n){var r,i,o,a,u,f;if(!Mn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!yn(t))throw new TypeError(j("invalid argument. First argument must be a complex number. Value: `%s`.",t));if(r=this._buffer,i=this._length,arguments.length>1){if(!nt(e))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",e));if(e<0&&(e+=i)<0&&(e=0),arguments.length>2){if(!nt(n))throw new TypeError(j("invalid argument. Third argument must be an integer. Value: `%s`.",n));n<0&&(n+=i)<0&&(n=0),n>i&&(n=i)}else n=i}else e=0,n=i;for(a=Fn(t),u=In(t),f=e;f<n;f++)r[o=2*f]=a,r[o+1]=u;return this})),M(Yn.prototype,"filter",(function(t,e){var n,r,i,o;if(!Mn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ut(t))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",t));for(n=this._buffer,r=[],i=0;i<this._length;i++)o=Cn(n,i),t.call(e,o,i,this)&&r.push(o);return new this.constructor(r)})),M(Yn.prototype,"find",(function(t,e){var n,r,i;if(!Mn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ut(t))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",t));for(n=this._buffer,r=0;r<this._length;r++)if(i=Cn(n,r),t.call(e,i,r,this))return i})),M(Yn.prototype,"findIndex",(function(t,e){var n,r,i;if(!Mn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ut(t))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",t));for(n=this._buffer,r=0;r<this._length;r++)if(i=Cn(n,r),t.call(e,i,r,this))return r;return-1})),M(Yn.prototype,"findLast",(function(t,e){var n,r,i;if(!Mn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ut(t))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",t));for(n=this._buffer,r=this._length-1;r>=0;r--)if(i=Cn(n,r),t.call(e,i,r,this))return i})),M(Yn.prototype,"findLastIndex",(function(t,e){var n,r,i;if(!Mn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ut(t))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",t));for(n=this._buffer,r=this._length-1;r>=0;r--)if(i=Cn(n,r),t.call(e,i,r,this))return r;return-1})),M(Yn.prototype,"forEach",(function(t,e){var n,r,i;if(!Mn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ut(t))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",t));for(n=this._buffer,r=0;r<this._length;r++)i=Cn(n,r),t.call(e,i,r,this)})),M(Yn.prototype,"get",(function(t){if(!Mn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ut(t))throw new TypeError(j("invalid argument. Must provide a nonnegative integer. Value: `%s`.",t));if(!(t>=this._length))return Cn(this._buffer,t)})),_n(Yn.prototype,"length",(function(){return this._length})),M(Yn.prototype,"includes",(function(t,e){var n,r,i,o,a;if(!Mn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!yn(t))throw new TypeError(j("invalid argument. First argument must be a complex number. Value: `%s`.",t));if(arguments.length>1){if(!nt(e))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0&&(e+=this._length)<0&&(e=0)}else e=0;for(i=Fn(t),o=In(t),n=this._buffer,a=e;a<this._length;a++)if(i===n[r=2*a]&&o===n[r+1])return!0;return!1})),M(Yn.prototype,"indexOf",(function(t,e){var n,r,i,o,a;if(!Mn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!yn(t))throw new TypeError(j("invalid argument. First argument must be a complex number. Value: `%s`.",t));if(arguments.length>1){if(!nt(e))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0&&(e+=this._length)<0&&(e=0)}else e=0;for(i=Fn(t),o=In(t),n=this._buffer,a=e;a<this._length;a++)if(i===n[r=2*a]&&o===n[r+1])return a;return-1})),M(Yn.prototype,"join",(function(t){var e,n,r,i;if(!Mn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(0===arguments.length)r=",";else{if(!on(t))throw new TypeError(j("invalid argument. First argument must be a string. Value: `%s`.",t));r=t}for(e=[],n=this._buffer,i=0;i<this._length;i++)e.push(Cn(n,i).toString());return e.join(r)})),M(Yn.prototype,"keys",(function(){var t,e,n,r,i;if(!Mn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return t=this,n=this._length,i=-1,M(e={},"next",(function(){if(i+=1,r||i>=n)return{done:!0};return{value:i,done:!1}})),M(e,"return",(function(t){if(r=!0,arguments.length)return{value:t,done:!0};return{done:!0}})),kt&&M(e,kt,(function(){return t.keys()})),e})),M(Yn.prototype,"lastIndexOf",(function(t,e){var n,r,i,o,a;if(!Mn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!yn(t))throw new TypeError(j("invalid argument. First argument must be a complex number. Value: `%s`.",t));if(arguments.length>1){if(!nt(e))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",e));e>=this._length?e=this._length-1:e<0&&(e+=this._length)}else e=this._length-1;for(i=Fn(t),o=In(t),n=this._buffer,a=e;a>=0;a--)if(i===n[r=2*a]&&o===n[r+1])return a;return-1})),M(Yn.prototype,"map",(function(t,e){var n,r,i,o,a;if(!Mn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ut(t))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",t));for(r=this._buffer,n=(i=new this.constructor(this._length))._buffer,o=0;o<this._length;o++)if(yn(a=t.call(e,Cn(r,o),o,this)))n[2*o]=Fn(a),n[2*o+1]=In(a);else{if(!Ke(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));n[2*o]=a[0],n[2*o+1]=a[1]}return i})),M(Yn.prototype,"reduce",(function(t,e){var n,r,i,o;if(!Mn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ut(t))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",t));if(n=this._buffer,i=this._length,arguments.length>1)r=e,o=0;else{if(0===i)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");r=Cn(n,0),o=1}for(;o<i;o++)r=t(r,Cn(n,o),o,this);return r})),M(Yn.prototype,"reduceRight",(function(t,e){var n,r,i,o;if(!Mn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ut(t))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",t));if(n=this._buffer,i=this._length,arguments.length>1)r=e,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.");r=Cn(n,i-1),o=i-2}for(;o>=0;o--)r=t(r,Cn(n,o),o,this);return r})),M(Yn.prototype,"reverse",(function(){var t,e,n,r,i,o;if(!Mn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(n=this._length,t=this._buffer,r=et(n/2),i=0;i<r;i++)o=n-i-1,e=t[2*i],t[2*i]=t[2*o],t[2*o]=e,e=t[2*i+1],t[2*i+1]=t[2*o+1],t[2*o+1]=e;return this})),M(Yn.prototype,"set",(function(t){var e,n,r,i,o,a,u,f,s;if(!Mn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(r=this._buffer,arguments.length>1){if(!ut(n=arguments[1]))throw new TypeError(j("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",n))}else n=0;if(yn(t)){if(n>=this._length)throw new RangeError(j("invalid argument. Index argument is out-of-bounds. Value: `%u`.",n));return r[n*=2]=Fn(t),void(r[n+1]=In(t))}if(Mn(t)){if(n+(a=t._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(e=t._buffer,s=r.byteOffset+n*Pn,e.buffer===r.buffer&&e.byteOffset<s&&e.byteOffset+e.byteLength>s){for(i=new ee(e.length),f=0;f<e.length;f++)i[f]=e[f];e=i}for(n*=2,s=0,f=0;f<a;f++)r[n]=e[s],r[n+1]=e[s+1],n+=2,s+=2}else{if(!zt(t))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`.",t));for(a=t.length,f=0;f<a;f++)if(!yn(t[f])){o=!0;break}if(o){if(!mn(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(n+a/2>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(e=t,s=r.byteOffset+n*Pn,e.buffer===r.buffer&&e.byteOffset<s&&e.byteOffset+e.byteLength>s){for(i=new ee(a),f=0;f<a;f++)i[f]=e[f];e=i}for(n*=2,a/=2,s=0,f=0;f<a;f++)r[n]=e[s],r[n+1]=e[s+1],n+=2,s+=2;return}if(n+a>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(n*=2,f=0;f<a;f++)u=t[f],r[n]=Fn(u),r[n+1]=In(u),n+=2}})),M(Yn.prototype,"slice",(function(t,e){var n,r,i,o,a,u,f;if(!Mn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(a=this._buffer,u=this._length,0===arguments.length)t=0,e=u;else{if(!nt(t))throw new TypeError(j("invalid argument. First argument must be an integer. Value: `%s`.",t));if(t<0&&(t+=u)<0&&(t=0),1===arguments.length)e=u;else{if(!nt(e))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0?(e+=u)<0&&(e=0):e>u&&(e=u)}}for(n=t<e?e-t:0,r=(i=new this.constructor(n))._buffer,f=0;f<n;f++)o=2*(f+t),r[2*f]=a[o],r[2*f+1]=a[o+1];return i})),M(Yn.prototype,"some",(function(t,e){var n,r;if(!Mn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ut(t))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",t));for(n=this._buffer,r=0;r<this._length;r++)if(t.call(e,Cn(n,r),r,this))return!0;return!1})),M(Yn.prototype,"sort",(function(t){var e,n,r,i,o;if(!Mn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ut(t))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",t));for(n=this._buffer,r=this._length,e=[],i=0;i<r;i++)e.push(Cn(n,i));for(e.sort(t),i=0;i<r;i++)n[o=2*i]=Fn(e[i]),n[o+1]=In(e[i]);return this})),M(Yn.prototype,"subarray",(function(t,e){var n,r,i;if(!Mn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(r=this._buffer,i=this._length,0===arguments.length)t=0,e=i;else{if(!nt(t))throw new TypeError(j("invalid argument. First argument must be an integer. Value: `%s`.",t));if(t<0&&(t+=i)<0&&(t=0),1===arguments.length)e=i;else{if(!nt(e))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0?(e+=i)<0&&(e=0):e>i&&(e=i)}}return t>=i?(i=0,n=r.byteLength):t>=e?(i=0,n=r.byteOffset+t*Pn):(i=e-t,n=r.byteOffset+t*Pn),new this.constructor(r.buffer,n,i<0?0:i)})),M(Yn.prototype,"toLocaleString",(function(t,e){var n,r,i,o,a;if(!Mn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(0===arguments.length)r=[];else{if(!on(t)&&!an(t))throw new TypeError(j("invalid argument. First argument must be a string or an array of strings. Value: `%s`.",t));r=t}if(arguments.length<2)n={};else{if(!Qe(e))throw new TypeError(j("invalid argument. Options argument must be an object. Value: `%s`.",e));n=e}for(o=this._buffer,i=[],a=0;a<this._length;a++)i.push(Cn(o,a).toLocaleString(r,n));return i.join(",")})),M(Yn.prototype,"toReversed",(function(){var t,e,n,r,i,o;if(!Mn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(n=this._length,e=new this.constructor(n),r=this._buffer,t=e._buffer,i=0;i<n;i++)o=n-i-1,t[2*i]=r[2*o],t[2*i+1]=r[2*o+1];return e})),M(Yn.prototype,"toSorted",(function(t){var e,n,r,i;if(!Mn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ut(t))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",t));for(n=this._buffer,r=this._length,e=[],i=0;i<r;i++)e.push(Cn(n,i));return e.sort(t),new Yn(e)})),M(Yn.prototype,"toString",(function(){var t,e,n;if(!Mn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(t=[],e=this._buffer,n=0;n<this._length;n++)t.push(Cn(e,n).toString());return t.join(",")})),M(Yn.prototype,"values",(function(){var t,e,n,r,i,o;if(!Mn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return e=this,i=this._buffer,n=this._length,o=-1,M(t={},"next",(function(){if(o+=1,r||o>=n)return{done:!0};return{value:Cn(i,o),done:!1}})),M(t,"return",(function(t){if(r=!0,arguments.length)return{value:t,done:!0};return{done:!0}})),kt&&M(t,kt,(function(){return e.values()})),t})),M(Yn.prototype,"with",(function(t,e){var n,r,i;if(!Mn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!nt(t))throw new TypeError(j("invalid argument. First argument must be an integer. Value: `%s`.",t));if(i=this._length,t<0&&(t+=i),t<0||t>=i)throw new RangeError(j("invalid argument. Index argument is out-of-bounds. Value: `%s`.",t));if(!yn(e))throw new TypeError(j("invalid argument. Second argument must be a complex number. Value: `%s`.",e));return(n=(r=new this.constructor(this._buffer))._buffer)[2*t]=Fn(e),n[2*t+1]=In(e),r}));var zn=Me.BYTES_PER_ELEMENT,Jn=lt();function Wn(t){return"object"==typeof t&&null!==t&&"BooleanArray"===t.constructor.name&&t.BYTES_PER_ELEMENT===zn}function $n(t){return t===Gn}function Gn(){var t,e,n,r,i;if(e=arguments.length,!(this instanceof Gn))return 0===e?new Gn:1===e?new Gn(arguments[0]):2===e?new Gn(arguments[0],arguments[1]):new Gn(arguments[0],arguments[1],arguments[2]);if(0===e)n=new Me(0);else if(1===e)if(ut(i=arguments[0]))n=new Me(i);else if(zt(i))n=function(t,e){var n,r;for(n=e.length,r=0;r<n;r++)t[r]=gt(e[r]);return t}(new Me(i.length),i);else if(Yt(i))n=new Me(i);else{if(!Qe(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===Jn)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(!Ut(i[kt]))throw new TypeError(j("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",i));if(!Ut((n=i[kt]()).next))throw new TypeError(j("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",i));n=new Me(Dn(n))}else{if(!Yt(n=arguments[0]))throw new TypeError(j("invalid argument. First argument must be an ArrayBuffer. Value: `%s`.",n));if(!ut(t=arguments[1]))throw new TypeError(j("invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.",t));if(2===e)n=new Me(n,t);else{if(!ut(r=arguments[2]))throw new TypeError(j("invalid argument. Length must be a nonnegative integer. Value: `%s`.",r));if(r*zn>n.byteLength-t)throw new RangeError(j("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",r*zn));n=new Me(n,t,r)}}return M(this,"_buffer",n),M(this,"_length",n.length),this}M(Gn,"BYTES_PER_ELEMENT",zn),M(Gn,"name","BooleanArray"),M(Gn,"from",(function(t){var e,n,r,i,o,a,u,f,s;if(!Ut(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!$n(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if((n=arguments.length)>1){if(!Ut(r=arguments[1]))throw new TypeError(j("invalid argument. Second argument must be a function. Value: `%s`.",r));n>2&&(e=arguments[2])}if(zt(t)){if(r){for(f=t.length,u=t.get&&t.set?Gt("default"):Zt("default"),o=(i=new this(f))._buffer,s=0;s<f;s++)o[s]=gt(r.call(e,u(t,s),s));return i}return new this(t)}if(Qe(t)&&Jn&&Ut(t[kt])){if(!Ut((o=t[kt]()).next))throw new TypeError(j("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",t));for(a=r?function(t,e,n){var r,i,o;for(r=[],o=-1;!(i=t.next()).done;)o+=1,r.push(gt(e.call(n,i.value,o)));return r}(o,r,e):Dn(o),o=(i=new this(f=a.length))._buffer,s=0;s<f;s++)o[s]=a[s];return i}throw new TypeError(j("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",t))})),M(Gn,"of",(function(){var t,e;if(!Ut(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!$n(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");for(t=[],e=0;e<arguments.length;e++)t.push(arguments[e]);return new this(t)})),M(Gn.prototype,"at",(function(t){var e,n;if(!Wn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!it(t))throw new TypeError(j("invalid argument. Must provide an integer. Value: `%s`.",t));if(n=this._length,e=this._buffer,t<0&&(t+=n),!(t<0||t>=n))return gt(e[t])})),_n(Gn.prototype,"buffer",(function(){return this._buffer.buffer})),_n(Gn.prototype,"byteLength",(function(){return this._buffer.byteLength})),_n(Gn.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),M(Gn.prototype,"BYTES_PER_ELEMENT",Gn.BYTES_PER_ELEMENT),M(Gn.prototype,"copyWithin",(function(t,e){if(!Wn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");return 2===arguments.length?this._buffer.copyWithin(t,e):this._buffer.copyWithin(t,e,arguments[2]),this})),M(Gn.prototype,"entries",(function(){var t,e,n,r,i,o;if(!Wn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");return t=this,r=this._buffer,n=this._length,o=-1,M(e={},"next",(function(){if(o+=1,i||o>=n)return{done:!0};return{value:[o,gt(r[o])],done:!1}})),M(e,"return",(function(t){if(i=!0,arguments.length)return{value:t,done:!0};return{done:!0}})),kt&&M(e,kt,(function(){return t.entries()})),e})),M(Gn.prototype,"every",(function(t,e){var n,r;if(!Wn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Ut(t))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",t));for(n=this._buffer,r=0;r<this._length;r++)if(!t.call(e,gt(n[r]),r,this))return!1;return!0})),M(Gn.prototype,"fill",(function(t,e,n){var r,i,o,a;if(!Wn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!pt(t))throw new TypeError(j("invalid argument. First argument must be a boolean. Value: `%s`.",t));if(r=this._buffer,i=this._length,arguments.length>1){if(!it(e))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",e));if(e<0&&(e+=i)<0&&(e=0),arguments.length>2){if(!it(n))throw new TypeError(j("invalid argument. Third argument must be an integer. Value: `%s`.",n));n<0&&(n+=i)<0&&(n=0),n>i&&(n=i)}else n=i}else e=0,n=i;for(o=t?1:0,a=e;a<n;a++)r[a]=o;return this})),M(Gn.prototype,"filter",(function(t,e){var n,r,i,o;if(!Wn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Ut(t))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",t));for(n=this._buffer,r=[],i=0;i<this._length;i++)o=gt(n[i]),t.call(e,o,i,this)&&r.push(o);return new this.constructor(r)})),M(Gn.prototype,"find",(function(t,e){var n,r,i;if(!Wn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Ut(t))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",t));for(n=this._buffer,i=0;i<this._length;i++)if(r=gt(n[i]),t.call(e,r,i,this))return r})),M(Gn.prototype,"findIndex",(function(t,e){var n,r,i;if(!Wn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Ut(t))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",t));for(n=this._buffer,i=0;i<this._length;i++)if(r=gt(n[i]),t.call(e,r,i,this))return i;return-1})),M(Gn.prototype,"findLast",(function(t,e){var n,r,i;if(!Wn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Ut(t))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",t));for(n=this._buffer,i=this._length-1;i>=0;i--)if(r=gt(n[i]),t.call(e,r,i,this))return r})),M(Gn.prototype,"findLastIndex",(function(t,e){var n,r,i;if(!Wn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Ut(t))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",t));for(n=this._buffer,i=this._length-1;i>=0;i--)if(r=gt(n[i]),t.call(e,r,i,this))return i;return-1})),M(Gn.prototype,"forEach",(function(t,e){var n,r;if(!Wn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Ut(t))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",t));for(n=this._buffer,r=0;r<this._length;r++)t.call(e,gt(n[r]),r,this)})),M(Gn.prototype,"get",(function(t){if(!Wn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!ut(t))throw new TypeError(j("invalid argument. Must provide a nonnegative integer. Value: `%s`.",t));if(!(t>=this._length))return gt(this._buffer[t])})),M(Gn.prototype,"includes",(function(t,e){var n,r;if(!Wn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!pt(t))throw new TypeError(j("invalid argument. First argument must be a boolean. Value: `%s`.",t));if(arguments.length>1){if(!it(e))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0&&(e+=this._length)<0&&(e=0)}else e=0;for(n=this._buffer,r=e;r<this._length;r++)if(t===gt(n[r]))return!0;return!1})),M(Gn.prototype,"indexOf",(function(t,e){var n,r;if(!Wn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!pt(t))throw new TypeError(j("invalid argument. First argument must be a boolean. Value: `%s`.",t));if(arguments.length>1){if(!it(e))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0&&(e+=this._length)<0&&(e=0)}else e=0;for(n=this._buffer,r=e;r<this._length;r++)if(t===gt(n[r]))return r;return-1})),M(Gn.prototype,"join",(function(t){var e,n,r;if(!Wn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(arguments.length>0){if(!tn(t))throw new TypeError(j("invalid argument. First argument must be a string. Value: `%s`.",t))}else t=",";for(e=this._buffer,n=[],r=0;r<this._length;r++)e[r]?n.push("true"):n.push("false");return n.join(t)})),M(Gn.prototype,"keys",(function(){var t,e,n,r,i;if(!Wn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");return t=this,n=this._length,i=-1,M(e={},"next",(function(){if(i+=1,r||i>=n)return{done:!0};return{value:i,done:!1}})),M(e,"return",(function(t){if(r=!0,arguments.length)return{value:t,done:!0};return{done:!0}})),kt&&M(e,kt,(function(){return t.keys()})),e})),M(Gn.prototype,"lastIndexOf",(function(t,e){var n,r;if(!Wn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!pt(t))throw new TypeError(j("invalid argument. First argument must be a boolean. Value: `%s`.",t));if(arguments.length>1){if(!it(e))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",e));e>=this._length?e=this._length-1:e<0&&(e+=this._length)}else e=this._length-1;for(n=this._buffer,r=e;r>=0;r--)if(t===gt(n[r]))return r;return-1})),_n(Gn.prototype,"length",(function(){return this._length})),M(Gn.prototype,"map",(function(t,e){var n,r,i,o;if(!Wn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Ut(t))throw new TypeError("invalid argument. First argument must be a function. Value: `%s`.",t);for(i=this._buffer,n=(r=new this.constructor(this._length))._buffer,o=0;o<this._length;o++)n[o]=gt(t.call(e,gt(i[o]),o,this));return r})),M(Gn.prototype,"reduce",(function(t,e){var n,r,i,o;if(!Wn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Ut(t))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",t));if(n=this._buffer,r=this._length,arguments.length>1)i=e,o=0;else{if(0===r)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");i=gt(n[0]),o=1}for(;o<r;o++)i=t(i,gt(n[o]),o,this);return i})),M(Gn.prototype,"reduceRight",(function(t,e){var n,r,i,o;if(!Wn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Ut(t))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",t));if(n=this._buffer,r=this._length,arguments.length>1)i=e,o=r-1;else{if(0===r)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");i=gt(n[r-1]),o=r-2}for(;o>=0;o--)i=t(i,gt(n[o]),o,this);return i})),M(Gn.prototype,"reverse",(function(){var t,e,n,r,i,o;if(!Wn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");for(t=this._buffer,n=this._length,r=et(n/2),i=0;i<r;i++)o=n-i-1,e=t[i],t[i]=t[o],t[o]=e;return this})),M(Gn.prototype,"set",(function(t){var e,n,r,i,o,a,u;if(!Wn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(r=this._buffer,arguments.length>1){if(!ut(n=arguments[1]))throw new TypeError(j("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",n))}else n=0;if(zt(t)){if(n+(o=t.length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(e=Wn(t)?t._buffer:t,u=r.byteOffset+n*zn,e.buffer===r.buffer&&e.byteOffset<u&&e.byteOffset+e.byteLength>u){for(i=new Me(e.length),a=0;a<e.length;a++)i[a]=e[a];e=i}for(a=0;a<o;n++,a++)r[n]=e[a]?1:0}else{if(n>=this._length)throw new RangeError(j("invalid argument. Index argument is out-of-bounds. Value: `%u`.",n));r[n]=t?1:0}})),M(Gn.prototype,"slice",(function(t,e){var n,r,i,o,a,u;if(!Wn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(o=this._buffer,a=this._length,0===arguments.length)t=0,e=a;else{if(!it(t))throw new TypeError(j("invalid argument. First argument must be an integer. Value: `%s`.",t));if(t<0&&(t+=a)<0&&(t=0),1===arguments.length)e=a;else{if(!it(e))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0?(e+=a)<0&&(e=0):e>a&&(e=a)}}for(n=t<e?e-t:0,r=(i=new this.constructor(n))._buffer,u=0;u<n;u++)r[u]=o[u+t];return i})),M(Gn.prototype,"some",(function(t,e){var n,r;if(!Wn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Ut(t))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",t));for(n=this._buffer,r=0;r<this._length;r++)if(t.call(e,gt(n[r]),r,this))return!0;return!1})),M(Gn.prototype,"sort",(function(t){var e;if(!Wn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(e=this._buffer,0===arguments.length)return e.sort(),this;if(!Ut(t))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",t));return e.sort((function(e,n){return t(gt(e),gt(n))})),this})),M(Gn.prototype,"subarray",(function(t,e){var n,r,i;if(!Wn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(r=this._buffer,i=this._length,0===arguments.length)t=0,e=i;else{if(!it(t))throw new TypeError(j("invalid argument. First argument must be an integer. Value: `%s`.",t));if(t<0&&(t+=i)<0&&(t=0),1===arguments.length)e=i;else{if(!it(e))throw new TypeError(j("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0?(e+=i)<0&&(e=0):e>i&&(e=i)}}return t>=i?(i=0,n=r.byteLength):t>=e?(i=0,n=r.byteOffset+t*zn):(i=e-t,n=r.byteOffset+t*zn),new this.constructor(r.buffer,n,i<0?0:i)})),M(Gn.prototype,"toLocaleString",(function(t,e){var n,r,i,o,a;if(!Wn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(0===arguments.length)r=[];else{if(!tn(t)&&!an(t))throw new TypeError(j("invalid argument. First argument must be a string or an array of strings. Value: `%s`.",t));r=t}if(arguments.length<2)n={};else{if(!Qe(e))throw new TypeError(j("invalid argument. Options argument must be an object. Value: `%s`.",e));n=e}for(o=this._buffer,i=[],a=0;a<this._length;a++)i.push(gt(o[a]).toLocaleString(r,n));return i.join(",")})),M(Gn.prototype,"toReversed",(function(){var t,e,n,r,i;if(!Wn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");for(n=this._length,e=new this.constructor(n),r=this._buffer,t=e._buffer,i=0;i<n;i++)t[i]=r[n-i-1];return e})),M(Gn.prototype,"toSorted",(function(t){var e,n,r,i,o;if(!Wn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");for(r=this._length,n=new this.constructor(r),i=this._buffer,e=n._buffer,o=0;o<r;o++)e[o]=i[o];if(0===arguments.length)return e.sort(),n;if(!Ut(t))throw new TypeError(j("invalid argument. First argument must be a function. Value: `%s`.",t));return e.sort((function(e,n){return t(gt(e),gt(n))})),n})),M(Gn.prototype,"toString",(function(){var t,e,n;if(!Wn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");for(t=[],e=this._buffer,n=0;n<this._length;n++)e[n]?t.push("true"):t.push("false");return t.join(",")})),M(Gn.prototype,"values",(function(){var t,e,n,r,i,o;if(!Wn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");return e=this,i=this._buffer,n=this._length,o=-1,M(t={},"next",(function(){if(o+=1,r||o>=n)return{done:!0};return{value:gt(i[o]),done:!1}})),M(t,"return",(function(t){if(r=!0,arguments.length)return{value:t,done:!0};return{done:!0}})),kt&&M(t,kt,(function(){return e.values()})),t})),M(Gn.prototype,"with",(function(t,e){var n,r;if(!Wn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!it(t))throw new TypeError(j("invalid argument. First argument must be an integer. Value: `%s`.",t));if(r=this._length,t<0&&(t+=r),t<0||t>=r)throw new RangeError(j("invalid argument. Index argument is out-of-bounds. Value: `%s`.",t));if(!pt(e))throw new TypeError(j("invalid argument. Second argument must be a boolean. Value: `%s`.",e));return(n=new this.constructor(this._buffer))._buffer[t]=e?1:0,n}));var qn=[ee,ae,ve,he,Be,Ae,Xe,Me,ze,Bn,Yn,Gn],Zn=["float64","float32","int32","uint32","int16","uint16","int8","uint8","uint8c","complex64","complex128","bool"],Xn=Zn.length;function Hn(t){var e;if(jt(t))return"generic";if(Bt(t))return null;for(e=0;e<Xn;e++)if(t instanceof qn[e])return Zn[e];return Xt[Ft(t)]||null}function Kn(t,e){var n,r,i,o;for(i=Hn(t),r=Wt(t)?Gt(i):Zt(i),n=t.length,o=0;o<n;o++)if(r(t,o)===e)return!0;return!1}function Qn(t){var e,n,r;if(!zt(t))throw new TypeError(j("invalid argument. Must provide an array-like object. Value: `%s`.",t));return r=Hn(t),Wt(t)&&(e=Gt(r)),n=t.length,void 0===e?function(e){var r;for(r=0;r<n;r++)if(t[r]===e)return!0;return!1}:function(r){var i;for(i=0;i<n;i++)if(e(t,i)===r)return!0;return!1}}function tr(t,e,n){return t.replace(e,n)}M(Kn,"factory",Qn);var er={all:["binary","bool","complex32","complex64","complex128","float16","float32","float64","generic","int16","int32","int8","uint16","uint32","uint8","uint8c"],typed:["binary","bool","complex32","complex64","complex128","float16","float32","float64","int16","int32","int8","uint16","uint32","uint8","uint8c"],floating_point:["complex32","complex64","complex128","float16","float32","float64"],real_floating_point:["float16","float32","float64"],complex_floating_point:["complex32","complex64","complex128"],boolean:["bool"],integer:["int16","int32","int8","uint16","uint32","uint8","uint8c"],signed_integer:["int16","int32","int8"],unsigned_integer:["uint16","uint32","uint8","uint8c"],real:["float16","float32","float64","int16","int32","int8","uint16","uint32","uint8","uint8c"],numeric:["complex32","complex64","complex128","float16","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"]},nr=/_and_generic$/;var rr=Qn(function(){var t,e,n;return 0===arguments.length?er.all.slice():(n=!1,t=arguments[0],nr.test(t)&&"all"!==(t=tr(t,nr,""))&&"index"!==t&&(n=!0),e=(e=er[t])?e.slice():[],n&&e.length>0&&e.push("generic"),e)}());function ir(t,e){return null!=t&&("symbol"==typeof e?e in Object(t):String(e)in Object(t))}function or(t){return it(t)&&t>0}function ar(t){return ot(t)&&t.valueOf()>0}function ur(t){return or(t)||ar(t)}function fr(t){return Ut(t)&&or(t.alignment)&&or(t.byteLength)&&Ut(t.byteLengthOf)&&Ut(t.byteOffsetOf)&&Ut(t.bufferOf)&&Ut(t.isStruct)&&Ut(t.viewOf)&&J(t,"fields")&&J(t,"layout")}M(ur,"isPrimitive",or),M(ur,"isObject",ar);var sr,lr=Object,cr=Object.getPrototypeOf;sr=Ut(Object.getPrototypeOf)?cr:function(t){var e=function(t){return t.__proto__}(t);return e||null===e?e:"[object Function]"===G(t.constructor)?t.constructor.prototype:t instanceof lr?lr.prototype:null};var hr=sr;function pr(t){return null==t?null:(t=lr(t),hr(t))}var gr=Object.prototype;function yr(t){var e;return!!Qe(t)&&(!(e=pr(t))||!J(t,"constructor")&&J(e,"constructor")&&Ut(e.constructor)&&"[object Function]"===G(e.constructor)&&J(e,"isPrototypeOf")&&Ut(e.isPrototypeOf)&&(e===gr||function(t){var e;for(e in t)if(!J(t,e))return!1;return!0}(t)))}function mr(t){return Object.keys(Object(t))}var dr,br=void 0!==Object.keys;function vr(t){return"[object Arguments]"===G(t)}dr=function(){return vr(arguments)}();var wr=dr;function _r(t){return t!=t}function Er(t){return N(t)&&_r(t)}function xr(t){return H(t)&&_r(t.valueOf())}function Tr(t){return Er(t)||xr(t)}M(Tr,"isPrimitive",Er),M(Tr,"isObject",xr);var Ar=Object.prototype.propertyIsEnumerable;var Or,Vr=!Ar.call("beep","0");function Sr(t,e){var n;return null!=t&&(!(n=Ar.call(t,e))&&Vr&&on(t)?!Er(e=+e)&&it(e)&&e>=0&&e<t.length:n)}Or=wr?vr:function(t){return null!==t&&"object"==typeof t&&!jt(t)&&"number"==typeof t.length&&nt(t.length)&&t.length>=0&&t.length<=fe&&J(t,"callee")&&!Sr(t,"callee")};var jr=Or,Rr=Array.prototype.slice;var Lr=Sr((function(){}),"prototype"),Br=!Sr({toString:null},"toString");function Fr(t,e,n){var r,i;if(!zt(t)&&!tn(t))throw new TypeError(j("invalid argument. First argument must be an array-like object. Value: `%s`.",t));if(0===(r=t.length))return-1;if(3===arguments.length){if(!it(n))throw new TypeError(j("invalid argument. Third argument must be an integer. Value: `%s`.",n));if(n>=0){if(n>=r)return-1;i=n}else(i=r+n)<0&&(i=0)}else i=0;if(Tr(e)){for(;i<r;i++)if(Tr(t[i]))return i}else for(;i<r;i++)if(t[i]===e)return i;return-1}function Ir(t){return t.constructor&&t.constructor.prototype===t}var Ur=["console","external","frame","frameElement","frames","innerHeight","innerWidth","outerHeight","outerWidth","pageXOffset","pageYOffset","parent","scrollLeft","scrollTop","scrollX","scrollY","self","webkitIndexedDB","webkitStorageInfo","window"],Pr="undefined"==typeof window?void 0:window;var kr=function(){var t;if("undefined"===It(Pr))return!1;for(t in Pr)try{-1===Fr(Ur,t)&&J(Pr,t)&&null!==Pr[t]&&"object"===It(Pr[t])&&Ir(Pr[t])}catch(t){return!0}return!1}(),Mr="undefined"!=typeof window;var Nr,Cr=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];Nr=br?function(){return 2!==(mr(arguments)||"").length}(1,2)?function(t){return jr(t)?mr(Rr.call(t)):mr(t)}:mr:function(t){var e,n,r,i,o,a,u;if(i=[],jr(t)){for(u=0;u<t.length;u++)i.push(u.toString());return i}if("string"==typeof t){if(t.length>0&&!J(t,"0"))for(u=0;u<t.length;u++)i.push(u.toString())}else{if(!1==(r="function"==typeof t)&&!Lt(t))return i;n=Lr&&r}for(o in t)n&&"prototype"===o||!J(t,o)||i.push(String(o));if(Br)for(e=function(t){if(!1===Mr&&!kr)return Ir(t);try{return Ir(t)}catch(t){return!1}}(t),u=0;u<Cr.length;u++)a=Cr[u],e&&"constructor"===a||!J(t,a)||i.push(String(a));return i};var Yr=Nr;var Dr=function(t,e){var n,r,i,o,a,u,f,s=!0;if(!Lt(t))throw new TypeError(j("invalid argument. First argument must be an object (except null). Value: `%s`.",t));if(arguments.length>1){if(!yr(e))throw new TypeError(j("invalid argument. Options argument must be an object. Value: `%s`.",e));if(J(e,"duplicates")&&!pt(s=e.duplicates))throw new TypeError(j("invalid option. `%s` option must be a boolean. Option: `%s`.","duplicates",s))}if(r=(n=Yr(t)).length,a={},s)for(f=0;f<r;f++)J(a,o=t[i=n[f]])?(u=a[o],jt(u)?a[o].push(i):a[o]=[u,i]):a[o]=i;else for(f=0;f<r;f++)a[t[i=n[f]]]=i;return a}({bool:0,int8:1,uint8:2,uint8c:3,int16:4,uint16:5,int32:6,uint32:7,int64:8,uint64:9,float16:10,float32:11,float64:12,complex32:13,complex64:14,complex128:15,binary:16,generic:17,notype:18,userdefined_type:256},{duplicates:!1});function zr(t){var e=Dr[t];return tn(e)?e:null}var Jr,Wr,$r,Gr={bool:0,int8:1,uint8:2,uint8c:3,int16:4,uint16:5,int32:6,uint32:7,int64:8,uint64:9,float16:10,float32:11,float64:12,complex32:13,complex64:14,complex128:15,binary:16,generic:17,notype:18,userdefined_type:256};function qr(t){var e=Gr[t];return N(e)?e:null}function Zr(t){var e=typeof t;return"string"===e?null===qr(t)?null:t:"number"===e?zr(t):"object"===e&&t?String(t):fr(t)?t.layout:null}var Xr={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 Hr(t){var e;return tn(t)?Xr[t]||null:N(t)?Xr[zr(t)]||null:t&&or(e=t.byteLength)?e:null}function Kr(t,e){var n,r,i;if(n=arguments.length,!(this instanceof Kr))return n<2?new Kr(t):new Kr(t,e);if(rr(t))r="builtin";else{if(function(t){return t instanceof Kr||"object"==typeof t&&null!==t&&"DataType"===t.constructor.name&&tn(t.char)&&tn(t.description)&&tn(t.byteOrder)&&ir(t,"value")}(t))return new Kr(t.value,{description:t.description});if(!fr(t))throw new TypeError(j("invalid argument. First argument must be either a supported data type string, a struct constructor, or another data type instance. Value: `%s`.",t));r="struct"}if(n>1){if(!yr(i=e))throw new TypeError(j("invalid argument. Options argument must be an object. Value: `%s`.",i));if(J(i,"description")&&!tn(i.description))throw new TypeError(j("invalid option. `%s` option must be a string. Option: `%s`.","description",i.description))}else i={};return M(this,"_value",t),M(this,"_description",i.description||function(t){return 0===arguments.length?{binary:"byte",bool:"boolean",complex32:"half-precision floating-point complex number",complex64:"single-precision floating-point complex number",complex128:"double-precision floating-point complex number",float16:"half-precision floating-point number",bfloat16:"brain floating-point number",float32:"single-precision floating-point number",float64:"double-precision floating-point number",float128:"quadruple-precision floating-point number",generic:"generic array value",int8:"signed 8-bit integer",int16:"signed 16-bit integer",int32:"signed 32-bit integer",int64:"signed 64-bit integer",int128:"signed 128-bit integer",int256:"signed 256-bit integer",uint8:"unsigned 8-bit integer",uint8c:"unsigned 8-bit integer (clamped)",uint16:"unsigned 16-bit integer",uint32:"unsigned 32-bit integer",uint64:"unsigned 64-bit integer",uint128:"unsigned 128-bit integer",uint256:"unsigned 256-bit integer"}:(void 0===Jr&&(Jr={binary:"byte",bool:"boolean",complex32:"half-precision floating-point complex number",complex64:"single-precision floating-point complex number",complex128:"double-precision floating-point complex number",float16:"half-precision floating-point number",bfloat16:"brain floating-point number",float32:"single-precision floating-point number",float64:"double-precision floating-point number",float128:"quadruple-precision floating-point number",generic:"generic array value",int8:"signed 8-bit integer",int16:"signed 16-bit integer",int32:"signed 32-bit integer",int64:"signed 64-bit integer",int128:"signed 128-bit integer",int256:"signed 256-bit integer",uint8:"unsigned 8-bit integer",uint8c:"unsigned 8-bit integer (clamped)",uint16:"unsigned 16-bit integer",uint32:"unsigned 32-bit integer",uint64:"unsigned 64-bit integer",uint128:"unsigned 128-bit integer",uint256:"unsigned 256-bit integer"}),Jr[Zr(t)]||null)}(t)||""),M(this,"_char",function(t){return 0===arguments.length?{binary:"r",bool:"x",complex32:"j",complex64:"c",complex128:"z",float16:"h",bfloat16:"e",float32:"f",float64:"d",float128:"g",generic:"o",int8:"s",int16:"k",int32:"i",int64:"l",int128:"m",int256:"n",uint8:"b",uint8c:"a",uint16:"t",uint32:"u",uint64:"v",uint128:"w",uint256:"y"}:(void 0===Wr&&(Wr={binary:"r",bool:"x",complex32:"j",complex64:"c",complex128:"z",float16:"h",bfloat16:"e",float32:"f",float64:"d",float128:"g",generic:"o",int8:"s",int16:"k",int32:"i",int64:"l",int128:"m",int256:"n",uint8:"b",uint8c:"a",uint16:"t",uint32:"u",uint64:"v",uint128:"w",uint256:"y"}),Wr[Zr(t)]||null)}(t)||""),M(this,"_enum",function(t){var e=typeof t;return"number"===e?zr(t)?t:null:"string"===e?qr(t):"object"===e&&t&&it(t.enum)?t.enum:fr(t)?qr("userdefined_type"):null}(t)||-1),M(this,"_alignment",function(t){var e;return 0===arguments.length?{binary:1,bool:1,complex32:2,complex64:4,complex128:8,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}:(void 0===$r&&($r={binary:1,bool:1,complex32:2,complex64:4,complex128:8,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}),t?or(e=t.alignment)?e:$r[Zr(t)]||null:null)}(t)||-1),M(this,"_byteLength",Hr(t)||-1),M(this,"_byteOrder","host"),M(this,"_type",r),this}function Qr(t){return Ut(t)&&or(t.alignment)&&or(t.byteLength)&&Ut(t.byteLengthOf)&&Ut(t.byteOffsetOf)&&Ut(t.bufferOf)&&Ut(t.viewOf)||function(t){return t instanceof Kr||"object"==typeof t&&null!==t&&it(t.alignment)&&it(t.byteLength)&&tn(t.byteOrder)&&tn(t.char)&&it(t.enum)&&ir(t,"value")}(t)&&Qr(t.value)}function ti(t){return rr(t)||((e=t)instanceof Kr||"object"==typeof e&&null!==e&&it(e.alignment)&&it(e.byteLength)&&tn(e.byteOrder)&&tn(e.char)&&it(e.enum)&&ir(e,"value"))||Qr(t);var e}M(Kr,"name","DataType"),_n(Kr.prototype,"alignment",(function(){return this._alignment})),_n(Kr.prototype,"byteLength",(function(){return this._byteLength})),_n(Kr.prototype,"byteOrder",(function(){return this._byteOrder})),_n(Kr.prototype,"char",(function(){return this._char})),_n(Kr.prototype,"description",(function(){return this._description})),_n(Kr.prototype,"enum",(function(){return this._enum})),_n(Kr.prototype,"value",(function(){return this._value})),M(Kr.prototype,"toJSON",(function(){return{type:"DataType",value:this.toString(),byteOrder:this._byteOrder,description:this._description}})),M(Kr.prototype,"toString",(function(){return"struct"===this._type?this._value.layout:String(this._value)})),M(Kr.prototype,"valueOf",(function(){return this.toString()}));var ei,ni=Ut(Object.assign),ri=Object.assign,ii=void 0!==Object.getOwnPropertySymbols,oi=lr.getOwnPropertySymbols;ei=ii?function(t){return oi(lr(t))}:function(){return[]};var ai,ui=ei;function fi(t){var e,n,r;for(e=Yr(t),n=ui(t),r=0;r<n.length;r++)Sr(t,n[r])&&e.push(n[r]);return e}ai=ni?ri:function(t){var e,n,r,i,o,a,u;if(null==t)throw new TypeError(j("invalid argument. First argument must be a non-null object. Value: `%s`.",t));for(o=lr(t),a=1;a<arguments.length;a++)if(null!=(e=arguments[a]))for(i=(n=fi(lr(e))).length,u=0;u<i;u++)o[r=n[u]]=e[r];return o};var si=ai,li=["throw","normalize","clamp","wrap"];function ci(){return li.slice()}function hi(){return{throw:1,clamp:2,wrap:3,normalize:4}}M(ci,"enum",hi);var pi=Qn(ci()),gi=["row-major","column-major"];function yi(){return gi.slice()}var mi=["row-major","column-major"];function di(){return{"row-major":101,"column-major":102}}M((function(){return mi.slice()}),"enum",di);var bi={"row-major":101,"column-major":102};function vi(){return{"row-major":bi["row-major"],"column-major":bi["column-major"]}}M(yi,"enum",vi);var wi=Qn(yi());function _i(t,e){return yr(e)?J(e,"readonly")&&(t.readonly=e.readonly,!pt(t.readonly))?new TypeError(j("invalid option. `%s` option must be a boolean. Option: `%s`.","readonly",t.readonly)):J(e,"mode")&&(t.mode=e.mode,!pi(t.mode))?new TypeError(j("invalid option. `%s` option must be a valid index mode. Option: `%s`.","mode",t.mode)):J(e,"order")&&(t.order=e.order,!wi(t.order))?new TypeError(j("invalid option. `%s` option must be a memory layout. Option: `%s`.","order",t.order)):null:new TypeError(j("invalid argument. Options argument must be an object. Value: `%s`.",e))}var Ei=Object.prototype.isPrototypeOf;var xi="function"==typeof ArrayBuffer?ArrayBuffer:null;var Ti,Ai="function"==typeof ArrayBuffer?ArrayBuffer:void 0;Ti=function(){var t,e,n;if("function"!=typeof xi)return!1;try{(t=Yt(n=new xi(16))&&"function"==typeof xi.isView)&&((e=new ee(n))[0]=-3.14,e[1]=NaN,t=t&&xi.isView(e)&&16===n.byteLength&&-3.14===e[0]&&e[1]!=e[1])}catch(e){t=!1}return t}()?Ai:function(){throw new Error("not implemented")};var Oi=Ti,Vi={float64:function(t,e,n){t[e]=n},float32:function(t,e,n){t[e]=n},int32:function(t,e,n){t[e]=n},int16:function(t,e,n){t[e]=n},int8:function(t,e,n){t[e]=n},uint32:function(t,e,n){t[e]=n},uint16:function(t,e,n){t[e]=n},uint8:function(t,e,n){t[e]=n},uint8c:function(t,e,n){t[e]=n},generic:function(t,e,n){t[e]=n},default:function(t,e,n){t[e]=n}};function Si(t){var e=Vi[t];return"function"==typeof e?e:Vi.default}var ji={complex128:function(t,e,n){t.set(n,e)},complex64:function(t,e,n){t.set(n,e)},default:function(t,e,n){t.set(n,e)}};function Ri(t){var e=ji[t];return"function"==typeof e?e:ji.default}function Li(t){var e=Hn(t);return Wt(t)?{data:t,dtype:e,accessorProtocol:!0,accessors:[Gt(e),Ri(e)]}:{data:t,dtype:e,accessorProtocol:!1,accessors:[Zt(e),Si(e)]}}function Bi(t,e,n,r,i,o,a){var u,f,s,l,c,h,p;for(u=e.data,f=i.data,l=e.accessors[0],s=i.accessors[1],c=r,h=a,p=0;p<t;p++)s(f,h,l(u,c)),c+=n,h+=o;return i}var Fi=8;function Ii(t,e,n,r,i){var o,a,u,f,s,l;if(t<=0)return r;if(u=Li(e),f=Li(r),u.accessorProtocol||f.accessorProtocol)return Bi(t,u,n,o=n<0?(1-t)*n:0,f,i,a=i<0?(1-t)*i:0),f.data;if(1===n&&1===i){if((s=t%Fi)>0)for(l=0;l<s;l++)r[l]=e[l];if(t<Fi)return r;for(l=s;l<t;l+=Fi)r[l]=e[l],r[l+1]=e[l+1],r[l+2]=e[l+2],r[l+3]=e[l+3],r[l+4]=e[l+4],r[l+5]=e[l+5],r[l+6]=e[l+6],r[l+7]=e[l+7];return r}for(o=n<0?(1-t)*n:0,a=i<0?(1-t)*i:0,l=0;l<t;l++)r[a]=e[o],o+=n,a+=i;return r}var Ui=8;function Pi(t,e,n,r,i,o,a){var u,f,s,l,c,h;if(t<=0)return i;if(s=Li(e),l=Li(i),s.accessorProtocol||l.accessorProtocol)return Bi(t,s,n,r,l,o,a),l.data;if(u=r,f=a,1===n&&1===o){if((c=t%Ui)>0)for(h=0;h<c;h++)i[f]=e[u],u+=n,f+=o;if(t<Ui)return i;for(h=c;h<t;h+=Ui)i[f]=e[u],i[f+1]=e[u+1],i[f+2]=e[u+2],i[f+3]=e[u+3],i[f+4]=e[u+4],i[f+5]=e[u+5],i[f+6]=e[u+6],i[f+7]=e[u+7],u+=Ui,f+=Ui;return i}for(h=0;h<t;h++)i[f]=e[u],u+=n,f+=o;return i}function ki(t,e){return t<e?t:e}function Mi(t,e){var n,r;for(n=[],r=0;r<e;r++)n.push(t);return n}M(Ii,"ndarray",Pi);var Ni="function"==typeof DataView;function Ci(t){return Ni&&t instanceof DataView||"[object DataView]"===G(t)}var Yi="function"==typeof DataView?DataView:null;var Di,zi="function"==typeof DataView?DataView:void 0;Di=function(){var t,e,n;if("function"!=typeof Yi)return!1;try{n=new Oi(24),(t=Ci(e=new Yi(n,8))&&"function"==typeof e.getFloat64&&"function"==typeof e.setFloat64)&&(e.setFloat64(0,-3.14),e.setFloat64(8,NaN),t=t&&e.buffer===n&&16===e.byteLength&&8===e.byteOffset&&-3.14===e.getFloat64(0)&&e.getFloat64(8)!=e.getFloat64(8))}catch(e){t=!1}return t}()?zi:function(){throw new Error("not implemented")};var Ji=Di,Wi="__@@##$$@@__struct_buffer__@@$$##@@__",$i="Struct";function Gi(t,e,n,r){k(t,e,{configurable:!1,enumerable:!1,get:n,set:r})}function qi(t,e,n){k(t,e,{configurable:!1,enumerable:!0,get:n})}function Zi(t,e,n,r){k(t,e,{configurable:!1,enumerable:!0,get:n,set:r})}var Xi,Hi={int8:{get:"getInt8",set:"setInt8"},int16:{get:"getInt16",set:"setInt16"},int32:{get:"getInt32",set:"setInt32"},int64:{get:"getBigInt64",set:"setBigInt64"},uint8:{get:"getUint8",set:"setUint8"},uint16:{get:"getUint16",set:"setUint16"},uint32:{get:"getUint32",set:"setUint32"},uint64:{get:"getBigUint64",set:"setBigUint64"},float16:{get:"getFloat16",set:"setFloat16"},float32:{get:"getFloat32",set:"setFloat32"},float64:{get:"getFloat64",set:"setFloat64"},complex32:{get:"getFloat16",set:"setFloat16"},complex64:{get:"getFloat32",set:"setFloat32"},complex128:{get:"getFloat64",set:"setFloat64"},bool:{get:"getUint8",set:"setUint8"}},Ki={uint16:Ae,uint8:Me};(Xi=new Ki.uint16(1))[0]=4660;var Qi=52===new Ki.uint8(Xi.buffer)[0];var to={complex64:gn,complex128:ln};function eo(t){return to[t]||null}var no={float64:"complex128",float32:"complex64"},ro=eo(no.float64);var io={complex128:"float64",complex64:"float32",complex32:"float16"};function oo(t,e){return function(){var n=this[Wi],r=n[e](t.byteOffset,Qi),i=n[e](t.byteOffset+t.byteLength/2,Qi);return function(t,e,n){var r;if(arguments.length>2){if(r=eo(no[n]))return new r(t,e);throw new TypeError(j("invalid argument. Must provide a recognized data type. Value: `%s`.",n))}return new ro(t,e)}(r,i,io[t.type])}}var ao={float64:ee,float32:ae,int16:Be,int32:ve,int8:Xe,uint16:Ae,uint32:he,uint8:Me,uint8c:ze,complex64:Bn,complex128:Yn,bool:Gn};function uo(t){return ao[t]||null}function fo(t,e){return new Me(t.buffer,t.byteOffset+t.BYTES_PER_ELEMENT*e,t.length-e)}function so(){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"}}}var lo={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"}},co={"dtypes.default":lo.dtypes.default,"dtypes.numeric":lo.dtypes.numeric,"dtypes.real":lo.dtypes.real,"dtypes.floating_point":lo.dtypes.floating_point,"dtypes.real_floating_point":lo.dtypes.real_floating_point,"dtypes.complex_floating_point":lo.dtypes.complex_floating_point,"dtypes.integer":lo.dtypes.integer,"dtypes.signed_integer":lo.dtypes.signed_integer,"dtypes.unsigned_integer":lo.dtypes.unsigned_integer,"dtypes.boolean":lo.dtypes.boolean,"dtypes.index":lo.dtypes.index,"dtypes.integer_index":lo.dtypes.integer_index,"dtypes.boolean_index":lo.dtypes.boolean_index,"dtypes.mask_index":lo.dtypes.mask_index};M(so,"get",(function(t){var e=co[t];return void 0===e?null:e}));var ho=so.get("dtypes.default"),po=uo("complex64"),go=uo("complex128"),yo=uo("bool");function mo(){var t,e,n,r;if(null===(n=uo(e=(t=arguments.length)&&tn(arguments[t-1])?arguments[t-=1]:ho)))throw new TypeError(j("invalid argument. Must provide a recognized data type. Value: `%s`.",e));return t<=0?new n(0):1===t?((r=arguments[0])instanceof po?r=Tn(r,0):r instanceof go?r=An(r,0):r instanceof yo&&(r=fo(r,0)),new n(r)):2===t?new n(arguments[0],arguments[1]):new n(arguments[0],arguments[1],arguments[2])}function bo(t){if(t.length)return t.isStructType?function(t){return function(){var e,n,r,i;for(e=(n=this[Wi]).byteOffset+t.byteOffset,r=[],i=0;i<t.length;i++)r.push(new t.type(n.buffer,e,t.byteLength)),e+=t.byteOffset;return r}}(t):function(t){return function(){var e=this[Wi];return mo(e.buffer,e.byteOffset+t.byteOffset,t.length,t.type)}}(t);switch(t.type){case"float64":case"float32":case"float16":case"int8":case"int16":case"int32":case"uint8":case"uint16":case"uint32":case"int64":case"uint64":return function(t,e){return function(){return this[Wi][e](t.byteOffset,Qi)}}(t,Hi[t.type].get);case"bool":return function(t,e){return function(){var n=this[Wi];return gt(n[e](t.byteOffset,Qi))}}(t,Hi[t.type].get);case"complex128":case"complex64":case"complex32":return oo(t,Hi[t.type].get);default:if(t.isStructType)return function(t){return function(){var e=this[Wi];return new t.type(e.buffer,e.byteOffset+t.byteOffset,t.byteLength)}}(t);throw new Error(j("unexpected error. Unrecognized data type. Value: `%s`.",t.type))}}var vo={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"]},wo=/_and_generic$/;function _o(){var t,e,n;return 0===arguments.length?vo.all.slice():(n=!1,t=arguments[0],wo.test(t)&&"all"!==(t=tr(t,wo,""))&&"index"!==t&&(n=!0),e=(e=vo[t])?e.slice():[],n&&e.length>0&&e.push("generic"),e)}var Eo=Qn(_o("real_floating_point")),xo=Qn(_o("signed_integer")),To=Et();function Ao(){return"function"==typeof To.BigInt&&"function"==typeof BigInt&&"bigint"==typeof To.BigInt("1")&&"bigint"==typeof BigInt("1")}function Oo(t){return"bigint"==typeof t}function Vo(t){return"object"==typeof t&&"[object BigInt]"===G(t)&&function(t){try{return"bigint"==typeof t.valueOf()}catch(t){return!1}}(t)}function So(t){return Oo(t)||Vo(t)}M(So,"isPrimitive",Oo),M(So,"isObject",Vo);var jo,Ro=ct(!1),Lo=ct(!1),Bo=ct(!1);M(Ro,"isPrimitive",Lo),M(Ro,"isObject",Bo),jo=Ao()?So:Ro;const{isPrimitive:Fo}=jo;var Io,Uo={float64:{float64:1,float32:0,float16:0,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:0,complex32:0,binary:0,generic:1,bool:0},float32:{float64:1,float32:1,float16:0,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,complex32:0,binary:0,generic:1,bool:0},float16:{float64:1,float32:1,float16:1,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,complex32:1,binary:0,generic:1,bool:0},int64:{float64:0,float32:0,float16:0,int64:1,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:0,complex64:0,complex32:0,binary:0,generic:1,bool:0},int32:{float64:1,float32:0,float16:0,int64:1,int32:1,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:0,complex32:0,binary:0,generic:1,bool:0},int16:{float64:1,float32:1,float16:0,int64:1,int32:1,int16:1,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,complex32:0,binary:0,generic:1,bool:0},int8:{float64:1,float32:1,float16:1,int64:1,int32:1,int16:1,int8:1,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,complex32:1,binary:0,generic:1,bool:0},uint64:{float64:0,float32:0,float16:0,int64:0,int32:0,int16:0,int8:0,uint64:1,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:0,complex64:0,complex32:0,binary:0,generic:1,bool:0},uint32:{float64:1,float32:0,float16:0,int64:1,int32:0,int16:0,int8:0,uint64:1,uint32:1,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:0,complex32:0,binary:0,generic:1,bool:0},uint16:{float64:1,float32:1,float16:0,int64:1,int32:1,int16:0,int8:0,uint64:1,uint32:1,uint16:1,uint8:0,uint8c:0,complex128:1,complex64:1,complex32:0,binary:0,generic:1,bool:0},uint8:{float64:1,float32:1,float16:1,int64:1,int32:1,int16:1,int8:0,uint64:1,uint32:1,uint16:1,uint8:1,uint8c:1,complex128:1,complex64:1,complex32:1,binary:0,generic:1,bool:0},uint8c:{float64:1,float32:1,float16:1,int64:1,int32:1,int16:1,int8:0,uint64:1,uint32:1,uint16:1,uint8:1,uint8c:1,complex128:1,complex64:1,complex32:1,binary:0,generic:1,bool:0},complex128:{float64:0,float32:0,float16:0,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:0,complex32:0,binary:0,generic:1,bool:0},complex64:{float64:0,float32:0,float16:0,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,complex32:0,binary:0,generic:1,bool:0},complex32:{float64:0,float32:0,float16:0,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,complex32:1,binary:0,generic:1,bool:0},generic:{float64:0,float32:0,float16:0,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:0,complex64:0,complex32:0,binary:0,generic:1,bool:0},binary:{float64:0,float32:0,float16:0,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:0,complex64:0,complex32:0,binary:1,generic:0,bool:0},bool:{float64:0,float32:0,float16:0,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:0,complex64:0,complex32:0,binary:0,generic:1,bool:1}};var Po=function(t){return 0===arguments.length?function(){var t,e,n,r,i,o,a,u,f;for(n={},e=(t=Yr(Uo)).length,f=0;f<e;f++){for(i=t[f],a=Uo[i],r={},u=0;u<e;u++)r[o=t[u]]=a[o];n[i]=r}return n}():(void 0===Io&&(Io=function(){var t,e,n,r,i,o,a,u,f;for(n={},e=(t=Yr(Uo)).length,f=0;f<e;f++){for(i=t[f],a=Uo[i],r=[],u=0;u<e;u++)1===a[o=t[u]]&&r.push(o);n[i]=r}return n}()),t=Zr(t),J(Io,t)?Io[t].slice():null)}();var ko,Mo={float64:{float64:1,float32:1,float16:1,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,complex32:1,binary:0,generic:1,bool:0},float32:{float64:1,float32:1,float16:1,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,complex32:1,binary:0,generic:1,bool:0},float16:{float64:1,float32:1,float16:1,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,complex32:1,binary:0,generic:1,bool:0},int64:{float64:0,float32:0,float16:0,int64:1,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:0,complex64:0,complex32:0,binary:0,generic:1,bool:0},int32:{float64:1,float32:0,float16:0,int64:1,int32:1,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:0,complex32:0,binary:0,generic:1,bool:0},int16:{float64:1,float32:1,float16:0,int64:1,int32:1,int16:1,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,complex32:0,binary:0,generic:1,bool:0},int8:{float64:1,float32:1,float16:1,int64:1,int32:1,int16:1,int8:1,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,complex32:1,binary:0,generic:1,bool:0},uint64:{float64:0,float32:0,float16:0,int64:0,int32:0,int16:0,int8:0,uint64:1,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:0,complex64:0,complex32:0,binary:0,generic:1,bool:0},uint32:{float64:1,float32:0,float16:0,int64:1,int32:0,int16:0,int8:0,uint64:1,uint32:1,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:0,complex32:0,binary:0,generic:1,bool:0},uint16:{float64:1,float32:1,float16:0,int64:1,int32:1,int16:0,int8:0,uint64:1,uint32:1,uint16:1,uint8:0,uint8c:0,complex128:1,complex64:1,complex32:0,binary:0,generic:1,bool:0},uint8:{float64:1,float32:1,float16:1,int64:1,int32:1,int16:1,int8:0,uint64:1,uint32:1,uint16:1,uint8:1,uint8c:1,complex128:1,complex64:1,complex32:1,binary:0,generic:1,bool:0},uint8c:{float64:1,float32:1,float16:1,int64:1,int32:1,int16:1,int8:0,uint64:1,uint32:1,uint16:1,uint8:1,uint8c:1,complex128:1,complex64:1,complex32:1,binary:0,generic:1,bool:0},complex128:{float64:0,float32:0,float16:0,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,complex32:1,binary:0,generic:1,bool:0},complex64:{float64:0,float32:0,float16:0,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,complex32:1,binary:0,generic:1,bool:0},complex32:{float64:0,float32:0,float16:0,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,complex32:1,binary:0,generic:1,bool:0},generic:{float64:0,float32:0,float16:0,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:0,complex64:0,complex32:0,binary:0,generic:1,bool:0},binary:{float64:0,float32:0,float16:0,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:0,complex64:0,complex32:0,binary:1,generic:0,bool:0},bool:{float64:0,float32:0,float16:0,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:0,complex64:0,complex32:0,binary:0,generic:1,bool:1}};var No=function(t){return 0===arguments.length?function(){var t,e,n,r,i,o,a,u,f;for(n={},e=(t=Yr(Mo)).length,f=0;f<e;f++){for(i=t[f],a=Mo[i],r={},u=0;u<e;u++)r[o=t[u]]=a[o];n[i]=r}return n}():(void 0===ko&&(ko=function(){var t,e,n,r,i,o,a,u,f;for(n={},e=(t=Yr(Mo)).length,f=0;f<e;f++){for(i=t[f],a=Mo[i],r=[],u=0;u<e;u++)1===a[o=t[u]]&&r.push(o);n[i]=r}return n}()),t=Zr(t),J(ko,t)?ko[t].slice():null)}();var Co,Yo={float64:{float64:1,float32:1,float16:1,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:0,complex32:0,binary:0,generic:1,bool:0},float32:{float64:1,float32:1,float16:1,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,complex32:0,binary:0,generic:1,bool:0},float16:{float64:1,float32:1,float16:1,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,complex32:1,binary:0,generic:1,bool:0},int64:{float64:0,float32:0,float16:0,int64:1,int32:1,int16:1,int8:1,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:0,complex64:0,complex32:0,binary:0,generic:1,bool:0},int32:{float64:1,float32:0,float16:0,int64:1,int32:1,int16:1,int8:1,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:0,complex32:0,binary:0,generic:1,bool:0},int16:{float64:1,float32:1,float16:0,int64:1,int32:1,int16:1,int8:1,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,complex32:0,binary:0,generic:1,bool:0},int8:{float64:1,float32:1,float16:1,int64:1,int32:1,int16:1,int8:1,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,complex32:0,binary:0,generic:1,bool:0},uint64:{float64:0,float32:0,float16:0,int64:0,int32:0,int16:0,int8:0,uint64:1,uint32:1,uint16:1,uint8:1,uint8c:1,complex128:1,complex64:0,complex32:0,binary:0,generic:1,bool:0},uint32:{float64:1,float32:0,float16:0,int64:1,int32:0,int16:0,int8:0,uint64:1,uint32:1,uint16:1,uint8:1,uint8c:1,complex128:1,complex64:0,complex32:0,binary:0,generic:1,bool:0},uint16:{float64:1,float32:1,float16:0,int64:1,int32:1,int16:0,int8:0,uint64:1,uint32:1,uint16:1,uint8:1,uint8c:1,complex128:1,complex64:1,complex32:0,binary:0,generic:1,bool:0},uint8:{float64:1,float32:1,float16:1,int64:1,int32:1,int16:1,int8:0,uint64:1,uint32:1,uint16:1,uint8:1,uint8c:1,complex128:1,complex64:1,complex32:1,binary:0,generic:1,bool:0},uint8c:{float64:1,float32:1,float16:1,int64:1,int32:1,int16:1,int8:0,uint64:1,uint32:1,uint16:1,uint8:1,uint8c:1,complex128:1,complex64:1,complex32:1,binary:0,generic:1,bool:0},complex128:{float64:0,float32:0,float16:0,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,complex32:1,binary:0,generic:0,bool:0},complex64:{float64:0,float32:0,float16:0,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,complex32:1,binary:0,generic:0,bool:0},complex32:{float64:0,float32:0,float16:0,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,complex32:1,binary:0,generic:0,bool:0},generic:{float64:0,float32:0,float16:0,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:0,complex64:0,complex32:0,binary:0,generic:1,bool:0},binary:{float64:0,float32:0,float16:0,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:0,complex64:0,complex32:0,binary:1,generic:0,bool:0},bool:{float64:0,float32:0,float16:0,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:0,complex64:0,complex32:0,binary:0,generic:1,bool:1}};var Do=function(t){return 0===arguments.length?function(){var t,e,n,r,i,o,a,u,f;for(n={},e=(t=Yr(Yo)).length,f=0;f<e;f++){for(i=t[f],a=Yo[i],r={},u=0;u<e;u++)r[o=t[u]]=a[o];n[i]=r}return n}():(void 0===Co&&(Co=function(){var t,e,n,r,i,o,a,u,f;for(n={},e=(t=Yr(Yo)).length,f=0;f<e;f++){for(i=t[f],a=Yo[i],r=[],u=0;u<e;u++)1===a[o=t[u]]&&r.push(o);n[i]=r}return n}()),t=Zr(t),J(Co,t)?Co[t].slice():null)}();function zo(t,e,n){return"unsafe"===n||(Zr(t)===Zr(e)||"none"!==n&&"equiv"!==n&&("safe"===n?function(t,e){var n;return(t=Zr(t))===(e=Zr(e))||!!(n=Po[t])&&n[e]>0}(t,e):"mostly-safe"===n?function(t,e){var n;return(t=Zr(t))===(e=Zr(e))||!!(n=No[t])&&n[e]>0}(t,e):function(t,e){var n;return(t=Zr(t))===(e=Zr(e))||!!(n=Do[t])&&n[e]>0}(t,e)))}var Jo=1401298464324817e-60,Wo=16777215,$o=-16777215;function Go(t){return t!=t||t===Q||t===tt?"float32":nt(t)?t>=$o&&t<=Wo?"float32":"float64":t>-Jo&&t<Jo?"float64":"float32"}function qo(t){return N(t)?t!=t||t===Q||t===tt?"float32":nt(t)?0===t&&(0===(e=t)&&1/e===tt)?"float32":t<0?t>=$e?"int8":t>=Se?"int16":t>=ye?"int32":"float64":t<=Ie?"uint8":t<=_e?"uint16":t<=fe?"uint32":"float64":t>-Jo&&t<Jo?"float64":"float32":pt(t)?"bool":yn(t)?"float64"===Go(t.re)||"float64"===Go(t.im)?"complex128":"complex64":"generic";var e}var Zo={Complex64:"complex64",Complex128:"complex128"};var Xo,Ho=["complex64","complex128"].slice(),Ko=[];for(Xo=0;Xo<Ho.length;Xo++)Ko.push(eo(Ho[Xo]));var Qo=Ho.length;function ta(t){var e;for(e=0;e<Qo;e++)if(t instanceof Ko[e])return Ho[e];return Zo[Ft(t)]||null}function ea(t){return t?1:0}function na(t){return q(t)}var ra={dtypes:{real:"float64",complex:"complex128"}};function ia(t,e){return function(n){var r,i;N(n)?(r=Eo(t.type)?t.type:it(n)?xo(t.type)?function(t){return t<0?t>=$e?"int8":t>=Se?"int16":t>=ye?"int32":"float64":t<=We?"int8":t<=Ve?"int16":t<=ge?"int32":"float64"}(n):qo(n):ra.dtypes.real,i=n):yn(n)?(r=ta(n)||("float32"===t.type?"complex64":"complex128"),i=n.re):pt(n)?(r="bool",i=ea(n)):Fo(n)?(r="int64",i=na(n)):(r="generic",i=n);if(!zo(r,t.type,t.castingMode))throw new TypeError(j("invalid assignment. Assigned value cannot be cast to the data type of `%s`. Data types: [%s, %s].",t.name,t.type,r));this[Wi][e](t.byteOffset,i,Qi)}}function oa(t){return gt(t)}function aa(t){return gt(t.re||t.im)}function ua(t,e){return function(n){var r,i;pt(n)?(r="bool",i=ea(n)):N(n)?(r=ra.dtypes.real,i=ea(oa(n))):Fo(n)?(r="int64",i=ea(function(t){return gt(t)}(n))):yn(n)?(r=ta(n)||ra.dtypes.complex,i=ea(aa(n))):(r="generic",i=gt(n));if(!zo(r,t.type,t.castingMode))throw new TypeError(j("invalid assignment. Assigned value cannot be cast to the data type of `%s`. Data types: [%s, %s].",t.name,t.type,r));this[Wi][e](t.byteOffset,i,Qi)}}var fa="function"==typeof BigInt?BigInt:void 0;function sa(t,e){return function(n){var r,i;Fo(n)?(r="int64",i=n):N(n)?it(n)?(r=qo(n),i=fa(n)):(r=ra.dtypes.real,i=fa(et(n))):pt(n)?(r="bool",i=function(t){return fa(t?1:0)}(n)):yn(n)?(r=ta(n)||ra.dtypes.complex,i=fa(et(n.re))):(r="generic",i=fa(et(q(i))));if(!zo(r,t.type,t.castingMode))throw new TypeError(j("invalid assignment. Assigned value cannot be cast to the data type of `%s`. Data types: [%s, %s].",t.name,t.type,r));this[Wi][e](t.byteOffset,i,Qi)}}function la(t){return Qe(t)&&Ci(t[Wi])}var ca=Qn(_o("complex_floating_point")),ha=Qn(_o("boolean")),pa=Qn(_o("real"));function ga(t,e){if(wn(t))return An(t,e);if(bn(t))return Tn(t,e);throw new TypeError(j("invalid argument. First argument must be a complex-valued floating-point array. Value: `%s`.",t))}function ya(t,e){return e>0?0:(1-t)*e}var ma=8;function da(t,e,n,r,i){var o,a,u,f;if(t<=0)return n;if((u=Li(n)).accessorProtocol)return function(t,e,n,r,i){var o,a,u,f;for(o=n.data,a=n.accessors[1],u=i,f=0;f<t;f++)a(o,u,e),u+=r}(t,e,u,r,i),u.data;if(o=i,1===r){if((a=t%ma)>0)for(f=0;f<a;f++)n[o]=e,o+=r;if(t<ma)return n;for(f=a;f<t;f+=ma)n[o]=e,n[o+1]=e,n[o+2]=e,n[o+3]=e,n[o+4]=e,n[o+5]=e,n[o+6]=e,n[o+7]=e,o+=ma;return n}for(f=0;f<t;f++)n[o]=e,o+=r;return n}function ba(t,e,n,r){return da(t,e,n,r,ya(t,r))}function va(t){return Mi(0,t)}function wa(t,e,n,r,i,o){var a,u;return a=Li(t),u=Li(e),a.accessorProtocol||u.accessorProtocol?(function(t,e,n,r,i,o){var a,u,f,s,l,c;for(a=t.data,u=e.data,f=t.accessors[0],s=e.accessors[1],l=r,c=0;c<a.length;c++)s(u,l,i.call(o,f(a,c),c,a)),l+=n}(a,u,n,r,i,o),e):function(t,e,n,r,i,o){var a,u;for(a=r,u=0;u<t.length;u++)e[a]=i.call(o,t[u],u,t),a+=n;return e}(t,e,n,r,i,o)}function _a(t,e,n){return function(t,e){return"function"==typeof t[e]}(t,"map")?t.map(e,n):wa(t,va(t.length),1,0,e,n)}function Ea(t){return t.re}function xa(t){if(t.length)return t.isStructType?function(t){return function(e){var n,r,i,o,a,u,f,s;if(!zt(e))throw new TypeError(j("invalid assignment. `%s` must be an array-like object. Value: `%s`.",t.name,e));if(e.length!==t.length)throw new RangeError(j("invalid assignment. `%s` must be an array-like object having length %u.",t.name,t.length));if("none"===t.casting)for(s=0;s<e.length;s++)if(!(e[s]instanceof t.type))throw new TypeError(j("invalid assignment. Assigned value cannot be cast to the data type of `%s`. Value: `%s`.",t.name,e[s]));for(f=t.byteLength/t.length,r=[],s=0;s<e.length;s++){if((u=this.constructor.viewOf(e[s])).byteLength!==f)throw new RangeError(j("invalid assignment. `%s` must be an array-like object containing `struct` instances having the same byte length.",t.name));a=new Me(u.buffer,u.byteOffset,f),r.push(a)}for(n=(i=this[Wi]).byteOffset+t.byteOffset,s=0;s<e.length;s++)o=new Me(i.buffer,n,f),Ii(t.length,r[s],1,o,1),n+=f}}(t):function(t){return function(e){var n,r,i;if(!zt(e)||la(e))throw new TypeError(j("invalid assignment. `%s` must be an array-like object. Value: `%s`.",t.name,e));if(e.length!==t.length)throw new RangeError(j("invalid assignment. `%s` must be an array-like object having length %u.",t.name,t.length));if(!zo(i=Hn(e),t.type,t.castingMode))throw new TypeError(j("invalid assignment. Assigned value cannot be cast to the data type of `%s`. Data types: [%s, %s].",t.name,t.type,i));return n=mo((r=this[Wi]).buffer,r.byteOffset+t.byteOffset,t.length,t.type),i===t.type?ca(i)?void Ii(2*t.length,ga(e,0),1,ga(n,0),1):ha(i)?void Ii(t.length,fo(e,0),1,fo(n,0),1):void Ii(t.length,e,1,n,1):pa(i)?pa(t.type)?void Ii(t.length,e,1,n,1):ca(t.type)?(n=ga(n,0),Ii(t.length,n,2,e,1),void ba.ndarray(t.length,0,n,2,1)):void _a.assign(e,n,1,0,oa):ca(i)?pa(t.type)?void _a.assign(e,n,1,0,Ea):ca(t.type)?void Ii(2*t.length,ga(e,0),1,ga(n,0),1):void _a.assign(e,n,1,0,aa):void(pa(t.type)?Ii(t.length,fo(e,0),1,n,1):(n=ga(n,0),Ii(t.length,n,2,fo(e,0),1),ba.ndarray(t.length,0,n,2,1)))}}(t);switch(t.type){case"float64":case"float32":case"float16":case"int8":case"int16":case"int32":case"uint8":case"uint16":case"uint32":return ia(t,Hi[t.type].set);case"int64":case"uint64":return sa(t,Hi[t.type].set);case"bool":return ua(t,Hi[t.type].set);case"complex128":case"complex64":case"complex32":return function(t,e){return function(n){var r,i,o,a;if(yn(n)?(i=ta(n)||t.type,o=n.re,a=n.im):N(n)?(i="complex64"===t.type?"float32":"float64",o=n,a=0):Fo(n)?(i="int64",o=na(n),a=0):pt(n)?(i="bool",o=ea(n),a=0):(i="generic",o=n,a=0),!zo(i,t.type,t.castingMode))throw new TypeError(j("invalid assignment. Assigned value cannot be cast to the data type of `%s`. Data types: [%s, %s].",t.name,t.type,i));(r=this[Wi])[e](t.byteOffset,o,Qi),r[e](t.byteOffset+t.byteLength/2,a,Qi)}}(t,Hi[t.type].set);default:if(t.isStructType)return function(t){return function(e){var n,r,i,o,a;if(!la(e))throw new TypeError(j("invalid assignment. `%s` must be a `struct` instance. Value: `%s`.",t.name,e));if("none"===t.casting&&!(e instanceof t.type))throw new TypeError(j("invalid assignment. Assigned value cannot be cast to the data type of `%s`. Value: `%s`.",t.name,e));if(a=t.byteLength,(o=this.constructor.viewOf(e)).byteLength!==a)throw new RangeError(j("invalid assignment. `%s` must be a `struct` instance having the same byte length.",t.name));i=new Me(o.buffer,o.byteOffset,a),n=this[Wi],r=new Me(n.buffer,n.byteOffset+t.byteOffset,a),Ii(t.length,i,1,r,1)}}(t);throw new Error(j("unexpected error. Unrecognized data type. Value: `%s`.",t.type))}}M(ba,"ndarray",da),M(_a,"assign",wa);var Ta=["name","type","description","length","enumerable","writable","default","castingMode"];function Aa(t){return"union"===t.type&&zt(t.fields)}function Oa(t){return null==t}function Va(t,e,n,r,i){var o,a,u,f,s;if(t<=0)return"";if(1===r&&0===i&&t===n.length&&function(t,e){return"function"==typeof t[e]}(n,"join"))return n.join(e);if((u=Li(n)).accessorProtocol)return function(t,e,n,r,i){var o,a,u,f,s,l;for(o=n.data,a=n.accessors[0],f=i,u="",l=0;l<t;l++)l>0&&(u+=e),Oa(s=a(o,f))||(u+=String(s)),f+=r;return u}(t,e,u,r,i);for(a=i,o="",s=0;s<t;s++)s>0&&(o+=e),Oa(f=n[a])||(o+=String(f)),a+=r;return o}function Sa(t,e){return Va(t.length,e,t,1,0)}function ja(t,e){return pt(t)?null:new TypeError(j("invalid argument. `%s` field must be a boolean. Value: `%s`.",e,t))}M((function(t,e,n,r){return Va(t,e,n,r,ya(t,r))}),"ndarray",Va);var Ra=["int8","int16","int32","int64","uint8","uint16","uint32","uint64","float32","float64","complex64","complex128","bool"];var La,Ba={int8:1,int16:2,int32:4,int64:8,uint8:1,uint16:2,uint32:4,uint64:8,float16:2,float32:4,float64:8,complex32:2,complex64:4,complex128:8,bool:1},Fa=["name","type"],Ia={name:function(t,e){return tn(t)||t.length>0?null:new TypeError(j("invalid argument. `%s` field must be a non-empty string. Value: `%s`.",e,t))},type:function(t){return Kn(Ra,t)||fr(t)?null:new TypeError(j('invalid argument. `%s` field must be either a struct type or one of the following: "%s". Value: `%s`.',"type",Sa(Ra,", "),t))},description:function(t,e){return tn(t)?null:new TypeError(j("invalid argument. `%s` field must be a string. Value: `%s`.",e,t))},length:function(t,e){return or(t)?null:new TypeError(j("invalid argument. `%s` field must be a positive integer. Value: `%s`.",e,t))},enumerable:ja,writable:ja,default:ct(null),castingMode:(La=["none","safe","mostly-safe","same-kind","unsafe"],function(t,e){return Kn(La,t)?null:new TypeError(j('invalid argument. `%s` field must be one of the following: "%s". Value: `%s`.',e,Sa(La,", "),t))})};function Ua(t,e){var n,r,i,o,a;for(n={isStructType:!1,description:"",byteLength:0,byteOffset:0,alignment:0,padding:0,enumerable:!0,writable:!0,default:void 0,castingMode:"none"},a=0;a<e.length;a++)if(ir(t,o=e[a])){if(i=t[o],r=Ia[o](i,o))return r;n[o]=i}return function(t,e){var n;for(n=0;n<e.length;n++)if(!ir(t,e[n]))return!1;return!0}(n,Fa)?(n.isStructType=fr(n.type),n.byteLength=function(t){var e;return e=t.isStructType?t.type.byteLength:Hr(t.type),t.length&&(e*=t.length),e}(n),n.isStructType?n.alignment=n.type.alignment:n.alignment=Ba[n.type],n):new TypeError(j('invalid argument. Field objects must have the following properties: "%s". Value: `%s`.',Sa(Fa,", "),JSON.stringify(t)))}function Pa(t){var e,n,r;for(e=0,r=0;r<t.length;r++)(n=t[r].alignment)>e&&(e=n);return e}function ka(t){var e,n,r,i,o,a,u;if(0===(e=t.fields).length)return null;for(r=[],u=0;u<e.length;u++){if(!Qe(a=e[u]))return null;if(Aa(a))return new TypeError(j("invalid argument. Union types cannot contain nested union types. Value: `%s`.",JSON.stringify(e)));if(void 0===n&&ir(a,"default"))n=!0;else if(!0===n&&ir(a,"default"))return new TypeError(j("invalid argument. Union types can only contain one field with a default value. Value: `%s`.",JSON.stringify(e)));if((i=Ua(a,Ta))instanceof Error)return i;if(0===u)o=i.byteLength;else if(i.byteLength!==o)return new RangeError(j("invalid argument. Union types must contain fields having the same byte length. Value: `%s`.",JSON.stringify(e)));r.push(i)}return{type:"union",fields:r,byteLength:o,byteOffset:0,alignment:Pa(r),padding:0}}function Ma(t){var e=Hn(t);return Wt(t)?Gt(e):Zt(e)}function Na(t,e,n){return function(t,e){return"function"==typeof t[e]}(t,"indexOf")?t.indexOf(e,n):(n<0&&(n+=t.length)<0&&(n=0),zt(r=t)&&Ut(r.get)&&Ut(r.set)?function(t,e,n){var r,i;for(r=Ma(t),i=n;i<t.length;i++)if(e===r(t,i))return i;return-1}(t,e,n):function(t,e,n){var r;for(r=n;r<t.length;r++)if(e===t[r])return r;return-1}(t,e,n));var r}function Ca(t,e){var n;return 0===t.length?new Error("invalid operation. struct does not have any fields."):(n=Na(t,e,0))<0?new TypeError(j('invalid argument. Field name must be one of the following: "%s". Value: `%s`.',Sa(t,", "),e)):n}function Ya(t,e){var n;for(n=0;n<t.length;n++)t[n].padding=e;return t}function Da(t){return function(e,n){return j("[%u,",t+parseInt(n,10))}}function za(t){var e,n,r,i,o,a;for(i=t.length,r=/\[(\d{1,}),/g,e=[],a=0;a<i;a++)o=t[a],a>0&&o.byteOffset===t[a-1].byteOffset||(o.isStructType?e.push(tr(o.type.layout,r,Da(o.byteOffset))):e.push(j("|<%s>[%u,%u]",o.type,o.byteOffset,o.byteLength)));return"|"===(n=j("%s|",e.join("")))[n.length-2]&&(n=n.substring(0,n.length-1)),n}var Ja=["none","linear","layout"],Wa=Qn(Ja);function $a(t,e,n){var r;if(!yr(n))throw new TypeError(j("invalid argument. Options argument must be an object. Value: `%s`.",n));if(r={format:"none"},J(n,"format")&&(r.format=n.format,!Wa(r.format)))throw new TypeError(j('invalid option. `%s` option must be one of the following: "%s". Option: `%s`.',"format",Sa(Ja,", "),n.format));return"linear"===r.format?function(t,e){var n,r,i,o,a,u,f,s,l,c,h,p,g,y,m,d,b,v,w,_,E,x;for(d=e.length,n="%"+(t.byteLength-1).toString().length+"s",y=0,_=0;_<d;_++)(m=(b=e[_]).name.length+1+(b.byteLength-1).toString().length+1)>y&&(y=m);for(r="%"+y+"s",i="// %s",u="%s: %s %s",c=0,s=[],_=0;_<d;_++)if(b=e[_],!(_>0&&b.byteOffset===e[_-1].byteOffset)){for(l=_<d-1&&b.byteOffset===e[_+1].byteOffset,E=0;E<b.byteLength;E++){if(h=j(n,c.toString()),p=j(r,j("%s[%u]",b.name,E)),o=b.alignment>1?" (byte %u)":"",l){for(a=" => union: %s",f=[],x=_+1;x<d&&b.byteOffset===e[x].byteOffset;)w=(v=e[x]).isStructType?"<Struct>":v.type,f.push(j("%s<%s>[%u]",v.name,w,E%v.alignment)),x+=1;a=j(a,f.join(", "))}else a="";f=j(o+a,E%b.alignment),g=b.length?j(i,j("%s[%u]%s",b.type,et(E/b.alignment),f)):j(i,j("%s%s",b.type,f)),s.push(j(u,h,p,g)),c+=1}for(E=0;E<b.padding;E++)h=j(n,c.toString()),p=j(r,"--"),g=j(i,"padding"),s.push(j(u,h,p,g)),c+=1}return s.join("\n")}(t,e):"layout"===r.format?za(e):"<Struct>"}function Ga(){}var qa="foo"===Ga.name;var Za=[ee,ae,ve,he,Be,Ae,Xe,Me,ze],Xa=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array"],Ha=Qt()?pr(ee):Ka;function Ka(){}Ha="TypedArray"===function(t){if(!1===Ut(t))throw new TypeError(j("invalid argument. Must provide a function. Value: `%s`.",t));return qa?t.name:St.exec(t.toString())[1]}(Ha)?Ha:Ka;var Qa=[Yn,Bn],tu=["Complex64Array","Complex128Array"];function eu(){return"function"==typeof W&&"symbol"==typeof W("foo")&&J(W,"hasInstance")&&"symbol"==typeof W.hasInstance}var nu=eu()?Symbol.hasInstance:null,ru=eu();function iu(t,e){if("function"!=typeof e&&(!ru||"object"!=typeof e||"function"!=typeof e[nu]))throw new TypeError(j("invalid argument. Second argument must be callable. Value: `%s`.",e));return t instanceof e}var ou=[[ee,"Float64Array"],[ae,"Float32Array"],[ve,"Int32Array"],[he,"Uint32Array"],[Be,"Int16Array"],[Ae,"Uint16Array"],[Xe,"Int8Array"],[Me,"Uint8Array"],[ze,"Uint8ClampedArray"],[Bn,"Complex64Array"],[Yn,"Complex128Array"],[Gn,"BooleanArray"]];function au(t){var e,n;for(n=0;n<ou.length;n++)if(iu(t,ou[n][0]))return ou[n][1];for(;t;){for(e=Ft(t),n=0;n<ou.length;n++)if(e===ou[n][1])return ou[n][1];t=pr(t)}}function uu(t){var e,n,r,i;if(function(t){var e,n;if("object"!=typeof t||null===t)return!1;if(t instanceof Ha)return!0;for(n=0;n<Za.length;n++)if(t instanceof Za[n])return!0;for(;t;){for(e=Ft(t),n=0;n<Xa.length;n++)if(Xa[n]===e)return!0;t=pr(t)}return!1}(t))e=t;else if(function(t){var e,n;if("object"!=typeof t||null===t)return!1;for(n=0;n<Qa.length;n++)if(t instanceof Qa[n])return!0;for(;t;){for(e=Ft(t),n=0;n<tu.length;n++)if(tu[n]===e)return!0;t=pr(t)}return!1}(t))e=8===t.BYTES_PER_ELEMENT?Tn(t,0):An(t,0);else{if(!((i=t)instanceof Gn||"BooleanArray"===Ft(i)))throw new TypeError(j("invalid argument. Must provide a typed array. Value: `%s`.",t));e=fo(t,0)}for(n={type:au(t),data:[]},r=0;r<e.length;r++)n.data.push(e[r]);return n}function fu(t){var e,n,r,i,o,a,u,f;if(!zt(t))throw new TypeError(j("invalid argument. First argument must be an array-like object. Value: `%s`.",t));if(u=function(t){var e,n,r,i;for(e=[],i=0;i<t.length;i++){if(!Qe(r=t[i]))return new TypeError(j("invalid argument. First argument must be an array of objects. Value: `%s`. Index: `%d`.",r,i));if(Aa(r)){if(null===(n=ka(r)))return new TypeError(j("invalid argument. Union types must be an array of objects. Value: `%s`. Index: `%d`.",JSON.stringify(r),i));if(n instanceof Error)return n}else if((n=Ua(r,Ta))instanceof Error)return n;e.push(n)}return e}(t),u instanceof Error)throw u;if(u=function(t){var e,n,r,i,o,a;for(e={},n=[],i=0;i<t.length;i++)if(a=(r=t[i]).name,Aa(r))for(o=0;o<r.fields.length;o++){if(!0===e[a=r.fields[o].name])return new TypeError(j("invalid argument. First argument must be an array of objects having unique field names. Value: `%s`.",JSON.stringify(t)));e[a]=!0,n.push(a)}else{if(!0===e[a])return new TypeError(j("invalid argument. First argument must be an array of objects having unique field names. Value: `%s`.",JSON.stringify(t)));e[a]=!0,n.push(a)}return n}(a=u),u instanceof Error)throw u;function s(t,i,u){var f,l,c,h,p,g,y,m,d,b;if(l=arguments.length,!(this instanceof s))return 0===l?new s:1===l?new s(t):2===l?new s(t,i):new s(t,i,u);if(Yt(t)){if(1===l)h=new Ji(t,0,n);else{if(!ut(i))throw new TypeError(j("invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.",i));if(2===l)h=new Ji(t,i,n);else{if(!ut(u))throw new TypeError(j("invalid argument. Byte length must be a nonnegative integer. Value: `%s`.",u));h=new Ji(t,i,ki(u,n))}}if(h.byteLength<n)throw new RangeError(j("invalid argument. ArrayBuffer has insufficient capacity. Minimum capacity: `%u`.",n))}else if(h=new Ji(new Oi(n)),l>0){if(!Qe(t))throw new TypeError(j("invalid argument. First argument must be an object. Value: `%s`.",t));p=t}if(M(this,Wi,h),void 0!==p){for(f=Mi(void 0,a.length),c={},m=0;m<a.length;m++)if(b=e[m],d=r[m],ir(p,b)){if(c[d])throw new Error("invalid argument. Union types may only be initialized by a single member.");f[m]=p[b],c[d]=!0}for(m=0;m<a.length;m++)c[d=r[m]]||void 0!==(g=a[m]).default&&(f[m]=g.default);for(m=0;m<a.length;m++)void 0!==(y=f[m])&&o[e[m]][1].call(this,y)}return this}return e=u,i=Pa(a),a=function(t,e){var n,r,i,o,a,u,f;for(i=0,u=0;u<t.length;u++){if(i+=r=((n=ki((a=t[u]).alignment,e))-i%n)%n,u>0&&((o=t[u-1]).padding=r,Aa(a)&&Ya(o.fields,r)),a.byteOffset=i,Aa(a))for(f=0;f<a.fields.length;f++)a.fields[f].byteOffset=i;i+=a.byteLength}return r=(n-i%n)%n,a.padding=r,Aa(a)&&Ya(a.fields,r),t}(a,i),a=function(t){var e,n,r,i;for(e=[],r=0;r<t.length;r++)if(Aa(n=t[r]))for(i=0;i<n.fields.length;i++)e.push(n.fields[i]);else e.push(n);return e}(a),r=function(t){var e,n,r,i;for(n=t.length,e=[],i=0,r=0;r<n-1;r++)t[r].byteOffset!==t[r+1].byteOffset?(e.push(i),i+=1):e.push(i);return e.push(i),e}(a),f=a[a.length-1],n=f.byteOffset+f.byteLength+f.padding,M(s,"name",$i),M(s,"alignment",i),M(s,"byteLength",n),_n(s,"fields",(function(){return e.slice()})),_n(s,"layout",(function(){return za(a)})),M(s,"bufferOf",(function(t){if(!la(t))throw new TypeError(j("invalid argument. First argument must be a `struct` instance. Value: `%s`.",t));return t[Wi].buffer})),M(s,"byteLengthOf",(function(t){var n=Ca(e,t);if(n instanceof Error)throw n;return a[n].byteLength})),M(s,"byteOffsetOf",(function(t){var n=Ca(e,t);if(n instanceof Error)throw n;return a[n].byteOffset})),M(s,"descriptionOf",(function(t){var n=Ca(e,t);if(n instanceof Error)throw n;return a[n].description})),M(s,"isStruct",(function(t){return t instanceof s||la(t)&&fr(t.constructor)})),M(s,"typeOf",(function(t){var n=Ca(e,t);if(n instanceof Error)throw n;return a[n].type})),M(s,"viewOf",(function(t){var e;if(!la(t))throw new TypeError(j("invalid argument. First argument must be a `struct` instance. Value: `%s`.",t));return e=t[Wi],new Ji(e.buffer,e.byteOffset,e.byteLength)})),o=function(t,e){var n,r,i,o,a;for(i={},a=0;a<e.length;a++)n=bo(o=e[a]),r=xa(o),o.enumerable?o.writable?Zi(t,o.name,n,r):qi(t,o.name,n):o.writable?Gi(t,o.name,n,r):_n(t,o.name,n),i[o.name]=[n,r];return i}(s.prototype,a),M(s.prototype,"toString",(function(){if(!(this instanceof s))throw new Error("invalid invocation. `this` is not a struct instance.");return $a(s,a,arguments.length>0?arguments[0]:{})})),M(s.prototype,"toJSON",(function(){if(!(this instanceof s))throw new Error("invalid invocation. `this` is not a struct instance.");return function(t,e){var n,r,i,o;for(n={},o=0;o<e.length;o++)zt(i=t[(r=e[o]).name])?i=uu(i):(la(i)||yn(i)&&Ut(i.toJSON))&&(i=i.toJSON()),n[r.name]=i;return n}(this,a)})),s}function su(t,e,n){var r,i,o,a,u,f,s,l,c,h,p;for(u={format:"layout"},f=n.length,s=n.get&&n.set?Gt("default"):Zt("default"),o=t.layout,c=t.byteLength,r=new Me(e),i=0,p=0;p<f;p++){h=s(n,p);try{a=t.viewOf(h),l=!0}catch(e){try{h=new t(h)}catch(t){return null}a=t.viewOf(h),l=!1}if(l&&h.toString(u)!==o)return null;Pi(c,new Me(a.buffer,a.byteOffset,a.byteLength),1,0,r,1,i),i+=c}return e}var lu=lt(),cu="StructArray";function hu(t){var e,n,r,i;if(zt(t))i=fu(t);else{if(!fr(t))throw new TypeError(j("invalid argument. First argument must be either a struct constructor or struct schema. Value: `%s`.",t));i=t}function o(t,n,r){var a,u,f,s;if(a=arguments.length,!(this instanceof o))return 0===a?new o:1===a?new o(t):2===a?new o(t,n):new o(t,n,r);if(0===a)u=new Oi(0),f=0;else if(1===a)if(ut(t))u=new Oi(t*e),f=t;else if(zt(t)){if(f=t.length,null===(u=su(i,new Oi(f*e),t)))throw new TypeError(j("invalid argument. Each element of a provided input array must be a valid object or a struct instance having the same layout as elements in the desired output array."))}else if(Yt(t)){if(!it(f=(u=t).byteLength/e))throw new RangeError(j("invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.",e,u.byteLength))}else{if(!Qe(t))throw new TypeError(j("invalid argument. First argument must be a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",t));if(!1===lu)throw new TypeError(j("invalid argument. Environment lacks Symbol.iterator support. First argument must be a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.",t));if(!Ut(t[kt]))throw new TypeError(j("invalid argument. First argument must be a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",t));if(!Ut((u=t[kt]()).next))throw new TypeError(j("invalid argument. First argument must be a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",t));if(f=(s=function(t){var e,n;for(e=[];!(n=t.next()).done;)e.push(n.value);return e}(u)).length,null===(u=su(i,new Oi(f*e),s)))throw new TypeError(j("invalid argument. Each element of a provided input iterable must be either a valid object or a struct instance having the same layout as elements in the desired output array."))}else{if(!Yt(u=arguments[0]))throw new TypeError(j("invalid argument. First argument must be an ArrayBuffer. Value: `%s`.",t));if(!ut(n))throw new TypeError(j("invalid argument. Second argument must be a nonnegative integer. Value: `%s`.",n));if(!it(n/e))throw new RangeError(j("invalid argument. Second argument must be a multiple of %u. Value: `%u`.",e,n));if(n>=u.byteLength)throw new RangeError(j("invalid argument. Second argument exceeds the bounds of the ArrayBuffer. Value: `%s`.",n));if(2===a){if(!it(f=(u.byteLength-n)/e))throw new RangeError(j("invalid argument. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.",e,u.byteLength-n))}else{if(!ut(f=r))throw new TypeError(j("invalid argument. Third argument must be a nonnegative integer. Value: `%s`.",f));if(f*e>u.byteLength-n)throw new RangeError(j("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",f*e))}}return M(this,"_buffer",u),M(this,"_byteOffset",n||0),M(this,"_byteLength",f*e),M(this,"_length",f),this}return e=i.byteLength,n=i.layout,r=i.fields,M(o,"BYTES_PER_ELEMENT",e),M(o,"name",cu),M(o,"struct",i),_n(o.prototype,"buffer",(function(){return this._buffer})),_n(o.prototype,"byteLength",(function(){return this._byteLength})),_n(o.prototype,"byteOffset",(function(){return this._byteOffset})),M(o.prototype,"BYTES_PER_ELEMENT",o.BYTES_PER_ELEMENT),M(o.prototype,"get",(function(t){if(!a(this))throw new TypeError(j("invalid invocation. `this` is not a %s.",cu));if(!ut(t))throw new TypeError(j("invalid argument. Must provide a nonnegative integer. Value: `%s`.",t));if(!(t>=this._length))return new i(this._buffer,this._byteOffset+t*e,e)})),_n(o.prototype,"length",(function(){return this._length})),M(o.prototype,"set",(function(t){var o,u,f,s,l,c,h,p,g,y,m,d;if(!a(this))throw new TypeError(j("invalid invocation. `this` is not a %s.",cu));if(s=this._buffer,arguments.length>1){if(!ut(f=arguments[1]))throw new TypeError(j("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",f))}else f=0;if(u={format:"layout"},h=i.byteLength,!zt(t)||Kn(r,"length")){if(f>=this._length)throw new RangeError(j("invalid argument. Index argument is out-of-bounds. Value: `%u`.",f));if(!Qe(t))throw new TypeError(j("invalid argument. Must provide either a valid object or a struct instance. Value: `%s`.",t));if(t.toString(u)===n)return o=i.viewOf(t),void Pi(h,new Me(o.buffer,o.byteOffset,h),1,0,new Me(s,this._byteOffset+f*e,h),1,0);for(g=new i(s,this._byteOffset+f*e,h),m=0;m<r.length;m++)ir(t,y=r[m])&&(g[y]=t[y])}else{if(f+(p=t.length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(c=(o=t).get&&o.set?Gt("default"):Zt("default"),d=this._byteOffset+f*e,o.buffer===s&&o.byteOffset<d&&o.byteOffset+o.byteLength>d){for(l=[],m=0;m<p;m++)l.push(c(t,m));o=l,c=Zt("default")}for(m=0;m<p;f++,m++)this.set(c(o,m),f)}})),M(o.prototype,"struct",i),o;function a(t){return"object"==typeof t&&null!==t&&(t.constructor.name===cu||function(t,e){var n=typeof e;if(null===e||"object"!==n&&"function"!==n)throw new TypeError(j("invalid argument. Second argument must be either an object (except null) or a function. Value: `%s`.",e));return n=typeof t,null!==t&&("object"===n||"function"===n)&&Ei.call(e,t)}(t,o.prototype))&&t.BYTES_PER_ELEMENT===e}}function pu(t){if(t.__esModule)return t;var e=t.default;if("function"==typeof e){var n=function t(){return this instanceof t?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach((function(e){var r=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,r.get?r:{enumerable:!0,get:function(){return t[e]}})})),n}var gu="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},yu=[],mu=[],du="undefined"!=typeof Uint8Array?Uint8Array:Array,bu=!1;function vu(){bu=!0;for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0;e<64;++e)yu[e]=t[e],mu[t.charCodeAt(e)]=e;mu["-".charCodeAt(0)]=62,mu["_".charCodeAt(0)]=63}function wu(t,e,n){for(var r,i,o=[],a=e;a<n;a+=3)r=(t[a]<<16)+(t[a+1]<<8)+t[a+2],o.push(yu[(i=r)>>18&63]+yu[i>>12&63]+yu[i>>6&63]+yu[63&i]);return o.join("")}function _u(t){var e;bu||vu();for(var n=t.length,r=n%3,i="",o=[],a=16383,u=0,f=n-r;u<f;u+=a)o.push(wu(t,u,u+a>f?f:u+a));return 1===r?(e=t[n-1],i+=yu[e>>2],i+=yu[e<<4&63],i+="=="):2===r&&(e=(t[n-2]<<8)+t[n-1],i+=yu[e>>10],i+=yu[e>>4&63],i+=yu[e<<2&63],i+="="),o.push(i),o.join("")}function Eu(t,e,n,r,i){var o,a,u=8*i-r-1,f=(1<<u)-1,s=f>>1,l=-7,c=n?i-1:0,h=n?-1:1,p=t[e+c];for(c+=h,o=p&(1<<-l)-1,p>>=-l,l+=u;l>0;o=256*o+t[e+c],c+=h,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=r;l>0;a=256*a+t[e+c],c+=h,l-=8);if(0===o)o=1-s;else{if(o===f)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),o-=s}return(p?-1:1)*a*Math.pow(2,o-r)}function xu(t,e,n,r,i,o){var a,u,f,s=8*o-i-1,l=(1<<s)-1,c=l>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,g=r?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(u=isNaN(e)?1:0,a=l):(a=Math.floor(Math.log(e)/Math.LN2),e*(f=Math.pow(2,-a))<1&&(a--,f*=2),(e+=a+c>=1?h/f:h*Math.pow(2,1-c))*f>=2&&(a++,f/=2),a+c>=l?(u=0,a=l):a+c>=1?(u=(e*f-1)*Math.pow(2,i),a+=c):(u=e*Math.pow(2,c-1)*Math.pow(2,i),a=0));i>=8;t[n+p]=255&u,p+=g,u/=256,i-=8);for(a=a<<i|u,s+=i;s>0;t[n+p]=255&a,p+=g,a/=256,s-=8);t[n+p-g]|=128*y}var Tu={}.toString,Au=Array.isArray||function(t){return"[object Array]"==Tu.call(t)};ju.TYPED_ARRAY_SUPPORT=void 0===gu.TYPED_ARRAY_SUPPORT||gu.TYPED_ARRAY_SUPPORT;var Ou=Vu();function Vu(){return ju.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Su(t,e){if(Vu()<e)throw new RangeError("Invalid typed array length");return ju.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=ju.prototype:(null===t&&(t=new ju(e)),t.length=e),t}function ju(t,e,n){if(!(ju.TYPED_ARRAY_SUPPORT||this instanceof ju))return new ju(t,e,n);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return Bu(this,t)}return Ru(this,t,e,n)}function Ru(t,e,n,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,n,r){if(e.byteLength,n<0||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");e=void 0===n&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,n):new Uint8Array(e,n,r);ju.TYPED_ARRAY_SUPPORT?(t=e).__proto__=ju.prototype:t=Fu(t,e);return t}(t,e,n,r):"string"==typeof e?function(t,e,n){"string"==typeof n&&""!==n||(n="utf8");if(!ju.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|Pu(e,n);t=Su(t,r);var i=t.write(e,n);i!==r&&(t=t.slice(0,i));return t}(t,e,n):function(t,e){if(Uu(e)){var n=0|Iu(e.length);return 0===(t=Su(t,n)).length||e.copy(t,0,0,n),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(r=e.length)!=r?Su(t,0):Fu(t,e);if("Buffer"===e.type&&Au(e.data))return Fu(t,e.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function Lu(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function Bu(t,e){if(Lu(e),t=Su(t,e<0?0:0|Iu(e)),!ju.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)t[n]=0;return t}function Fu(t,e){var n=e.length<0?0:0|Iu(e.length);t=Su(t,n);for(var r=0;r<n;r+=1)t[r]=255&e[r];return t}function Iu(t){if(t>=Vu())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Vu().toString(16)+" bytes");return 0|t}function Uu(t){return!(null==t||!t._isBuffer)}function Pu(t,e){if(Uu(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return lf(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return cf(t).length;default:if(r)return lf(t).length;e=(""+e).toLowerCase(),r=!0}}function ku(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return Ku(this,e,n);case"utf8":case"utf-8":return qu(this,e,n);case"ascii":return Xu(this,e,n);case"latin1":case"binary":return Hu(this,e,n);case"base64":return Gu(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Qu(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function Mu(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function Nu(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=ju.from(e,r)),Uu(e))return 0===e.length?-1:Cu(t,e,n,r,i);if("number"==typeof e)return e&=255,ju.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):Cu(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function Cu(t,e,n,r,i){var o,a=1,u=t.length,f=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;a=2,u/=2,f/=2,n/=2}function s(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var l=-1;for(o=n;o<u;o++)if(s(t,o)===s(e,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===f)return l*a}else-1!==l&&(o-=o-l),l=-1}else for(n+f>u&&(n=u-f),o=n;o>=0;o--){for(var c=!0,h=0;h<f;h++)if(s(t,o+h)!==s(e,h)){c=!1;break}if(c)return o}return-1}function Yu(t,e,n,r){n=Number(n)||0;var i=t.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a<r;++a){var u=parseInt(e.substr(2*a,2),16);if(isNaN(u))return a;t[n+a]=u}return a}function Du(t,e,n,r){return hf(lf(e,t.length-n),t,n,r)}function zu(t,e,n,r){return hf(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function Ju(t,e,n,r){return zu(t,e,n,r)}function Wu(t,e,n,r){return hf(cf(e),t,n,r)}function $u(t,e,n,r){return hf(function(t,e){for(var n,r,i,o=[],a=0;a<t.length&&!((e-=2)<0);++a)r=(n=t.charCodeAt(a))>>8,i=n%256,o.push(i),o.push(r);return o}(e,t.length-n),t,n,r)}function Gu(t,e,n){return 0===e&&n===t.length?_u(t):_u(t.slice(e,n))}function qu(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i<n;){var o,a,u,f,s=t[i],l=null,c=s>239?4:s>223?3:s>191?2:1;if(i+c<=n)switch(c){case 1:s<128&&(l=s);break;case 2:128==(192&(o=t[i+1]))&&(f=(31&s)<<6|63&o)>127&&(l=f);break;case 3:o=t[i+1],a=t[i+2],128==(192&o)&&128==(192&a)&&(f=(15&s)<<12|(63&o)<<6|63&a)>2047&&(f<55296||f>57343)&&(l=f);break;case 4:o=t[i+1],a=t[i+2],u=t[i+3],128==(192&o)&&128==(192&a)&&128==(192&u)&&(f=(15&s)<<18|(63&o)<<12|(63&a)<<6|63&u)>65535&&f<1114112&&(l=f)}null===l?(l=65533,c=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),i+=c}return function(t){var e=t.length;if(e<=Zu)return String.fromCharCode.apply(String,t);var n="",r=0;for(;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=Zu));return n}(r)}ju.poolSize=8192,ju._augment=function(t){return t.__proto__=ju.prototype,t},ju.from=function(t,e,n){return Ru(null,t,e,n)},ju.TYPED_ARRAY_SUPPORT&&(ju.prototype.__proto__=Uint8Array.prototype,ju.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&ju[Symbol.species]),ju.alloc=function(t,e,n){return function(t,e,n,r){return Lu(e),e<=0?Su(t,e):void 0!==n?"string"==typeof r?Su(t,e).fill(n,r):Su(t,e).fill(n):Su(t,e)}(null,t,e,n)},ju.allocUnsafe=function(t){return Bu(null,t)},ju.allocUnsafeSlow=function(t){return Bu(null,t)},ju.isBuffer=pf,ju.compare=function(t,e){if(!Uu(t)||!Uu(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,i=0,o=Math.min(n,r);i<o;++i)if(t[i]!==e[i]){n=t[i],r=e[i];break}return n<r?-1:r<n?1:0},ju.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},ju.concat=function(t,e){if(!Au(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return ju.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var r=ju.allocUnsafe(e),i=0;for(n=0;n<t.length;++n){var o=t[n];if(!Uu(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(r,i),i+=o.length}return r},ju.byteLength=Pu,ju.prototype._isBuffer=!0,ju.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)Mu(this,e,e+1);return this},ju.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)Mu(this,e,e+3),Mu(this,e+1,e+2);return this},ju.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)Mu(this,e,e+7),Mu(this,e+1,e+6),Mu(this,e+2,e+5),Mu(this,e+3,e+4);return this},ju.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?qu(this,0,t):ku.apply(this,arguments)},ju.prototype.equals=function(t){if(!Uu(t))throw new TypeError("Argument must be a Buffer");return this===t||0===ju.compare(this,t)},ju.prototype.inspect=function(){var t="";return this.length>0&&(t=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(t+=" ... ")),"<Buffer "+t+">"},ju.prototype.compare=function(t,e,n,r,i){if(!Uu(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(e>>>=0),u=Math.min(o,a),f=this.slice(r,i),s=t.slice(e,n),l=0;l<u;++l)if(f[l]!==s[l]){o=f[l],a=s[l];break}return o<a?-1:a<o?1:0},ju.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},ju.prototype.indexOf=function(t,e,n){return Nu(this,t,e,n,!0)},ju.prototype.lastIndexOf=function(t,e,n){return Nu(this,t,e,n,!1)},ju.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return Yu(this,t,e,n);case"utf8":case"utf-8":return Du(this,t,e,n);case"ascii":return zu(this,t,e,n);case"latin1":case"binary":return Ju(this,t,e,n);case"base64":return Wu(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $u(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},ju.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Zu=4096;function Xu(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(127&t[i]);return r}function Hu(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(t[i]);return r}function Ku(t,e,n){var r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=e;o<n;++o)i+=sf(t[o]);return i}function Qu(t,e,n){for(var r=t.slice(e,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function tf(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function ef(t,e,n,r,i,o){if(!Uu(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function nf(t,e,n,r){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-n,2);i<o;++i)t[n+i]=(e&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function rf(t,e,n,r){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-n,4);i<o;++i)t[n+i]=e>>>8*(r?i:3-i)&255}function of(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function af(t,e,n,r,i){return i||of(t,0,n,4),xu(t,e,n,r,23,4),n+4}function uf(t,e,n,r,i){return i||of(t,0,n,8),xu(t,e,n,r,52,8),n+8}ju.prototype.slice=function(t,e){var n,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t),ju.TYPED_ARRAY_SUPPORT)(n=this.subarray(t,e)).__proto__=ju.prototype;else{var i=e-t;n=new ju(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+t]}return n},ju.prototype.readUIntLE=function(t,e,n){t|=0,e|=0,n||tf(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r},ju.prototype.readUIntBE=function(t,e,n){t|=0,e|=0,n||tf(t,e,this.length);for(var r=this[t+--e],i=1;e>0&&(i*=256);)r+=this[t+--e]*i;return r},ju.prototype.readUInt8=function(t,e){return e||tf(t,1,this.length),this[t]},ju.prototype.readUInt16LE=function(t,e){return e||tf(t,2,this.length),this[t]|this[t+1]<<8},ju.prototype.readUInt16BE=function(t,e){return e||tf(t,2,this.length),this[t]<<8|this[t+1]},ju.prototype.readUInt32LE=function(t,e){return e||tf(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},ju.prototype.readUInt32BE=function(t,e){return e||tf(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},ju.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||tf(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*e)),r},ju.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||tf(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},ju.prototype.readInt8=function(t,e){return e||tf(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},ju.prototype.readInt16LE=function(t,e){e||tf(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},ju.prototype.readInt16BE=function(t,e){e||tf(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},ju.prototype.readInt32LE=function(t,e){return e||tf(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},ju.prototype.readInt32BE=function(t,e){return e||tf(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},ju.prototype.readFloatLE=function(t,e){return e||tf(t,4,this.length),Eu(this,t,!0,23,4)},ju.prototype.readFloatBE=function(t,e){return e||tf(t,4,this.length),Eu(this,t,!1,23,4)},ju.prototype.readDoubleLE=function(t,e){return e||tf(t,8,this.length),Eu(this,t,!0,52,8)},ju.prototype.readDoubleBE=function(t,e){return e||tf(t,8,this.length),Eu(this,t,!1,52,8)},ju.prototype.writeUIntLE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||ef(this,t,e,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[e]=255&t;++o<n&&(i*=256);)this[e+o]=t/i&255;return e+n},ju.prototype.writeUIntBE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||ef(this,t,e,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+n},ju.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||ef(this,t,e,1,255,0),ju.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},ju.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||ef(this,t,e,2,65535,0),ju.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):nf(this,t,e,!0),e+2},ju.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||ef(this,t,e,2,65535,0),ju.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):nf(this,t,e,!1),e+2},ju.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||ef(this,t,e,4,4294967295,0),ju.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):rf(this,t,e,!0),e+4},ju.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||ef(this,t,e,4,4294967295,0),ju.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):rf(this,t,e,!1),e+4},ju.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);ef(this,t,e,n,i-1,-i)}var o=0,a=1,u=0;for(this[e]=255&t;++o<n&&(a*=256);)t<0&&0===u&&0!==this[e+o-1]&&(u=1),this[e+o]=(t/a>>0)-u&255;return e+n},ju.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);ef(this,t,e,n,i-1,-i)}var o=n-1,a=1,u=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===u&&0!==this[e+o+1]&&(u=1),this[e+o]=(t/a>>0)-u&255;return e+n},ju.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||ef(this,t,e,1,127,-128),ju.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},ju.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||ef(this,t,e,2,32767,-32768),ju.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):nf(this,t,e,!0),e+2},ju.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||ef(this,t,e,2,32767,-32768),ju.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):nf(this,t,e,!1),e+2},ju.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||ef(this,t,e,4,2147483647,-2147483648),ju.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):rf(this,t,e,!0),e+4},ju.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||ef(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),ju.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):rf(this,t,e,!1),e+4},ju.prototype.writeFloatLE=function(t,e,n){return af(this,t,e,!0,n)},ju.prototype.writeFloatBE=function(t,e,n){return af(this,t,e,!1,n)},ju.prototype.writeDoubleLE=function(t,e,n){return uf(this,t,e,!0,n)},ju.prototype.writeDoubleBE=function(t,e,n){return uf(this,t,e,!1,n)},ju.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);var i,o=r-n;if(this===t&&n<e&&e<r)for(i=o-1;i>=0;--i)t[i+e]=this[i+n];else if(o<1e3||!ju.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+e]=this[i+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+o),e);return o},ju.prototype.fill=function(t,e,n,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!ju.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var o;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(o=e;o<n;++o)this[o]=t;else{var a=Uu(t)?t:lf(new ju(t,r).toString()),u=a.length;for(o=0;o<n-e;++o)this[o+e]=a[o%u]}return this};var ff=/[^+\/0-9A-Za-z-_]/g;function sf(t){return t<16?"0"+t.toString(16):t.toString(16)}function lf(t,e){var n;e=e||1/0;for(var r=t.length,i=null,o=[],a=0;a<r;++a){if((n=t.charCodeAt(a))>55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function cf(t){return function(t){var e,n,r,i,o,a;bu||vu();var u=t.length;if(u%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o="="===t[u-2]?2:"="===t[u-1]?1:0,a=new du(3*u/4-o),r=o>0?u-4:u;var f=0;for(e=0,n=0;e<r;e+=4,n+=3)i=mu[t.charCodeAt(e)]<<18|mu[t.charCodeAt(e+1)]<<12|mu[t.charCodeAt(e+2)]<<6|mu[t.charCodeAt(e+3)],a[f++]=i>>16&255,a[f++]=i>>8&255,a[f++]=255&i;return 2===o?(i=mu[t.charCodeAt(e)]<<2|mu[t.charCodeAt(e+1)]>>4,a[f++]=255&i):1===o&&(i=mu[t.charCodeAt(e)]<<10|mu[t.charCodeAt(e+1)]<<4|mu[t.charCodeAt(e+2)]>>2,a[f++]=i>>8&255,a[f++]=255&i),a}(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(ff,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function hf(t,e,n,r){for(var i=0;i<r&&!(i+n>=e.length||i>=t.length);++i)e[i+n]=t[i];return i}function pf(t){return null!=t&&(!!t._isBuffer||gf(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&gf(t.slice(0,0))}(t))}function gf(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}pu(Object.freeze({__proto__:null,Buffer:ju,INSPECT_MAX_BYTES:50,SlowBuffer:function(t){return+t!=t&&(t=0),ju.alloc(+t)},isBuffer:pf,kMaxLength:Ou})).Buffer;var yf=function(){throw new Error("not implemented")};function mf(){throw new Error("not implemented")}var df={binary:yf,float64:ee,float32:ae,float16:mf,generic:Array,int16:Be,int32:ve,int8:Xe,uint16:Ae,uint32:he,uint8:Me,uint8c:ze,complex32:mf,complex64:Bn,complex128:Yn,bool:Gn},bf={};var vf=Ut(yf.allocUnsafe)?function(t){if(!st(t))throw new TypeError(j("invalid argument. Must provide a nonnegative integer. Value: `%s`.",t));return yf.allocUnsafe(t)}:function(t){if(!st(t))throw new TypeError(j("invalid argument. Must provide a nonnegative integer. Value: `%s`.",t));return new yf(t)};function wf(t){return function(t,e,n,r){var i;return function(t,e){return"function"==typeof t["fill"]}(t)?t.fill(e,n,r):(n<0&&(n+=t.length)<0&&(n=0),r<0?r+=t.length:r>t.length&&(r=t.length),(i=Li(t)).accessorProtocol?function(t,e,n,r){var i,o,a;for(i=t.data,o=t.accessors[1],a=n;a<r;a++)o(i,a,e);return i}(i,e,n,r):function(t,e,n,r){var i;for(i=n;i<r;i++)t[i]=e;return t}(t,e,n,r))}(vf(t),0,0,t)}function _f(t,e){var n=function(t){var e,n,r;return!Ut(t)&&(r=Zr(t),n=df[r]||null)?n:Qr(t)?(r?e=t.value:r=(e=t).layout,(n=bf[r])||(n=hu(e),bf[r]=n),n):null}(t);return n?new n(e):null}function Ef(t,e){var n=Zr(t);return"generic"===n?va(e):"binary"===n?wf(e):_f(t,e)}function xf(t){var e,n,r,i;for(r=Ma(t),n=t.length,e=[],i=0;i<n;i++)e.push(r(t,i));return e}function Tf(t){if("function"!=typeof t)throw new TypeError(j("invalid argument. Must provide a function. Value: `%s`.",t));return function(e){var n,r;if(!function(t){return null!=t&&"function"!=typeof t&&"number"==typeof t.length&&nt(t.length)&&t.length>=0&&t.length<=He}(e))return!1;if(0===(n=e.length))return!1;for(r=0;r<n;r++)if(!1===t(e[r]))return!1;return!0}}var Af=Tf(st.isPrimitive),Of=Tf(st.isObject),Vf=Tf(st);M(Vf,"primitives",Af),M(Vf,"objects",Of);var Sf=Tf(at.isPrimitive),jf=Tf(at.isObject),Rf=Tf(at);function Lf(t,e,n){var r,i,o,a,u;for(r=t.length,i=n,o=n,u=0;u<r;u++){if(0===t[u])return[n,n];(a=e[u])>0?o+=a*(t[u]-1):a<0&&(i+=a*(t[u]-1))}return[i,o]}function Bf(t){return Math.abs(t)}M(Rf,"primitives",Sf),M(Rf,"objects",jf),M(Lf,"assign",(function(t,e,n,r){var i,o,a,u,f;for(i=t.length,o=n,a=n,f=0;f<i;f++){if(0===t[f])return r[0]=n,r[1]=n,r;(u=e[f])>0?a+=u*(t[f]-1):u<0&&(o+=u*(t[f]-1))}return r[0]=o,r[1]=a,r}));var Ff=Array.prototype.slice;function If(t,e,n){var r;return function(t,e){return"function"==typeof t[e]}(t,"slice")?t.slice(e,n):(r=Li(t)).accessorProtocol?function(t,e,n){var r,i,o,a;for(r=t.data,i=t.accessors[0],o=[],a=e;a<n;a++)o.push(i(r,a));return o}(r,e,n):function(t,e,n){return Ff.call(t,e,n)}(t,e,n)}function Uf(t,e){return e&&(2===t||3===t)}function Pf(t,e){return e&&(1===t||3===t)}function kf(t){return"column-major"===t}var Mf=/[-\/\\^$*+?.()|[\]{}]/g;var Nf=RegExp.prototype.exec;var Cf=Y();function Yf(t){return"object"==typeof t&&(t instanceof RegExp||(Cf?function(t){try{return Nf.call(t),!0}catch(t){return!1}}(t):"[object RegExp]"===G(t)))}function Df(t,e,n){if(!tn(t))throw new TypeError(j("invalid argument. First argument must be a string. Value: `%s`.",t));if(tn(e))e=new RegExp(function(t){var e,n;if(!tn(t))throw new TypeError(j("invalid argument. Must provide a regular expression string. Value: `%s`.",t));if("/"===t[0])for(n=t.length-1;n>=0&&"/"!==t[n];n--);return void 0===n||n<=0?t.replace(Mf,"\\$&"):(e=(e=t.substring(1,n)).replace(Mf,"\\$&"),t=t[0]+e+t.substring(n))}(e),"g");else if(!Yf(e))throw new TypeError(j("invalid argument. Second argument must be a string or regular expression. Value: `%s`.",e));if(!tn(n)&&!Ut(n))throw new TypeError(j("invalid argument. Third argument must be a string or replacement function. Value: `%s`.",n));return tr(t,e,n)}var zf={int8:"new Int8Array( [ {{data}} ] )",uint8:"new Uint8Array( [ {{data}} ] )",uint8c:"new Uint8ClampedArray( [ {{data}} ] )",int16:"new Int16Array( [ {{data}} ] )",uint16:"new Uint16Array( [ {{data}} ] )",int32:"new Int32Array( [ {{data}} ] )",uint32:"new Uint32Array( [ {{data}} ] )",float32:"new Float32Array( [ {{data}} ] )",float64:"new Float64Array( [ {{data}} ] )",generic:"[ {{data}} ]",binary:"new Buffer( [ {{data}} ] )",complex64:"new Complex64Array( [ {{data}} ] )",complex128:"new Complex128Array( [ {{data}} ] )",bool:"new BooleanArray( [ {{data}} ] )"};var Jf={bool:0,int8:1,uint8:2,uint8c:3,int16:4,uint16:5,int32:6,uint32:7,int64:8,uint64:9,float16:10,float32:11,float64:12,complex32:13,complex64:14,complex128:15,binary:16,generic:17,notype:18,userdefined_type:256},Wf=vi(),$f={throw:1,clamp:2,wrap:3,normalize:4};var Gf=4294967295,qf=4294967296,Zf=new Me(8),Xf=new Ji(Zf.buffer);function Hf(t,e,n,r){var i,o,a;if(0===t){for(a=0;a<Zf.length;a++)e[r]=0,r+=n;return e}for(o=(t&Gf)>>>0,i=et(t/qf),Qi?(Xf.setUint32(0,o,Qi),Xf.setUint32(4,i,Qi)):(Xf.setUint32(0,i,Qi),Xf.setUint32(4,o,Qi)),a=0;a<Zf.length;a++)e[r]=Zf[a],r+=n;return e}M((function(t){var e,n,r,i;return e=new Me(8),0===t||(i=(4294967295&t)>>>0,r=et(t/4294967296),n=new Ji(e.buffer),Qi?(n.setUint32(0,i,Qi),n.setUint32(4,r,Qi)):(n.setUint32(0,r,Qi),n.setUint32(4,i,Qi))),e}),"assign",Hf);var Kf={bool:0,int8:1,uint8:2,uint8c:3,int16:4,uint16:5,int32:6,uint32:7,int64:8,uint64:9,float16:10,float32:11,float64:12,complex32:13,complex64:14,complex128:15,binary:16,generic:17,notype:18,userdefined_type:256},Qf=vi(),ts={throw:1,clamp:2,wrap:3,normalize:4};function es(t,e,n,r,i,o){var a,u,f,s,l;if(!(this instanceof es))return new es(t,e,n,r,i,o);for(s=1,l=0;l<n.length;l++)s*=n[l];return u=e.BYTES_PER_ELEMENT?e.BYTES_PER_ELEMENT*s:null,this._byteLength=u,this._bytesPerElement=Hr(t),this._buffer=e,this._dtype=t,this._length=s,this._ndims=n.length,this._offset=i,this._order=o,this._shape=n,this._strides=r,this._accessors=gt(e.get&&e.set),this._iterationOrder=function(t){var e,n;for(e=0,n=0;n<t.length;n++)t[n]<0&&(e+=1);return 0===e?1:e===t.length?-1:0}(r),a=function(t,e,n,r,i){var o;return 0!==t&&0!==i&&t===(o=Lf(e,n,r))[1]-o[0]+1}(s,n,r,i,this._iterationOrder),f=function(t){var e,n,r,i,o,a;if(0===(n=t.length))return 0;for(e=!0,r=!0,i=Bf(t[0]),a=1;a<n;a++){if(o=Bf(t[a]),e&&o<i?e=!1:r&&o>i&&(r=!1),!r&&!e)return 0;i=o}return r&&e?3:r?1:2}(r),this._flags={ROW_MAJOR_CONTIGUOUS:Pf(f,a),COLUMN_MAJOR_CONTIGUOUS:Uf(f,a),READONLY:!1},this.__meta_dataview__=null,this}function ns(){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"},order:"row-major",casting:"safe",index_mode:"throw"}}M(es,"name","ndarray"),_n(es.prototype,"byteLength",(function(){return this._byteLength})),_n(es.prototype,"BYTES_PER_ELEMENT",(function(){return this._bytesPerElement})),_n(es.prototype,"data",(function(){return this._buffer})),_n(es.prototype,"dtype",(function(){return this._dtype})),_n(es.prototype,"flags",(function(){return{ROW_MAJOR_CONTIGUOUS:(t=this._flags).ROW_MAJOR_CONTIGUOUS,COLUMN_MAJOR_CONTIGUOUS:t.COLUMN_MAJOR_CONTIGUOUS,READONLY:t.READONLY};var t})),_n(es.prototype,"length",(function(){return this._length})),_n(es.prototype,"ndims",(function(){return this._ndims})),_n(es.prototype,"offset",(function(){return this._offset})),_n(es.prototype,"order",(function(){return this._order})),_n(es.prototype,"shape",(function(){return If(this._shape,0,this._shape.length)})),_n(es.prototype,"strides",(function(){return If(this._strides,0,this._strides.length)})),M(es.prototype,"get",(function(){var t,e;for(t=this._offset,e=0;e<arguments.length;e++)t+=this._strides[e]*arguments[e];return this._accessors?this._buffer.get(t):this._buffer[t]})),M(es.prototype,"iget",(function(t){var e,n,r,i,o,a;if(0===(r=this._ndims))return this._accessors?this._buffer.get(this._offset):this._buffer[this._offset];if(this._flags.ROW_MAJOR_CONTIGUOUS||this._flags.COLUMN_MAJOR_CONTIGUOUS){if(1===this._iterationOrder)return this._accessors?this._buffer.get(this._offset+t):this._buffer[this._offset+t];if(-1===this._iterationOrder)return this._accessors?this._buffer.get(this.offset-t):this._buffer[this._offset-t]}if(n=this._shape,e=this._strides,i=this._offset,kf(this._order)){for(a=0;a<r;a++)t-=o=t%n[a],t/=n[a],i+=o*e[a];return this._accessors?this._buffer.get(i):this._buffer[i]}for(a=r-1;a>=0;a--)t-=o=t%n[a],t/=n[a],i+=o*e[a];return this._accessors?this._buffer.get(i):this._buffer[i]})),M(es.prototype,"set",(function(){var t,e;for(t=this._offset,e=0;e<arguments.length-1;e++)t+=this._strides[e]*arguments[e];return this._accessors?this._buffer.set(arguments[e],t):this._buffer[t]=arguments[e],this})),M(es.prototype,"iset",(function(t,e){var n,r,i,o,a,u;if(0===(i=this._ndims))return this._accessors?this._buffer.set(t,this._offset):this._buffer[this._offset]=t,this;if(this._flags.ROW_MAJOR_CONTIGUOUS||this._flags.COLUMN_MAJOR_CONTIGUOUS){if(1===this._iterationOrder)return this._accessors?this._buffer.set(e,this._offset+t):this._buffer[this._offset+t]=e,this;if(-1===this._iterationOrder)return this._accessors?this._buffer.set(e,this._offset-t):this._buffer[this._offset-t]=e,this}if(r=this._shape,n=this._strides,o=this._offset,kf(this._order)){for(u=0;u<i;u++)t-=a=t%r[u],t/=r[u],o+=a*n[u];return this._accessors?this._buffer.set(e,o):this._buffer[o]=e,this}for(u=i-1;u>=0;u--)t-=a=t%r[u],t/=r[u],o+=a*n[u];return this._accessors?this._buffer.set(e,o):this._buffer[o]=e,this})),M(es.prototype,"toString",(function(){var t,e,n,r,i,o;if(e=this._shape.length,n="ndarray( '"+(r=this._dtype)+"', ",t="",this._length<=100)if("complex64"===r||"complex128"===r)for(o=0;o<this._length;o++)t+=Fn(i=this.iget(o))+", "+In(i),o<this._length-1&&(t+=", ");else for(o=0;o<this._length;o++)t+=this.iget(o),o<this._length-1&&(t+=", ");else{if("complex64"===r||"complex128"===r)for(o=0;o<3;o++)t+=Fn(i=this.iget(o))+", "+In(i),o<2&&(t+=", ");else for(o=0;o<3;o++)t+=this.iget(o),o<2&&(t+=", ");if(t+=", ..., ","complex64"===r||"complex128"===r)for(o=2;o>=0;o--)t+=Fn(i=this.iget(this._length-1-o))+", "+In(i),o>0&&(t+=", ");else for(o=2;o>=0;o--)t+=this.iget(this._length-1-o),o>0&&(t+=", ")}if(n+=Df(zf[this.dtype],"{{data}}",t),n+=", ",n+=0===e?"[]":"[ "+this._shape.join(", ")+" ]",n+=", ",n+="[ ",0===e)n+="0";else for(o=0;o<e;o++)this._strides[o]<0?n+=-this._strides[o]:n+=this._strides[o],o<e-1&&(n+=", ");return n+=" ]",n+=", ",n+="0",n+=", ",n+="'"+this._order+"'",n+=" )"})),M(es.prototype,"toJSON",(function(){var t,e,n,r;for(e=this._length,(t={}).type="ndarray",t.dtype=this.dtype,t.flags={READONLY:this._flags.READONLY},t.order=this._order,t.shape=this._shape.slice(),t.strides=this._strides.slice(),r=0;r<t.strides.length;r++)t.strides[r]<0&&(t.strides[r]*=-1);if(t.data=[],"complex64"===t.dtype||"complex128"===t.dtype)for(r=0;r<e;r++)n=this.iget(r),t.data.push(Fn(n),In(n));else for(r=0;r<e;r++)t.data.push(this.iget(r));return t})),M(es.prototype,"valueOf",(function(){return 0===this._ndims?this.iget():this})),M(es.prototype,"__array_meta_dataview__",Ao()?function(){var t,e,n,r,i,o,a,u,f,s,l,c,h,p;if(f=this._mode||"throw",a=this._submode||[f],n=33+16*(c=this._ndims)+(h=a.length),(u=this.__meta_dataview__)&&u.byteLength===n)return u;for(u=new Ji(new Oi(n)),i=this._shape,o=this._strides,r=this._dtype,t=this._bytesPerElement,s=0,u.setInt8(s,Qi?1:0),s+=1,u.setInt16(s,Jf[r],Qi),s+=2,u.setBigInt64(s,fa(c),Qi),l=8*c,s+=8,p=0;p<c;p++)u.setBigInt64(s,fa(i[p]),Qi),u.setBigInt64(s+l,fa(o[p]*t),Qi),s+=8;for(s+=l,u.setBigInt64(s,fa(this._offset*t),Qi),s+=8,u.setInt8(s,Wf[this._order]),s+=1,u.setInt8(s,$f[f]),s+=1,u.setBigInt64(s,fa(h),Qi),s+=8,p=0;p<h;p++)u.setInt8(s,$f[a[p]]),s+=1;return e=0,e|=this._flags.READONLY?4:0,u.setInt32(s,e,Qi),this.__meta_dataview__=u,u}:function(){var t,e,n,r,i,o,a,u,f,s,l,c,h,p,g;if(s=this._mode||"throw",u=this._submode||[s],r=33+16*(h=this._ndims)+(p=u.length),(f=this.__meta_dataview__)&&f.byteLength===r)return f;for(f=new Ji(new Oi(r)),e=new Me(f.buffer),o=this._shape,a=this._strides,i=this._dtype,t=this._bytesPerElement,l=0,f.setInt8(l,Qi?1:0),l+=1,f.setInt16(l,Kf[i],Qi),Hf(h,e,1,l+=2),c=8*h,l+=8,g=0;g<h;g++)Hf(o[g],e,1,l),Hf(a[g]*t,e,1,l+c),l+=8;for(l+=c,Hf(this._offset*t,e,1,l),l+=8,f.setInt8(l,Qf[this._order]),l+=1,f.setInt8(l,ts[s]),Hf(p,e,1,l+=1),l+=8,g=0;g<p;g++)f.setInt8(l,ts[u[g]]),l+=1;return n=0,n|=this._flags.READONLY?4:0,f.setInt32(l,n,Qi),this.__meta_dataview__=f,f});var rs={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"},order:"row-major",casting:"safe",index_mode:"throw"},is={"dtypes.default":rs.dtypes.default,"dtypes.numeric":rs.dtypes.numeric,"dtypes.real":rs.dtypes.real,"dtypes.floating_point":rs.dtypes.floating_point,"dtypes.real_floating_point":rs.dtypes.real_floating_point,"dtypes.complex_floating_point":rs.dtypes.complex_floating_point,"dtypes.integer":rs.dtypes.integer,"dtypes.signed_integer":rs.dtypes.signed_integer,"dtypes.unsigned_integer":rs.dtypes.unsigned_integer,"dtypes.boolean":rs.dtypes.boolean,"dtypes.index":rs.dtypes.index,"dtypes.integer_index":rs.dtypes.integer_index,"dtypes.boolean_index":rs.dtypes.boolean_index,"dtypes.mask_index":rs.dtypes.mask_index,order:rs.order,casting:rs.casting,index_mode:rs.index_mode};function os(t){var e=typeof t;return null===t||"object"!==e&&"function"!==e?new TypeError(j("invalid argument. A provided constructor must be either an object (except null) or a function. Value: `%s`.",t)):null}M(ns,"get",(function(t){var e=is[t];return void 0===e?null:e}));var as=Object.create;function us(){}var fs="function"==typeof as?as:function(t){return us.prototype=t,new us};function ss(t,e){return t<0?0:t>e?e:t}function ls(t,e){var n=e+1;return t<0?((t+=n)<0&&0!==(t%=n)&&(t+=n),t):t>e?((t-=n)>e&&(t%=n),t):t}function cs(t,e){return t<0?(t+=e+1)<0?-1:t:t>e?-1:t}var hs={wrap:ls,clamp:ss,normalize:function(t,e){var n=cs(t,e);if(n<0||n>e)throw new RangeError(j("invalid argument. Index must resolve to a value on the interval: [0, %d]. Value: `%d`.",e,t));return n},throw:function(t,e){if(t<0||t>e)throw new RangeError(j("invalid argument. Index must resolve to a value on the interval: [0, %d]. Value: `%d`.",e,t));return t}};function ps(t,e,n){var r;if("clamp"===n)return ss(t,e);if("wrap"===n)return ls(t,e);if(r=t,"normalize"===n&&(r=cs(r,e)),r<0||r>e)throw new RangeError(j("invalid argument. Index must resolve to a value on the interval: [0, %d]. Value: `%d`.",e,t));return r}M(ps,"factory",(function(t){if(!pi(t))throw new TypeError(j("invalid argument. First argument must be a recognized index mode. Value: `%s`.",t));return hs[t]}));var gs=es.prototype.iget;var ys=es.prototype.iset;function ms(t,e){var n,r;for(n=[],r=0;r<e;r++)n.push(t[r]);return n}var ds=32767,bs=ns.get("index_mode"),vs=!1;function ws(t,e,n,r,i,o,a){var u,f,s,l,c;if(!(this instanceof ws))return arguments.length<7?new ws(t,e,n,r,i,o):new ws(t,e,n,r,i,o,a);if(!ti(t))throw new TypeError(j("invalid argument. First argument must be a supported ndarray data type. Value: `%s`.",t));if(!zt(e))throw new TypeError(j("invalid argument. Second argument must be an array-like object, typed-array-like, or a Buffer. Value: `%s`.",e));if(e.get&&e.set&&(!Ut(e.get)||!Ut(e.set)))throw new TypeError(j("invalid argument. Second argument `get` and `set` properties must be functions. Value: `%s`.",e));if(!Af(n)&&(!zt(n)||n.length>0))throw new TypeError(j("invalid argument. Third argument must be an array-like object containing nonnegative integers. Value: `%s`.",n));if((u=n.length)>ds)throw new RangeError(j("invalid argument. Number of dimensions must not exceed %u due to stack limits. Value: `%u`.",ds,u));if(!Sf(r))throw new TypeError(j("invalid argument. Fourth argument must be an array-like object containing integers. Value: `%s`.",r));if(u>0){if(r.length!==u)throw new RangeError(j("invalid argument. Fourth argument length must match the number of dimensions. Expected number of dimensions: `%u`. Strides length: `%u`.",u,r.length))}else{if(1!==r.length)throw new RangeError("invalid argument. Fourth argument length must be equal to 1 when creating a zero-dimensional ndarray.");if(0!==r[0])throw new RangeError(j("invalid argument. Fourth argument must contain a single element equal to 0. Value: `%d`.",r[0]))}if(!ut(i))throw new TypeError(j("invalid argument. Fifth argument must be a nonnegative integer. Value: `%s`.",i));if(!wi(o))throw new TypeError(j("invalid argument. Sixth argument must be a supported order. Value: `%s`.",o));if(u>0&&!function(t,e,n,r){var i=Lf(e,n,r);return i[0]>=0&&i[1]<t}(e.length,n,r,i)&&function(t){var e,n,r;if(0===(e=t.length))return 0;for(n=1,r=0;r<e;r++)n*=t[r];return n}(n)>0)throw new Error("invalid arguments. Input buffer is incompatible with the specified meta data. Ensure that the offset is valid with regard to the strides array and that the buffer has enough elements to satisfy the desired array shape.");if((f={}).mode=bs,f.readonly=vs,arguments.length>6&&(s=function(t,e){var n;if(!yr(e))return new TypeError(j("invalid argument. Options argument must be an object. Value: `%s`.",e));if(J(e,"mode")&&(t.mode=e.mode,!pi(t.mode)))return new TypeError(j("invalid option. `%s` option must be a recognized mode. Option: `%s`.","mode",t.mode));if(J(e,"submode")){if(t.submode=e.submode,!Ke(t.submode))return new TypeError(j("invalid option. `%s` option must be an array containing recognized modes. Option: `%s`.","submode",t.submode));if(0===t.submode.length)return new TypeError(j("invalid option. `%s` option must be an array containing recognized modes. Option: `%s`.","submode",t.submode.join(",")));for(n=0;n<t.submode.length;n++)if(!pi(t.submode[n]))return new TypeError(j("invalid option. Each submode must be a recognized mode. Option: `%s`.",t.submode[n]));t.submode=t.submode.slice()}return J(e,"readonly")&&(t.readonly=e.readonly,!pt(t.readonly))?new TypeError(j("invalid option. `%s` option must be a boolean. Option: `%s`.","readonly",t.readonly)):null}(f,a),s))throw s;return this._mode=f.mode,void 0===f.submode&&(f.submode=[this._mode]),this._submode=f.submode,l=ms(n,u),c=ms(r,u||1),es.call(this,t,e,l,c,i,o),this._flags.READONLY=f.readonly,this}function _s(){throw new Error("setTimeout has not been defined")}function Es(){throw new Error("clearTimeout has not been defined")}!function(t,e){var n=os(t);if(n)throw n;if(n=os(e))throw n;if(void 0===e.prototype)throw new TypeError(j("invalid argument. Second argument must have a prototype from which another object can inherit. Value: `%s`.",e.prototype));t.prototype=fs(e.prototype),k(t.prototype,"constructor",{configurable:!0,enumerable:!1,writable:!0,value:t})}(ws,es),M(ws,"name","ndarray"),M(ws.prototype,"get",(function(){var t,e,n,r;if(arguments.length!==this._ndims)throw new RangeError(j("invalid arguments. Number of indices must match the number of dimensions. ndims: `%u`. nargs: `%u`.",this._ndims,arguments.length));for(t=this._offset,n=this._submode.length,r=0;r<arguments.length;r++){if(!it(arguments[r]))throw new TypeError(j("invalid argument. Indices must be integer valued. Argument: `%u`. Value: `%s`.",r,arguments[r]));e=ps(arguments[r],this._shape[r]-1,this._submode[r%n]),t+=this._strides[r]*e}return this._accessors?this._buffer.get(t):this._buffer[t]})),M(ws.prototype,"iget",(function(t){if(this._ndims>0){if(!it(t))throw new TypeError(j("invalid argument. Index must be an integer. Value: `%s`.",t));return t=ps(t,this._length-1,this._mode),gs.call(this,t)}return gs.call(this)})),M(ws.prototype,"set",(function(){var t,e,n,r;if(this._flags.READONLY)throw new Error("invalid invocation. Cannot write to a read-only array.");if(arguments.length!==this._ndims+1)throw new RangeError(j("invalid arguments. Number of indices must match the number of dimensions. ndims: `%u`. nargs: `%u`.",this._ndims,arguments.length));for(t=this._offset,n=this._submode.length,r=0;r<arguments.length-1;r++){if(!it(arguments[r]))throw new TypeError(j("invalid argument. Indices must be integer valued. Argument: `%i`. Value: `%s`.",r,arguments[r]));e=ps(arguments[r],this._shape[r]-1,this._submode[r%n]),t+=this._strides[r]*e}return this._accessors?this._buffer.set(arguments[r],t):this._buffer[t]=arguments[r],this})),M(ws.prototype,"iset",(function(t,e){if(this._flags.READONLY)throw new Error("invalid invocation. Cannot write to a read-only array.");if(this._ndims>0){if(!it(t))throw new TypeError(j("invalid argument. Index must be an integer. Value: `%s`.",t));t=ps(t,this._length-1,this._mode),ys.call(this,t,e)}else ys.call(this,t);return this}));var xs=_s,Ts=Es;function As(t){if(xs===setTimeout)return setTimeout(t,0);if((xs===_s||!xs)&&setTimeout)return xs=setTimeout,setTimeout(t,0);try{return xs(t,0)}catch(e){try{return xs.call(null,t,0)}catch(e){return xs.call(this,t,0)}}}"function"==typeof gu.setTimeout&&(xs=setTimeout),"function"==typeof gu.clearTimeout&&(Ts=clearTimeout);var Os,Vs=[],Ss=!1,js=-1;function Rs(){Ss&&Os&&(Ss=!1,Os.length?Vs=Os.concat(Vs):js=-1,Vs.length&&Ls())}function Ls(){if(!Ss){var t=As(Rs);Ss=!0;for(var e=Vs.length;e;){for(Os=Vs,Vs=[];++js<e;)Os&&Os[js].run();js=-1,e=Vs.length}Os=null,Ss=!1,function(t){if(Ts===clearTimeout)return clearTimeout(t);if((Ts===Es||!Ts)&&clearTimeout)return Ts=clearTimeout,clearTimeout(t);try{return Ts(t)}catch(e){try{return Ts.call(null,t)}catch(e){return Ts.call(this,t)}}}(t)}}function Bs(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];Vs.push(new Fs(t,e)),1!==Vs.length||Ss||As(Ls)}function Fs(t,e){this.fun=t,this.array=e}Fs.prototype.run=function(){this.fun.apply(null,this.array)};var Is="browser",Us="browser",Ps={},ks=[],Ms={},Ns={},Cs={};function Ys(){}var Ds=Ys,zs=Ys,Js=Ys,Ws=Ys,$s=Ys,Gs=Ys,qs=Ys;function Zs(t){throw new Error("process.binding is not supported")}function Xs(){return"/"}function Hs(t){throw new Error("process.chdir is not supported")}function Ks(){return 0}var Qs=gu.performance||{},tl=Qs.now||Qs.mozNow||Qs.msNow||Qs.oNow||Qs.webkitNow||function(){return(new Date).getTime()};function el(t){var e=.001*tl.call(Qs),n=Math.floor(e),r=Math.floor(e%1*1e9);return t&&(n-=t[0],(r-=t[1])<0&&(n--,r+=1e9)),[n,r]}var nl=new Date;function rl(){return(new Date-nl)/1e3}var il={nextTick:Bs,title:Is,browser:true,env:Ps,argv:ks,version:"",versions:Ms,on:Ds,addListener:zs,once:Js,off:Ws,removeListener:$s,removeAllListeners:Gs,emit:qs,binding:Zs,cwd:Xs,chdir:Hs,umask:Ks,hrtime:el,platform:Us,release:Ns,config:Cs,uptime:rl},ol=pu(Object.freeze({__proto__:null,addListener:zs,argv:ks,binding:Zs,browser:true,chdir:Hs,config:Cs,cwd:Xs,default:il,emit:qs,env:Ps,hrtime:el,nextTick:Bs,off:Ws,on:Ds,once:Js,platform:Us,release:Ns,removeAllListeners:Gs,removeListener:$s,title:Is,umask:Ks,uptime:rl,version:"",versions:Ms})),al=Object.prototype.toString;var ul=new Function("try {return this === global;} catch ( err ) {return false;}")(),fl=ol,sl=Et(),ll=/node|io\.js/;var cl,hl,pl="object"==typeof gu&&gu===sl&&sl===sl.global&&("[object global]"===G(sl)||"[object Object]"===G(sl))&&!0===ul&&"object"==typeof fl&&"[object process]"===(cl=fl,al.call(cl))&&yr(fl.versions)&&tn(fl.versions.node)&&(void 0===fl.release||yr(fl.release)&&tn(fl.release.name)&&ll.test(fl.release.name)),gl=ol.versions.node,yl=(hl=pl?gl:null,hl?parseInt(hl.split(".")[0],10):-1),ml=Ut(yf.from)&&yl>=5;var dl,bl=Ut(yf.from)?function(t){if(!zt(t))throw new TypeError(j("invalid argument. Must provide an array-like object. Value: `%s`.",t));return yf.from(t)}:function(t){if(!zt(t))throw new TypeError(j("invalid argument. Must provide an array-like object. Value: `%s`.",t));return new yf(t)};dl=ml?function(t,e,n){var r,i;if(!Yt(t))throw new TypeError(j("invalid argument. First argument must be an ArrayBuffer. Value: `%s`.",t));if(arguments.length>1){if(!ut(e))throw new TypeError(j("invalid argument. Second argument must be a nonnegative integer. Value: `%s`.",e));if(e>t.byteLength)throw new RangeError(j("invalid argument. Second argument must not exceed the number of bytes in the input ArrayBuffer. Value: `%s`.",e));if(r=e,arguments.length>2){if(!ut(n))throw new TypeError(j("invalid argument. Last argument must be a nonnegative integer. Value: `%s`.",n));if(n>t.byteLength)throw new RangeError(j("invalid argument. Last argument must not exceed the number of bytes in the input ArrayBuffer. Value: `%s`.",n));i=n}else i=t.byteLength-r}else r=0,i=t.byteLength;return 0===i&&yl<6?yf.from([]):yf.from(t,r,i)}:function(t,e,n){var r;if(!Yt(t))throw new TypeError(j("invalid argument. First argument must be an ArrayBuffer. Value: `%s`.",t));if(arguments.length>1){if(!ut(e))throw new TypeError(j("invalid argument. Second argument must be a nonnegative integer. Value: `%s`.",e));if(e>t.byteLength)throw new RangeError(j("invalid argument. Second argument must not exceed the number of bytes in the input ArrayBuffer. Value: `%s`.",e));if(arguments.length>2){if(!ut(n))throw new TypeError(j("invalid argument. Last argument must be a nonnegative integer. Value: `%s`.",n));if(n>t.byteLength)throw new RangeError(j("invalid argument. Last argument must not exceed the number of bytes in the input ArrayBuffer. Value: `%s`.",n));r=n}else r=t.byteLength-e;return bl(new Me(t,e,r))}return yl<3?bl(new Me(t)):0===t.byteLength?new yf([]):new yf(t)};var vl,wl=dl;vl=Ut(yf.from)?function(t){if(!Bt(t))throw new TypeError(j("invalid argument. Must provide a Buffer. Value: `%s`.",t));return yf.from(t)}:function(t){if(!Bt(t))throw new TypeError(j("invalid argument. Must provide a Buffer. Value: `%s`.",t));return new yf(t)};var _l=vl;var El=ns.get("dtypes.default"),xl=ns.get("order");function Tl(t){return"generic"===t}function Al(t){return"binary"===t}function Ol(t){return J(t,"order")?t.order:xl}function Vl(t,e,n,r,i,o,a){var u,f,s,l,c;if(Tl(t))throw new TypeError(j("invalid argument. ArrayBuffer is incompatible with the specified data type. Value: `%s`.",t));return c=i,l=n*r,r<0&&(c-=(l*=-1)*Hr(t)),u=Al(t)?wl(e,c,l):mo(e,c,l,t),c=function(t,e){var n,r,i;for(r=t.length,n=0,i=0;i<r;i++)e[i]<0&&(n-=e[i]*(t[i]-1));return n}(f=[n],s=[r]),arguments.length>6?new ws(t,u,f,s,c,o,a):new ws(t,u,f,s,c,o)}function Sl(t,e,n){var r,i;return r=null===n?{}:n,ut(t)?new ws(e,i=Ef(e,t),[i.length],[1],0,Ol(r),r):Bt(t)?new ws(e,i=Tl(e)?xf(t):Al(e)?_l(t):mo(t,e),[i.length],[1],0,Ol(r),r):zt(t)?new ws(e,i=Tl(e)?xf(t):Al(e)?bl(t):mo(t,e),[i.length],[1],0,Ol(r),r):Yt(t)?Vl(e,t,t.byteLength/Hr(e),1,0,Ol(r),r):Nt(t)?(i=function(){var t,e,n,r,i,o,a,u,f;if(t=arguments[0],arguments.length>1)if(zt(arguments[1])){if(r=arguments[1],arguments.length>2){if(!Ut(n=arguments[2]))throw new TypeError(j("invalid argument. Callback argument must be a function. Value: `%s`.",n));e=arguments[3]}}else{if(!Ut(n=arguments[1]))throw new TypeError(j("invalid argument. Callback argument must be a function. Value: `%s`.",n));e=arguments[2]}if(!Mt(t))throw new TypeError(j("invalid argument. Iterator argument must be an iterator protocol-compliant object. Value: `%s`.",t));if(u=-1,void 0===r){if(r=[],n){for(;u+=1,!(f=t.next()).done;)r.push(n.call(e,f.value,u));return r}for(;!(f=t.next()).done;)r.push(f.value);return r}if(i=r.length,a=Hn(r),o=Wt(r)?Ri(a):Si(a),n){for(;u<i-1&&(u+=1,!(f=t.next()).done);)o(r,u,n.call(e,f.value,u));return r}for(;u<i-1&&(u+=1,!(f=t.next()).done);)o(r,u,f.value);return r}(i=t[kt]()),Al(e)?i=bl(i):Tl(e)||(i=mo(i,e)),new ws(e,i,[i.length],[1],0,Ol(r),r)):null===n&&yr(t)?new ws(e,i=Ef(e,0),[i.length],[1],0,Ol(t),t):null}function jl(){var t,e,n,r,i,o,a,u;if(0===(t=arguments.length))return a=Ef(El,0),new ws(El,a,[a.length],[1],0,xl);if(e=arguments[0],1===t){if(ti(e))return Sl(0,e,null);if(null===(u=Sl(e,El,null)))throw new TypeError(j("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, iterable, data type, or options object. Value: `%s`.",e));return u}if(n=arguments[1],2===t){if(ti(e)){if(null===n)throw new TypeError(j("invalid argument. Options argument must be an object. Value: `%s`.",n));return Sl(0,e,n)}if(ti(n)){if(null===(u=Sl(e,n,null)))throw new TypeError(j("invalid argument. First argument must be a length, ArrayBuffer, typed array, array-like object, or iterable. Value: `%s`.",e));return u}if(ut(n)){if(!Yt(e))throw new TypeError(j("invalid argument. First argument must be an ArrayBuffer. Value: `%s`.",e));return Vl(El,e,(e.byteLength-n)/Hr(El),1,n,xl)}if(null===n)throw new TypeError(j("invalid argument. Options argument must be an object. Value: `%s`.",n));if(null===(u=Sl(e,El,n)))throw new TypeError(j("invalid argument. First argument must be a length, ArrayBuffer, typed array, array-like object, or iterable. Value: `%s`.",e));return u}if(r=arguments[2],3===t){if(ti(r)){if(!Yt(e))throw new TypeError(j("invalid argument. First argument must be an ArrayBuffer. Value: `%s`.",e));if(!ut(n))throw new TypeError(j("invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.",n));return Vl(r,e,(e.byteLength-n)/Hr(r),1,n,xl)}if(ti(n)){if(null===r)throw new TypeError(j("invalid argument. Options argument must be an object. Value: `%s`.",r));if(null===(u=Sl(e,n,r)))throw new TypeError(j("invalid argument. First argument must be a length, ArrayBuffer, typed array, array-like object, or iterable. Value: `%s`.",e));return u}if(!Yt(e))throw new TypeError(j("invalid argument. First argument must be an ArrayBuffer. Value: `%s`.",e));if(!ut(n))throw new TypeError(j("invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.",n));if(ut(r))return Vl(El,e,r,1,n,xl);if(null===r)throw new TypeError(j("invalid argument. Options argument must be an object. Value: `%s`.",r));return Vl(El,e,(e.byteLength-n)/Hr(El),1,n,Ol(r),r)}if(i=arguments[3],4===t){if(!Yt(e))throw new TypeError(j("invalid argument. First argument must be an ArrayBuffer. Value: `%s`.",e));if(!ut(n))throw new TypeError(j("invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.",n));if(ut(r)){if(ti(i))return Vl(i,e,r,1,n,xl);if(!yr(i))throw new TypeError(j("invalid argument. Options argument must be an object. Value: `%s`.",i));return Vl(El,e,r,1,n,Ol(i),i)}if(!ti(r))throw new TypeError(j("invalid argument. Third argument must be a recognized/supported data type. Value: `%s`.",r));if(!yr(i))throw new TypeError(j("invalid argument. Options argument must be an object. Value: `%s`.",i));return Vl(r,e,(e.byteLength-n)/Hr(r),1,n,Ol(i),i)}if(o=arguments[4],!Yt(e))throw new TypeError(j("invalid argument. First argument must be an ArrayBuffer. Value: `%s`.",e));if(!ut(n))throw new TypeError(j("invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.",n));if(!ut(r))throw new TypeError(j("invalid argument. Length must be a nonnegative integer. Value: `%s`.",r));if(!ti(i))throw new TypeError(j("invalid argument. Fourth argument must be a recognized/supported data type. Value: `%s`.",i));if(!yr(o))throw new TypeError(j("invalid argument. Options argument must be an object. Value: `%s`.",o));return Vl(i,e,r,1,n,Ol(o),o)}function Rl(t,e){var n,r;if(!ti(t))throw new TypeError(j("invalid argument. First argument must be a supported data type. Value: `%s`.",t));if(n={},arguments.length>1&&(r=_i(n,e)))throw r;return function(){var e,r,i,o,a;if(e=si({},n),r=arguments.length,0===r)return jl(t,e);if(r>3){if(a=_i(e,arguments[3]))throw a;return jl(arguments[0],arguments[1],arguments[2],t,e)}if(3===r){if(ut(arguments[2]))return jl(arguments[0],arguments[1],arguments[2],t,e);if(a=_i(e,arguments[2]))throw a;return jl(arguments[0],arguments[1],t,e)}if(2===r){if(o=arguments[1],ut(i=arguments[0])){if(a=_i(e,o))throw a;return jl(i,t,e)}if(Yt(i)){if(ut(o))return jl(i,o,t,e);if(a=_i(e,o))throw a;return jl(i,t,e)}if(zt(i)){if(a=_i(e,o))throw a;return jl(i,t,e)}if(a=_i(e,o))throw a;return jl(i,t,e)}if(i=arguments[0],ut(i)||Yt(i)||zt(i)||Nt(i))return jl(i,t,e);if(a=_i(e,i),a)throw a;return jl(t,e)}}return M(jl,"factory",Rl),Rl("uint16")}));
//# sourceMappingURL=browser.js.map