Repository navigation
Expand file tree
/
Copy pathmod.js
More file actions
4 lines (4 loc) · 94.6 KB
/
Copy pathmod.js
File metadata and controls
4 lines (4 loc) · 94.6 KB
1
2
3
4
// Copyright (c) 2026 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0
/// <reference types="./mod.d.ts" />
var r="function"==typeof Object.defineProperty?Object.defineProperty:null;var t=Object.defineProperty;function e(r){return"number"==typeof r}function n(r){var t,e="";for(t=0;t<r;t++)e+="0";return e}function i(r,t,e){var i=!1,o=t-r.length;return o<0||(function(r){return"-"===r[0]}(r)&&(i=!0,r=r.substr(1)),r=e?r+n(o):n(o)+r,i&&(r="-"+r)),r}var o=String.prototype.toLowerCase,a=String.prototype.toUpperCase;function u(r){var t,n,u;switch(r.specifier){case"b":t=2;break;case"o":t=8;break;case"x":case"X":t=16;break;default:t=10}if(n=r.arg,u=parseInt(n,10),!isFinite(u)){if(!e(n))throw new Error("invalid integer. Value: "+n);u=0}return u<0&&("u"===r.specifier||10!==t)&&(u=4294967295+u+1),u<0?(n=(-u).toString(t),r.precision&&(n=i(n,r.precision,r.padRight)),n="-"+n):(n=u.toString(t),u||r.precision?r.precision&&(n=i(n,r.precision,r.padRight)):n="",r.sign&&(n=r.sign+n)),16===t&&(r.alternate&&(n="0x"+n),n=r.specifier===a.call(r.specifier)?a.call(n):o.call(n)),8===t&&r.alternate&&"0"!==n.charAt(0)&&(n="0"+n),n}var f=Math.abs,s=String.prototype.toLowerCase,l=String.prototype.toUpperCase,h=String.prototype.replace,c=/e\+(\d)$/,p=/e-(\d)$/,y=/^(\d+)$/,g=/^(\d+)e/,m=/\.0$/,v=/\.0*e/,w=/(\..*[^0])0*e/;function b(r,t){var e,n;switch(t.specifier){case"e":case"E":n=r.toExponential(t.precision);break;case"f":case"F":n=r.toFixed(t.precision);break;case"g":case"G":f(r)<1e-4?((e=t.precision)>0&&(e-=1),n=r.toExponential(e)):n=r.toPrecision(t.precision),t.alternate||(n=h.call(n,w,"$1e"),n=h.call(n,v,"e"),n=h.call(n,m,""));break;default:throw new Error("invalid double notation. Value: "+t.specifier)}return n=h.call(n,c,"e+0$1"),n=h.call(n,p,"e-0$1"),t.alternate&&(n=h.call(n,y,"$1."),n=h.call(n,g,"$1.e")),r>=0&&t.sign&&(n=t.sign+n),n=t.specifier===l.call(t.specifier)?l.call(n):s.call(n)}function d(r){var t,e="";for(t=0;t<r;t++)e+=" ";return e}var E=String.fromCharCode,T=Array.isArray;function _(r){return r!=r}function x(r){var t={};return t.specifier=r.specifier,t.precision=void 0===r.precision?1:r.precision,t.width=r.width,t.flags=r.flags||"",t.mapping=r.mapping,t}function V(r){var t,n,o,a,f,s,l,h,c,p,y,g,m,v;if(!T(r))throw new TypeError("invalid argument. First argument must be an array. Value: `"+r+"`.");for(s="",l=1,c=0;c<r.length;c++)if(o=r[c],"string"==typeof o)s+=o;else{if(t=void 0!==o.precision,!(o=x(o)).specifier)throw new TypeError("invalid argument. Token is missing `specifier` property. Index: `"+c+"`. Value: `"+o+"`.");for(o.mapping&&(l=o.mapping),n=o.flags,p=0;p<n.length;p++)switch(a=n.charAt(p)){case" ":o.sign=" ";break;case"+":o.sign="+";break;case"-":o.padRight=!0,o.padZeros=!1;break;case"0":o.padZeros=n.indexOf("-")<0;break;case"#":o.alternate=!0;break;default:throw new Error("invalid flag: "+a)}if("*"===o.width){if(o.width=parseInt(arguments[l],10),l+=1,_(o.width))throw new TypeError("the argument for * width at position "+l+" is not a number. Value: `"+o.width+"`.");o.width<0&&(o.padRight=!0,o.width=-o.width)}if(t&&"*"===o.precision){if(o.precision=parseInt(arguments[l],10),l+=1,_(o.precision))throw new TypeError("the argument for * precision at position "+l+" is not a number. Value: `"+o.precision+"`.");o.precision<0&&(o.precision=1,t=!1)}switch(o.arg=arguments[l],o.specifier){case"b":case"o":case"x":case"X":case"d":case"i":case"u":t&&(o.padZeros=!1),o.arg=u(o);break;case"s":o.maxWidth=t?o.precision:-1,o.arg=String(o.arg);break;case"c":if(!_(o.arg)){if((f=parseInt(o.arg,10))<0||f>127)throw new Error("invalid character code. Value: "+o.arg);o.arg=_(f)?String(o.arg):E(f)}break;case"e":case"E":case"f":case"F":case"g":case"G":if(t||(o.precision=6),h=parseFloat(o.arg),!isFinite(h)){if(!e(o.arg))throw new Error("invalid floating-point number. Value: "+s);h=o.arg,o.padZeros=!1}o.arg=b(h,o);break;default:throw new Error("invalid specifier: "+o.specifier)}o.maxWidth>=0&&o.arg.length>o.maxWidth&&(o.arg=o.arg.substring(0,o.maxWidth)),o.padZeros?o.arg=i(o.arg,o.width||o.precision,o.padRight):o.width&&(o.arg=(y=o.arg,g=o.width,m=o.padRight,v=void 0,(v=g-y.length)<0?y:y=m?y+d(v):d(v)+y)),s+=o.arg||"",l+=1}return s}var A=/%(?:([1-9]\d*)\$)?([0 +\-#]*)(\*|\d+)?(?:(\.)(\*|\d+)?)?[hlL]?([%A-Za-z])/g;function S(r){var t={mapping:r[1]?parseInt(r[1],10):void 0,flags:r[2],width:r[3],precision:r[5],specifier:r[6]};return"."===r[4]&&void 0===r[5]&&(t.precision="1"),t}function j(r){var t,e,n,i;for(e=[],i=0,n=A.exec(r);n;)(t=r.slice(i,A.lastIndex-n[0].length)).length&&e.push(t),"%"===n[6]?e.push("%"):e.push(S(n)),i=A.lastIndex,n=A.exec(r);return(t=r.slice(i)).length&&e.push(t),e}function F(r){var t,e;if("string"!=typeof r)throw new TypeError(F("invalid argument. First argument must be a string. Value: `%s`.",r));for(t=[j(r)],e=1;e<arguments.length;e++)t.push(arguments[e]);return V.apply(null,t)}var L,O=Object.prototype,R=O.toString,I=O.__defineGetter__,k=O.__defineSetter__,B=O.__lookupGetter__,M=O.__lookupSetter__;L=function(){try{return r({},"x",{}),!0}catch(r){return!1}}()?t:function(r,t,e){var n,i,o,a;if("object"!=typeof r||null===r||"[object Array]"===R.call(r))throw new TypeError(F("invalid argument. First argument must be an object. Value: `%s`.",r));if("object"!=typeof e||null===e||"[object Array]"===R.call(e))throw new TypeError(F("invalid argument. Property descriptor must be an object. Value: `%s`.",e));if((i="value"in e)&&(B.call(r,t)||M.call(r,t)?(n=r.__proto__,r.__proto__=O,delete r[t],r[t]=e.value,r.__proto__=n):r[t]=e.value),o="get"in e,a="set"in e,i&&(o||a))throw new Error("invalid argument. Cannot specify one or more accessors and a value or writable attribute in the property descriptor.");return o&&I&&I.call(r,t,e.get),a&&k&&k.call(r,t,e.set),r};var N=L;function P(r,t,e){N(r,t,{configurable:!1,enumerable:!1,writable:!1,value:e})}function C(r,t,e){N(r,t,{configurable:!1,enumerable:!1,get:e})}function U(r,t,e,n){N(r,t,{configurable:!1,enumerable:!1,get:e,set:n})}var Y="function"==typeof Symbol&&"symbol"==typeof Symbol("foo");function W(){return Y&&"symbol"==typeof Symbol.toStringTag}var G=Object.prototype.toString;var $=Object.prototype.hasOwnProperty;function z(r,t){return null!=r&&$.call(r,t)}var q="function"==typeof Symbol?Symbol:void 0,H="function"==typeof q?q.toStringTag:"";var J=W()?function(r){var t,e,n;if(null==r)return G.call(r);e=r[H],t=z(r,H);try{r[H]=void 0}catch(t){return G.call(r)}return n=G.call(r),t?r[H]=e:delete r[H],n}:function(r){return G.call(r)};var Z=Array.isArray?Array.isArray:function(r){return"[object Array]"===J(r)};function X(r){return"object"==typeof r&&null!==r&&!Z(r)}var D=/./;function K(r){return"boolean"==typeof r}var Q=Boolean,rr=Boolean.prototype.toString;var tr=W();function er(r){return"object"==typeof r&&(r instanceof Q||(tr?function(r){try{return rr.call(r),!0}catch(r){return!1}}(r):"[object Boolean]"===J(r)))}function nr(r){return K(r)||er(r)}P(nr,"isPrimitive",K),P(nr,"isObject",er);var ir="object"==typeof self?self:null,or="object"==typeof window?window:null,ar="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},ur="object"==typeof ar?ar:null,fr="object"==typeof globalThis?globalThis:null;var sr=function(r){if(arguments.length){if(!K(r))throw new TypeError(F("invalid argument. Must provide a boolean. Value: `%s`.",r));if(r)return new Function("return this;")()}if(fr)return fr;if(ir)return ir;if(or)return or;if(ur)return ur;throw new Error("unexpected error. Unable to resolve global object.")}(),lr=sr.document&&sr.document.childNodes,hr=Int8Array;function cr(){return/^\s*function\s*([^(]*)/i}var pr=/^\s*function\s*([^(]*)/i;function yr(r){if("function"!=typeof r)throw new TypeError(F("invalid argument. Must provide a function. Value: `%s`.",r));return function(t){var e,n;if(!Z(t))return!1;if(0===(e=t.length))return!1;for(n=0;n<e;n++)if(!1===r(t[n]))return!1;return!0}}function gr(r){return null!==r&&"object"==typeof r}function mr(r){return gr(r)&&(r._isBuffer||r.constructor&&"function"==typeof r.constructor.isBuffer&&r.constructor.isBuffer(r))}function vr(r){var t,e,n;if(("Object"===(e=J(r).slice(8,-1))||"Error"===e)&&r.constructor){if("string"==typeof(n=r.constructor).name)return n.name;if(t=pr.exec(n.toString()))return t[1]}return mr(r)?"Buffer":e}P(cr,"REGEXP",pr),P(gr,"isObjectLikeArray",yr(gr));var wr="function"==typeof D||"object"==typeof hr||"function"==typeof lr?function(r){return vr(r).toLowerCase()}:function(r){var t;return null===r?"null":"object"===(t=typeof r)?vr(r).toLowerCase():t};function br(r){return"function"===wr(r)}var dr,Er=Object,Tr=Object.getPrototypeOf;dr=br(Object.getPrototypeOf)?Tr:function(r){var t=function(r){return r.__proto__}(r);return t||null===t?t:"[object Function]"===J(r.constructor)?r.constructor.prototype:r instanceof Er?Er.prototype:null};var _r=dr;function xr(r){return null==r?null:(r=Er(r),_r(r))}var Vr=Object.prototype;function Ar(r){var t;return!!X(r)&&(!(t=xr(r))||!z(r,"constructor")&&z(t,"constructor")&&br(t.constructor)&&"[object Function]"===J(t.constructor)&&z(t,"isPrototypeOf")&&br(t.isPrototypeOf)&&(t===Vr||function(r){var t;for(t in r)if(!z(r,t))return!1;return!0}(r)))}function Sr(r){return function(){return r}}function jr(){}function Fr(r){return r!=r}var Lr=Math.floor;function Or(r){return Lr(r)===r}var Rr=9007199254740991;function Ir(r){return"object"==typeof r&&null!==r&&"number"==typeof r.length&&Or(r.length)&&r.length>=0&&r.length<=Rr}var kr="function"==typeof Uint32Array;function Br(r){return kr&&r instanceof Uint32Array||"[object Uint32Array]"===J(r)}function Mr(r){return"number"==typeof r}var Nr=Number,Pr=Nr.prototype.toString;var Cr=W();function Ur(r){return"object"==typeof r&&(r instanceof Nr||(Cr?function(r){try{return Pr.call(r),!0}catch(r){return!1}}(r):"[object Number]"===J(r)))}function Yr(r){return Mr(r)||Ur(r)}P(Yr,"isPrimitive",Mr),P(Yr,"isObject",Ur);var Wr=Number.POSITIVE_INFINITY,Gr=Nr.NEGATIVE_INFINITY;function $r(r){return r<Wr&&r>Gr&&Or(r)}function zr(r){return Mr(r)&&$r(r)}function qr(r){return Ur(r)&&$r(r.valueOf())}function Hr(r){return zr(r)||qr(r)}function Jr(r){return zr(r)&&r>0}function Zr(r){return qr(r)&&r.valueOf()>0}function Xr(r){return Jr(r)||Zr(r)}P(Hr,"isPrimitive",zr),P(Hr,"isObject",qr),P(Xr,"isPrimitive",Jr),P(Xr,"isObject",Zr);var Dr=9007199254740991,Kr=4294967295,Qr="function"==typeof Uint32Array?Uint32Array:null;var rt,tt="function"==typeof Uint32Array?Uint32Array:void 0;rt=function(){var r,t;if("function"!=typeof Qr)return!1;try{r=Br(t=new Qr(t=[1,3.14,-3.14,Kr+1,Kr+2]))&&1===t[0]&&3===t[1]&&t[2]===Kr-2&&0===t[3]&&1===t[4]}catch(t){r=!1}return r}()?tt:function(){throw new Error("not implemented")};var et=rt;function nt(r,t){return Fr(r)||Fr(t)?NaN:r===Wr||t===Wr?Wr:r===t&&0===r?function(r){return 0===r&&1/r===Wr}(r)?r:t:r>t?r:t}var it=65535;function ot(r,t){var e,n;return((e=((r>>>=0)&it)>>>0)*(n=((t>>>=0)&it)>>>0)>>>0)+((r>>>16>>>0)*n+e*(t>>>16>>>0)<<16>>>0)>>>0}var at="function";var ut={float64:function(r,t){return r[t]},float32:function(r,t){return r[t]},int32:function(r,t){return r[t]},int16:function(r,t){return r[t]},int8:function(r,t){return r[t]},uint32:function(r,t){return r[t]},uint16:function(r,t){return r[t]},uint8:function(r,t){return r[t]},uint8c:function(r,t){return r[t]},generic:function(r,t){return r[t]},default:function(r,t){return r[t]}};function ft(r){var t=ut[r];return"function"==typeof t?t:ut.default}var st={float64:function(r,t,e){r[t]=e},float32:function(r,t,e){r[t]=e},int32:function(r,t,e){r[t]=e},int16:function(r,t,e){r[t]=e},int8:function(r,t,e){r[t]=e},uint32:function(r,t,e){r[t]=e},uint16:function(r,t,e){r[t]=e},uint8:function(r,t,e){r[t]=e},uint8c:function(r,t,e){r[t]=e},generic:function(r,t,e){r[t]=e},default:function(r,t,e){r[t]=e}};function lt(r){var t=st[r];return"function"==typeof t?t:st.default}var ht={complex128:function(r,t){return r.get(t)},complex64:function(r,t){return r.get(t)},default:function(r,t){return r.get(t)}};function ct(r){var t=ht[r];return"function"==typeof t?t:ht.default}var pt={complex128:function(r,t,e){r.set(e,t)},complex64:function(r,t,e){r.set(e,t)},default:function(r,t,e){r.set(e,t)}};function yt(r){var t=pt[r];return"function"==typeof t?t:pt.default}var gt={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"},mt="function"==typeof Float64Array;var vt="function"==typeof Float64Array?Float64Array:null;function wt(){var r,t,e;if("function"!=typeof vt)return!1;try{t=new vt([1,3.14,-3.14,NaN]),e=t,r=(mt&&e instanceof Float64Array||"[object Float64Array]"===J(e))&&1===t[0]&&3.14===t[1]&&-3.14===t[2]&&t[3]!=t[3]}catch(t){r=!1}return r}var bt="function"==typeof Float64Array?Float64Array:void 0;var dt=wt()?bt:function(){throw new Error("not implemented")},Et="function"==typeof Float32Array;var Tt="function"==typeof Float32Array?Float32Array:null;var _t,xt="function"==typeof Float32Array?Float32Array:void 0;_t=function(){var r,t,e;if("function"!=typeof Tt)return!1;try{t=new Tt([1,3.14,-3.14,5e40]),e=t,r=(Et&&e instanceof Float32Array||"[object Float32Array]"===J(e))&&1===t[0]&&3.140000104904175===t[1]&&-3.140000104904175===t[2]&&t[3]===Wr}catch(t){r=!1}return r}()?xt:function(){throw new Error("not implemented")};var Vt=_t,At="function"==typeof Int32Array;var St="function"==typeof Int32Array?Int32Array:null;var jt,Ft="function"==typeof Int32Array?Int32Array:void 0;jt=function(){var r,t,e;if("function"!=typeof St)return!1;try{t=new St([1,3.14,-3.14,2147483648]),e=t,r=(At&&e instanceof Int32Array||"[object Int32Array]"===J(e))&&1===t[0]&&3===t[1]&&-3===t[2]&&-2147483648===t[3]}catch(t){r=!1}return r}()?Ft:function(){throw new Error("not implemented")};var Lt=jt,Ot="function"==typeof Uint16Array;var Rt="function"==typeof Uint16Array?Uint16Array:null;var It,kt="function"==typeof Uint16Array?Uint16Array:void 0;It=function(){var r,t,e;if("function"!=typeof Rt)return!1;try{t=new Rt(t=[1,3.14,-3.14,65536,65537]),e=t,r=(Ot&&e instanceof Uint16Array||"[object Uint16Array]"===J(e))&&1===t[0]&&3===t[1]&&65533===t[2]&&0===t[3]&&1===t[4]}catch(t){r=!1}return r}()?kt:function(){throw new Error("not implemented")};var Bt=It,Mt="function"==typeof Int16Array;var Nt="function"==typeof Int16Array?Int16Array:null;var Pt,Ct="function"==typeof Int16Array?Int16Array:void 0;Pt=function(){var r,t,e;if("function"!=typeof Nt)return!1;try{t=new Nt([1,3.14,-3.14,32768]),e=t,r=(Mt&&e instanceof Int16Array||"[object Int16Array]"===J(e))&&1===t[0]&&3===t[1]&&-3===t[2]&&-32768===t[3]}catch(t){r=!1}return r}()?Ct:function(){throw new Error("not implemented")};var Ut=Pt,Yt="function"==typeof Uint8Array;var Wt="function"==typeof Uint8Array?Uint8Array:null;var Gt,$t="function"==typeof Uint8Array?Uint8Array:void 0;Gt=function(){var r,t,e;if("function"!=typeof Wt)return!1;try{t=new Wt(t=[1,3.14,-3.14,256,257]),e=t,r=(Yt&&e instanceof Uint8Array||"[object Uint8Array]"===J(e))&&1===t[0]&&3===t[1]&&253===t[2]&&0===t[3]&&1===t[4]}catch(t){r=!1}return r}()?$t:function(){throw new Error("not implemented")};var zt=Gt,qt="function"==typeof Uint8ClampedArray;var Ht="function"==typeof Uint8ClampedArray?Uint8ClampedArray:null;var Jt,Zt="function"==typeof Uint8ClampedArray?Uint8ClampedArray:void 0;Jt=function(){var r,t,e;if("function"!=typeof Ht)return!1;try{t=new Ht([-1,0,1,3.14,4.99,255,256]),e=t,r=(qt&&e instanceof Uint8ClampedArray||"[object Uint8ClampedArray]"===J(e))&&0===t[0]&&0===t[1]&&1===t[2]&&3===t[3]&&5===t[4]&&255===t[5]&&255===t[6]}catch(t){r=!1}return r}()?Zt:function(){throw new Error("not implemented")};var Xt=Jt,Dt="function"==typeof Int8Array;var Kt="function"==typeof Int8Array?Int8Array:null;var Qt,re="function"==typeof Int8Array?Int8Array:void 0;Qt=function(){var r,t,e;if("function"!=typeof Kt)return!1;try{t=new Kt([1,3.14,-3.14,128]),e=t,r=(Dt&&e instanceof Int8Array||"[object Int8Array]"===J(e))&&1===t[0]&&3===t[1]&&-3===t[2]&&-128===t[3]}catch(t){r=!1}return r}()?re:function(){throw new Error("not implemented")};var te=Qt;function ee(r){return zr(r)&&r>=0}function ne(r){return qr(r)&&r.valueOf()>=0}function ie(r){return ee(r)||ne(r)}P(ie,"isPrimitive",ee),P(ie,"isObject",ne);var oe=4294967295;function ae(r){return"object"==typeof r&&null!==r&&"number"==typeof r.length&&Or(r.length)&&r.length>=0&&r.length<=oe}var ue="function"==typeof ArrayBuffer;function fe(r){return ue&&r instanceof ArrayBuffer||"[object ArrayBuffer]"===J(r)}function se(r){return"string"==typeof r}var le=String.prototype.valueOf;var he=W();function ce(r){return"object"==typeof r&&(r instanceof String||(he?function(r){try{return le.call(r),!0}catch(r){return!1}}(r):"[object String]"===J(r)))}function pe(r){return se(r)||ce(r)}P(pe,"isPrimitive",se),P(pe,"isObject",ce);var ye=yr(pe.isPrimitive),ge=yr(pe.isObject),me=yr(pe);function ve(r,t,e){N(r,t,{configurable:!1,enumerable:!0,writable:!1,value:e})}function we(r,t){if(!(this instanceof we))throw new TypeError("invalid invocation. Constructor must be called with the `new` keyword.");if(!Mr(r))throw new TypeError(F("invalid argument. Real component must be a number. Value: `%s`.",r));if(!Mr(t))throw new TypeError(F("invalid argument. Imaginary component must be a number. Value: `%s`.",t));return ve(this,"re",r),ve(this,"im",t),this}P(me,"primitives",ye),P(me,"objects",ge),P(we,"name","Complex128"),P(we,"BYTES_PER_ELEMENT",8),P(we.prototype,"BYTES_PER_ELEMENT",8),P(we.prototype,"byteLength",16),P(we.prototype,"toString",(function(){var r=""+this.re;return this.im<0?r+=" - "+-this.im:r+=" + "+this.im,r+="i"})),P(we.prototype,"toJSON",(function(){var r={type:"Complex128"};return r.re=this.re,r.im=this.im,r}));var be="function"==typeof Math.fround?Math.fround:null,de=new Vt(1);var Ee="function"==typeof be?be:function(r){return de[0]=r,de[0]};function Te(r,t){if(!(this instanceof Te))throw new TypeError("invalid invocation. Constructor must be called with the `new` keyword.");if(!Mr(r))throw new TypeError(F("invalid argument. Real component must be a number. Value: `%s`.",r));if(!Mr(t))throw new TypeError(F("invalid argument. Imaginary component must be a number. Value: `%s`.",t));return ve(this,"re",Ee(r)),ve(this,"im",Ee(t)),this}function _e(r){return r instanceof we||r instanceof Te||"object"==typeof r&&null!==r&&"number"==typeof r.re&&"number"==typeof r.im}function xe(r){return Or(r/2)}P(Te,"name","Complex64"),P(Te,"BYTES_PER_ELEMENT",4),P(Te.prototype,"BYTES_PER_ELEMENT",4),P(Te.prototype,"byteLength",8),P(Te.prototype,"toString",(function(){var r=""+this.re;return this.im<0?r+=" - "+-this.im:r+=" + "+this.im,r+="i"})),P(Te.prototype,"toJSON",(function(){var r={type:"Complex64"};return r.re=this.re,r.im=this.im,r}));var Ve=8;function Ae(r){return"object"==typeof r&&null!==r&&"Complex64Array"===r.constructor.name&&r.BYTES_PER_ELEMENT===Ve}var Se=16;function je(r){return"object"==typeof r&&null!==r&&"Complex128Array"===r.constructor.name&&r.BYTES_PER_ELEMENT===Se}function Fe(){return"function"==typeof q&&"symbol"==typeof q("foo")&&z(q,"iterator")&&"symbol"==typeof q.iterator}var Le=Fe()?Symbol.iterator:null;function Oe(r){return r.re}function Re(r){return r.im}function Ie(r,t){return new Vt(r.buffer,r.byteOffset+r.BYTES_PER_ELEMENT*t,2*(r.length-t))}function ke(r,t){return new dt(r.buffer,r.byteOffset+r.BYTES_PER_ELEMENT*t,2*(r.length-t))}function Be(r){var t,e,n;for(t=[];!(e=r.next()).done;)if(ae(n=e.value)&&n.length>=2)t.push(n[0],n[1]);else{if(!_e(n))return new TypeError(F("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",n));t.push(Oe(n),Re(n))}return t}var Me=2*Vt.BYTES_PER_ELEMENT,Ne=Fe();function Pe(r){return r instanceof Ye||"object"==typeof r&&null!==r&&("Complex64Array"===r.constructor.name||"Complex128Array"===r.constructor.name)&&"number"==typeof r._length&&"object"==typeof r._buffer}function Ce(r){return r===Ye||"Complex128Array"===r.name}function Ue(r,t){return new Te(r[t*=2],r[t+1])}function Ye(){var r,t,e,n;if(t=arguments.length,!(this instanceof Ye))return 0===t?new Ye:1===t?new Ye(arguments[0]):2===t?new Ye(arguments[0],arguments[1]):new Ye(arguments[0],arguments[1],arguments[2]);if(0===t)e=new Vt(0);else if(1===t)if(ee(arguments[0]))e=new Vt(2*arguments[0]);else if(Ir(arguments[0]))if((n=(e=arguments[0]).length)&&Z(e)&&_e(e[0])){if(e=function(r,t){var e,n,i,o;for(e=t.length,o=0,i=0;i<e;i++){if(!_e(n=t[i]))return null;r[o]=Oe(n),r[o+1]=Re(n),o+=2}return r}(new Vt(2*n),e),null===e){if(!xe(n))throw new RangeError(F("invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.",n));e=new Vt(arguments[0])}}else{if(Ae(e))e=Ie(e,0);else if(je(e))e=ke(e,0);else if(!xe(n))throw new RangeError(F("invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.",n));e=new Vt(e)}else if(fe(arguments[0])){if(!Or((e=arguments[0]).byteLength/Me))throw new RangeError(F("invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.",Me,e.byteLength));e=new Vt(e)}else{if(!X(arguments[0]))throw new TypeError(F("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",arguments[0]));if(e=arguments[0],!1===Ne)throw new TypeError(F("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.",e));if(!br(e[Le]))throw new TypeError(F("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",e));if(!br((e=e[Le]()).next))throw new TypeError(F("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",e));if((e=Be(e))instanceof Error)throw e;e=new Vt(e)}else{if(!fe(e=arguments[0]))throw new TypeError(F("invalid argument. First argument must be an ArrayBuffer. Value: `%s`.",e));if(!ee(r=arguments[1]))throw new TypeError(F("invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.",r));if(!Or(r/Me))throw new RangeError(F("invalid argument. Byte offset must be a multiple of %u. Value: `%u`.",Me,r));if(2===t){if(!Or((n=e.byteLength-r)/Me))throw new RangeError(F("invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.",Me,n));e=new Vt(e,r)}else{if(!ee(n=arguments[2]))throw new TypeError(F("invalid argument. Length must be a nonnegative integer. Value: `%s`.",n));if(n*Me>e.byteLength-r)throw new RangeError(F("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*Me));e=new Vt(e,r,2*n)}}return P(this,"_buffer",e),P(this,"_length",e.length/2),this}function We(r){return r.re}function Ge(r){return r.im}function $e(r){var t,e,n;for(t=[];!(e=r.next()).done;)if(ae(n=e.value)&&n.length>=2)t.push(n[0],n[1]);else{if(!_e(n))return new TypeError(F("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",n));t.push(We(n),Ge(n))}return t}P(Ye,"BYTES_PER_ELEMENT",Me),P(Ye,"name","Complex64Array"),P(Ye,"from",(function(r){var t,e,n,i,o,a,u,f,s,l,h,c;if(!br(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Ce(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((e=arguments.length)>1){if(!br(n=arguments[1]))throw new TypeError(F("invalid argument. Second argument must be a function. Value: `%s`.",n));e>2&&(t=arguments[2])}if(Pe(r)){if(f=r.length,n){for(o=(i=new this(f))._buffer,c=0,h=0;h<f;h++){if(_e(l=n.call(t,r.get(h),h)))o[c]=Oe(l),o[c+1]=Re(l);else{if(!(ae(l)&&l.length>=2))throw new TypeError(F("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",l));o[c]=l[0],o[c+1]=l[1]}c+=2}return i}return new this(r)}if(Ir(r)){if(n){for(f=r.length,u=r.get&&r.set?ct("default"):ft("default"),h=0;h<f;h++)if(!_e(u(r,h))){s=!0;break}if(s){if(!xe(f))throw new RangeError(F("invalid argument. First argument must have a length which is a multiple of %u. Length: `%u`.",2,f));for(o=(i=new this(f/2))._buffer,h=0;h<f;h++)o[h]=n.call(t,u(r,h),h);return i}for(o=(i=new this(f))._buffer,c=0,h=0;h<f;h++){if(_e(l=n.call(t,u(r,h),h)))o[c]=Oe(l),o[c+1]=Re(l);else{if(!(ae(l)&&l.length>=2))throw new TypeError(F("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",l));o[c]=l[0],o[c+1]=l[1]}c+=2}return i}return new this(r)}if(X(r)&&Ne&&br(r[Le])){if(!br((o=r[Le]()).next))throw new TypeError(F("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r));if(a=n?function(r,t,e){var n,i,o,a;for(n=[],a=-1;!(i=r.next()).done;)if(a+=1,ae(o=t.call(e,i.value,a))&&o.length>=2)n.push(o[0],o[1]);else{if(!_e(o))return new TypeError(F("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",o));n.push(Oe(o),Re(o))}return n}(o,n,t):Be(o),a instanceof Error)throw a;for(o=(i=new this(f=a.length/2))._buffer,h=0;h<f;h++)o[h]=a[h];return i}throw new TypeError(F("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r))})),P(Ye,"of",(function(){var r,t;if(!br(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Ce(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(r=[],t=0;t<arguments.length;t++)r.push(arguments[t]);return new this(r)})),P(Ye.prototype,"at",(function(r){if(!Pe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Or(r))throw new TypeError(F("invalid argument. Must provide an integer. Value: `%s`.",r));if(r<0&&(r+=this._length),!(r<0||r>=this._length))return Ue(this._buffer,r)})),C(Ye.prototype,"buffer",(function(){return this._buffer.buffer})),C(Ye.prototype,"byteLength",(function(){return this._buffer.byteLength})),C(Ye.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),P(Ye.prototype,"BYTES_PER_ELEMENT",Ye.BYTES_PER_ELEMENT),P(Ye.prototype,"copyWithin",(function(r,t){if(!Pe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return 2===arguments.length?this._buffer.copyWithin(2*r,2*t):this._buffer.copyWithin(2*r,2*t,2*arguments[2]),this})),P(Ye.prototype,"entries",(function(){var r,t,e,n,i,o;if(!Pe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return r=this,n=this._buffer,e=this._length,o=-1,P(t={},"next",(function(){if(o+=1,i||o>=e)return{done:!0};return{value:[o,Ue(n,o)],done:!1}})),P(t,"return",(function(r){if(i=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),Le&&P(t,Le,(function(){return r.entries()})),t})),P(Ye.prototype,"every",(function(r,t){var e,n;if(!Pe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!br(r))throw new TypeError(F("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)if(!r.call(t,Ue(e,n),n,this))return!1;return!0})),P(Ye.prototype,"fill",(function(r,t,e){var n,i,o,a,u,f;if(!Pe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!_e(r))throw new TypeError(F("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(n=this._buffer,i=this._length,arguments.length>1){if(!Or(t))throw new TypeError(F("invalid argument. Second argument must be an integer. Value: `%s`.",t));if(t<0&&(t+=i)<0&&(t=0),arguments.length>2){if(!Or(e))throw new TypeError(F("invalid argument. Third argument must be an integer. Value: `%s`.",e));e<0&&(e+=i)<0&&(e=0),e>i&&(e=i)}else e=i}else t=0,e=i;for(a=Oe(r),u=Re(r),f=t;f<e;f++)n[o=2*f]=a,n[o+1]=u;return this})),P(Ye.prototype,"filter",(function(r,t){var e,n,i,o;if(!Pe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!br(r))throw new TypeError(F("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=[],i=0;i<this._length;i++)o=Ue(e,i),r.call(t,o,i,this)&&n.push(o);return new this.constructor(n)})),P(Ye.prototype,"find",(function(r,t){var e,n,i;if(!Pe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!br(r))throw new TypeError(F("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)if(i=Ue(e,n),r.call(t,i,n,this))return i})),P(Ye.prototype,"findIndex",(function(r,t){var e,n,i;if(!Pe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!br(r))throw new TypeError(F("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)if(i=Ue(e,n),r.call(t,i,n,this))return n;return-1})),P(Ye.prototype,"findLast",(function(r,t){var e,n,i;if(!Pe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!br(r))throw new TypeError(F("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=this._length-1;n>=0;n--)if(i=Ue(e,n),r.call(t,i,n,this))return i})),P(Ye.prototype,"findLastIndex",(function(r,t){var e,n,i;if(!Pe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!br(r))throw new TypeError(F("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=this._length-1;n>=0;n--)if(i=Ue(e,n),r.call(t,i,n,this))return n;return-1})),P(Ye.prototype,"forEach",(function(r,t){var e,n,i;if(!Pe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!br(r))throw new TypeError(F("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)i=Ue(e,n),r.call(t,i,n,this)})),P(Ye.prototype,"get",(function(r){if(!Pe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ee(r))throw new TypeError(F("invalid argument. Must provide a nonnegative integer. Value: `%s`.",r));if(!(r>=this._length))return Ue(this._buffer,r)})),P(Ye.prototype,"includes",(function(r,t){var e,n,i,o,a;if(!Pe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!_e(r))throw new TypeError(F("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!Or(t))throw new TypeError(F("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length)<0&&(t=0)}else t=0;for(i=Oe(r),o=Re(r),e=this._buffer,a=t;a<this._length;a++)if(i===e[n=2*a]&&o===e[n+1])return!0;return!1})),P(Ye.prototype,"indexOf",(function(r,t){var e,n,i,o,a;if(!Pe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!_e(r))throw new TypeError(F("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!Or(t))throw new TypeError(F("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length)<0&&(t=0)}else t=0;for(i=Oe(r),o=Re(r),e=this._buffer,a=t;a<this._length;a++)if(i===e[n=2*a]&&o===e[n+1])return a;return-1})),P(Ye.prototype,"join",(function(r){var t,e,n,i;if(!Pe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(0===arguments.length)n=",";else{if(!se(r))throw new TypeError(F("invalid argument. First argument must be a string. Value: `%s`.",r));n=r}for(t=[],e=this._buffer,i=0;i<this._length;i++)t.push(Ue(e,i).toString());return t.join(n)})),P(Ye.prototype,"keys",(function(){var r,t,e,n,i;if(!Pe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return r=this,e=this._length,i=-1,P(t={},"next",(function(){if(i+=1,n||i>=e)return{done:!0};return{value:i,done:!1}})),P(t,"return",(function(r){if(n=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),Le&&P(t,Le,(function(){return r.keys()})),t})),P(Ye.prototype,"lastIndexOf",(function(r,t){var e,n,i,o,a;if(!Pe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!_e(r))throw new TypeError(F("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!Or(t))throw new TypeError(F("invalid argument. Second argument must be an integer. Value: `%s`.",t));t>=this._length?t=this._length-1:t<0&&(t+=this._length)}else t=this._length-1;for(i=Oe(r),o=Re(r),e=this._buffer,a=t;a>=0;a--)if(i===e[n=2*a]&&o===e[n+1])return a;return-1})),C(Ye.prototype,"length",(function(){return this._length})),P(Ye.prototype,"map",(function(r,t){var e,n,i,o,a;if(!Pe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!br(r))throw new TypeError(F("invalid argument. First argument must be a function. Value: `%s`.",r));for(n=this._buffer,e=(i=new this.constructor(this._length))._buffer,o=0;o<this._length;o++)if(_e(a=r.call(t,Ue(n,o),o,this)))e[2*o]=Oe(a),e[2*o+1]=Re(a);else{if(!ae(a)||2!==a.length)throw new TypeError(F("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",a));e[2*o]=a[0],e[2*o+1]=a[1]}return i})),P(Ye.prototype,"reduce",(function(r,t){var e,n,i,o;if(!Pe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!br(r))throw new TypeError(F("invalid argument. First argument must be a function. Value: `%s`.",r));if(e=this._buffer,i=this._length,arguments.length>1)n=t,o=0;else{if(0===i)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");n=Ue(e,0),o=1}for(;o<i;o++)n=r(n,Ue(e,o),o,this);return n})),P(Ye.prototype,"reduceRight",(function(r,t){var e,n,i,o;if(!Pe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!br(r))throw new TypeError(F("invalid argument. First argument must be a function. Value: `%s`.",r));if(e=this._buffer,i=this._length,arguments.length>1)n=t,o=i-1;else{if(0===i)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");n=Ue(e,i-1),o=i-2}for(;o>=0;o--)n=r(n,Ue(e,o),o,this);return n})),P(Ye.prototype,"reverse",(function(){var r,t,e,n,i,o;if(!Pe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(e=this._length,r=this._buffer,n=Lr(e/2),i=0;i<n;i++)o=e-i-1,t=r[2*i],r[2*i]=r[2*o],r[2*o]=t,t=r[2*i+1],r[2*i+1]=r[2*o+1],r[2*o+1]=t;return this})),P(Ye.prototype,"set",(function(r){var t,e,n,i,o,a,u,f,s;if(!Pe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,arguments.length>1){if(!ee(e=arguments[1]))throw new TypeError(F("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",e))}else e=0;if(_e(r)){if(e>=this._length)throw new RangeError(F("invalid argument. Index argument is out-of-bounds. Value: `%u`.",e));return n[e*=2]=Oe(r),void(n[e+1]=Re(r))}if(Pe(r)){if(e+(a=r._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(t=r._buffer,s=n.byteOffset+e*Me,t.buffer===n.buffer&&t.byteOffset<s&&t.byteOffset+t.byteLength>s){for(i=new Vt(t.length),f=0;f<t.length;f++)i[f]=t[f];t=i}for(e*=2,s=0,f=0;f<a;f++)n[e]=t[s],n[e+1]=t[s+1],e+=2,s+=2}else{if(!Ir(r))throw new TypeError(F("invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `%s`.",r));for(a=r.length,f=0;f<a;f++)if(!_e(r[f])){o=!0;break}if(o){if(!xe(a))throw new RangeError(F("invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.",a));if(e+a/2>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(t=r,s=n.byteOffset+e*Me,t.buffer===n.buffer&&t.byteOffset<s&&t.byteOffset+t.byteLength>s){for(i=new Vt(a),f=0;f<a;f++)i[f]=t[f];t=i}for(e*=2,a/=2,s=0,f=0;f<a;f++)n[e]=t[s],n[e+1]=t[s+1],e+=2,s+=2;return}if(e+a>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(e*=2,f=0;f<a;f++)u=r[f],n[e]=Oe(u),n[e+1]=Re(u),e+=2}})),P(Ye.prototype,"slice",(function(r,t){var e,n,i,o,a,u,f;if(!Pe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(a=this._buffer,u=this._length,0===arguments.length)r=0,t=u;else{if(!Or(r))throw new TypeError(F("invalid argument. First argument must be an integer. Value: `%s`.",r));if(r<0&&(r+=u)<0&&(r=0),1===arguments.length)t=u;else{if(!Or(t))throw new TypeError(F("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0?(t+=u)<0&&(t=0):t>u&&(t=u)}}for(e=r<t?t-r:0,n=(i=new this.constructor(e))._buffer,f=0;f<e;f++)o=2*(f+r),n[2*f]=a[o],n[2*f+1]=a[o+1];return i})),P(Ye.prototype,"some",(function(r,t){var e,n;if(!Pe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!br(r))throw new TypeError(F("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)if(r.call(t,Ue(e,n),n,this))return!0;return!1})),P(Ye.prototype,"sort",(function(r){var t,e,n,i,o;if(!Pe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!br(r))throw new TypeError(F("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=this._length,t=[],i=0;i<n;i++)t.push(Ue(e,i));for(t.sort(r),i=0;i<n;i++)e[o=2*i]=Oe(t[i]),e[o+1]=Re(t[i]);return this})),P(Ye.prototype,"subarray",(function(r,t){var e,n,i;if(!Pe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,i=this._length,0===arguments.length)r=0,t=i;else{if(!Or(r))throw new TypeError(F("invalid argument. First argument must be an integer. Value: `%s`.",r));if(r<0&&(r+=i)<0&&(r=0),1===arguments.length)t=i;else{if(!Or(t))throw new TypeError(F("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0?(t+=i)<0&&(t=0):t>i&&(t=i)}}return r>=i?(i=0,e=n.byteLength):r>=t?(i=0,e=n.byteOffset+r*Me):(i=t-r,e=n.byteOffset+r*Me),new this.constructor(n.buffer,e,i<0?0:i)})),P(Ye.prototype,"toLocaleString",(function(r,t){var e,n,i,o,a;if(!Pe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(0===arguments.length)n=[];else{if(!se(r)&&!ye(r))throw new TypeError(F("invalid argument. First argument must be a string or an array of strings. Value: `%s`.",r));n=r}if(arguments.length<2)e={};else{if(!X(t))throw new TypeError(F("invalid argument. Options argument must be an object. Value: `%s`.",t));e=t}for(o=this._buffer,i=[],a=0;a<this._length;a++)i.push(Ue(o,a).toLocaleString(n,e));return i.join(",")})),P(Ye.prototype,"toReversed",(function(){var r,t,e,n,i,o;if(!Pe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(e=this._length,t=new this.constructor(e),n=this._buffer,r=t._buffer,i=0;i<e;i++)o=e-i-1,r[2*i]=n[2*o],r[2*i+1]=n[2*o+1];return t})),P(Ye.prototype,"toSorted",(function(r){var t,e,n,i;if(!Pe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!br(r))throw new TypeError(F("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=this._length,t=[],i=0;i<n;i++)t.push(Ue(e,i));return t.sort(r),new Ye(t)})),P(Ye.prototype,"toString",(function(){var r,t,e;if(!Pe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(r=[],t=this._buffer,e=0;e<this._length;e++)r.push(Ue(t,e).toString());return r.join(",")})),P(Ye.prototype,"values",(function(){var r,t,e,n,i,o;if(!Pe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return t=this,i=this._buffer,e=this._length,o=-1,P(r={},"next",(function(){if(o+=1,n||o>=e)return{done:!0};return{value:Ue(i,o),done:!1}})),P(r,"return",(function(r){if(n=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),Le&&P(r,Le,(function(){return t.values()})),r})),P(Ye.prototype,"with",(function(r,t){var e,n,i;if(!Pe(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Or(r))throw new TypeError(F("invalid argument. First argument must be an integer. Value: `%s`.",r));if(i=this._length,r<0&&(r+=i),r<0||r>=i)throw new RangeError(F("invalid argument. Index argument is out-of-bounds. Value: `%s`.",r));if(!_e(t))throw new TypeError(F("invalid argument. Second argument must be a complex number. Value: `%s`.",t));return(e=(n=new this.constructor(this._buffer))._buffer)[2*r]=Oe(t),e[2*r+1]=Re(t),n}));var ze=2*dt.BYTES_PER_ELEMENT,qe=Fe();function He(r){return r instanceof Xe||"object"==typeof r&&null!==r&&("Complex64Array"===r.constructor.name||"Complex128Array"===r.constructor.name)&&"number"==typeof r._length&&"object"==typeof r._buffer}function Je(r){return r===Xe||"Complex64Array"===r.name}function Ze(r,t){return new we(r[t*=2],r[t+1])}function Xe(){var r,t,e,n;if(t=arguments.length,!(this instanceof Xe))return 0===t?new Xe:1===t?new Xe(arguments[0]):2===t?new Xe(arguments[0],arguments[1]):new Xe(arguments[0],arguments[1],arguments[2]);if(0===t)e=new dt(0);else if(1===t)if(ee(arguments[0]))e=new dt(2*arguments[0]);else if(Ir(arguments[0]))if((n=(e=arguments[0]).length)&&Z(e)&&_e(e[0])){if(e=function(r,t){var e,n,i,o;for(e=t.length,o=0,i=0;i<e;i++){if(!_e(n=t[i]))return null;r[o]=We(n),r[o+1]=Ge(n),o+=2}return r}(new dt(2*n),e),null===e){if(!xe(n))throw new RangeError(F("invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.",n));e=new dt(arguments[0])}}else{if(Ae(e))e=Ie(e,0);else if(je(e))e=ke(e,0);else if(!xe(n))throw new RangeError(F("invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.",n));e=new dt(e)}else if(fe(arguments[0])){if(!Or((e=arguments[0]).byteLength/ze))throw new RangeError(F("invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.",ze,e.byteLength));e=new dt(e)}else{if(!X(arguments[0]))throw new TypeError(F("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",arguments[0]));if(e=arguments[0],!1===qe)throw new TypeError(F("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.",e));if(!br(e[Le]))throw new TypeError(F("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",e));if(!br((e=e[Le]()).next))throw new TypeError(F("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",e));if((e=$e(e))instanceof Error)throw e;e=new dt(e)}else{if(!fe(e=arguments[0]))throw new TypeError(F("invalid argument. First argument must be an ArrayBuffer. Value: `%s`.",e));if(!ee(r=arguments[1]))throw new TypeError(F("invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.",r));if(!Or(r/ze))throw new RangeError(F("invalid argument. Byte offset must be a multiple of %u. Value: `%u`.",ze,r));if(2===t){if(!Or((n=e.byteLength-r)/ze))throw new RangeError(F("invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.",ze,n));e=new dt(e,r)}else{if(!ee(n=arguments[2]))throw new TypeError(F("invalid argument. Length must be a nonnegative integer. Value: `%s`.",n));if(n*ze>e.byteLength-r)throw new RangeError(F("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*ze));e=new dt(e,r,2*n)}}return P(this,"_buffer",e),P(this,"_length",e.length/2),this}function De(r){var t,e;for(t=[];!(e=r.next()).done;)t.push(Q(e.value));return t}P(Xe,"BYTES_PER_ELEMENT",ze),P(Xe,"name","Complex128Array"),P(Xe,"from",(function(r){var t,e,n,i,o,a,u,f,s,l,h,c;if(!br(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Je(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((e=arguments.length)>1){if(!br(n=arguments[1]))throw new TypeError(F("invalid argument. Second argument must be a function. Value: `%s`.",n));e>2&&(t=arguments[2])}if(He(r)){if(f=r.length,n){for(o=(i=new this(f))._buffer,c=0,h=0;h<f;h++){if(_e(l=n.call(t,r.get(h),h)))o[c]=We(l),o[c+1]=Ge(l);else{if(!(ae(l)&&l.length>=2))throw new TypeError(F("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",l));o[c]=l[0],o[c+1]=l[1]}c+=2}return i}return new this(r)}if(Ir(r)){if(n){for(f=r.length,u=r.get&&r.set?ct("default"):ft("default"),h=0;h<f;h++)if(!_e(u(r,h))){s=!0;break}if(s){if(!xe(f))throw new RangeError(F("invalid argument. First argument must have a length which is a multiple of two. Length: `%u`.",f));for(o=(i=new this(f/2))._buffer,h=0;h<f;h++)o[h]=n.call(t,u(r,h),h);return i}for(o=(i=new this(f))._buffer,c=0,h=0;h<f;h++){if(_e(l=n.call(t,u(r,h),h)))o[c]=We(l),o[c+1]=Ge(l);else{if(!(ae(l)&&l.length>=2))throw new TypeError(F("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",l));o[c]=l[0],o[c+1]=l[1]}c+=2}return i}return new this(r)}if(X(r)&&qe&&br(r[Le])){if(!br((o=r[Le]()).next))throw new TypeError(F("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r));if(a=n?function(r,t,e){var n,i,o,a;for(n=[],a=-1;!(i=r.next()).done;)if(a+=1,ae(o=t.call(e,i.value,a))&&o.length>=2)n.push(o[0],o[1]);else{if(!_e(o))return new TypeError(F("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",o));n.push(We(o),Ge(o))}return n}(o,n,t):$e(o),a instanceof Error)throw a;for(o=(i=new this(f=a.length/2))._buffer,h=0;h<f;h++)o[h]=a[h];return i}throw new TypeError(F("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r))})),P(Xe,"of",(function(){var r,t;if(!br(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Je(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(r=[],t=0;t<arguments.length;t++)r.push(arguments[t]);return new this(r)})),P(Xe.prototype,"at",(function(r){if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Or(r))throw new TypeError(F("invalid argument. Must provide an integer. Value: `%s`.",r));if(r<0&&(r+=this._length),!(r<0||r>=this._length))return Ze(this._buffer,r)})),C(Xe.prototype,"buffer",(function(){return this._buffer.buffer})),C(Xe.prototype,"byteLength",(function(){return this._buffer.byteLength})),C(Xe.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),P(Xe.prototype,"BYTES_PER_ELEMENT",Xe.BYTES_PER_ELEMENT),P(Xe.prototype,"copyWithin",(function(r,t){if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return 2===arguments.length?this._buffer.copyWithin(2*r,2*t):this._buffer.copyWithin(2*r,2*t,2*arguments[2]),this})),P(Xe.prototype,"entries",(function(){var r,t,e,n,i,o,a;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return t=this,r=this._buffer,n=this._length,o=-1,a=-2,P(e={},"next",(function(){var t;if(o+=1,i||o>=n)return{done:!0};return t=new we(r[a+=2],r[a+1]),{value:[o,t],done:!1}})),P(e,"return",(function(r){if(i=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),Le&&P(e,Le,(function(){return t.entries()})),e})),P(Xe.prototype,"every",(function(r,t){var e,n;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!br(r))throw new TypeError(F("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)if(!r.call(t,Ze(e,n),n,this))return!1;return!0})),P(Xe.prototype,"fill",(function(r,t,e){var n,i,o,a,u,f;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!_e(r))throw new TypeError(F("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(n=this._buffer,i=this._length,arguments.length>1){if(!Or(t))throw new TypeError(F("invalid argument. Second argument must be an integer. Value: `%s`.",t));if(t<0&&(t+=i)<0&&(t=0),arguments.length>2){if(!Or(e))throw new TypeError(F("invalid argument. Third argument must be an integer. Value: `%s`.",e));e<0&&(e+=i)<0&&(e=0),e>i&&(e=i)}else e=i}else t=0,e=i;for(a=We(r),u=Ge(r),f=t;f<e;f++)n[o=2*f]=a,n[o+1]=u;return this})),P(Xe.prototype,"filter",(function(r,t){var e,n,i,o;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!br(r))throw new TypeError(F("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=[],i=0;i<this._length;i++)o=Ze(e,i),r.call(t,o,i,this)&&n.push(o);return new this.constructor(n)})),P(Xe.prototype,"find",(function(r,t){var e,n,i;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!br(r))throw new TypeError(F("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)if(i=Ze(e,n),r.call(t,i,n,this))return i})),P(Xe.prototype,"findIndex",(function(r,t){var e,n,i;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!br(r))throw new TypeError(F("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)if(i=Ze(e,n),r.call(t,i,n,this))return n;return-1})),P(Xe.prototype,"findLast",(function(r,t){var e,n,i;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!br(r))throw new TypeError(F("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=this._length-1;n>=0;n--)if(i=Ze(e,n),r.call(t,i,n,this))return i})),P(Xe.prototype,"findLastIndex",(function(r,t){var e,n,i;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!br(r))throw new TypeError(F("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=this._length-1;n>=0;n--)if(i=Ze(e,n),r.call(t,i,n,this))return n;return-1})),P(Xe.prototype,"forEach",(function(r,t){var e,n,i;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!br(r))throw new TypeError(F("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)i=Ze(e,n),r.call(t,i,n,this)})),P(Xe.prototype,"get",(function(r){if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!ee(r))throw new TypeError(F("invalid argument. Must provide a nonnegative integer. Value: `%s`.",r));if(!(r>=this._length))return Ze(this._buffer,r)})),C(Xe.prototype,"length",(function(){return this._length})),P(Xe.prototype,"includes",(function(r,t){var e,n,i,o,a;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!_e(r))throw new TypeError(F("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!Or(t))throw new TypeError(F("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length)<0&&(t=0)}else t=0;for(i=We(r),o=Ge(r),e=this._buffer,a=t;a<this._length;a++)if(i===e[n=2*a]&&o===e[n+1])return!0;return!1})),P(Xe.prototype,"indexOf",(function(r,t){var e,n,i,o,a;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!_e(r))throw new TypeError(F("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!Or(t))throw new TypeError(F("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length)<0&&(t=0)}else t=0;for(i=We(r),o=Ge(r),e=this._buffer,a=t;a<this._length;a++)if(i===e[n=2*a]&&o===e[n+1])return a;return-1})),P(Xe.prototype,"join",(function(r){var t,e,n,i;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(0===arguments.length)n=",";else{if(!pe(r))throw new TypeError(F("invalid argument. First argument must be a string. Value: `%s`.",r));n=r}for(t=[],e=this._buffer,i=0;i<this._length;i++)t.push(Ze(e,i).toString());return t.join(n)})),P(Xe.prototype,"keys",(function(){var r,t,e,n,i;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return r=this,e=this._length,i=-1,P(t={},"next",(function(){if(i+=1,n||i>=e)return{done:!0};return{value:i,done:!1}})),P(t,"return",(function(r){if(n=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),Le&&P(t,Le,(function(){return r.keys()})),t})),P(Xe.prototype,"lastIndexOf",(function(r,t){var e,n,i,o,a;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!_e(r))throw new TypeError(F("invalid argument. First argument must be a complex number. Value: `%s`.",r));if(arguments.length>1){if(!Or(t))throw new TypeError(F("invalid argument. Second argument must be an integer. Value: `%s`.",t));t>=this._length?t=this._length-1:t<0&&(t+=this._length)}else t=this._length-1;for(i=We(r),o=Ge(r),e=this._buffer,a=t;a>=0;a--)if(i===e[n=2*a]&&o===e[n+1])return a;return-1})),P(Xe.prototype,"map",(function(r,t){var e,n,i,o,a;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!br(r))throw new TypeError(F("invalid argument. First argument must be a function. Value: `%s`.",r));for(n=this._buffer,e=(i=new this.constructor(this._length))._buffer,o=0;o<this._length;o++)if(_e(a=r.call(t,Ze(n,o),o,this)))e[2*o]=We(a),e[2*o+1]=Ge(a);else{if(!ae(a)||2!==a.length)throw new TypeError(F("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",a));e[2*o]=a[0],e[2*o+1]=a[1]}return i})),P(Xe.prototype,"reduce",(function(r,t){var e,n,i,o;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!br(r))throw new TypeError(F("invalid argument. First argument must be a function. Value: `%s`.",r));if(e=this._buffer,i=this._length,arguments.length>1)n=t,o=0;else{if(0===i)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");n=Ze(e,0),o=1}for(;o<i;o++)n=r(n,Ze(e,o),o,this);return n})),P(Xe.prototype,"reduceRight",(function(r,t){var e,n,i,o;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!br(r))throw new TypeError(F("invalid argument. First argument must be a function. Value: `%s`.",r));if(e=this._buffer,i=this._length,arguments.length>1)n=t,o=i-1;else{if(0===i)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");n=Ze(e,i-1),o=i-2}for(;o>=0;o--)n=r(n,Ze(e,o),o,this);return n})),P(Xe.prototype,"reverse",(function(){var r,t,e,n,i,o;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(e=this._length,r=this._buffer,n=Lr(e/2),i=0;i<n;i++)o=e-i-1,t=r[2*i],r[2*i]=r[2*o],r[2*o]=t,t=r[2*i+1],r[2*i+1]=r[2*o+1],r[2*o+1]=t;return this})),P(Xe.prototype,"set",(function(r){var t,e,n,i,o,a,u,f,s;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,arguments.length>1){if(!ee(e=arguments[1]))throw new TypeError(F("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",e))}else e=0;if(_e(r)){if(e>=this._length)throw new RangeError(F("invalid argument. Index argument is out-of-bounds. Value: `%u`.",e));return n[e*=2]=We(r),void(n[e+1]=Ge(r))}if(He(r)){if(e+(a=r._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(t=r._buffer,s=n.byteOffset+e*ze,t.buffer===n.buffer&&t.byteOffset<s&&t.byteOffset+t.byteLength>s){for(i=new dt(t.length),f=0;f<t.length;f++)i[f]=t[f];t=i}for(e*=2,s=0,f=0;f<a;f++)n[e]=t[s],n[e+1]=t[s+1],e+=2,s+=2}else{if(!Ir(r))throw new TypeError(F("invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `%s`.",r));for(a=r.length,f=0;f<a;f++)if(!_e(r[f])){o=!0;break}if(o){if(!xe(a))throw new RangeError(F("invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.",a));if(e+a/2>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(t=r,s=n.byteOffset+e*ze,t.buffer===n.buffer&&t.byteOffset<s&&t.byteOffset+t.byteLength>s){for(i=new dt(a),f=0;f<a;f++)i[f]=t[f];t=i}for(e*=2,a/=2,s=0,f=0;f<a;f++)n[e]=t[s],n[e+1]=t[s+1],e+=2,s+=2;return}if(e+a>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(e*=2,f=0;f<a;f++)u=r[f],n[e]=We(u),n[e+1]=Ge(u),e+=2}})),P(Xe.prototype,"slice",(function(r,t){var e,n,i,o,a,u,f;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(a=this._buffer,u=this._length,0===arguments.length)r=0,t=u;else{if(!Or(r))throw new TypeError(F("invalid argument. First argument must be an integer. Value: `%s`.",r));if(r<0&&(r+=u)<0&&(r=0),1===arguments.length)t=u;else{if(!Or(t))throw new TypeError(F("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0?(t+=u)<0&&(t=0):t>u&&(t=u)}}for(e=r<t?t-r:0,n=(i=new this.constructor(e))._buffer,f=0;f<e;f++)o=2*(f+r),n[2*f]=a[o],n[2*f+1]=a[o+1];return i})),P(Xe.prototype,"some",(function(r,t){var e,n;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!br(r))throw new TypeError(F("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)if(r.call(t,Ze(e,n),n,this))return!0;return!1})),P(Xe.prototype,"sort",(function(r){var t,e,n,i,o;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!br(r))throw new TypeError(F("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=this._length,t=[],i=0;i<n;i++)t.push(Ze(e,i));for(t.sort(r),i=0;i<n;i++)e[o=2*i]=We(t[i]),e[o+1]=Ge(t[i]);return this})),P(Xe.prototype,"subarray",(function(r,t){var e,n,i;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,i=this._length,0===arguments.length)r=0,t=i;else{if(!Or(r))throw new TypeError(F("invalid argument. First argument must be an integer. Value: `%s`.",r));if(r<0&&(r+=i)<0&&(r=0),1===arguments.length)t=i;else{if(!Or(t))throw new TypeError(F("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0?(t+=i)<0&&(t=0):t>i&&(t=i)}}return r>=i?(i=0,e=n.byteLength):r>=t?(i=0,e=n.byteOffset+r*ze):(i=t-r,e=n.byteOffset+r*ze),new this.constructor(n.buffer,e,i<0?0:i)})),P(Xe.prototype,"toLocaleString",(function(r,t){var e,n,i,o,a;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(0===arguments.length)n=[];else{if(!pe(r)&&!ye(r))throw new TypeError(F("invalid argument. First argument must be a string or an array of strings. Value: `%s`.",r));n=r}if(arguments.length<2)e={};else{if(!X(t))throw new TypeError(F("invalid argument. Options argument must be an object. Value: `%s`.",t));e=t}for(o=this._buffer,i=[],a=0;a<this._length;a++)i.push(Ze(o,a).toLocaleString(n,e));return i.join(",")})),P(Xe.prototype,"toReversed",(function(){var r,t,e,n,i,o;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(e=this._length,t=new this.constructor(e),n=this._buffer,r=t._buffer,i=0;i<e;i++)o=e-i-1,r[2*i]=n[2*o],r[2*i+1]=n[2*o+1];return t})),P(Xe.prototype,"toSorted",(function(r){var t,e,n,i;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!br(r))throw new TypeError(F("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=this._length,t=[],i=0;i<n;i++)t.push(Ze(e,i));return t.sort(r),new Xe(t)})),P(Xe.prototype,"toString",(function(){var r,t,e;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(r=[],t=this._buffer,e=0;e<this._length;e++)r.push(Ze(t,e).toString());return r.join(",")})),P(Xe.prototype,"values",(function(){var r,t,e,n,i,o;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return t=this,i=this._buffer,e=this._length,o=-1,P(r={},"next",(function(){if(o+=1,n||o>=e)return{done:!0};return{value:Ze(i,o),done:!1}})),P(r,"return",(function(r){if(n=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),Le&&P(r,Le,(function(){return t.values()})),r})),P(Xe.prototype,"with",(function(r,t){var e,n,i;if(!He(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Or(r))throw new TypeError(F("invalid argument. First argument must be an integer. Value: `%s`.",r));if(i=this._length,r<0&&(r+=i),r<0||r>=i)throw new RangeError(F("invalid argument. Index argument is out-of-bounds. Value: `%s`.",r));if(!_e(t))throw new TypeError(F("invalid argument. Second argument must be a complex number. Value: `%s`.",t));return(e=(n=new this.constructor(this._buffer))._buffer)[2*r]=We(t),e[2*r+1]=Ge(t),n}));var Ke=zt.BYTES_PER_ELEMENT,Qe=Fe();function rn(r){return"object"==typeof r&&null!==r&&"BooleanArray"===r.constructor.name&&r.BYTES_PER_ELEMENT===Ke}function tn(r){return r===en}function en(){var r,t,e,n,i;if(t=arguments.length,!(this instanceof en))return 0===t?new en:1===t?new en(arguments[0]):2===t?new en(arguments[0],arguments[1]):new en(arguments[0],arguments[1],arguments[2]);if(0===t)e=new zt(0);else if(1===t)if(ee(i=arguments[0]))e=new zt(i);else if(Ir(i))e=function(r,t){var e,n;for(e=t.length,n=0;n<e;n++)r[n]=Q(t[n]);return r}(new zt(i.length),i);else if(fe(i))e=new zt(i);else{if(!X(i))throw new TypeError(F("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",i));if(!1===Qe)throw new TypeError(F("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.",i));if(!br(i[Le]))throw new TypeError(F("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",i));if(!br((e=i[Le]()).next))throw new TypeError(F("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",i));e=new zt(De(e))}else{if(!fe(e=arguments[0]))throw new TypeError(F("invalid argument. First argument must be an ArrayBuffer. Value: `%s`.",e));if(!ee(r=arguments[1]))throw new TypeError(F("invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.",r));if(2===t)e=new zt(e,r);else{if(!ee(n=arguments[2]))throw new TypeError(F("invalid argument. Length must be a nonnegative integer. Value: `%s`.",n));if(n*Ke>e.byteLength-r)throw new RangeError(F("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*Ke));e=new zt(e,r,n)}}return P(this,"_buffer",e),P(this,"_length",e.length),this}P(en,"BYTES_PER_ELEMENT",Ke),P(en,"name","BooleanArray"),P(en,"from",(function(r){var t,e,n,i,o,a,u,f,s;if(!br(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!tn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if((e=arguments.length)>1){if(!br(n=arguments[1]))throw new TypeError(F("invalid argument. Second argument must be a function. Value: `%s`.",n));e>2&&(t=arguments[2])}if(Ir(r)){if(n){for(f=r.length,u=r.get&&r.set?ct("default"):ft("default"),o=(i=new this(f))._buffer,s=0;s<f;s++)o[s]=Q(n.call(t,u(r,s),s));return i}return new this(r)}if(X(r)&&Qe&&br(r[Le])){if(!br((o=r[Le]()).next))throw new TypeError(F("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r));for(a=n?function(r,t,e){var n,i,o;for(n=[],o=-1;!(i=r.next()).done;)o+=1,n.push(Q(t.call(e,i.value,o)));return n}(o,n,t):De(o),o=(i=new this(f=a.length))._buffer,s=0;s<f;s++)o[s]=a[s];return i}throw new TypeError(F("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",r))})),P(en,"of",(function(){var r,t;if(!br(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!tn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");for(r=[],t=0;t<arguments.length;t++)r.push(arguments[t]);return new this(r)})),P(en.prototype,"at",(function(r){var t,e;if(!rn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!zr(r))throw new TypeError(F("invalid argument. Must provide an integer. Value: `%s`.",r));if(e=this._length,t=this._buffer,r<0&&(r+=e),!(r<0||r>=e))return Q(t[r])})),C(en.prototype,"buffer",(function(){return this._buffer.buffer})),C(en.prototype,"byteLength",(function(){return this._buffer.byteLength})),C(en.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),P(en.prototype,"BYTES_PER_ELEMENT",en.BYTES_PER_ELEMENT),P(en.prototype,"copyWithin",(function(r,t){if(!rn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");return 2===arguments.length?this._buffer.copyWithin(r,t):this._buffer.copyWithin(r,t,arguments[2]),this})),P(en.prototype,"entries",(function(){var r,t,e,n,i,o;if(!rn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");return r=this,n=this._buffer,e=this._length,o=-1,P(t={},"next",(function(){if(o+=1,i||o>=e)return{done:!0};return{value:[o,Q(n[o])],done:!1}})),P(t,"return",(function(r){if(i=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),Le&&P(t,Le,(function(){return r.entries()})),t})),P(en.prototype,"every",(function(r,t){var e,n;if(!rn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!br(r))throw new TypeError(F("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)if(!r.call(t,Q(e[n]),n,this))return!1;return!0})),P(en.prototype,"fill",(function(r,t,e){var n,i,o,a;if(!rn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!K(r))throw new TypeError(F("invalid argument. First argument must be a boolean. Value: `%s`.",r));if(n=this._buffer,i=this._length,arguments.length>1){if(!zr(t))throw new TypeError(F("invalid argument. Second argument must be an integer. Value: `%s`.",t));if(t<0&&(t+=i)<0&&(t=0),arguments.length>2){if(!zr(e))throw new TypeError(F("invalid argument. Third argument must be an integer. Value: `%s`.",e));e<0&&(e+=i)<0&&(e=0),e>i&&(e=i)}else e=i}else t=0,e=i;for(o=r?1:0,a=t;a<e;a++)n[a]=o;return this})),P(en.prototype,"filter",(function(r,t){var e,n,i,o;if(!rn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!br(r))throw new TypeError(F("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=[],i=0;i<this._length;i++)o=Q(e[i]),r.call(t,o,i,this)&&n.push(o);return new this.constructor(n)})),P(en.prototype,"find",(function(r,t){var e,n,i;if(!rn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!br(r))throw new TypeError(F("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,i=0;i<this._length;i++)if(n=Q(e[i]),r.call(t,n,i,this))return n})),P(en.prototype,"findIndex",(function(r,t){var e,n,i;if(!rn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!br(r))throw new TypeError(F("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,i=0;i<this._length;i++)if(n=Q(e[i]),r.call(t,n,i,this))return i;return-1})),P(en.prototype,"findLast",(function(r,t){var e,n,i;if(!rn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!br(r))throw new TypeError(F("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,i=this._length-1;i>=0;i--)if(n=Q(e[i]),r.call(t,n,i,this))return n})),P(en.prototype,"findLastIndex",(function(r,t){var e,n,i;if(!rn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!br(r))throw new TypeError(F("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,i=this._length-1;i>=0;i--)if(n=Q(e[i]),r.call(t,n,i,this))return i;return-1})),P(en.prototype,"forEach",(function(r,t){var e,n;if(!rn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!br(r))throw new TypeError(F("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)r.call(t,Q(e[n]),n,this)})),P(en.prototype,"get",(function(r){if(!rn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!ee(r))throw new TypeError(F("invalid argument. Must provide a nonnegative integer. Value: `%s`.",r));if(!(r>=this._length))return Q(this._buffer[r])})),P(en.prototype,"includes",(function(r,t){var e,n;if(!rn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!K(r))throw new TypeError(F("invalid argument. First argument must be a boolean. Value: `%s`.",r));if(arguments.length>1){if(!zr(t))throw new TypeError(F("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length)<0&&(t=0)}else t=0;for(e=this._buffer,n=t;n<this._length;n++)if(r===Q(e[n]))return!0;return!1})),P(en.prototype,"indexOf",(function(r,t){var e,n;if(!rn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!K(r))throw new TypeError(F("invalid argument. First argument must be a boolean. Value: `%s`.",r));if(arguments.length>1){if(!zr(t))throw new TypeError(F("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0&&(t+=this._length)<0&&(t=0)}else t=0;for(e=this._buffer,n=t;n<this._length;n++)if(r===Q(e[n]))return n;return-1})),P(en.prototype,"join",(function(r){var t,e,n;if(!rn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(arguments.length>0){if(!se(r))throw new TypeError(F("invalid argument. First argument must be a string. Value: `%s`.",r))}else r=",";for(t=this._buffer,e=[],n=0;n<this._length;n++)t[n]?e.push("true"):e.push("false");return e.join(r)})),P(en.prototype,"keys",(function(){var r,t,e,n,i;if(!rn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");return r=this,e=this._length,i=-1,P(t={},"next",(function(){if(i+=1,n||i>=e)return{done:!0};return{value:i,done:!1}})),P(t,"return",(function(r){if(n=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),Le&&P(t,Le,(function(){return r.keys()})),t})),P(en.prototype,"lastIndexOf",(function(r,t){var e,n;if(!rn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!K(r))throw new TypeError(F("invalid argument. First argument must be a boolean. Value: `%s`.",r));if(arguments.length>1){if(!zr(t))throw new TypeError(F("invalid argument. Second argument must be an integer. Value: `%s`.",t));t>=this._length?t=this._length-1:t<0&&(t+=this._length)}else t=this._length-1;for(e=this._buffer,n=t;n>=0;n--)if(r===Q(e[n]))return n;return-1})),C(en.prototype,"length",(function(){return this._length})),P(en.prototype,"map",(function(r,t){var e,n,i,o;if(!rn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!br(r))throw new TypeError("invalid argument. First argument must be a function. Value: `%s`.",r);for(i=this._buffer,e=(n=new this.constructor(this._length))._buffer,o=0;o<this._length;o++)e[o]=Q(r.call(t,Q(i[o]),o,this));return n})),P(en.prototype,"reduce",(function(r,t){var e,n,i,o;if(!rn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!br(r))throw new TypeError(F("invalid argument. First argument must be a function. Value: `%s`.",r));if(e=this._buffer,n=this._length,arguments.length>1)i=t,o=0;else{if(0===n)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");i=Q(e[0]),o=1}for(;o<n;o++)i=r(i,Q(e[o]),o,this);return i})),P(en.prototype,"reduceRight",(function(r,t){var e,n,i,o;if(!rn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!br(r))throw new TypeError(F("invalid argument. First argument must be a function. Value: `%s`.",r));if(e=this._buffer,n=this._length,arguments.length>1)i=t,o=n-1;else{if(0===n)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");i=Q(e[n-1]),o=n-2}for(;o>=0;o--)i=r(i,Q(e[o]),o,this);return i})),P(en.prototype,"reverse",(function(){var r,t,e,n,i,o;if(!rn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");for(r=this._buffer,e=this._length,n=Lr(e/2),i=0;i<n;i++)o=e-i-1,t=r[i],r[i]=r[o],r[o]=t;return this})),P(en.prototype,"set",(function(r){var t,e,n,i,o,a,u;if(!rn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(n=this._buffer,arguments.length>1){if(!ee(e=arguments[1]))throw new TypeError(F("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",e))}else e=0;if(Ir(r)){if(e+(o=r.length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(t=rn(r)?r._buffer:r,u=n.byteOffset+e*Ke,t.buffer===n.buffer&&t.byteOffset<u&&t.byteOffset+t.byteLength>u){for(i=new zt(t.length),a=0;a<t.length;a++)i[a]=t[a];t=i}for(a=0;a<o;e++,a++)n[e]=t[a]?1:0}else{if(e>=this._length)throw new RangeError(F("invalid argument. Index argument is out-of-bounds. Value: `%u`.",e));n[e]=r?1:0}})),P(en.prototype,"slice",(function(r,t){var e,n,i,o,a,u;if(!rn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(o=this._buffer,a=this._length,0===arguments.length)r=0,t=a;else{if(!zr(r))throw new TypeError(F("invalid argument. First argument must be an integer. Value: `%s`.",r));if(r<0&&(r+=a)<0&&(r=0),1===arguments.length)t=a;else{if(!zr(t))throw new TypeError(F("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0?(t+=a)<0&&(t=0):t>a&&(t=a)}}for(e=r<t?t-r:0,n=(i=new this.constructor(e))._buffer,u=0;u<e;u++)n[u]=o[u+r];return i})),P(en.prototype,"some",(function(r,t){var e,n;if(!rn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!br(r))throw new TypeError(F("invalid argument. First argument must be a function. Value: `%s`.",r));for(e=this._buffer,n=0;n<this._length;n++)if(r.call(t,Q(e[n]),n,this))return!0;return!1})),P(en.prototype,"sort",(function(r){var t;if(!rn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(t=this._buffer,0===arguments.length)return t.sort(),this;if(!br(r))throw new TypeError(F("invalid argument. First argument must be a function. Value: `%s`.",r));return t.sort((function(t,e){return r(Q(t),Q(e))})),this})),P(en.prototype,"subarray",(function(r,t){var e,n,i;if(!rn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(n=this._buffer,i=this._length,0===arguments.length)r=0,t=i;else{if(!zr(r))throw new TypeError(F("invalid argument. First argument must be an integer. Value: `%s`.",r));if(r<0&&(r+=i)<0&&(r=0),1===arguments.length)t=i;else{if(!zr(t))throw new TypeError(F("invalid argument. Second argument must be an integer. Value: `%s`.",t));t<0?(t+=i)<0&&(t=0):t>i&&(t=i)}}return r>=i?(i=0,e=n.byteLength):r>=t?(i=0,e=n.byteOffset+r*Ke):(i=t-r,e=n.byteOffset+r*Ke),new this.constructor(n.buffer,e,i<0?0:i)})),P(en.prototype,"toLocaleString",(function(r,t){var e,n,i,o,a;if(!rn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(0===arguments.length)n=[];else{if(!se(r)&&!ye(r))throw new TypeError(F("invalid argument. First argument must be a string or an array of strings. Value: `%s`.",r));n=r}if(arguments.length<2)e={};else{if(!X(t))throw new TypeError(F("invalid argument. Options argument must be an object. Value: `%s`.",t));e=t}for(o=this._buffer,i=[],a=0;a<this._length;a++)i.push(Q(o[a]).toLocaleString(n,e));return i.join(",")})),P(en.prototype,"toReversed",(function(){var r,t,e,n,i;if(!rn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");for(e=this._length,t=new this.constructor(e),n=this._buffer,r=t._buffer,i=0;i<e;i++)r[i]=n[e-i-1];return t})),P(en.prototype,"toSorted",(function(r){var t,e,n,i,o;if(!rn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");for(n=this._length,e=new this.constructor(n),i=this._buffer,t=e._buffer,o=0;o<n;o++)t[o]=i[o];if(0===arguments.length)return t.sort(),e;if(!br(r))throw new TypeError(F("invalid argument. First argument must be a function. Value: `%s`.",r));return t.sort((function(t,e){return r(Q(t),Q(e))})),e})),P(en.prototype,"toString",(function(){var r,t,e;if(!rn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");for(r=[],t=this._buffer,e=0;e<this._length;e++)t[e]?r.push("true"):r.push("false");return r.join(",")})),P(en.prototype,"values",(function(){var r,t,e,n,i,o;if(!rn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");return t=this,i=this._buffer,e=this._length,o=-1,P(r={},"next",(function(){if(o+=1,n||o>=e)return{done:!0};return{value:Q(i[o]),done:!1}})),P(r,"return",(function(r){if(n=!0,arguments.length)return{value:r,done:!0};return{done:!0}})),Le&&P(r,Le,(function(){return t.values()})),r})),P(en.prototype,"with",(function(r,t){var e,n;if(!rn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!zr(r))throw new TypeError(F("invalid argument. First argument must be an integer. Value: `%s`.",r));if(n=this._length,r<0&&(r+=n),r<0||r>=n)throw new RangeError(F("invalid argument. Index argument is out-of-bounds. Value: `%s`.",r));if(!K(t))throw new TypeError(F("invalid argument. Second argument must be a boolean. Value: `%s`.",t));return(e=new this.constructor(this._buffer))._buffer[r]=t?1:0,e}));var nn=[dt,Vt,Lt,et,Ut,Bt,te,zt,Xt,Ye,Xe,en],on=["float64","float32","int32","uint32","int16","uint16","int8","uint8","uint8c","complex64","complex128","bool"],an=on.length;function un(r){var t,e=function(r){var t;if(Z(r))return"generic";if(mr(r))return null;for(t=0;t<an;t++)if(r instanceof nn[t])return on[t];return gt[vr(r)]||null}(r);return typeof(t=r).get===at&&typeof t.set===at?{data:r,dtype:e,accessorProtocol:!0,accessors:[ct(e),yt(e)]}:{data:r,dtype:e,accessorProtocol:!1,accessors:[ft(e),lt(e)]}}function fn(r,t,e,n,i,o,a){var u,f,s,l,h,c,p;for(u=t.data,f=i.data,l=t.accessors[0],s=i.accessors[1],h=n,c=a,p=0;p<r;p++)s(f,c,l(u,h)),h+=e,c+=o;return i}var sn=8;function ln(r,t,e,n,i){var o,a,u,f,s,l;if(r<=0)return n;if(u=un(t),f=un(n),u.accessorProtocol||f.accessorProtocol)return fn(r,u,e,o=e<0?(1-r)*e:0,f,i,a=i<0?(1-r)*i:0),f.data;if(1===e&&1===i){if((s=r%sn)>0)for(l=0;l<s;l++)n[l]=t[l];if(r<sn)return n;for(l=s;l<r;l+=sn)n[l]=t[l],n[l+1]=t[l+1],n[l+2]=t[l+2],n[l+3]=t[l+3],n[l+4]=t[l+4],n[l+5]=t[l+5],n[l+6]=t[l+6],n[l+7]=t[l+7];return n}for(o=e<0?(1-r)*e:0,a=i<0?(1-r)*i:0,l=0;l<r;l++)n[a]=t[o],o+=e,a+=i;return n}function hn(){}P(ln,"ndarray",(function(r,t,e,n,i,o,a){var u,f,s,l,h,c;if(r<=0)return i;if(s=un(t),l=un(i),s.accessorProtocol||l.accessorProtocol)return fn(r,s,e,n,l,o,a),l.data;if(u=n,f=a,1===e&&1===o){if((h=r%8)>0)for(c=0;c<h;c++)i[f]=t[u],u+=e,f+=o;if(r<8)return i;for(c=h;c<r;c+=8)i[f]=t[u],i[f+1]=t[u+1],i[f+2]=t[u+2],i[f+3]=t[u+3],i[f+4]=t[u+4],i[f+5]=t[u+5],i[f+6]=t[u+6],i[f+7]=t[u+7],u+=8,f+=8;return i}for(c=0;c<r;c++)i[f]=t[u],u+=e,f+=o;return i}));var cn="foo"===hn.name;var pn=[dt,Vt,Lt,et,Ut,Bt,te,zt,Xt],yn=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array"],gn=wt()?xr(dt):mn;function mn(){}gn="TypedArray"===function(r){if(!1===br(r))throw new TypeError(F("invalid argument. Must provide a function. Value: `%s`.",r));return cn?r.name:pr.exec(r.toString())[1]}(gn)?gn:mn;var vn=[Xe,Ye],wn=["Complex64Array","Complex128Array"];function bn(){return"function"==typeof q&&"symbol"==typeof q("foo")&&z(q,"hasInstance")&&"symbol"==typeof q.hasInstance}var dn=bn()?Symbol.hasInstance:null,En=bn();function Tn(r,t){if("function"!=typeof t&&(!En||"object"!=typeof t||"function"!=typeof t[dn]))throw new TypeError(F("invalid argument. Second argument must be callable. Value: `%s`.",t));return r instanceof t}var _n=[[dt,"Float64Array"],[Vt,"Float32Array"],[Lt,"Int32Array"],[et,"Uint32Array"],[Ut,"Int16Array"],[Bt,"Uint16Array"],[te,"Int8Array"],[zt,"Uint8Array"],[Xt,"Uint8ClampedArray"],[Ye,"Complex64Array"],[Xe,"Complex128Array"],[en,"BooleanArray"]];function xn(r){var t,e;for(e=0;e<_n.length;e++)if(Tn(r,_n[e][0]))return _n[e][1];for(;r;){for(t=vr(r),e=0;e<_n.length;e++)if(t===_n[e][1])return _n[e][1];r=xr(r)}}function Vn(r){var t,e,n,i,o,a;if(function(r){var t,e;if("object"!=typeof r||null===r)return!1;if(r instanceof gn)return!0;for(e=0;e<pn.length;e++)if(r instanceof pn[e])return!0;for(;r;){for(t=vr(r),e=0;e<yn.length;e++)if(yn[e]===t)return!0;r=xr(r)}return!1}(r))t=r;else if(function(r){var t,e;if("object"!=typeof r||null===r)return!1;for(e=0;e<vn.length;e++)if(r instanceof vn[e])return!0;for(;r;){for(t=vr(r),e=0;e<wn.length;e++)if(wn[e]===t)return!0;r=xr(r)}return!1}(r))t=8===r.BYTES_PER_ELEMENT?Ie(r,0):ke(r,0);else{if(!((a=r)instanceof en||"BooleanArray"===vr(a)))throw new TypeError(F("invalid argument. Must provide a typed array. Value: `%s`.",r));o=0,t=new zt((i=r).buffer,i.byteOffset+i.BYTES_PER_ELEMENT*o,i.length-o)}for(e={type:xn(r),data:[]},n=0;n<t.length;n++)e.data.push(t[n]);return e}var An=Kr-1;function Sn(){return Lr(1+An*Math.random())>>>0}var jn=624,Fn=397,Ln=Kr>>>0,On=19650218,Rn=2147483648,In=2147483647,kn=1812433253,Bn=1664525,Mn=1566083941,Nn=2636928640,Pn=4022730752,Cn=[0,2567483615],Un=1/9007199254740992,Yn=67108864,Wn=2147483648,Gn=1,$n=Dr*Un,zn=1,qn=3,Hn=2,Jn=jn+3,Zn=jn+5,Xn=jn+6;function Dn(r,t){var e;return e=t?"option":"argument",r.length<Xn+1?new RangeError(F("invalid %s. `state` array has insufficient length.",e)):r[0]!==zn?new RangeError(F("invalid %s. `state` array has an incompatible schema version. Expected: `%s`. Actual: `%s.`",e,zn,r[0])):r[1]!==qn?new RangeError(F("invalid %s. `state` array has an incompatible number of sections. Expected: `%s`. Actual: `%s`.",e,qn,r[1])):r[Hn]!==jn?new RangeError(F("invalid %s. `state` array has an incompatible state length. Expected: `%u`. Actual: `%u`.",e,jn,r[Hn])):1!==r[Jn]?new RangeError(F("invalid %s. `state` array has an incompatible section length. Expected: `%u`. Actual: `%u`.",e,1,r[Jn])):r[Zn]!==r.length-Xn?new RangeError(F("invalid %s. `state` array length is incompatible with seed section length. Expected: `%u`. Actual: `%u`.",e,r.length-Xn,r[Zn])):null}function Kn(r,t,e){var n;for(r[0]=e>>>0,n=1;n<t;n++)e=((e=r[n-1]>>>0)^e>>>30)>>>0,r[n]=ot(e,kn)+n>>>0;return r}function Qn(r){var t,e,n,i,o,a;if(n={},arguments.length){if(!Ar(r))throw new TypeError(F("invalid argument. Options argument must be an object. Value: `%s`.",r));if(z(r,"copy")&&(n.copy=r.copy,!K(r.copy)))throw new TypeError(F("invalid option. `%s` option must be a boolean. Option: `%s`.","copy",r.copy));if(z(r,"state")){if(e=r.state,n.state=!0,!Br(e))throw new TypeError(F("invalid option. `%s` option must be a Uint32Array. Option: `%s`.","state",e));if(a=Dn(e,!0))throw a;!1===n.copy?t=e:(t=new et(e.length),ln(e.length,e,1,t,1)),e=new et(t.buffer,t.byteOffset+(Hn+1)*t.BYTES_PER_ELEMENT,jn),i=new et(t.buffer,t.byteOffset+(Zn+1)*t.BYTES_PER_ELEMENT,e[Zn])}if(void 0===i)if(z(r,"seed"))if(i=r.seed,n.seed=!0,Jr(i)){if(i>Ln)throw new RangeError(F("invalid option. `%s` option must be a positive integer less than or equal to the maximum unsigned 32-bit integer. Option: `%u`.","seed",i));i>>>=0}else{if(!1===Ir(i)||i.length<1)throw new TypeError(F("invalid option. `%s` option must be either a positive integer less than or equal to the maximum unsigned 32-bit integer or an array-like object containing integer values less than or equal to the maximum unsigned 32-bit integer. Option: `%s`.","seed",i));if(1===i.length){if(!Jr(i=i[0]))throw new TypeError(F("invalid option. `%s` option must be either a positive integer less than or equal to the maximum unsigned 32-bit integer or an array-like object containing integer values less than or equal to the maximum unsigned 32-bit integer. Option: `%s`.","seed",i));if(i>Ln)throw new RangeError(F("invalid option. `%s` option must be either a positive integer less than or equal to the maximum unsigned 32-bit integer or an array-like object containing integer values less than or equal to the maximum unsigned 32-bit integer. Option: `%u`.","seed",i));i>>>=0}else o=i.length,(t=new et(Xn+o))[0]=zn,t[1]=qn,t[Hn]=jn,t[Jn]=1,t[Jn+1]=jn,t[Zn]=o,ln.ndarray(o,i,1,0,t,1,Zn+1),e=new et(t.buffer,t.byteOffset+(Hn+1)*t.BYTES_PER_ELEMENT,jn),i=new et(t.buffer,t.byteOffset+(Zn+1)*t.BYTES_PER_ELEMENT,o),e=function(r,t,e,n){var i,o,a,u;for(o=1,a=0,u=nt(t,n);u>0;u--)i=ot(i=((i=r[o-1]>>>0)^i>>>30)>>>0,Bn)>>>0,r[o]=(r[o]>>>0^i)+e[a]+a>>>0,a+=1,(o+=1)>=t&&(r[0]=r[t-1],o=1),a>=n&&(a=0);for(u=t-1;u>0;u--)i=ot(i=((i=r[o-1]>>>0)^i>>>30)>>>0,Mn)>>>0,r[o]=(r[o]>>>0^i)-o>>>0,(o+=1)>=t&&(r[0]=r[t-1],o=1);return r[0]=Wn,r}(e=Kn(e,jn,On),jn,i,o)}else i=Sn()>>>0}else i=Sn()>>>0;return void 0===e&&((t=new et(Xn+1))[0]=zn,t[1]=qn,t[Hn]=jn,t[Jn]=1,t[Jn+1]=jn,t[Zn]=1,t[Zn+1]=i,e=new et(t.buffer,t.byteOffset+(Hn+1)*t.BYTES_PER_ELEMENT,jn),i=new et(t.buffer,t.byteOffset+(Zn+1)*t.BYTES_PER_ELEMENT,1),e=Kn(e,jn,i)),P(y,"NAME","mt19937"),C(y,"seed",u),C(y,"seedLength",f),U(y,"state",h,c),C(y,"stateLength",s),C(y,"byteLength",l),P(y,"toJSON",p),P(y,"MIN",0),P(y,"MAX",Kr),P(y,"normalized",g),P(g,"NAME",y.NAME),C(g,"seed",u),C(g,"seedLength",f),U(g,"state",h,c),C(g,"stateLength",s),C(g,"byteLength",l),P(g,"toJSON",p),P(g,"MIN",0),P(g,"MAX",$n),y;function u(){var r=t[Zn];return ln(r,i,1,new et(r),1)}function f(){return t[Zn]}function s(){return t.length}function l(){return t.byteLength}function h(){var r=t.length;return ln(r,t,1,new et(r),1)}function c(r){var o;if(!Br(r))throw new TypeError(F("invalid argument. Must provide a Uint32Array. Value: `%s`.",r));if(o=Dn(r,!1))throw o;!1===n.copy?n.state&&r.length===t.length?ln(r.length,r,1,t,1):(t=r,n.state=!0):(r.length!==t.length&&(t=new et(r.length)),ln(r.length,r,1,t,1)),e=new et(t.buffer,t.byteOffset+(Hn+1)*t.BYTES_PER_ELEMENT,jn),i=new et(t.buffer,t.byteOffset+(Zn+1)*t.BYTES_PER_ELEMENT,t[Zn])}function p(){var r={type:"PRNG"};return r.name=y.NAME,r.state=Vn(t),r.params=[],r}function y(){var r,n;return(n=t[Jn+1])>=jn&&(e=function(r){var t,e,n,i;for(i=jn-Fn,e=0;e<i;e++)t=r[e]&Rn|r[e+1]&In,r[e]=r[e+Fn]^t>>>1^Cn[t&Gn];for(n=jn-1;e<n;e++)t=r[e]&Rn|r[e+1]&In,r[e]=r[e-i]^t>>>1^Cn[t&Gn];return t=r[n]&Rn|r[0]&In,r[n]=r[Fn-1]^t>>>1^Cn[t&Gn],r}(e),n=0),r=e[n],t[Jn+1]=n+1,r^=r>>>11,r^=r<<7&Nn,r^=r<<15&Pn,(r^=r>>>18)>>>0}function g(){var r=y()>>>5,t=y()>>>6;return(r*Yn+t)*Un}}function ri(){var r,t=arguments,e="https://stdlib.io/e/"+t[0]+"?";for(r=1;r<t.length;r++)e+="&arg[]="+encodeURIComponent(t[r]);return e}function ti(r){return Mr(r)&&r>=0&&r<=1}function ei(r){return Ur(r)&&r.valueOf()>=0&&r.valueOf()<=1}function ni(r){return ti(r)||ei(r)}function ii(r){return 0===r||Fr(r)?r:r<0?-1:1}P(Qn({seed:Sn()}),"factory",Qn),P(ni,"isPrimitive",ti),P(ni,"isObject",ei);var oi=Math.sqrt;function ai(r){return Math.abs(r)}var ui,fi={uint16:Bt,uint8:zt};(ui=new fi.uint16(1))[0]=4660;var si=52===new fi.uint8(ui.buffer)[0],li=!0===si?1:0,hi=new dt(1),ci=new et(hi.buffer);function pi(r){return hi[0]=r,ci[li]}var yi=!0===si?1:0,gi=new dt(1),mi=new et(gi.buffer);function vi(r,t){return gi[0]=r,mi[yi]=t>>>0,gi[0]}var wi=1023;var bi,di,Ei=.6931471803691238,Ti=1.9082149292705877e-10,_i=0x40000000000000,xi=.3333333333333333,Vi=1048575,Ai=2146435072,Si=1048576,ji=1072693248;function Fi(r){var t,e,n,i,o,a,u,f,s,l,h,c;return 0===r?Gr:Fr(r)||r<0?NaN:(o=0,(e=pi(r))<Si&&(o-=54,e=pi(r*=_i)),e>=Ai?r+r:(o+=(e>>20)-wi|0,o+=(f=(e&=Vi)+614244&1048576|0)>>20|0,u=(r=vi(r,e|f^ji))-1,(Vi&2+e)<3?0===u?0===o?0:o*Ei+o*Ti:(a=u*u*(.5-xi*u),0===o?u-a:o*Ei-(a-o*Ti-u)):(f=e-398458|0,s=440401-e|0,i=(h=(c=(l=u/(2+u))*l)*c)*function(r){return 0===r?.3999999999940942:.3999999999940942+r*(.22222198432149784+.15313837699209373*r)}(h),n=c*function(r){return 0===r?.6666666666666735:.6666666666666735+r*(.2857142874366239+r*(.1818357216161805+.14798198605116586*r))}(h),a=n+i,(f|=s)>0?(t=.5*u*u,0===o?u-(t-l*(t+a)):o*Ei-(t-(l*(t+a)+o*Ti)-u)):0===o?u-l*(u-a):o*Ei-(l*(u-a)-o*Ti-u))))}function Li(r){return xe(r>0?r-1:r+1)}function Oi(r){return r===Wr||r===Gr}!0===si?(bi=1,di=0):(bi=0,di=1);var Ri={HIGH:bi,LOW:di},Ii=new dt(1),ki=new et(Ii.buffer),Bi=Ri.HIGH,Mi=Ri.LOW;function Ni(r,t,e,n){return Ii[0]=r,t[n]=ki[Bi],t[n+e]=ki[Mi],t}function Pi(r){return Ni(r,[0,0],1,0)}P(Pi,"assign",Ni);var Ci=!0===si?0:1,Ui=new dt(1),Yi=new et(Ui.buffer);function Wi(r,t){return Ui[0]=r,Yi[Ci]=t>>>0,Ui[0]}function Gi(r){return 0|r}var $i,zi,qi=2147483647,Hi=2147483648;!0===si?($i=1,zi=0):($i=0,zi=1);var Ji={HIGH:$i,LOW:zi},Zi=new dt(1),Xi=new et(Zi.buffer),Di=Ji.HIGH,Ki=Ji.LOW;function Qi(r,t){return Xi[Di]=r,Xi[Ki]=t,Zi[0]}var ro=[0,0];function to(r,t){var e,n;return Pi.assign(r,ro,1,0),e=ro[0],e&=qi,n=pi(t),Qi(e|=n&=Hi,ro[1])}var eo=1072693247,no=1e300,io=1e-300;var oo=20;var ao=1048575,uo=1048576,fo=1072693248,so=536870912,lo=524288,ho=9007199254740992,co=.9617966939259756,po=.9617967009544373,yo=-7.028461650952758e-9,go=[1,1.5],mo=[0,.5849624872207642],vo=[0,1.350039202129749e-8];var wo=1.4426950408889634,bo=1.4426950216293335,Eo=1.9259629911266175e-8;var To=1023,_o=-1023,xo=-1074,Vo=22250738585072014e-324,Ao=4503599627370496;function So(r,t,e,n){return Fr(r)||Oi(r)?(t[n]=r,t[n+e]=0,t):0!==r&&ai(r)<Vo?(t[n]=r*Ao,t[n+e]=-52,t):(t[n]=r,t[n+e]=0,t)}P((function(r){return So(r,[0,0],1,0)}),"assign",So);var jo=2146435072;var Fo=2220446049250313e-31,Lo=2148532223,Oo=[0,0],Ro=[0,0];function Io(r,t){var e,n;return 0===t||0===r||Fr(r)||Oi(r)?r:(So(r,Oo,1,0),r=Oo[0],t+=Oo[1],t+=function(r){var t=pi(r);return(t=(t&jo)>>>20)-wi|0}(r),t<xo?to(0,r):t>To?r<0?Gr:Wr:(t<=_o?(t+=52,n=Fo):n=1,Pi.assign(r,Ro,1,0),e=Ro[0],e&=Lo,n*Qi(e|=t+wi<<20,Ro[1])))}var ko=.6931471805599453,Bo=1048575;var Mo=1048576,No=1071644672,Po=.6931471824645996,Co=-1.904654299957768e-9;var Uo=1072693247,Yo=1105199104,Wo=1139802112,Go=1083179008,$o=1072693248,zo=1083231232,qo=3230714880,Ho=31,Jo=1e300,Zo=1e-300,Xo=8008566259537294e-32,Do=[0,0],Ko=[0,0];function Qo(r,t){var e,n,i,o,a,u,f,s,l,h,c,p,y,g;if(Fr(r)||Fr(t))return NaN;if(Pi.assign(t,Do,1,0),a=Do[0],0===Do[1]){if(0===t)return 1;if(1===t)return r;if(-1===t)return 1/r;if(.5===t)return oi(r);if(-.5===t)return 1/oi(r);if(2===t)return r*r;if(3===t)return r*r*r;if(4===t)return(r*=r)*r;if(Oi(t))return function(r,t){return-1===r?(r-r)/(r-r):1===r?1:ai(r)<1==(t===Wr)?0:Wr}(r,t)}if(Pi.assign(r,Do,1,0),o=Do[0],0===Do[1]){if(0===o)return function(r,t){return t===Gr?Wr:t===Wr?0:t>0?Li(t)?r:0:Li(t)?to(Wr,r):Wr}(r,t);if(1===r)return 1;if(-1===r&&Li(t))return-1;if(Oi(r))return r===Gr?Qo(-0,-t):t<0?0:Wr}if(r<0&&!1===Or(t))return(r-r)/(r-r);if(i=ai(r),e=o&qi|0,n=a&qi|0,f=a>>>Ho|0,u=(u=o>>>Ho|0)&&Li(t)?-1:1,n>Yo){if(n>Wo)return function(r,t){return(pi(r)&qi)<=eo?t<0?no*no:io*io:t>0?no*no:io*io}(r,t);if(e<Uo)return 1===f?u*Jo*Jo:u*Zo*Zo;if(e>$o)return 0===f?u*Jo*Jo:u*Zo*Zo;c=function(r,t){var e,n,i,o,a,u,f;return o=(i=t-1)*i*(0===(f=i)?.5:.5+f*(.25*f-.3333333333333333)),e=(u=i*Eo-o*wo)-((n=Wi(n=(a=bo*i)+u,0))-a),r[0]=n,r[1]=e,r}(Ko,i)}else c=function(r,t,e){var n,i,o,a,u,f,s,l,h,c,p,y,g,m,v,w,b,d,E,T,_;return d=0,e<uo&&(d-=53,e=pi(t*=ho)),d+=(e>>oo)-wi|0,e=(E=e&ao|0)|fo|0,E<=235662?T=0:E<767610?T=1:(T=0,d+=1,e-=uo),a=Wi(i=(w=(t=vi(t,e))-(s=go[T]))*(b=1/(t+s)),0),n=(e>>1|so)+lo,f=vi(0,n+=T<<18),v=(o=i*i)*o*(0===(_=o)?.5999999999999946:.5999999999999946+_*(.4285714285785502+_*(.33333332981837743+_*(.272728123808534+_*(.23066074577556175+.20697501780033842*_))))),f=Wi(f=3+(o=a*a)+(v+=(u=b*(w-a*f-a*(t-(f-s))))*(a+i)),0),h=Wi(h=(w=a*f)+(b=u*f+(v-(f-3-o))*i),0),c=po*h,g=(p=yo*h+(b-(h-w))*co+vo[T])-((y=Wi(y=c+p+(l=mo[T])+(m=d),0))-m-l-c),r[0]=y,r[1]=g,r}(Ko,i,e);if(p=(h=(t-(s=Wi(t,0)))*c[0]+t*c[1])+(l=s*c[0]),Pi.assign(p,Do,1,0),y=Gi(Do[0]),g=Gi(Do[1]),y>=Go){if(0!=(y-Go|g))return u*Jo*Jo;if(h+Xo>p-l)return u*Jo*Jo}else if((y&qi)>=zo){if(0!=(y-qo|g))return u*Zo*Zo;if(h<=p-l)return u*Zo*Zo}return p=function(r,t,e){var n,i,o,a,u,f,s,l,h,c;return h=((l=r&qi|0)>>oo)-wi|0,s=0,l>No&&(i=vi(0,((s=r+(Mo>>h+1)>>>0)&~(Bo>>(h=((s&qi)>>oo)-wi|0)))>>>0),s=(s&Bo|Mo)>>oo-h>>>0,r<0&&(s=-s),t-=i),r=Gi(r=pi(f=1-((f=(o=(i=Wi(i=e+t,0))*Po)+(a=(e-(i-t))*ko+i*Co))*(n=f-(i=f*f)*(0===(c=i)?.16666666666666602:.16666666666666602+c*(c*(6613756321437934e-20+c*(4.1381367970572385e-8*c-16533902205465252e-22))-.0027777777777015593)))/(n-2)-((u=a-(f-o))+f*u)-f))),(r+=s<<oo>>>0)>>oo<=0?Io(f,s):vi(f,r)}(y,l,h),u*p}var ra=1/12,ta=1/360,ea=1/1260;function na(r){var t;switch(r){case 0:return.08106146679532726;case 1:return.04134069595540929;case 2:return.02767792568499834;case 3:return.02079067210376509;case 4:return.01664469118982119;case 5:return.01387612882307075;case 6:return.01189670994589177;case 7:return.01041126526197209;case 8:return.009255462182712733;case 9:return.00833056343336287;default:return t=Qo(r+=1,2),(ra-(ta-ea/t)/t)/r}}var ia=1/6;function oa(r,t,e){return e>.5?t-oa(r,t,1-e):t*e<10?function(r,t,e){var n,i=0;for(n=0;n<t;n++)r()<=e&&(i+=1);return i}(r,t,e):function(r,t,e){var n,i,o,a,u,f,s,l,h,c,p,y,g,m,v,w,b,d,E,T,_,x,V,A,S,j;for(s=t-(T=Lr((t+1)*e))+1,l=(t+1)*(x=e/(_=1-e)),g=.0248*(m=1.15+2.53*(o=oi(a=t*e*_)))-.0873+.01*e,v=t*e+.5,n=(2.83+5.1/m)*o,i=.86*(y=.92-4.2/m),b=(T+.5)*Fi((T+1)/(x*s)),b+=na(T)+na(t-T);;){if((S=r())<=i)return x=(A=S/y-.43)*(2*g/(.5-ai(A))+m)+v,Lr(x);if(S>=y?A=r()-.5:(A=.5*ii(A=S/y-.93)-A,S=y*r()),h=.5-ai(A),!((E=Lr(A*(2*g/h+m)+v))<0||E>t))if(S=S*n/(g/(h*h)+m),(c=ai(E-T))>15){if(S=Fi(S),u=c/a,f=(c/3+.625)*c,f+=ia,S<(V=-c*c/(2*a))-(u*=.5+(f/=a)))return E;if(S<=V+u&&(j=b+(t+1)*Fi(s/(p=t-E+1)),j+=(E+.5)*Fi(p*x/(E+1)),S<=(j+=-(na(E)+na(t-E)))))return E}else{if(w=1,T<E)for(d=T;d<=E;d++)w*=l/d-x;else if(T>E)for(d=E;d<=T;d++)S*=l/d-x;if(S<=w)return E}}}(r,t,e)}function aa(){var r,t,e,n,i,o;if(0===arguments.length)t=Qn();else if(1===arguments.length){if(!Ar(r=arguments[0]))throw new TypeError(ri("0nz2V",r));if(z(r,"prng")){if(!br(r.prng))throw new TypeError(ri("0nz6u","prng",r.prng));t=r.prng}else t=Qn(r)}else{if(n=function(r,t){return Jr(r)?ti(t)?null:new TypeError(ri("0nz73",t)):new TypeError(ri("0nz4b",t))}(i=arguments[0],o=arguments[1]))throw n;if(arguments.length>2){if(!Ar(r=arguments[2]))throw new TypeError(ri("0nz2V",r));if(z(r,"prng")){if(!br(r.prng))throw new TypeError(ri("0nz6u","prng",r.prng));t=r.prng}else t=Qn(r)}else t=Qn()}return P(e=void 0===i?function(r,e){if(Fr(r)||Fr(e)||(n=r,!(Lr(n)===n&&n>0))||!function(r){return r>=0&&r<=1}(e))return NaN;var n;return oa(t,r,e)}:function(){return oa(t,i,o)},"NAME","binomial"),r&&r.prng?(P(e,"seed",null),P(e,"seedLength",null),U(e,"state",Sr(null),jr),P(e,"stateLength",null),P(e,"byteLength",null),P(e,"toJSON",Sr(null)),P(e,"PRNG",t)):(C(e,"seed",(function(){return t.seed})),C(e,"seedLength",(function(){return t.seedLength})),U(e,"state",(function(){return t.state}),(function(r){t.state=r})),C(e,"stateLength",(function(){return t.stateLength})),C(e,"byteLength",(function(){return t.byteLength})),P(e,"toJSON",(function(){var r={type:"PRNG"};r.name=e.NAME,r.state=Vn(t.state),r.params=void 0===i?[]:[i,o];return r})),P(e,"PRNG",t),t=t.normalized),e}var ua=aa();P(ua,"factory",aa);export{ua as default,aa as factory};
//# sourceMappingURL=mod.js.map