-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
3 lines (3 loc) · 202 KB
/
index.js
File metadata and controls
3 lines (3 loc) · 202 KB
1
2
3
// Copyright (c) 2026 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("buffer")):"function"==typeof define&&define.amd?define(["buffer"],e):(t="undefined"!=typeof globalThis?globalThis:t||self).array=e(t.require$$0)}(this,(function(t){"use strict";var e=Object.prototype.hasOwnProperty;function n(t,n){return null!=t&&e.call(t,n)}var r="function"==typeof Symbol&&"symbol"==typeof Symbol("foo");function i(){return r&&"symbol"==typeof Symbol.toStringTag}var o=Object.prototype.toString;var a="function"==typeof Symbol?Symbol:void 0,u="function"==typeof a?a.toStringTag:"";var f=i()?function(t){var e,r,i;if(null==t)return o.call(t);r=t[u],e=n(t,u);try{t[u]=void 0}catch(e){return o.call(t)}return i=o.call(t),e?t[u]=r:delete t[u],i}:function(t){return o.call(t)};var s=Array.isArray?Array.isArray:function(t){return"[object Array]"===f(t)};function l(t){return"object"==typeof t&&null!==t&&!s(t)}var c=/./,h="function"==typeof Object.defineProperty?Object.defineProperty:null;var p=Object.defineProperty;function g(t){return"number"==typeof t}function y(t){var e,n="";for(e=0;e<t;e++)n+="0";return n}function m(t,e,n){var r=!1,i=e-t.length;return i<0||(function(t){return"-"===t[0]}(t)&&(r=!0,t=t.substr(1)),t=n?t+y(i):y(i)+t,r&&(t="-"+t)),t}var d=String.prototype.toLowerCase,v=String.prototype.toUpperCase;function b(t){var e,n,r;switch(t.specifier){case"b":e=2;break;case"o":e=8;break;case"x":case"X":e=16;break;default:e=10}if(n=t.arg,r=parseInt(n,10),!isFinite(r)){if(!g(n))throw new Error("invalid integer. Value: "+n);r=0}return r<0&&("u"===t.specifier||10!==e)&&(r=4294967295+r+1),r<0?(n=(-r).toString(e),t.precision&&(n=m(n,t.precision,t.padRight)),n="-"+n):(n=r.toString(e),r||t.precision?t.precision&&(n=m(n,t.precision,t.padRight)):n="",t.sign&&(n=t.sign+n)),16===e&&(t.alternate&&(n="0x"+n),n=t.specifier===v.call(t.specifier)?v.call(n):d.call(n)),8===e&&t.alternate&&"0"!==n.charAt(0)&&(n="0"+n),n}var w=Math.abs,_=String.prototype.toLowerCase,E=String.prototype.toUpperCase,x=String.prototype.replace,T=/e\+(\d)$/,V=/e-(\d)$/,O=/^(\d+)$/,A=/^(\d+)e/,j=/\.0$/,S=/\.0*e/,L=/(\..*[^0])0*e/;function F(t,e){var n,r;switch(e.specifier){case"e":case"E":r=t.toExponential(e.precision);break;case"f":case"F":r=t.toFixed(e.precision);break;case"g":case"G":w(t)<1e-4?((n=e.precision)>0&&(n-=1),r=t.toExponential(n)):r=t.toPrecision(e.precision),e.alternate||(r=x.call(r,L,"$1e"),r=x.call(r,S,"e"),r=x.call(r,j,""));break;default:throw new Error("invalid double notation. Value: "+e.specifier)}return r=x.call(r,T,"e+0$1"),r=x.call(r,V,"e-0$1"),e.alternate&&(r=x.call(r,O,"$1."),r=x.call(r,A,"$1.e")),t>=0&&e.sign&&(r=e.sign+r),r=e.specifier===E.call(e.specifier)?E.call(r):_.call(r)}function I(t){var e,n="";for(e=0;e<t;e++)n+=" ";return n}var R=String.fromCharCode,B=Array.isArray;function M(t){return t!=t}function k(t){var e={};return e.specifier=t.specifier,e.precision=void 0===t.precision?1:t.precision,e.width=t.width,e.flags=t.flags||"",e.mapping=t.mapping,e}function U(t){var e,n,r,i,o,a,u,f,s,l,c,h,p,y;if(!B(t))throw new TypeError("invalid argument. First argument must be an array. Value: `"+t+"`.");for(a="",u=1,s=0;s<t.length;s++)if(r=t[s],"string"==typeof r)a+=r;else{if(e=void 0!==r.precision,!(r=k(r)).specifier)throw new TypeError("invalid argument. Token is missing `specifier` property. Index: `"+s+"`. Value: `"+r+"`.");for(r.mapping&&(u=r.mapping),n=r.flags,l=0;l<n.length;l++)switch(i=n.charAt(l)){case" ":r.sign=" ";break;case"+":r.sign="+";break;case"-":r.padRight=!0,r.padZeros=!1;break;case"0":r.padZeros=n.indexOf("-")<0;break;case"#":r.alternate=!0;break;default:throw new Error("invalid flag: "+i)}if("*"===r.width){if(r.width=parseInt(arguments[u],10),u+=1,M(r.width))throw new TypeError("the argument for * width at position "+u+" is not a number. Value: `"+r.width+"`.");r.width<0&&(r.padRight=!0,r.width=-r.width)}if(e&&"*"===r.precision){if(r.precision=parseInt(arguments[u],10),u+=1,M(r.precision))throw new TypeError("the argument for * precision at position "+u+" is not a number. Value: `"+r.precision+"`.");r.precision<0&&(r.precision=1,e=!1)}switch(r.arg=arguments[u],r.specifier){case"b":case"o":case"x":case"X":case"d":case"i":case"u":e&&(r.padZeros=!1),r.arg=b(r);break;case"s":r.maxWidth=e?r.precision:-1,r.arg=String(r.arg);break;case"c":if(!M(r.arg)){if((o=parseInt(r.arg,10))<0||o>127)throw new Error("invalid character code. Value: "+r.arg);r.arg=M(o)?String(r.arg):R(o)}break;case"e":case"E":case"f":case"F":case"g":case"G":if(e||(r.precision=6),f=parseFloat(r.arg),!isFinite(f)){if(!g(r.arg))throw new Error("invalid floating-point number. Value: "+a);f=r.arg,r.padZeros=!1}r.arg=F(f,r);break;default:throw new Error("invalid specifier: "+r.specifier)}r.maxWidth>=0&&r.arg.length>r.maxWidth&&(r.arg=r.arg.substring(0,r.maxWidth)),r.padZeros?r.arg=m(r.arg,r.width||r.precision,r.padRight):r.width&&(r.arg=(c=r.arg,h=r.width,p=r.padRight,y=void 0,(y=h-c.length)<0?c:c=p?c+I(y):I(y)+c)),a+=r.arg||"",u+=1}return a}var N=/%(?:([1-9]\d*)\$)?([0 +\-#]*)(\*|\d+)?(?:(\.)(\*|\d+)?)?[hlL]?([%A-Za-z])/g;function P(t){var e={mapping:t[1]?parseInt(t[1],10):void 0,flags:t[2],width:t[3],precision:t[5],specifier:t[6]};return"."===t[4]&&void 0===t[5]&&(e.precision="1"),e}function C(t){var e,n,r,i;for(n=[],i=0,r=N.exec(t);r;)(e=t.slice(i,N.lastIndex-r[0].length)).length&&n.push(e),"%"===r[6]?n.push("%"):n.push(P(r)),i=N.lastIndex,r=N.exec(t);return(e=t.slice(i)).length&&n.push(e),n}function Y(t){var e,n;if("string"!=typeof t)throw new TypeError(Y("invalid argument. First argument must be a string. Value: `%s`.",t));for(e=[C(t)],n=1;n<arguments.length;n++)e.push(arguments[n]);return U.apply(null,e)}var D,J=Object.prototype,z=J.toString,$=J.__defineGetter__,W=J.__defineSetter__,G=J.__lookupGetter__,Z=J.__lookupSetter__;D=function(){try{return h({},"x",{}),!0}catch(t){return!1}}()?p:function(t,e,n){var r,i,o,a;if("object"!=typeof t||null===t||"[object Array]"===z.call(t))throw new TypeError(Y("invalid argument. First argument must be an object. Value: `%s`.",t));if("object"!=typeof n||null===n||"[object Array]"===z.call(n))throw new TypeError(Y("invalid argument. Property descriptor must be an object. Value: `%s`.",n));if((i="value"in n)&&(G.call(t,e)||Z.call(t,e)?(r=t.__proto__,t.__proto__=J,delete t[e],t[e]=n.value,t.__proto__=r):t[e]=n.value),o="get"in n,a="set"in n,i&&(o||a))throw new Error("invalid argument. Cannot specify one or more accessors and a value or writable attribute in the property descriptor.");return o&&$&&$.call(t,e,n.get),a&&W&&W.call(t,e,n.set),t};var q=D;function K(t,e,n){q(t,e,{configurable:!1,enumerable:!1,writable:!1,value:n})}function X(t){return"boolean"==typeof t}var H=Boolean,Q=Boolean.prototype.toString;var tt=i();function et(t){return"object"==typeof t&&(t instanceof H||(tt?function(t){try{return Q.call(t),!0}catch(t){return!1}}(t):"[object Boolean]"===f(t)))}function nt(t){return X(t)||et(t)}K(nt,"isPrimitive",X),K(nt,"isObject",et);var rt="object"==typeof self?self:null,it="object"==typeof window?window:null,ot="object"==typeof global?global:null,at="object"==typeof globalThis?globalThis:null;function ut(t){if(arguments.length){if(!X(t))throw new TypeError(Y("invalid argument. Must provide a boolean. Value: `%s`.",t));if(t)return new Function("return this;")()}if(at)return at;if(rt)return rt;if(it)return it;if(ot)return ot;throw new Error("unexpected error. Unable to resolve global object.")}var ft=ut(),st=ft.document&&ft.document.childNodes,lt=Int8Array;function ct(){return/^\s*function\s*([^(]*)/i}var ht=/^\s*function\s*([^(]*)/i;function pt(t){if("function"!=typeof t)throw new TypeError(Y("invalid argument. Must provide a function. Value: `%s`.",t));return function(e){var n,r;if(!s(e))return!1;if(n=e.length,0===n)return!1;for(r=0;r<n;r++)if(!1===t(e[r]))return!1;return!0}}function gt(t){return null!==t&&"object"==typeof t}function yt(t){return gt(t)&&(t._isBuffer||t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t))}function mt(t){var e,n,r;if(("Object"===(n=f(t).slice(8,-1))||"Error"===n)&&t.constructor){if("string"==typeof(r=t.constructor).name)return r.name;if(e=ht.exec(r.toString()))return e[1]}return yt(t)?"Buffer":n}K(ct,"REGEXP",ht),K(gt,"isObjectLikeArray",pt(gt));var dt="function"==typeof c||"object"==typeof lt||"function"==typeof st?function(t){return mt(t).toLowerCase()}:function(t){var e;return null===t?"null":"object"===(e=typeof t)?mt(t).toLowerCase():e};function vt(t){return"function"===dt(t)}var bt,wt=Object,_t=Object.getPrototypeOf;bt=vt(Object.getPrototypeOf)?_t:function(t){var e=function(t){return t.__proto__}(t);return e||null===e?e:"[object Function]"===f(t.constructor)?t.constructor.prototype:t instanceof wt?wt.prototype:null};var Et=bt;function xt(t){return null==t?null:(t=wt(t),Et(t))}var Tt=Object.prototype;function Vt(t){var e;return!!l(t)&&(!(e=xt(t))||!n(t,"constructor")&&n(e,"constructor")&&vt(e.constructor)&&"[object Function]"===f(e.constructor)&&n(e,"isPrototypeOf")&&vt(e.isPrototypeOf)&&(e===Tt||function(t){var e;for(e in t)if(!n(t,e))return!1;return!0}(t)))}function Ot(t){return"number"==typeof t}var At=Number,jt=At.prototype.toString;var St=i();function Lt(t){return"object"==typeof t&&(t instanceof At||(St?function(t){try{return jt.call(t),!0}catch(t){return!1}}(t):"[object Number]"===f(t)))}function Ft(t){return Ot(t)||Lt(t)}K(Ft,"isPrimitive",Ot),K(Ft,"isObject",Lt);var It=Number.POSITIVE_INFINITY,Rt=At.NEGATIVE_INFINITY,Bt=Math.floor;function Mt(t){return Bt(t)===t}function kt(t){return t<It&&t>Rt&&Mt(t)}function Ut(t){return Ot(t)&&kt(t)}function Nt(t){return Lt(t)&&kt(t.valueOf())}function Pt(t){return Ut(t)||Nt(t)}function Ct(t){return Ut(t)&&t>=0}function Yt(t){return Nt(t)&&t.valueOf()>=0}function Dt(t){return Ct(t)||Yt(t)}K(Pt,"isPrimitive",Ut),K(Pt,"isObject",Nt),K(Dt,"isPrimitive",Ct),K(Dt,"isObject",Yt);var Jt=ut();function zt(){return"function"==typeof Jt.BigInt&&"function"==typeof BigInt&&"bigint"==typeof Jt.BigInt("1")&&"bigint"==typeof BigInt("1")}function $t(t,e,n){q(t,e,{configurable:!1,enumerable:!1,get:n})}function Wt(t){return"string"==typeof t}var Gt=String.prototype.valueOf;var Zt=i();function qt(t){return"object"==typeof t&&(t instanceof String||(Zt?function(t){try{return Gt.call(t),!0}catch(t){return!1}}(t):"[object String]"===f(t)))}function Kt(t){return Wt(t)||qt(t)}function Xt(t){return Ut(t)&&t>0}function Ht(t){return Nt(t)&&t.valueOf()>0}function Qt(t){return Xt(t)||Ht(t)}function te(t){return Object.keys(Object(t))}K(Kt,"isPrimitive",Wt),K(Kt,"isObject",qt),K(Qt,"isPrimitive",Xt),K(Qt,"isObject",Ht);var ee,ne=void 0!==Object.keys;function re(t){return"[object Arguments]"===f(t)}ee=function(){return re(arguments)}();var ie=ee;function oe(t){return t!=t}function ae(t){return Ot(t)&&oe(t)}function ue(t){return Lt(t)&&oe(t.valueOf())}function fe(t){return ae(t)||ue(t)}K(fe,"isPrimitive",ae),K(fe,"isObject",ue);var se=Object.prototype.propertyIsEnumerable;var le=!se.call("beep","0");function ce(t,e){var n;return null!=t&&(!(n=se.call(t,e))&&le&&Kt(t)?!ae(e=+e)&&Ut(e)&&e>=0&&e<t.length:n)}var he=4294967295;var pe=ie?re:function(t){return null!==t&&"object"==typeof t&&!s(t)&&"number"==typeof t.length&&Mt(t.length)&&t.length>=0&&t.length<=he&&n(t,"callee")&&!ce(t,"callee")},ge=Array.prototype.slice;var ye=ce((function(){}),"prototype"),me=!ce({toString:null},"toString"),de=9007199254740991;function ve(t){return"object"==typeof t&&null!==t&&"number"==typeof t.length&&Mt(t.length)&&t.length>=0&&t.length<=de}function be(t,e,n){var r,i;if(!ve(t)&&!Wt(t))throw new TypeError(Y("invalid argument. First argument must be an array-like object. Value: `%s`.",t));if(0===(r=t.length))return-1;if(3===arguments.length){if(!Ut(n))throw new TypeError(Y("invalid argument. Third argument must be an integer. Value: `%s`.",n));if(n>=0){if(n>=r)return-1;i=n}else(i=r+n)<0&&(i=0)}else i=0;if(fe(e)){for(;i<r;i++)if(fe(t[i]))return i}else for(;i<r;i++)if(t[i]===e)return i;return-1}function we(t){return t.constructor&&t.constructor.prototype===t}var _e=["console","external","frame","frameElement","frames","innerHeight","innerWidth","outerHeight","outerWidth","pageXOffset","pageYOffset","parent","scrollLeft","scrollTop","scrollX","scrollY","self","webkitIndexedDB","webkitStorageInfo","window"],Ee="undefined"==typeof window?void 0:window;var xe=function(){var t;if("undefined"===dt(Ee))return!1;for(t in Ee)try{-1===be(_e,t)&&n(Ee,t)&&null!==Ee[t]&&"object"===dt(Ee[t])&&we(Ee[t])}catch(t){return!0}return!1}(),Te="undefined"!=typeof window;var Ve,Oe=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];Ve=ne?function(){return 2!==(te(arguments)||"").length}(1,2)?function(t){return pe(t)?te(ge.call(t)):te(t)}:te:function(t){var e,r,i,o,a,u,f;if(o=[],pe(t)){for(f=0;f<t.length;f++)o.push(f.toString());return o}if("string"==typeof t){if(t.length>0&&!n(t,"0"))for(f=0;f<t.length;f++)o.push(f.toString())}else{if(!1==(i="function"==typeof t)&&!gt(t))return o;r=ye&&i}for(a in t)r&&"prototype"===a||!n(t,a)||o.push(String(a));if(me)for(e=function(t){if(!1===Te&&!xe)return we(t);try{return we(t)}catch(t){return!1}}(t),f=0;f<Oe.length;f++)u=Oe[f],e&&"constructor"===u||!n(t,u)||o.push(String(u));return o};var Ae=Ve;var je=function(t,e){var r,i,o,a,u,f,l,c=!0;if(!gt(t))throw new TypeError(Y("invalid argument. First argument must be an object (except null). Value: `%s`.",t));if(arguments.length>1){if(!Vt(e))throw new TypeError(Y("invalid argument. Options argument must be an object. Value: `%s`.",e));if(n(e,"duplicates")&&!X(c=e.duplicates))throw new TypeError(Y("invalid option. `%s` option must be a boolean. Option: `%s`.","duplicates",c))}if(i=(r=Ae(t)).length,u={},c)for(l=0;l<i;l++)n(u,a=t[o=r[l]])?(f=u[a],s(f)?u[a].push(o):u[a]=[f,o]):u[a]=o;else for(l=0;l<i;l++)u[t[o=r[l]]]=o;return u}({bool:0,int8:1,uint8:2,uint8c:3,int16:4,uint16:5,int32:6,uint32:7,int64:8,uint64:9,float16:10,float32:11,float64:12,complex32:13,complex64:14,complex128:15,binary:16,generic:17,notype:18,userdefined_type:256},{duplicates:!1});function Se(t){var e=je[t];return Wt(e)?e:null}var Le={binary:1,bool:1,complex64:8,complex128:16,float16:2,bfloat16:2,float32:4,float64:8,float128:16,generic:null,int8:1,int16:2,int32:4,int64:8,int128:16,int256:32,uint8:1,uint8c:1,uint16:2,uint32:4,uint64:8,uint128:16,uint256:32};function Fe(t){var e;return Wt(t)?Le[t]||null:Ot(t)?Le[Se(t)]||null:t&&Xt(e=t.byteLength)?e:null}function Ie(t){var e,n;for(e=0,n=0;n<t.length;n++)t[n]<0&&(e+=1);return 0===e?1:e===t.length?-1:0}function Re(t){return Math.abs(t)}function Be(t){var e,n,r,i,o,a;if(0===(n=t.length))return 0;for(e=!0,r=!0,i=Re(t[0]),a=1;a<n;a++){if(o=Re(t[a]),e&&o<i?e=!1:r&&o>i&&(r=!1),!r&&!e)return 0;i=o}return r&&e?3:r?1:2}var Me="function";function ke(t){return typeof t.get===Me&&typeof t.set===Me}var Ue={float64:function(t,e){return t[e]},float32:function(t,e){return t[e]},int32:function(t,e){return t[e]},int16:function(t,e){return t[e]},int8:function(t,e){return t[e]},uint32:function(t,e){return t[e]},uint16:function(t,e){return t[e]},uint8:function(t,e){return t[e]},uint8c:function(t,e){return t[e]},generic:function(t,e){return t[e]},default:function(t,e){return t[e]}};function Ne(t){var e=Ue[t];return"function"==typeof e?e:Ue.default}var Pe={float64:function(t,e,n){t[e]=n},float32:function(t,e,n){t[e]=n},int32:function(t,e,n){t[e]=n},int16:function(t,e,n){t[e]=n},int8:function(t,e,n){t[e]=n},uint32:function(t,e,n){t[e]=n},uint16:function(t,e,n){t[e]=n},uint8:function(t,e,n){t[e]=n},uint8c:function(t,e,n){t[e]=n},generic:function(t,e,n){t[e]=n},default:function(t,e,n){t[e]=n}};function Ce(t){var e=Pe[t];return"function"==typeof e?e:Pe.default}var Ye={complex128:function(t,e){return t.get(e)},complex64:function(t,e){return t.get(e)},default:function(t,e){return t.get(e)}};function De(t){var e=Ye[t];return"function"==typeof e?e:Ye.default}var Je={complex128:function(t,e,n){t.set(n,e)},complex64:function(t,e,n){t.set(n,e)},default:function(t,e,n){t.set(n,e)}};function ze(t){var e=Je[t];return"function"==typeof e?e:Je.default}var $e={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"},We="function"==typeof Float64Array;var Ge="function"==typeof Float64Array?Float64Array:null;function Ze(){var t,e,n;if("function"!=typeof Ge)return!1;try{e=new Ge([1,3.14,-3.14,NaN]),n=e,t=(We&&n instanceof Float64Array||"[object Float64Array]"===f(n))&&1===e[0]&&3.14===e[1]&&-3.14===e[2]&&e[3]!=e[3]}catch(e){t=!1}return t}var qe="function"==typeof Float64Array?Float64Array:void 0;var Ke=Ze()?qe:function(){throw new Error("not implemented")},Xe="function"==typeof Float32Array;var He="function"==typeof Float32Array?Float32Array:null;var Qe,tn="function"==typeof Float32Array?Float32Array:void 0;Qe=function(){var t,e,n;if("function"!=typeof He)return!1;try{e=new He([1,3.14,-3.14,5e40]),n=e,t=(Xe&&n instanceof Float32Array||"[object Float32Array]"===f(n))&&1===e[0]&&3.140000104904175===e[1]&&-3.140000104904175===e[2]&&e[3]===It}catch(e){t=!1}return t}()?tn:function(){throw new Error("not implemented")};var en=Qe,nn="function"==typeof Uint32Array;var rn="function"==typeof Uint32Array?Uint32Array:null;var on,an="function"==typeof Uint32Array?Uint32Array:void 0;on=function(){var t,e,n;if("function"!=typeof rn)return!1;try{e=new rn(e=[1,3.14,-3.14,he+1,he+2]),n=e,t=(nn&&n instanceof Uint32Array||"[object Uint32Array]"===f(n))&&1===e[0]&&3===e[1]&&e[2]===he-2&&0===e[3]&&1===e[4]}catch(e){t=!1}return t}()?an:function(){throw new Error("not implemented")};var un=on,fn="function"==typeof Int32Array;var sn=2147483647,ln=-2147483648,cn="function"==typeof Int32Array?Int32Array:null;var hn,pn="function"==typeof Int32Array?Int32Array:void 0;hn=function(){var t,e,n;if("function"!=typeof cn)return!1;try{e=new cn([1,3.14,-3.14,sn+1]),n=e,t=(fn&&n instanceof Int32Array||"[object Int32Array]"===f(n))&&1===e[0]&&3===e[1]&&-3===e[2]&&e[3]===ln}catch(e){t=!1}return t}()?pn:function(){throw new Error("not implemented")};var gn=hn,yn="function"==typeof Uint16Array;var mn=65535,dn="function"==typeof Uint16Array?Uint16Array:null;var vn,bn="function"==typeof Uint16Array?Uint16Array:void 0;vn=function(){var t,e,n;if("function"!=typeof dn)return!1;try{e=new dn(e=[1,3.14,-3.14,mn+1,mn+2]),n=e,t=(yn&&n instanceof Uint16Array||"[object Uint16Array]"===f(n))&&1===e[0]&&3===e[1]&&e[2]===mn-2&&0===e[3]&&1===e[4]}catch(e){t=!1}return t}()?bn:function(){throw new Error("not implemented")};var wn=vn,_n="function"==typeof Int16Array;var En=32767,xn=-32768,Tn="function"==typeof Int16Array?Int16Array:null;var Vn,On="function"==typeof Int16Array?Int16Array:void 0;Vn=function(){var t,e,n;if("function"!=typeof Tn)return!1;try{e=new Tn([1,3.14,-3.14,En+1]),n=e,t=(_n&&n instanceof Int16Array||"[object Int16Array]"===f(n))&&1===e[0]&&3===e[1]&&-3===e[2]&&e[3]===xn}catch(e){t=!1}return t}()?On:function(){throw new Error("not implemented")};var An=Vn,jn="function"==typeof Uint8Array;var Sn=255,Ln="function"==typeof Uint8Array?Uint8Array:null;var Fn,In="function"==typeof Uint8Array?Uint8Array:void 0;Fn=function(){var t,e,n;if("function"!=typeof Ln)return!1;try{e=new Ln(e=[1,3.14,-3.14,Sn+1,Sn+2]),n=e,t=(jn&&n instanceof Uint8Array||"[object Uint8Array]"===f(n))&&1===e[0]&&3===e[1]&&e[2]===Sn-2&&0===e[3]&&1===e[4]}catch(e){t=!1}return t}()?In:function(){throw new Error("not implemented")};var Rn=Fn,Bn="function"==typeof Uint8ClampedArray;var Mn="function"==typeof Uint8ClampedArray?Uint8ClampedArray:null;var kn,Un="function"==typeof Uint8ClampedArray?Uint8ClampedArray:void 0;kn=function(){var t,e,n;if("function"!=typeof Mn)return!1;try{e=new Mn([-1,0,1,3.14,4.99,255,256]),n=e,t=(Bn&&n instanceof Uint8ClampedArray||"[object Uint8ClampedArray]"===f(n))&&0===e[0]&&0===e[1]&&1===e[2]&&3===e[3]&&5===e[4]&&255===e[5]&&255===e[6]}catch(e){t=!1}return t}()?Un:function(){throw new Error("not implemented")};var Nn=kn,Pn="function"==typeof Int8Array;var Cn=127,Yn=-128,Dn="function"==typeof Int8Array?Int8Array:null;var Jn,zn="function"==typeof Int8Array?Int8Array:void 0;Jn=function(){var t,e,n;if("function"!=typeof Dn)return!1;try{e=new Dn([1,3.14,-3.14,Cn+1]),n=e,t=(Pn&&n instanceof Int8Array||"[object Int8Array]"===f(n))&&1===e[0]&&3===e[1]&&-3===e[2]&&e[3]===Yn}catch(e){t=!1}return t}()?zn:function(){throw new Error("not implemented")};var $n=Jn,Wn=4294967295;function Gn(t){return"object"==typeof t&&null!==t&&"number"==typeof t.length&&Mt(t.length)&&t.length>=0&&t.length<=Wn}var Zn="function"==typeof ArrayBuffer;function qn(t){return Zn&&t instanceof ArrayBuffer||"[object ArrayBuffer]"===f(t)}var Kn=pt(Kt.isPrimitive),Xn=pt(Kt.isObject),Hn=pt(Kt);function Qn(t,e,n){q(t,e,{configurable:!1,enumerable:!0,writable:!1,value:n})}function tr(t,e){if(!(this instanceof tr))throw new TypeError("invalid invocation. Constructor must be called with the `new` keyword.");if(!Ot(t))throw new TypeError(Y("invalid argument. Real component must be a number. Value: `%s`.",t));if(!Ot(e))throw new TypeError(Y("invalid argument. Imaginary component must be a number. Value: `%s`.",e));return Qn(this,"re",t),Qn(this,"im",e),this}K(Hn,"primitives",Kn),K(Hn,"objects",Xn),K(tr,"name","Complex128"),K(tr,"BYTES_PER_ELEMENT",8),K(tr.prototype,"BYTES_PER_ELEMENT",8),K(tr.prototype,"byteLength",16),K(tr.prototype,"toString",(function(){var t=""+this.re;return this.im<0?t+=" - "+-this.im:t+=" + "+this.im,t+="i"})),K(tr.prototype,"toJSON",(function(){var t={type:"Complex128"};return t.re=this.re,t.im=this.im,t}));var er="function"==typeof Math.fround?Math.fround:null,nr=new en(1);var rr="function"==typeof er?er:function(t){return nr[0]=t,nr[0]};function ir(t,e){if(!(this instanceof ir))throw new TypeError("invalid invocation. Constructor must be called with the `new` keyword.");if(!Ot(t))throw new TypeError(Y("invalid argument. Real component must be a number. Value: `%s`.",t));if(!Ot(e))throw new TypeError(Y("invalid argument. Imaginary component must be a number. Value: `%s`.",e));return Qn(this,"re",rr(t)),Qn(this,"im",rr(e)),this}function or(t){return t instanceof tr||t instanceof ir||"object"==typeof t&&null!==t&&"number"==typeof t.re&&"number"==typeof t.im}function ar(t){return Mt(t/2)}K(ir,"name","Complex64"),K(ir,"BYTES_PER_ELEMENT",4),K(ir.prototype,"BYTES_PER_ELEMENT",4),K(ir.prototype,"byteLength",8),K(ir.prototype,"toString",(function(){var t=""+this.re;return this.im<0?t+=" - "+-this.im:t+=" + "+this.im,t+="i"})),K(ir.prototype,"toJSON",(function(){var t={type:"Complex64"};return t.re=this.re,t.im=this.im,t}));var ur=8;function fr(t){return"object"==typeof t&&null!==t&&"Complex64Array"===t.constructor.name&&t.BYTES_PER_ELEMENT===ur}var sr=16;function lr(t){return"object"==typeof t&&null!==t&&"Complex128Array"===t.constructor.name&&t.BYTES_PER_ELEMENT===sr}function cr(){return"function"==typeof a&&"symbol"==typeof a("foo")&&n(a,"iterator")&&"symbol"==typeof a.iterator}var hr=cr()?Symbol.iterator:null;function pr(t){return t.re}function gr(t){return t.im}function yr(t,e){return new en(t.buffer,t.byteOffset+t.BYTES_PER_ELEMENT*e,2*(t.length-e))}function mr(t,e){return new Ke(t.buffer,t.byteOffset+t.BYTES_PER_ELEMENT*e,2*(t.length-e))}function dr(t){var e,n,r;for(e=[];!(n=t.next()).done;)if(Gn(r=n.value)&&r.length>=2)e.push(r[0],r[1]);else{if(!or(r))return new TypeError(Y("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",r));e.push(pr(r),gr(r))}return e}var vr=2*en.BYTES_PER_ELEMENT,br=cr();function wr(t){return t instanceof xr||"object"==typeof t&&null!==t&&("Complex64Array"===t.constructor.name||"Complex128Array"===t.constructor.name)&&"number"==typeof t._length&&"object"==typeof t._buffer}function _r(t){return t===xr||"Complex128Array"===t.name}function Er(t,e){return new ir(t[e*=2],t[e+1])}function xr(){var t,e,n,r;if(e=arguments.length,!(this instanceof xr))return 0===e?new xr:1===e?new xr(arguments[0]):2===e?new xr(arguments[0],arguments[1]):new xr(arguments[0],arguments[1],arguments[2]);if(0===e)n=new en(0);else if(1===e)if(Ct(arguments[0]))n=new en(2*arguments[0]);else if(ve(arguments[0]))if((r=(n=arguments[0]).length)&&s(n)&&or(n[0])){if(n=function(t,e){var n,r,i,o;for(n=e.length,o=0,i=0;i<n;i++){if(!or(r=e[i]))return null;t[o]=pr(r),t[o+1]=gr(r),o+=2}return t}(new en(2*r),n),null===n){if(!ar(r))throw new RangeError(Y("invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.",r));n=new en(arguments[0])}}else{if(fr(n))n=yr(n,0);else if(lr(n))n=mr(n,0);else if(!ar(r))throw new RangeError(Y("invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.",r));n=new en(n)}else if(qn(arguments[0])){if(!Mt((n=arguments[0]).byteLength/vr))throw new RangeError(Y("invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.",vr,n.byteLength));n=new en(n)}else{if(!l(arguments[0]))throw new TypeError(Y("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",arguments[0]));if(n=arguments[0],!1===br)throw new TypeError(Y("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.",n));if(!vt(n[hr]))throw new TypeError(Y("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",n));if(!vt((n=n[hr]()).next))throw new TypeError(Y("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",n));if((n=dr(n))instanceof Error)throw n;n=new en(n)}else{if(!qn(n=arguments[0]))throw new TypeError(Y("invalid argument. First argument must be an ArrayBuffer. Value: `%s`.",n));if(!Ct(t=arguments[1]))throw new TypeError(Y("invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.",t));if(!Mt(t/vr))throw new RangeError(Y("invalid argument. Byte offset must be a multiple of %u. Value: `%u`.",vr,t));if(2===e){if(!Mt((r=n.byteLength-t)/vr))throw new RangeError(Y("invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.",vr,r));n=new en(n,t)}else{if(!Ct(r=arguments[2]))throw new TypeError(Y("invalid argument. Length must be a nonnegative integer. Value: `%s`.",r));if(r*vr>n.byteLength-t)throw new RangeError(Y("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",r*vr));n=new en(n,t,2*r)}}return K(this,"_buffer",n),K(this,"_length",n.length/2),this}function Tr(t){return t.re}function Vr(t){return t.im}function Or(t){var e,n,r;for(e=[];!(n=t.next()).done;)if(Gn(r=n.value)&&r.length>=2)e.push(r[0],r[1]);else{if(!or(r))return new TypeError(Y("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",r));e.push(Tr(r),Vr(r))}return e}K(xr,"BYTES_PER_ELEMENT",vr),K(xr,"name","Complex64Array"),K(xr,"from",(function(t){var e,n,r,i,o,a,u,f,s,c,h,p;if(!vt(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!_r(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((n=arguments.length)>1){if(!vt(r=arguments[1]))throw new TypeError(Y("invalid argument. Second argument must be a function. Value: `%s`.",r));n>2&&(e=arguments[2])}if(wr(t)){if(f=t.length,r){for(o=(i=new this(f))._buffer,p=0,h=0;h<f;h++){if(or(c=r.call(e,t.get(h),h)))o[p]=pr(c),o[p+1]=gr(c);else{if(!(Gn(c)&&c.length>=2))throw new TypeError(Y("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",c));o[p]=c[0],o[p+1]=c[1]}p+=2}return i}return new this(t)}if(ve(t)){if(r){for(f=t.length,u=t.get&&t.set?De("default"):Ne("default"),h=0;h<f;h++)if(!or(u(t,h))){s=!0;break}if(s){if(!ar(f))throw new RangeError(Y("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]=r.call(e,u(t,h),h);return i}for(o=(i=new this(f))._buffer,p=0,h=0;h<f;h++){if(or(c=r.call(e,u(t,h),h)))o[p]=pr(c),o[p+1]=gr(c);else{if(!(Gn(c)&&c.length>=2))throw new TypeError(Y("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",c));o[p]=c[0],o[p+1]=c[1]}p+=2}return i}return new this(t)}if(l(t)&&br&&vt(t[hr])){if(!vt((o=t[hr]()).next))throw new TypeError(Y("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",t));if(a=r?function(t,e,n){var r,i,o,a;for(r=[],a=-1;!(i=t.next()).done;)if(a+=1,Gn(o=e.call(n,i.value,a))&&o.length>=2)r.push(o[0],o[1]);else{if(!or(o))return new TypeError(Y("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",o));r.push(pr(o),gr(o))}return r}(o,r,e):dr(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(Y("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",t))})),K(xr,"of",(function(){var t,e;if(!vt(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!_r(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(t=[],e=0;e<arguments.length;e++)t.push(arguments[e]);return new this(t)})),K(xr.prototype,"at",(function(t){if(!wr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Mt(t))throw new TypeError(Y("invalid argument. Must provide an integer. Value: `%s`.",t));if(t<0&&(t+=this._length),!(t<0||t>=this._length))return Er(this._buffer,t)})),$t(xr.prototype,"buffer",(function(){return this._buffer.buffer})),$t(xr.prototype,"byteLength",(function(){return this._buffer.byteLength})),$t(xr.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),K(xr.prototype,"BYTES_PER_ELEMENT",xr.BYTES_PER_ELEMENT),K(xr.prototype,"copyWithin",(function(t,e){if(!wr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return 2===arguments.length?this._buffer.copyWithin(2*t,2*e):this._buffer.copyWithin(2*t,2*e,2*arguments[2]),this})),K(xr.prototype,"entries",(function(){var t,e,n,r,i,o;if(!wr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return t=this,r=this._buffer,n=this._length,o=-1,K(e={},"next",(function(){if(o+=1,i||o>=n)return{done:!0};return{value:[o,Er(r,o)],done:!1}})),K(e,"return",(function(t){if(i=!0,arguments.length)return{value:t,done:!0};return{done:!0}})),hr&&K(e,hr,(function(){return t.entries()})),e})),K(xr.prototype,"every",(function(t,e){var n,r;if(!wr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));for(n=this._buffer,r=0;r<this._length;r++)if(!t.call(e,Er(n,r),r,this))return!1;return!0})),K(xr.prototype,"fill",(function(t,e,n){var r,i,o,a,u,f;if(!wr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!or(t))throw new TypeError(Y("invalid argument. First argument must be a complex number. Value: `%s`.",t));if(r=this._buffer,i=this._length,arguments.length>1){if(!Mt(e))throw new TypeError(Y("invalid argument. Second argument must be an integer. Value: `%s`.",e));if(e<0&&(e+=i)<0&&(e=0),arguments.length>2){if(!Mt(n))throw new TypeError(Y("invalid argument. Third argument must be an integer. Value: `%s`.",n));n<0&&(n+=i)<0&&(n=0),n>i&&(n=i)}else n=i}else e=0,n=i;for(a=pr(t),u=gr(t),f=e;f<n;f++)r[o=2*f]=a,r[o+1]=u;return this})),K(xr.prototype,"filter",(function(t,e){var n,r,i,o;if(!wr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));for(n=this._buffer,r=[],i=0;i<this._length;i++)o=Er(n,i),t.call(e,o,i,this)&&r.push(o);return new this.constructor(r)})),K(xr.prototype,"find",(function(t,e){var n,r,i;if(!wr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));for(n=this._buffer,r=0;r<this._length;r++)if(i=Er(n,r),t.call(e,i,r,this))return i})),K(xr.prototype,"findIndex",(function(t,e){var n,r,i;if(!wr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));for(n=this._buffer,r=0;r<this._length;r++)if(i=Er(n,r),t.call(e,i,r,this))return r;return-1})),K(xr.prototype,"findLast",(function(t,e){var n,r,i;if(!wr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));for(n=this._buffer,r=this._length-1;r>=0;r--)if(i=Er(n,r),t.call(e,i,r,this))return i})),K(xr.prototype,"findLastIndex",(function(t,e){var n,r,i;if(!wr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));for(n=this._buffer,r=this._length-1;r>=0;r--)if(i=Er(n,r),t.call(e,i,r,this))return r;return-1})),K(xr.prototype,"forEach",(function(t,e){var n,r,i;if(!wr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));for(n=this._buffer,r=0;r<this._length;r++)i=Er(n,r),t.call(e,i,r,this)})),K(xr.prototype,"get",(function(t){if(!wr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ct(t))throw new TypeError(Y("invalid argument. Must provide a nonnegative integer. Value: `%s`.",t));if(!(t>=this._length))return Er(this._buffer,t)})),K(xr.prototype,"includes",(function(t,e){var n,r,i,o,a;if(!wr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!or(t))throw new TypeError(Y("invalid argument. First argument must be a complex number. Value: `%s`.",t));if(arguments.length>1){if(!Mt(e))throw new TypeError(Y("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0&&(e+=this._length)<0&&(e=0)}else e=0;for(i=pr(t),o=gr(t),n=this._buffer,a=e;a<this._length;a++)if(i===n[r=2*a]&&o===n[r+1])return!0;return!1})),K(xr.prototype,"indexOf",(function(t,e){var n,r,i,o,a;if(!wr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!or(t))throw new TypeError(Y("invalid argument. First argument must be a complex number. Value: `%s`.",t));if(arguments.length>1){if(!Mt(e))throw new TypeError(Y("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0&&(e+=this._length)<0&&(e=0)}else e=0;for(i=pr(t),o=gr(t),n=this._buffer,a=e;a<this._length;a++)if(i===n[r=2*a]&&o===n[r+1])return a;return-1})),K(xr.prototype,"join",(function(t){var e,n,r,i;if(!wr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(0===arguments.length)r=",";else{if(!Wt(t))throw new TypeError(Y("invalid argument. First argument must be a string. Value: `%s`.",t));r=t}for(e=[],n=this._buffer,i=0;i<this._length;i++)e.push(Er(n,i).toString());return e.join(r)})),K(xr.prototype,"keys",(function(){var t,e,n,r,i;if(!wr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return t=this,n=this._length,i=-1,K(e={},"next",(function(){if(i+=1,r||i>=n)return{done:!0};return{value:i,done:!1}})),K(e,"return",(function(t){if(r=!0,arguments.length)return{value:t,done:!0};return{done:!0}})),hr&&K(e,hr,(function(){return t.keys()})),e})),K(xr.prototype,"lastIndexOf",(function(t,e){var n,r,i,o,a;if(!wr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!or(t))throw new TypeError(Y("invalid argument. First argument must be a complex number. Value: `%s`.",t));if(arguments.length>1){if(!Mt(e))throw new TypeError(Y("invalid argument. Second argument must be an integer. Value: `%s`.",e));e>=this._length?e=this._length-1:e<0&&(e+=this._length)}else e=this._length-1;for(i=pr(t),o=gr(t),n=this._buffer,a=e;a>=0;a--)if(i===n[r=2*a]&&o===n[r+1])return a;return-1})),$t(xr.prototype,"length",(function(){return this._length})),K(xr.prototype,"map",(function(t,e){var n,r,i,o,a;if(!wr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));for(r=this._buffer,n=(i=new this.constructor(this._length))._buffer,o=0;o<this._length;o++)if(or(a=t.call(e,Er(r,o),o,this)))n[2*o]=pr(a),n[2*o+1]=gr(a);else{if(!Gn(a)||2!==a.length)throw new TypeError(Y("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",a));n[2*o]=a[0],n[2*o+1]=a[1]}return i})),K(xr.prototype,"reduce",(function(t,e){var n,r,i,o;if(!wr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));if(n=this._buffer,i=this._length,arguments.length>1)r=e,o=0;else{if(0===i)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");r=Er(n,0),o=1}for(;o<i;o++)r=t(r,Er(n,o),o,this);return r})),K(xr.prototype,"reduceRight",(function(t,e){var n,r,i,o;if(!wr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));if(n=this._buffer,i=this._length,arguments.length>1)r=e,o=i-1;else{if(0===i)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");r=Er(n,i-1),o=i-2}for(;o>=0;o--)r=t(r,Er(n,o),o,this);return r})),K(xr.prototype,"reverse",(function(){var t,e,n,r,i,o;if(!wr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(n=this._length,t=this._buffer,r=Bt(n/2),i=0;i<r;i++)o=n-i-1,e=t[2*i],t[2*i]=t[2*o],t[2*o]=e,e=t[2*i+1],t[2*i+1]=t[2*o+1],t[2*o+1]=e;return this})),K(xr.prototype,"set",(function(t){var e,n,r,i,o,a,u,f,s;if(!wr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(r=this._buffer,arguments.length>1){if(!Ct(n=arguments[1]))throw new TypeError(Y("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",n))}else n=0;if(or(t)){if(n>=this._length)throw new RangeError(Y("invalid argument. Index argument is out-of-bounds. Value: `%u`.",n));return r[n*=2]=pr(t),void(r[n+1]=gr(t))}if(wr(t)){if(n+(a=t._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(e=t._buffer,s=r.byteOffset+n*vr,e.buffer===r.buffer&&e.byteOffset<s&&e.byteOffset+e.byteLength>s){for(i=new en(e.length),f=0;f<e.length;f++)i[f]=e[f];e=i}for(n*=2,s=0,f=0;f<a;f++)r[n]=e[s],r[n+1]=e[s+1],n+=2,s+=2}else{if(!ve(t))throw new TypeError(Y("invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `%s`.",t));for(a=t.length,f=0;f<a;f++)if(!or(t[f])){o=!0;break}if(o){if(!ar(a))throw new RangeError(Y("invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.",a));if(n+a/2>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(e=t,s=r.byteOffset+n*vr,e.buffer===r.buffer&&e.byteOffset<s&&e.byteOffset+e.byteLength>s){for(i=new en(a),f=0;f<a;f++)i[f]=e[f];e=i}for(n*=2,a/=2,s=0,f=0;f<a;f++)r[n]=e[s],r[n+1]=e[s+1],n+=2,s+=2;return}if(n+a>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(n*=2,f=0;f<a;f++)u=t[f],r[n]=pr(u),r[n+1]=gr(u),n+=2}})),K(xr.prototype,"slice",(function(t,e){var n,r,i,o,a,u,f;if(!wr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(a=this._buffer,u=this._length,0===arguments.length)t=0,e=u;else{if(!Mt(t))throw new TypeError(Y("invalid argument. First argument must be an integer. Value: `%s`.",t));if(t<0&&(t+=u)<0&&(t=0),1===arguments.length)e=u;else{if(!Mt(e))throw new TypeError(Y("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0?(e+=u)<0&&(e=0):e>u&&(e=u)}}for(n=t<e?e-t:0,r=(i=new this.constructor(n))._buffer,f=0;f<n;f++)o=2*(f+t),r[2*f]=a[o],r[2*f+1]=a[o+1];return i})),K(xr.prototype,"some",(function(t,e){var n,r;if(!wr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));for(n=this._buffer,r=0;r<this._length;r++)if(t.call(e,Er(n,r),r,this))return!0;return!1})),K(xr.prototype,"sort",(function(t){var e,n,r,i,o;if(!wr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));for(n=this._buffer,r=this._length,e=[],i=0;i<r;i++)e.push(Er(n,i));for(e.sort(t),i=0;i<r;i++)n[o=2*i]=pr(e[i]),n[o+1]=gr(e[i]);return this})),K(xr.prototype,"subarray",(function(t,e){var n,r,i;if(!wr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(r=this._buffer,i=this._length,0===arguments.length)t=0,e=i;else{if(!Mt(t))throw new TypeError(Y("invalid argument. First argument must be an integer. Value: `%s`.",t));if(t<0&&(t+=i)<0&&(t=0),1===arguments.length)e=i;else{if(!Mt(e))throw new TypeError(Y("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0?(e+=i)<0&&(e=0):e>i&&(e=i)}}return t>=i?(i=0,n=r.byteLength):t>=e?(i=0,n=r.byteOffset+t*vr):(i=e-t,n=r.byteOffset+t*vr),new this.constructor(r.buffer,n,i<0?0:i)})),K(xr.prototype,"toLocaleString",(function(t,e){var n,r,i,o,a;if(!wr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(0===arguments.length)r=[];else{if(!Wt(t)&&!Kn(t))throw new TypeError(Y("invalid argument. First argument must be a string or an array of strings. Value: `%s`.",t));r=t}if(arguments.length<2)n={};else{if(!l(e))throw new TypeError(Y("invalid argument. Options argument must be an object. Value: `%s`.",e));n=e}for(o=this._buffer,i=[],a=0;a<this._length;a++)i.push(Er(o,a).toLocaleString(r,n));return i.join(",")})),K(xr.prototype,"toReversed",(function(){var t,e,n,r,i,o;if(!wr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(n=this._length,e=new this.constructor(n),r=this._buffer,t=e._buffer,i=0;i<n;i++)o=n-i-1,t[2*i]=r[2*o],t[2*i+1]=r[2*o+1];return e})),K(xr.prototype,"toSorted",(function(t){var e,n,r,i;if(!wr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));for(n=this._buffer,r=this._length,e=[],i=0;i<r;i++)e.push(Er(n,i));return e.sort(t),new xr(e)})),K(xr.prototype,"toString",(function(){var t,e,n;if(!wr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(t=[],e=this._buffer,n=0;n<this._length;n++)t.push(Er(e,n).toString());return t.join(",")})),K(xr.prototype,"values",(function(){var t,e,n,r,i,o;if(!wr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return e=this,i=this._buffer,n=this._length,o=-1,K(t={},"next",(function(){if(o+=1,r||o>=n)return{done:!0};return{value:Er(i,o),done:!1}})),K(t,"return",(function(t){if(r=!0,arguments.length)return{value:t,done:!0};return{done:!0}})),hr&&K(t,hr,(function(){return e.values()})),t})),K(xr.prototype,"with",(function(t,e){var n,r,i;if(!wr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Mt(t))throw new TypeError(Y("invalid argument. First argument must be an integer. Value: `%s`.",t));if(i=this._length,t<0&&(t+=i),t<0||t>=i)throw new RangeError(Y("invalid argument. Index argument is out-of-bounds. Value: `%s`.",t));if(!or(e))throw new TypeError(Y("invalid argument. Second argument must be a complex number. Value: `%s`.",e));return(n=(r=new this.constructor(this._buffer))._buffer)[2*t]=pr(e),n[2*t+1]=gr(e),r}));var Ar=2*Ke.BYTES_PER_ELEMENT,jr=cr();function Sr(t){return t instanceof Ir||"object"==typeof t&&null!==t&&("Complex64Array"===t.constructor.name||"Complex128Array"===t.constructor.name)&&"number"==typeof t._length&&"object"==typeof t._buffer}function Lr(t){return t===Ir||"Complex64Array"===t.name}function Fr(t,e){return new tr(t[e*=2],t[e+1])}function Ir(){var t,e,n,r;if(e=arguments.length,!(this instanceof Ir))return 0===e?new Ir:1===e?new Ir(arguments[0]):2===e?new Ir(arguments[0],arguments[1]):new Ir(arguments[0],arguments[1],arguments[2]);if(0===e)n=new Ke(0);else if(1===e)if(Ct(arguments[0]))n=new Ke(2*arguments[0]);else if(ve(arguments[0]))if((r=(n=arguments[0]).length)&&s(n)&&or(n[0])){if(n=function(t,e){var n,r,i,o;for(n=e.length,o=0,i=0;i<n;i++){if(!or(r=e[i]))return null;t[o]=Tr(r),t[o+1]=Vr(r),o+=2}return t}(new Ke(2*r),n),null===n){if(!ar(r))throw new RangeError(Y("invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.",r));n=new Ke(arguments[0])}}else{if(fr(n))n=yr(n,0);else if(lr(n))n=mr(n,0);else if(!ar(r))throw new RangeError(Y("invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.",r));n=new Ke(n)}else if(qn(arguments[0])){if(!Mt((n=arguments[0]).byteLength/Ar))throw new RangeError(Y("invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.",Ar,n.byteLength));n=new Ke(n)}else{if(!l(arguments[0]))throw new TypeError(Y("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",arguments[0]));if(n=arguments[0],!1===jr)throw new TypeError(Y("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.",n));if(!vt(n[hr]))throw new TypeError(Y("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",n));if(!vt((n=n[hr]()).next))throw new TypeError(Y("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",n));if((n=Or(n))instanceof Error)throw n;n=new Ke(n)}else{if(!qn(n=arguments[0]))throw new TypeError(Y("invalid argument. First argument must be an ArrayBuffer. Value: `%s`.",n));if(!Ct(t=arguments[1]))throw new TypeError(Y("invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.",t));if(!Mt(t/Ar))throw new RangeError(Y("invalid argument. Byte offset must be a multiple of %u. Value: `%u`.",Ar,t));if(2===e){if(!Mt((r=n.byteLength-t)/Ar))throw new RangeError(Y("invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.",Ar,r));n=new Ke(n,t)}else{if(!Ct(r=arguments[2]))throw new TypeError(Y("invalid argument. Length must be a nonnegative integer. Value: `%s`.",r));if(r*Ar>n.byteLength-t)throw new RangeError(Y("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",r*Ar));n=new Ke(n,t,2*r)}}return K(this,"_buffer",n),K(this,"_length",n.length/2),this}function Rr(t){var e,n;for(e=[];!(n=t.next()).done;)e.push(H(n.value));return e}K(Ir,"BYTES_PER_ELEMENT",Ar),K(Ir,"name","Complex128Array"),K(Ir,"from",(function(t){var e,n,r,i,o,a,u,f,s,c,h,p;if(!vt(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Lr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((n=arguments.length)>1){if(!vt(r=arguments[1]))throw new TypeError(Y("invalid argument. Second argument must be a function. Value: `%s`.",r));n>2&&(e=arguments[2])}if(Sr(t)){if(f=t.length,r){for(o=(i=new this(f))._buffer,p=0,h=0;h<f;h++){if(or(c=r.call(e,t.get(h),h)))o[p]=Tr(c),o[p+1]=Vr(c);else{if(!(Gn(c)&&c.length>=2))throw new TypeError(Y("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",c));o[p]=c[0],o[p+1]=c[1]}p+=2}return i}return new this(t)}if(ve(t)){if(r){for(f=t.length,u=t.get&&t.set?De("default"):Ne("default"),h=0;h<f;h++)if(!or(u(t,h))){s=!0;break}if(s){if(!ar(f))throw new RangeError(Y("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]=r.call(e,u(t,h),h);return i}for(o=(i=new this(f))._buffer,p=0,h=0;h<f;h++){if(or(c=r.call(e,u(t,h),h)))o[p]=Tr(c),o[p+1]=Vr(c);else{if(!(Gn(c)&&c.length>=2))throw new TypeError(Y("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",c));o[p]=c[0],o[p+1]=c[1]}p+=2}return i}return new this(t)}if(l(t)&&jr&&vt(t[hr])){if(!vt((o=t[hr]()).next))throw new TypeError(Y("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",t));if(a=r?function(t,e,n){var r,i,o,a;for(r=[],a=-1;!(i=t.next()).done;)if(a+=1,Gn(o=e.call(n,i.value,a))&&o.length>=2)r.push(o[0],o[1]);else{if(!or(o))return new TypeError(Y("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",o));r.push(Tr(o),Vr(o))}return r}(o,r,e):Or(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(Y("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",t))})),K(Ir,"of",(function(){var t,e;if(!vt(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Lr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(t=[],e=0;e<arguments.length;e++)t.push(arguments[e]);return new this(t)})),K(Ir.prototype,"at",(function(t){if(!Sr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Mt(t))throw new TypeError(Y("invalid argument. Must provide an integer. Value: `%s`.",t));if(t<0&&(t+=this._length),!(t<0||t>=this._length))return Fr(this._buffer,t)})),$t(Ir.prototype,"buffer",(function(){return this._buffer.buffer})),$t(Ir.prototype,"byteLength",(function(){return this._buffer.byteLength})),$t(Ir.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),K(Ir.prototype,"BYTES_PER_ELEMENT",Ir.BYTES_PER_ELEMENT),K(Ir.prototype,"copyWithin",(function(t,e){if(!Sr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return 2===arguments.length?this._buffer.copyWithin(2*t,2*e):this._buffer.copyWithin(2*t,2*e,2*arguments[2]),this})),K(Ir.prototype,"entries",(function(){var t,e,n,r,i,o,a;if(!Sr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return e=this,t=this._buffer,r=this._length,o=-1,a=-2,K(n={},"next",(function(){var e;if(o+=1,i||o>=r)return{done:!0};return e=new tr(t[a+=2],t[a+1]),{value:[o,e],done:!1}})),K(n,"return",(function(t){if(i=!0,arguments.length)return{value:t,done:!0};return{done:!0}})),hr&&K(n,hr,(function(){return e.entries()})),n})),K(Ir.prototype,"every",(function(t,e){var n,r;if(!Sr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));for(n=this._buffer,r=0;r<this._length;r++)if(!t.call(e,Fr(n,r),r,this))return!1;return!0})),K(Ir.prototype,"fill",(function(t,e,n){var r,i,o,a,u,f;if(!Sr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!or(t))throw new TypeError(Y("invalid argument. First argument must be a complex number. Value: `%s`.",t));if(r=this._buffer,i=this._length,arguments.length>1){if(!Mt(e))throw new TypeError(Y("invalid argument. Second argument must be an integer. Value: `%s`.",e));if(e<0&&(e+=i)<0&&(e=0),arguments.length>2){if(!Mt(n))throw new TypeError(Y("invalid argument. Third argument must be an integer. Value: `%s`.",n));n<0&&(n+=i)<0&&(n=0),n>i&&(n=i)}else n=i}else e=0,n=i;for(a=Tr(t),u=Vr(t),f=e;f<n;f++)r[o=2*f]=a,r[o+1]=u;return this})),K(Ir.prototype,"filter",(function(t,e){var n,r,i,o;if(!Sr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));for(n=this._buffer,r=[],i=0;i<this._length;i++)o=Fr(n,i),t.call(e,o,i,this)&&r.push(o);return new this.constructor(r)})),K(Ir.prototype,"find",(function(t,e){var n,r,i;if(!Sr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));for(n=this._buffer,r=0;r<this._length;r++)if(i=Fr(n,r),t.call(e,i,r,this))return i})),K(Ir.prototype,"findIndex",(function(t,e){var n,r,i;if(!Sr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));for(n=this._buffer,r=0;r<this._length;r++)if(i=Fr(n,r),t.call(e,i,r,this))return r;return-1})),K(Ir.prototype,"findLast",(function(t,e){var n,r,i;if(!Sr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));for(n=this._buffer,r=this._length-1;r>=0;r--)if(i=Fr(n,r),t.call(e,i,r,this))return i})),K(Ir.prototype,"findLastIndex",(function(t,e){var n,r,i;if(!Sr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));for(n=this._buffer,r=this._length-1;r>=0;r--)if(i=Fr(n,r),t.call(e,i,r,this))return r;return-1})),K(Ir.prototype,"forEach",(function(t,e){var n,r,i;if(!Sr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));for(n=this._buffer,r=0;r<this._length;r++)i=Fr(n,r),t.call(e,i,r,this)})),K(Ir.prototype,"get",(function(t){if(!Sr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Ct(t))throw new TypeError(Y("invalid argument. Must provide a nonnegative integer. Value: `%s`.",t));if(!(t>=this._length))return Fr(this._buffer,t)})),$t(Ir.prototype,"length",(function(){return this._length})),K(Ir.prototype,"includes",(function(t,e){var n,r,i,o,a;if(!Sr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!or(t))throw new TypeError(Y("invalid argument. First argument must be a complex number. Value: `%s`.",t));if(arguments.length>1){if(!Mt(e))throw new TypeError(Y("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0&&(e+=this._length)<0&&(e=0)}else e=0;for(i=Tr(t),o=Vr(t),n=this._buffer,a=e;a<this._length;a++)if(i===n[r=2*a]&&o===n[r+1])return!0;return!1})),K(Ir.prototype,"indexOf",(function(t,e){var n,r,i,o,a;if(!Sr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!or(t))throw new TypeError(Y("invalid argument. First argument must be a complex number. Value: `%s`.",t));if(arguments.length>1){if(!Mt(e))throw new TypeError(Y("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0&&(e+=this._length)<0&&(e=0)}else e=0;for(i=Tr(t),o=Vr(t),n=this._buffer,a=e;a<this._length;a++)if(i===n[r=2*a]&&o===n[r+1])return a;return-1})),K(Ir.prototype,"join",(function(t){var e,n,r,i;if(!Sr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(0===arguments.length)r=",";else{if(!Kt(t))throw new TypeError(Y("invalid argument. First argument must be a string. Value: `%s`.",t));r=t}for(e=[],n=this._buffer,i=0;i<this._length;i++)e.push(Fr(n,i).toString());return e.join(r)})),K(Ir.prototype,"keys",(function(){var t,e,n,r,i;if(!Sr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return t=this,n=this._length,i=-1,K(e={},"next",(function(){if(i+=1,r||i>=n)return{done:!0};return{value:i,done:!1}})),K(e,"return",(function(t){if(r=!0,arguments.length)return{value:t,done:!0};return{done:!0}})),hr&&K(e,hr,(function(){return t.keys()})),e})),K(Ir.prototype,"lastIndexOf",(function(t,e){var n,r,i,o,a;if(!Sr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!or(t))throw new TypeError(Y("invalid argument. First argument must be a complex number. Value: `%s`.",t));if(arguments.length>1){if(!Mt(e))throw new TypeError(Y("invalid argument. Second argument must be an integer. Value: `%s`.",e));e>=this._length?e=this._length-1:e<0&&(e+=this._length)}else e=this._length-1;for(i=Tr(t),o=Vr(t),n=this._buffer,a=e;a>=0;a--)if(i===n[r=2*a]&&o===n[r+1])return a;return-1})),K(Ir.prototype,"map",(function(t,e){var n,r,i,o,a;if(!Sr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));for(r=this._buffer,n=(i=new this.constructor(this._length))._buffer,o=0;o<this._length;o++)if(or(a=t.call(e,Fr(r,o),o,this)))n[2*o]=Tr(a),n[2*o+1]=Vr(a);else{if(!Gn(a)||2!==a.length)throw new TypeError(Y("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",a));n[2*o]=a[0],n[2*o+1]=a[1]}return i})),K(Ir.prototype,"reduce",(function(t,e){var n,r,i,o;if(!Sr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));if(n=this._buffer,i=this._length,arguments.length>1)r=e,o=0;else{if(0===i)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");r=Fr(n,0),o=1}for(;o<i;o++)r=t(r,Fr(n,o),o,this);return r})),K(Ir.prototype,"reduceRight",(function(t,e){var n,r,i,o;if(!Sr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));if(n=this._buffer,i=this._length,arguments.length>1)r=e,o=i-1;else{if(0===i)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");r=Fr(n,i-1),o=i-2}for(;o>=0;o--)r=t(r,Fr(n,o),o,this);return r})),K(Ir.prototype,"reverse",(function(){var t,e,n,r,i,o;if(!Sr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(n=this._length,t=this._buffer,r=Bt(n/2),i=0;i<r;i++)o=n-i-1,e=t[2*i],t[2*i]=t[2*o],t[2*o]=e,e=t[2*i+1],t[2*i+1]=t[2*o+1],t[2*o+1]=e;return this})),K(Ir.prototype,"set",(function(t){var e,n,r,i,o,a,u,f,s;if(!Sr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(r=this._buffer,arguments.length>1){if(!Ct(n=arguments[1]))throw new TypeError(Y("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",n))}else n=0;if(or(t)){if(n>=this._length)throw new RangeError(Y("invalid argument. Index argument is out-of-bounds. Value: `%u`.",n));return r[n*=2]=Tr(t),void(r[n+1]=Vr(t))}if(Sr(t)){if(n+(a=t._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(e=t._buffer,s=r.byteOffset+n*Ar,e.buffer===r.buffer&&e.byteOffset<s&&e.byteOffset+e.byteLength>s){for(i=new Ke(e.length),f=0;f<e.length;f++)i[f]=e[f];e=i}for(n*=2,s=0,f=0;f<a;f++)r[n]=e[s],r[n+1]=e[s+1],n+=2,s+=2}else{if(!ve(t))throw new TypeError(Y("invalid argument. First argument must be either a complex number, an array-like object, or a complex number array. Value: `%s`.",t));for(a=t.length,f=0;f<a;f++)if(!or(t[f])){o=!0;break}if(o){if(!ar(a))throw new RangeError(Y("invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.",a));if(n+a/2>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(e=t,s=r.byteOffset+n*Ar,e.buffer===r.buffer&&e.byteOffset<s&&e.byteOffset+e.byteLength>s){for(i=new Ke(a),f=0;f<a;f++)i[f]=e[f];e=i}for(n*=2,a/=2,s=0,f=0;f<a;f++)r[n]=e[s],r[n+1]=e[s+1],n+=2,s+=2;return}if(n+a>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(n*=2,f=0;f<a;f++)u=t[f],r[n]=Tr(u),r[n+1]=Vr(u),n+=2}})),K(Ir.prototype,"slice",(function(t,e){var n,r,i,o,a,u,f;if(!Sr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(a=this._buffer,u=this._length,0===arguments.length)t=0,e=u;else{if(!Mt(t))throw new TypeError(Y("invalid argument. First argument must be an integer. Value: `%s`.",t));if(t<0&&(t+=u)<0&&(t=0),1===arguments.length)e=u;else{if(!Mt(e))throw new TypeError(Y("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0?(e+=u)<0&&(e=0):e>u&&(e=u)}}for(n=t<e?e-t:0,r=(i=new this.constructor(n))._buffer,f=0;f<n;f++)o=2*(f+t),r[2*f]=a[o],r[2*f+1]=a[o+1];return i})),K(Ir.prototype,"some",(function(t,e){var n,r;if(!Sr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));for(n=this._buffer,r=0;r<this._length;r++)if(t.call(e,Fr(n,r),r,this))return!0;return!1})),K(Ir.prototype,"sort",(function(t){var e,n,r,i,o;if(!Sr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));for(n=this._buffer,r=this._length,e=[],i=0;i<r;i++)e.push(Fr(n,i));for(e.sort(t),i=0;i<r;i++)n[o=2*i]=Tr(e[i]),n[o+1]=Vr(e[i]);return this})),K(Ir.prototype,"subarray",(function(t,e){var n,r,i;if(!Sr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(r=this._buffer,i=this._length,0===arguments.length)t=0,e=i;else{if(!Mt(t))throw new TypeError(Y("invalid argument. First argument must be an integer. Value: `%s`.",t));if(t<0&&(t+=i)<0&&(t=0),1===arguments.length)e=i;else{if(!Mt(e))throw new TypeError(Y("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0?(e+=i)<0&&(e=0):e>i&&(e=i)}}return t>=i?(i=0,n=r.byteLength):t>=e?(i=0,n=r.byteOffset+t*Ar):(i=e-t,n=r.byteOffset+t*Ar),new this.constructor(r.buffer,n,i<0?0:i)})),K(Ir.prototype,"toLocaleString",(function(t,e){var n,r,i,o,a;if(!Sr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(0===arguments.length)r=[];else{if(!Kt(t)&&!Kn(t))throw new TypeError(Y("invalid argument. First argument must be a string or an array of strings. Value: `%s`.",t));r=t}if(arguments.length<2)n={};else{if(!l(e))throw new TypeError(Y("invalid argument. Options argument must be an object. Value: `%s`.",e));n=e}for(o=this._buffer,i=[],a=0;a<this._length;a++)i.push(Fr(o,a).toLocaleString(r,n));return i.join(",")})),K(Ir.prototype,"toReversed",(function(){var t,e,n,r,i,o;if(!Sr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(n=this._length,e=new this.constructor(n),r=this._buffer,t=e._buffer,i=0;i<n;i++)o=n-i-1,t[2*i]=r[2*o],t[2*i+1]=r[2*o+1];return e})),K(Ir.prototype,"toSorted",(function(t){var e,n,r,i;if(!Sr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));for(n=this._buffer,r=this._length,e=[],i=0;i<r;i++)e.push(Fr(n,i));return e.sort(t),new Ir(e)})),K(Ir.prototype,"toString",(function(){var t,e,n;if(!Sr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(t=[],e=this._buffer,n=0;n<this._length;n++)t.push(Fr(e,n).toString());return t.join(",")})),K(Ir.prototype,"values",(function(){var t,e,n,r,i,o;if(!Sr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return e=this,i=this._buffer,n=this._length,o=-1,K(t={},"next",(function(){if(o+=1,r||o>=n)return{done:!0};return{value:Fr(i,o),done:!1}})),K(t,"return",(function(t){if(r=!0,arguments.length)return{value:t,done:!0};return{done:!0}})),hr&&K(t,hr,(function(){return e.values()})),t})),K(Ir.prototype,"with",(function(t,e){var n,r,i;if(!Sr(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Mt(t))throw new TypeError(Y("invalid argument. First argument must be an integer. Value: `%s`.",t));if(i=this._length,t<0&&(t+=i),t<0||t>=i)throw new RangeError(Y("invalid argument. Index argument is out-of-bounds. Value: `%s`.",t));if(!or(e))throw new TypeError(Y("invalid argument. Second argument must be a complex number. Value: `%s`.",e));return(n=(r=new this.constructor(this._buffer))._buffer)[2*t]=Tr(e),n[2*t+1]=Vr(e),r}));var Br=Rn.BYTES_PER_ELEMENT,Mr=cr();function kr(t){return"object"==typeof t&&null!==t&&"BooleanArray"===t.constructor.name&&t.BYTES_PER_ELEMENT===Br}function Ur(t){return t===Nr}function Nr(){var t,e,n,r,i;if(e=arguments.length,!(this instanceof Nr))return 0===e?new Nr:1===e?new Nr(arguments[0]):2===e?new Nr(arguments[0],arguments[1]):new Nr(arguments[0],arguments[1],arguments[2]);if(0===e)n=new Rn(0);else if(1===e)if(Ct(i=arguments[0]))n=new Rn(i);else if(ve(i))n=function(t,e){var n,r;for(n=e.length,r=0;r<n;r++)t[r]=H(e[r]);return t}(new Rn(i.length),i);else if(qn(i))n=new Rn(i);else{if(!l(i))throw new TypeError(Y("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",i));if(!1===Mr)throw new TypeError(Y("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.",i));if(!vt(i[hr]))throw new TypeError(Y("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",i));if(!vt((n=i[hr]()).next))throw new TypeError(Y("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",i));n=new Rn(Rr(n))}else{if(!qn(n=arguments[0]))throw new TypeError(Y("invalid argument. First argument must be an ArrayBuffer. Value: `%s`.",n));if(!Ct(t=arguments[1]))throw new TypeError(Y("invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.",t));if(2===e)n=new Rn(n,t);else{if(!Ct(r=arguments[2]))throw new TypeError(Y("invalid argument. Length must be a nonnegative integer. Value: `%s`.",r));if(r*Br>n.byteLength-t)throw new RangeError(Y("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",r*Br));n=new Rn(n,t,r)}}return K(this,"_buffer",n),K(this,"_length",n.length),this}K(Nr,"BYTES_PER_ELEMENT",Br),K(Nr,"name","BooleanArray"),K(Nr,"from",(function(t){var e,n,r,i,o,a,u,f,s;if(!vt(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Ur(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if((n=arguments.length)>1){if(!vt(r=arguments[1]))throw new TypeError(Y("invalid argument. Second argument must be a function. Value: `%s`.",r));n>2&&(e=arguments[2])}if(ve(t)){if(r){for(f=t.length,u=t.get&&t.set?De("default"):Ne("default"),o=(i=new this(f))._buffer,s=0;s<f;s++)o[s]=H(r.call(e,u(t,s),s));return i}return new this(t)}if(l(t)&&Mr&&vt(t[hr])){if(!vt((o=t[hr]()).next))throw new TypeError(Y("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",t));for(a=r?function(t,e,n){var r,i,o;for(r=[],o=-1;!(i=t.next()).done;)o+=1,r.push(H(e.call(n,i.value,o)));return r}(o,r,e):Rr(o),o=(i=new this(f=a.length))._buffer,s=0;s<f;s++)o[s]=a[s];return i}throw new TypeError(Y("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",t))})),K(Nr,"of",(function(){var t,e;if(!vt(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Ur(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");for(t=[],e=0;e<arguments.length;e++)t.push(arguments[e]);return new this(t)})),K(Nr.prototype,"at",(function(t){var e,n;if(!kr(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Ut(t))throw new TypeError(Y("invalid argument. Must provide an integer. Value: `%s`.",t));if(n=this._length,e=this._buffer,t<0&&(t+=n),!(t<0||t>=n))return H(e[t])})),$t(Nr.prototype,"buffer",(function(){return this._buffer.buffer})),$t(Nr.prototype,"byteLength",(function(){return this._buffer.byteLength})),$t(Nr.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),K(Nr.prototype,"BYTES_PER_ELEMENT",Nr.BYTES_PER_ELEMENT),K(Nr.prototype,"copyWithin",(function(t,e){if(!kr(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");return 2===arguments.length?this._buffer.copyWithin(t,e):this._buffer.copyWithin(t,e,arguments[2]),this})),K(Nr.prototype,"entries",(function(){var t,e,n,r,i,o;if(!kr(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");return t=this,r=this._buffer,n=this._length,o=-1,K(e={},"next",(function(){if(o+=1,i||o>=n)return{done:!0};return{value:[o,H(r[o])],done:!1}})),K(e,"return",(function(t){if(i=!0,arguments.length)return{value:t,done:!0};return{done:!0}})),hr&&K(e,hr,(function(){return t.entries()})),e})),K(Nr.prototype,"every",(function(t,e){var n,r;if(!kr(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));for(n=this._buffer,r=0;r<this._length;r++)if(!t.call(e,H(n[r]),r,this))return!1;return!0})),K(Nr.prototype,"fill",(function(t,e,n){var r,i,o,a;if(!kr(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!X(t))throw new TypeError(Y("invalid argument. First argument must be a boolean. Value: `%s`.",t));if(r=this._buffer,i=this._length,arguments.length>1){if(!Ut(e))throw new TypeError(Y("invalid argument. Second argument must be an integer. Value: `%s`.",e));if(e<0&&(e+=i)<0&&(e=0),arguments.length>2){if(!Ut(n))throw new TypeError(Y("invalid argument. Third argument must be an integer. Value: `%s`.",n));n<0&&(n+=i)<0&&(n=0),n>i&&(n=i)}else n=i}else e=0,n=i;for(o=t?1:0,a=e;a<n;a++)r[a]=o;return this})),K(Nr.prototype,"filter",(function(t,e){var n,r,i,o;if(!kr(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));for(n=this._buffer,r=[],i=0;i<this._length;i++)o=H(n[i]),t.call(e,o,i,this)&&r.push(o);return new this.constructor(r)})),K(Nr.prototype,"find",(function(t,e){var n,r,i;if(!kr(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));for(n=this._buffer,i=0;i<this._length;i++)if(r=H(n[i]),t.call(e,r,i,this))return r})),K(Nr.prototype,"findIndex",(function(t,e){var n,r,i;if(!kr(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));for(n=this._buffer,i=0;i<this._length;i++)if(r=H(n[i]),t.call(e,r,i,this))return i;return-1})),K(Nr.prototype,"findLast",(function(t,e){var n,r,i;if(!kr(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));for(n=this._buffer,i=this._length-1;i>=0;i--)if(r=H(n[i]),t.call(e,r,i,this))return r})),K(Nr.prototype,"findLastIndex",(function(t,e){var n,r,i;if(!kr(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));for(n=this._buffer,i=this._length-1;i>=0;i--)if(r=H(n[i]),t.call(e,r,i,this))return i;return-1})),K(Nr.prototype,"forEach",(function(t,e){var n,r;if(!kr(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));for(n=this._buffer,r=0;r<this._length;r++)t.call(e,H(n[r]),r,this)})),K(Nr.prototype,"get",(function(t){if(!kr(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Ct(t))throw new TypeError(Y("invalid argument. Must provide a nonnegative integer. Value: `%s`.",t));if(!(t>=this._length))return H(this._buffer[t])})),K(Nr.prototype,"includes",(function(t,e){var n,r;if(!kr(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!X(t))throw new TypeError(Y("invalid argument. First argument must be a boolean. Value: `%s`.",t));if(arguments.length>1){if(!Ut(e))throw new TypeError(Y("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0&&(e+=this._length)<0&&(e=0)}else e=0;for(n=this._buffer,r=e;r<this._length;r++)if(t===H(n[r]))return!0;return!1})),K(Nr.prototype,"indexOf",(function(t,e){var n,r;if(!kr(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!X(t))throw new TypeError(Y("invalid argument. First argument must be a boolean. Value: `%s`.",t));if(arguments.length>1){if(!Ut(e))throw new TypeError(Y("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0&&(e+=this._length)<0&&(e=0)}else e=0;for(n=this._buffer,r=e;r<this._length;r++)if(t===H(n[r]))return r;return-1})),K(Nr.prototype,"join",(function(t){var e,n,r;if(!kr(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(arguments.length>0){if(!Wt(t))throw new TypeError(Y("invalid argument. First argument must be a string. Value: `%s`.",t))}else t=",";for(e=this._buffer,n=[],r=0;r<this._length;r++)e[r]?n.push("true"):n.push("false");return n.join(t)})),K(Nr.prototype,"keys",(function(){var t,e,n,r,i;if(!kr(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");return t=this,n=this._length,i=-1,K(e={},"next",(function(){if(i+=1,r||i>=n)return{done:!0};return{value:i,done:!1}})),K(e,"return",(function(t){if(r=!0,arguments.length)return{value:t,done:!0};return{done:!0}})),hr&&K(e,hr,(function(){return t.keys()})),e})),K(Nr.prototype,"lastIndexOf",(function(t,e){var n,r;if(!kr(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!X(t))throw new TypeError(Y("invalid argument. First argument must be a boolean. Value: `%s`.",t));if(arguments.length>1){if(!Ut(e))throw new TypeError(Y("invalid argument. Second argument must be an integer. Value: `%s`.",e));e>=this._length?e=this._length-1:e<0&&(e+=this._length)}else e=this._length-1;for(n=this._buffer,r=e;r>=0;r--)if(t===H(n[r]))return r;return-1})),$t(Nr.prototype,"length",(function(){return this._length})),K(Nr.prototype,"map",(function(t,e){var n,r,i,o;if(!kr(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!vt(t))throw new TypeError("invalid argument. First argument must be a function. Value: `%s`.",t);for(i=this._buffer,n=(r=new this.constructor(this._length))._buffer,o=0;o<this._length;o++)n[o]=H(t.call(e,H(i[o]),o,this));return r})),K(Nr.prototype,"reduce",(function(t,e){var n,r,i,o;if(!kr(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));if(n=this._buffer,r=this._length,arguments.length>1)i=e,o=0;else{if(0===r)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");i=H(n[0]),o=1}for(;o<r;o++)i=t(i,H(n[o]),o,this);return i})),K(Nr.prototype,"reduceRight",(function(t,e){var n,r,i,o;if(!kr(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));if(n=this._buffer,r=this._length,arguments.length>1)i=e,o=r-1;else{if(0===r)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");i=H(n[r-1]),o=r-2}for(;o>=0;o--)i=t(i,H(n[o]),o,this);return i})),K(Nr.prototype,"reverse",(function(){var t,e,n,r,i,o;if(!kr(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");for(t=this._buffer,n=this._length,r=Bt(n/2),i=0;i<r;i++)o=n-i-1,e=t[i],t[i]=t[o],t[o]=e;return this})),K(Nr.prototype,"set",(function(t){var e,n,r,i,o,a,u;if(!kr(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(r=this._buffer,arguments.length>1){if(!Ct(n=arguments[1]))throw new TypeError(Y("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",n))}else n=0;if(ve(t)){if(n+(o=t.length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(e=kr(t)?t._buffer:t,u=r.byteOffset+n*Br,e.buffer===r.buffer&&e.byteOffset<u&&e.byteOffset+e.byteLength>u){for(i=new Rn(e.length),a=0;a<e.length;a++)i[a]=e[a];e=i}for(a=0;a<o;n++,a++)r[n]=e[a]?1:0}else{if(n>=this._length)throw new RangeError(Y("invalid argument. Index argument is out-of-bounds. Value: `%u`.",n));r[n]=t?1:0}})),K(Nr.prototype,"slice",(function(t,e){var n,r,i,o,a,u;if(!kr(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(o=this._buffer,a=this._length,0===arguments.length)t=0,e=a;else{if(!Ut(t))throw new TypeError(Y("invalid argument. First argument must be an integer. Value: `%s`.",t));if(t<0&&(t+=a)<0&&(t=0),1===arguments.length)e=a;else{if(!Ut(e))throw new TypeError(Y("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0?(e+=a)<0&&(e=0):e>a&&(e=a)}}for(n=t<e?e-t:0,r=(i=new this.constructor(n))._buffer,u=0;u<n;u++)r[u]=o[u+t];return i})),K(Nr.prototype,"some",(function(t,e){var n,r;if(!kr(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));for(n=this._buffer,r=0;r<this._length;r++)if(t.call(e,H(n[r]),r,this))return!0;return!1})),K(Nr.prototype,"sort",(function(t){var e;if(!kr(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(e=this._buffer,0===arguments.length)return e.sort(),this;if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));return e.sort((function(e,n){return t(H(e),H(n))})),this})),K(Nr.prototype,"subarray",(function(t,e){var n,r,i;if(!kr(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(r=this._buffer,i=this._length,0===arguments.length)t=0,e=i;else{if(!Ut(t))throw new TypeError(Y("invalid argument. First argument must be an integer. Value: `%s`.",t));if(t<0&&(t+=i)<0&&(t=0),1===arguments.length)e=i;else{if(!Ut(e))throw new TypeError(Y("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0?(e+=i)<0&&(e=0):e>i&&(e=i)}}return t>=i?(i=0,n=r.byteLength):t>=e?(i=0,n=r.byteOffset+t*Br):(i=e-t,n=r.byteOffset+t*Br),new this.constructor(r.buffer,n,i<0?0:i)})),K(Nr.prototype,"toLocaleString",(function(t,e){var n,r,i,o,a;if(!kr(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(0===arguments.length)r=[];else{if(!Wt(t)&&!Kn(t))throw new TypeError(Y("invalid argument. First argument must be a string or an array of strings. Value: `%s`.",t));r=t}if(arguments.length<2)n={};else{if(!l(e))throw new TypeError(Y("invalid argument. Options argument must be an object. Value: `%s`.",e));n=e}for(o=this._buffer,i=[],a=0;a<this._length;a++)i.push(H(o[a]).toLocaleString(r,n));return i.join(",")})),K(Nr.prototype,"toReversed",(function(){var t,e,n,r,i;if(!kr(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");for(n=this._length,e=new this.constructor(n),r=this._buffer,t=e._buffer,i=0;i<n;i++)t[i]=r[n-i-1];return e})),K(Nr.prototype,"toSorted",(function(t){var e,n,r,i,o;if(!kr(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");for(r=this._length,n=new this.constructor(r),i=this._buffer,e=n._buffer,o=0;o<r;o++)e[o]=i[o];if(0===arguments.length)return e.sort(),n;if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));return e.sort((function(e,n){return t(H(e),H(n))})),n})),K(Nr.prototype,"toString",(function(){var t,e,n;if(!kr(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");for(t=[],e=this._buffer,n=0;n<this._length;n++)e[n]?t.push("true"):t.push("false");return t.join(",")})),K(Nr.prototype,"values",(function(){var t,e,n,r,i,o;if(!kr(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");return e=this,i=this._buffer,n=this._length,o=-1,K(t={},"next",(function(){if(o+=1,r||o>=n)return{done:!0};return{value:H(i[o]),done:!1}})),K(t,"return",(function(t){if(r=!0,arguments.length)return{value:t,done:!0};return{done:!0}})),hr&&K(t,hr,(function(){return e.values()})),t})),K(Nr.prototype,"with",(function(t,e){var n,r;if(!kr(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Ut(t))throw new TypeError(Y("invalid argument. First argument must be an integer. Value: `%s`.",t));if(r=this._length,t<0&&(t+=r),t<0||t>=r)throw new RangeError(Y("invalid argument. Index argument is out-of-bounds. Value: `%s`.",t));if(!X(e))throw new TypeError(Y("invalid argument. Second argument must be a boolean. Value: `%s`.",e));return(n=new this.constructor(this._buffer))._buffer[t]=e?1:0,n}));var Pr=[Ke,en,gn,un,An,wn,$n,Rn,Nn,xr,Ir,Nr],Cr=["float64","float32","int32","uint32","int16","uint16","int8","uint8","uint8c","complex64","complex128","bool"],Yr=Cr.length;function Dr(t){var e;if(s(t))return"generic";if(yt(t))return null;for(e=0;e<Yr;e++)if(t instanceof Pr[e])return Cr[e];return $e[mt(t)]||null}function Jr(t){var e=Dr(t);return ke(t)?{data:t,dtype:e,accessorProtocol:!0,accessors:[De(e),ze(e)]}:{data:t,dtype:e,accessorProtocol:!1,accessors:[Ne(e),Ce(e)]}}var zr=Array.prototype.slice;function $r(t,e,n){var r;return function(t,e){return"function"==typeof t[e]}(t,"slice")?t.slice(e,n):(r=Jr(t)).accessorProtocol?function(t,e,n){var r,i,o,a;for(r=t.data,i=t.accessors[0],o=[],a=e;a<n;a++)o.push(i(r,a));return o}(r,e,n):function(t,e,n){return zr.call(t,e,n)}(t,e,n)}function Wr(t,e){return e&&(2===t||3===t)}function Gr(t,e){return e&&(1===t||3===t)}function Zr(t,e,n){var r,i,o,a,u;for(r=t.length,i=n,o=n,u=0;u<r;u++){if(0===t[u])return[n,n];(a=e[u])>0?o+=a*(t[u]-1):a<0&&(i+=a*(t[u]-1))}return[i,o]}function qr(t){return"column-major"===t}K(Zr,"assign",(function(t,e,n,r){var i,o,a,u,f;for(i=t.length,o=n,a=n,f=0;f<i;f++){if(0===t[f])return r[0]=n,r[1]=n,r;(u=e[f])>0?a+=u*(t[f]-1):u<0&&(o+=u*(t[f]-1))}return r[0]=o,r[1]=a,r}));var Kr=/[-\/\\^$*+?.()|[\]{}]/g;var Xr=RegExp.prototype.exec;var Hr=i();function Qr(t){return"object"==typeof t&&(t instanceof RegExp||(Hr?function(t){try{return Xr.call(t),!0}catch(t){return!1}}(t):"[object RegExp]"===f(t)))}function ti(t,e,n){return t.replace(e,n)}function ei(t,e,n){if(!Wt(t))throw new TypeError(Y("invalid argument. First argument must be a string. Value: `%s`.",t));if(Wt(e))e=new RegExp(function(t){var e,n;if(!Wt(t))throw new TypeError(Y("invalid argument. Must provide a regular expression string. Value: `%s`.",t));if("/"===t[0])for(n=t.length-1;n>=0&&"/"!==t[n];n--);return void 0===n||n<=0?t.replace(Kr,"\\$&"):(e=(e=t.substring(1,n)).replace(Kr,"\\$&"),t=t[0]+e+t.substring(n))}(e),"g");else if(!Qr(e))throw new TypeError(Y("invalid argument. Second argument must be a string or regular expression. Value: `%s`.",e));if(!Wt(n)&&!vt(n))throw new TypeError(Y("invalid argument. Third argument must be a string or replacement function. Value: `%s`.",n));return ti(t,e,n)}var ni={int8:"new Int8Array( [ {{data}} ] )",uint8:"new Uint8Array( [ {{data}} ] )",uint8c:"new Uint8ClampedArray( [ {{data}} ] )",int16:"new Int16Array( [ {{data}} ] )",uint16:"new Uint16Array( [ {{data}} ] )",int32:"new Int32Array( [ {{data}} ] )",uint32:"new Uint32Array( [ {{data}} ] )",float32:"new Float32Array( [ {{data}} ] )",float64:"new Float64Array( [ {{data}} ] )",generic:"[ {{data}} ]",binary:"new Buffer( [ {{data}} ] )",complex64:"new Complex64Array( [ {{data}} ] )",complex128:"new Complex128Array( [ {{data}} ] )",bool:"new BooleanArray( [ {{data}} ] )"};var ri,ii={uint16:wn,uint8:Rn};(ri=new ii.uint16(1))[0]=4660;var oi=52===new ii.uint8(ri.buffer)[0],ai="function"==typeof ArrayBuffer?ArrayBuffer:null;var ui,fi="function"==typeof ArrayBuffer?ArrayBuffer:void 0;ui=function(){var t,e,n;if("function"!=typeof ai)return!1;try{(t=qn(n=new ai(16))&&"function"==typeof ai.isView)&&((e=new Ke(n))[0]=-3.14,e[1]=NaN,t=t&&ai.isView(e)&&16===n.byteLength&&-3.14===e[0]&&e[1]!=e[1])}catch(e){t=!1}return t}()?fi:function(){throw new Error("not implemented")};var si=ui,li="function"==typeof DataView;function ci(t){return li&&t instanceof DataView||"[object DataView]"===f(t)}var hi="function"==typeof DataView?DataView:null;var pi,gi="function"==typeof DataView?DataView:void 0;pi=function(){var t,e,n;if("function"!=typeof hi)return!1;try{n=new si(24),(t=ci(e=new hi(n,8))&&"function"==typeof e.getFloat64&&"function"==typeof e.setFloat64)&&(e.setFloat64(0,-3.14),e.setFloat64(8,NaN),t=t&&e.buffer===n&&16===e.byteLength&&8===e.byteOffset&&-3.14===e.getFloat64(0)&&e.getFloat64(8)!=e.getFloat64(8))}catch(e){t=!1}return t}()?gi:function(){throw new Error("not implemented")};var yi=pi,mi="function"==typeof BigInt?BigInt:void 0,di=["row-major","column-major"];function vi(){return di.slice()}var bi=["row-major","column-major"];function wi(){return{"row-major":101,"column-major":102}}K((function(){return bi.slice()}),"enum",wi);var _i={"row-major":101,"column-major":102};function Ei(){return{"row-major":_i["row-major"],"column-major":_i["column-major"]}}K(vi,"enum",Ei);var xi=["throw","normalize","clamp","wrap"];function Ti(){return xi.slice()}function Vi(){return{throw:1,clamp:2,wrap:3,normalize:4}}K(Ti,"enum",Vi);var Oi={bool:0,int8:1,uint8:2,uint8c:3,int16:4,uint16:5,int32:6,uint32:7,int64:8,uint64:9,float16:10,float32:11,float64:12,complex32:13,complex64:14,complex128:15,binary:16,generic:17,notype:18,userdefined_type:256},Ai=Ei(),ji={throw:1,clamp:2,wrap:3,normalize:4};var Si=4294967295,Li=4294967296,Fi=new Rn(8),Ii=new yi(Fi.buffer);function Ri(t,e,n,r){var i,o,a;if(0===t){for(a=0;a<Fi.length;a++)e[r]=0,r+=n;return e}for(o=(t&Si)>>>0,i=Bt(t/Li),oi?(Ii.setUint32(0,o,oi),Ii.setUint32(4,i,oi)):(Ii.setUint32(0,i,oi),Ii.setUint32(4,o,oi)),a=0;a<Fi.length;a++)e[r]=Fi[a],r+=n;return e}K((function(t){var e,n,r,i;return e=new Rn(8),0===t||(i=(4294967295&t)>>>0,r=Bt(t/4294967296),n=new yi(e.buffer),oi?(n.setUint32(0,i,oi),n.setUint32(4,r,oi)):(n.setUint32(0,r,oi),n.setUint32(4,i,oi))),e}),"assign",Ri);var Bi={bool:0,int8:1,uint8:2,uint8c:3,int16:4,uint16:5,int32:6,uint32:7,int64:8,uint64:9,float16:10,float32:11,float64:12,complex32:13,complex64:14,complex128:15,binary:16,generic:17,notype:18,userdefined_type:256},Mi=Ei(),ki={throw:1,clamp:2,wrap:3,normalize:4};function Ui(t,e,n,r,i,o){var a,u,f,s,l;if(!(this instanceof Ui))return new Ui(t,e,n,r,i,o);for(s=1,l=0;l<n.length;l++)s*=n[l];return u=e.BYTES_PER_ELEMENT?e.BYTES_PER_ELEMENT*s:null,this._byteLength=u,this._bytesPerElement=Fe(t),this._buffer=e,this._dtype=t,this._length=s,this._ndims=n.length,this._offset=i,this._order=o,this._shape=n,this._strides=r,this._accessors=H(e.get&&e.set),this._iterationOrder=Ie(r),a=function(t,e,n,r,i){var o;return 0!==t&&0!==i&&t===(o=Zr(e,n,r))[1]-o[0]+1}(s,n,r,i,this._iterationOrder),f=Be(r),this._flags={ROW_MAJOR_CONTIGUOUS:Gr(f,a),COLUMN_MAJOR_CONTIGUOUS:Wr(f,a),READONLY:!1},this.__meta_dataview__=null,this}function Ni(t,e){var n,r,i,o;for(i=Dr(t),r=ke(t)?De(i):Ne(i),n=t.length,o=0;o<n;o++)if(r(t,o)===e)return!0;return!1}function Pi(t){var e,n,r;if(!ve(t))throw new TypeError(Y("invalid argument. Must provide an array-like object. Value: `%s`.",t));return r=Dr(t),ke(t)&&(e=De(r)),n=t.length,void 0===e?function(e){var r;for(r=0;r<n;r++)if(t[r]===e)return!0;return!1}:function(r){var i;for(i=0;i<n;i++)if(e(t,i)===r)return!0;return!1}}K(Ui,"name","ndarray"),$t(Ui.prototype,"byteLength",(function(){return this._byteLength})),$t(Ui.prototype,"BYTES_PER_ELEMENT",(function(){return this._bytesPerElement})),$t(Ui.prototype,"data",(function(){return this._buffer})),$t(Ui.prototype,"dtype",(function(){return this._dtype})),$t(Ui.prototype,"flags",(function(){return{ROW_MAJOR_CONTIGUOUS:(t=this._flags).ROW_MAJOR_CONTIGUOUS,COLUMN_MAJOR_CONTIGUOUS:t.COLUMN_MAJOR_CONTIGUOUS,READONLY:t.READONLY};var t})),$t(Ui.prototype,"length",(function(){return this._length})),$t(Ui.prototype,"ndims",(function(){return this._ndims})),$t(Ui.prototype,"offset",(function(){return this._offset})),$t(Ui.prototype,"order",(function(){return this._order})),$t(Ui.prototype,"shape",(function(){return $r(this._shape,0,this._shape.length)})),$t(Ui.prototype,"strides",(function(){return $r(this._strides,0,this._strides.length)})),K(Ui.prototype,"get",(function(){var t,e;for(t=this._offset,e=0;e<arguments.length;e++)t+=this._strides[e]*arguments[e];return this._accessors?this._buffer.get(t):this._buffer[t]})),K(Ui.prototype,"iget",(function(t){var e,n,r,i,o,a;if(0===(r=this._ndims))return this._accessors?this._buffer.get(this._offset):this._buffer[this._offset];if(this._flags.ROW_MAJOR_CONTIGUOUS||this._flags.COLUMN_MAJOR_CONTIGUOUS){if(1===this._iterationOrder)return this._accessors?this._buffer.get(this._offset+t):this._buffer[this._offset+t];if(-1===this._iterationOrder)return this._accessors?this._buffer.get(this.offset-t):this._buffer[this._offset-t]}if(n=this._shape,e=this._strides,i=this._offset,qr(this._order)){for(a=0;a<r;a++)t-=o=t%n[a],t/=n[a],i+=o*e[a];return this._accessors?this._buffer.get(i):this._buffer[i]}for(a=r-1;a>=0;a--)t-=o=t%n[a],t/=n[a],i+=o*e[a];return this._accessors?this._buffer.get(i):this._buffer[i]})),K(Ui.prototype,"set",(function(){var t,e;for(t=this._offset,e=0;e<arguments.length-1;e++)t+=this._strides[e]*arguments[e];return this._accessors?this._buffer.set(arguments[e],t):this._buffer[t]=arguments[e],this})),K(Ui.prototype,"iset",(function(t,e){var n,r,i,o,a,u;if(0===(i=this._ndims))return this._accessors?this._buffer.set(t,this._offset):this._buffer[this._offset]=t,this;if(this._flags.ROW_MAJOR_CONTIGUOUS||this._flags.COLUMN_MAJOR_CONTIGUOUS){if(1===this._iterationOrder)return this._accessors?this._buffer.set(e,this._offset+t):this._buffer[this._offset+t]=e,this;if(-1===this._iterationOrder)return this._accessors?this._buffer.set(e,this._offset-t):this._buffer[this._offset-t]=e,this}if(r=this._shape,n=this._strides,o=this._offset,qr(this._order)){for(u=0;u<i;u++)t-=a=t%r[u],t/=r[u],o+=a*n[u];return this._accessors?this._buffer.set(e,o):this._buffer[o]=e,this}for(u=i-1;u>=0;u--)t-=a=t%r[u],t/=r[u],o+=a*n[u];return this._accessors?this._buffer.set(e,o):this._buffer[o]=e,this})),K(Ui.prototype,"toString",(function(){var t,e,n,r,i,o;if(e=this._shape.length,n="ndarray( '"+(r=this._dtype)+"', ",t="",this._length<=100)if("complex64"===r||"complex128"===r)for(o=0;o<this._length;o++)t+=Tr(i=this.iget(o))+", "+Vr(i),o<this._length-1&&(t+=", ");else for(o=0;o<this._length;o++)t+=this.iget(o),o<this._length-1&&(t+=", ");else{if("complex64"===r||"complex128"===r)for(o=0;o<3;o++)t+=Tr(i=this.iget(o))+", "+Vr(i),o<2&&(t+=", ");else for(o=0;o<3;o++)t+=this.iget(o),o<2&&(t+=", ");if(t+=", ..., ","complex64"===r||"complex128"===r)for(o=2;o>=0;o--)t+=Tr(i=this.iget(this._length-1-o))+", "+Vr(i),o>0&&(t+=", ");else for(o=2;o>=0;o--)t+=this.iget(this._length-1-o),o>0&&(t+=", ")}if(n+=ei(ni[this.dtype],"{{data}}",t),n+=", ",n+=0===e?"[]":"[ "+this._shape.join(", ")+" ]",n+=", ",n+="[ ",0===e)n+="0";else for(o=0;o<e;o++)this._strides[o]<0?n+=-this._strides[o]:n+=this._strides[o],o<e-1&&(n+=", ");return n+=" ]",n+=", ",n+="0",n+=", ",n+="'"+this._order+"'",n+=" )"})),K(Ui.prototype,"toJSON",(function(){var t,e,n,r;for(e=this._length,(t={}).type="ndarray",t.dtype=this.dtype,t.flags={READONLY:this._flags.READONLY},t.order=this._order,t.shape=this._shape.slice(),t.strides=this._strides.slice(),r=0;r<t.strides.length;r++)t.strides[r]<0&&(t.strides[r]*=-1);if(t.data=[],"complex64"===t.dtype||"complex128"===t.dtype)for(r=0;r<e;r++)n=this.iget(r),t.data.push(Tr(n),Vr(n));else for(r=0;r<e;r++)t.data.push(this.iget(r));return t})),K(Ui.prototype,"valueOf",(function(){return 0===this._ndims?this.iget():this})),K(Ui.prototype,"__array_meta_dataview__",zt()?function(){var t,e,n,r,i,o,a,u,f,s,l,c,h,p;if(f=this._mode||"throw",a=this._submode||[f],n=33+16*(c=this._ndims)+(h=a.length),(u=this.__meta_dataview__)&&u.byteLength===n)return u;for(u=new yi(new si(n)),i=this._shape,o=this._strides,r=this._dtype,t=this._bytesPerElement,s=0,u.setInt8(s,oi?1:0),s+=1,u.setInt16(s,Oi[r],oi),s+=2,u.setBigInt64(s,mi(c),oi),l=8*c,s+=8,p=0;p<c;p++)u.setBigInt64(s,mi(i[p]),oi),u.setBigInt64(s+l,mi(o[p]*t),oi),s+=8;for(s+=l,u.setBigInt64(s,mi(this._offset*t),oi),s+=8,u.setInt8(s,Ai[this._order]),s+=1,u.setInt8(s,ji[f]),s+=1,u.setBigInt64(s,mi(h),oi),s+=8,p=0;p<h;p++)u.setInt8(s,ji[a[p]]),s+=1;return e=0,e|=this._flags.READONLY?4:0,u.setInt32(s,e,oi),this.__meta_dataview__=u,u}:function(){var t,e,n,r,i,o,a,u,f,s,l,c,h,p,g;if(s=this._mode||"throw",u=this._submode||[s],r=33+16*(h=this._ndims)+(p=u.length),(f=this.__meta_dataview__)&&f.byteLength===r)return f;for(f=new yi(new si(r)),e=new Rn(f.buffer),o=this._shape,a=this._strides,i=this._dtype,t=this._bytesPerElement,l=0,f.setInt8(l,oi?1:0),l+=1,f.setInt16(l,Bi[i],oi),Ri(h,e,1,l+=2),c=8*h,l+=8,g=0;g<h;g++)Ri(o[g],e,1,l),Ri(a[g]*t,e,1,l+c),l+=8;for(l+=c,Ri(this._offset*t,e,1,l),l+=8,f.setInt8(l,Mi[this._order]),l+=1,f.setInt8(l,ki[s]),Ri(p,e,1,l+=1),l+=8,g=0;g<p;g++)f.setInt8(l,ki[u[g]]),l+=1;return n=0,n|=this._flags.READONLY?4:0,f.setInt32(l,n,oi),this.__meta_dataview__=f,f}),K(Ni,"factory",Pi);var Ci={all:["binary","bool","complex32","complex64","complex128","float16","float32","float64","generic","int16","int32","int8","uint16","uint32","uint8","uint8c"],typed:["binary","bool","complex32","complex64","complex128","float16","float32","float64","int16","int32","int8","uint16","uint32","uint8","uint8c"],floating_point:["complex32","complex64","complex128","float16","float32","float64"],real_floating_point:["float16","float32","float64"],complex_floating_point:["complex32","complex64","complex128"],boolean:["bool"],integer:["int16","int32","int8","uint16","uint32","uint8","uint8c"],signed_integer:["int16","int32","int8"],unsigned_integer:["uint16","uint32","uint8","uint8c"],real:["float16","float32","float64","int16","int32","int8","uint16","uint32","uint8","uint8c"],numeric:["complex32","complex64","complex128","float16","float32","float64","int16","int32","int8","uint16","uint32","uint8","uint8c"],index:["int32","uint8","bool","generic"],integer_index:["int32"],boolean_index:["bool"],mask_index:["uint8"],typed_index:["int32","uint8","bool"]},Yi=/_and_generic$/;function Di(){var t,e,n;return 0===arguments.length?Ci.all.slice():(n=!1,t=arguments[0],Yi.test(t)&&"all"!==(t=ti(t,Yi,""))&&"index"!==t&&(n=!0),e=(e=Ci[t])?e.slice():[],n&&e.length>0&&e.push("generic"),e)}var Ji=Pi(Di());function zi(t,e){return null!=t&&("symbol"==typeof e?e in Object(t):String(e)in Object(t))}function $i(t){return vt(t)&&Xt(t.alignment)&&Xt(t.byteLength)&&vt(t.byteLengthOf)&&vt(t.byteOffsetOf)&&vt(t.bufferOf)&&vt(t.isStruct)&&vt(t.viewOf)&&n(t,"fields")&&n(t,"layout")}var Wi,Gi,Zi,qi={bool:0,int8:1,uint8:2,uint8c:3,int16:4,uint16:5,int32:6,uint32:7,int64:8,uint64:9,float16:10,float32:11,float64:12,complex32:13,complex64:14,complex128:15,binary:16,generic:17,notype:18,userdefined_type:256};function Ki(t){var e=qi[t];return Ot(e)?e:null}function Xi(t){var e=typeof t;return"string"===e?null===Ki(t)?null:t:"number"===e?Se(t):"object"===e&&t?String(t):$i(t)?t.layout:null}function Hi(t,e){var r,i,o;if(r=arguments.length,!(this instanceof Hi))return r<2?new Hi(t):new Hi(t,e);if(Ji(t))i="builtin";else{if(function(t){return t instanceof Hi||"object"==typeof t&&null!==t&&"DataType"===t.constructor.name&&Wt(t.char)&&Wt(t.description)&&Wt(t.byteOrder)&&zi(t,"value")}(t))return new Hi(t.value,{description:t.description});if(!$i(t))throw new TypeError(Y("invalid argument. First argument must be either a supported data type string, a struct constructor, or another data type instance. Value: `%s`.",t));i="struct"}if(r>1){if(!Vt(o=e))throw new TypeError(Y("invalid argument. Options argument must be an object. Value: `%s`.",o));if(n(o,"description")&&!Wt(o.description))throw new TypeError(Y("invalid option. `%s` option must be a string. Option: `%s`.","description",o.description))}else o={};return K(this,"_value",t),K(this,"_description",o.description||function(t){return 0===arguments.length?{binary:"byte",bool:"boolean",complex32:"half-precision floating-point complex number",complex64:"single-precision floating-point complex number",complex128:"double-precision floating-point complex number",float16:"half-precision floating-point number",bfloat16:"brain floating-point number",float32:"single-precision floating-point number",float64:"double-precision floating-point number",float128:"quadruple-precision floating-point number",generic:"generic array value",int8:"signed 8-bit integer",int16:"signed 16-bit integer",int32:"signed 32-bit integer",int64:"signed 64-bit integer",int128:"signed 128-bit integer",int256:"signed 256-bit integer",uint8:"unsigned 8-bit integer",uint8c:"unsigned 8-bit integer (clamped)",uint16:"unsigned 16-bit integer",uint32:"unsigned 32-bit integer",uint64:"unsigned 64-bit integer",uint128:"unsigned 128-bit integer",uint256:"unsigned 256-bit integer"}:(void 0===Wi&&(Wi={binary:"byte",bool:"boolean",complex32:"half-precision floating-point complex number",complex64:"single-precision floating-point complex number",complex128:"double-precision floating-point complex number",float16:"half-precision floating-point number",bfloat16:"brain floating-point number",float32:"single-precision floating-point number",float64:"double-precision floating-point number",float128:"quadruple-precision floating-point number",generic:"generic array value",int8:"signed 8-bit integer",int16:"signed 16-bit integer",int32:"signed 32-bit integer",int64:"signed 64-bit integer",int128:"signed 128-bit integer",int256:"signed 256-bit integer",uint8:"unsigned 8-bit integer",uint8c:"unsigned 8-bit integer (clamped)",uint16:"unsigned 16-bit integer",uint32:"unsigned 32-bit integer",uint64:"unsigned 64-bit integer",uint128:"unsigned 128-bit integer",uint256:"unsigned 256-bit integer"}),Wi[Xi(t)]||null)}(t)||""),K(this,"_char",function(t){return 0===arguments.length?{binary:"r",bool:"x",complex32:"j",complex64:"c",complex128:"z",float16:"h",bfloat16:"e",float32:"f",float64:"d",float128:"g",generic:"o",int8:"s",int16:"k",int32:"i",int64:"l",int128:"m",int256:"n",uint8:"b",uint8c:"a",uint16:"t",uint32:"u",uint64:"v",uint128:"w",uint256:"y"}:(void 0===Gi&&(Gi={binary:"r",bool:"x",complex32:"j",complex64:"c",complex128:"z",float16:"h",bfloat16:"e",float32:"f",float64:"d",float128:"g",generic:"o",int8:"s",int16:"k",int32:"i",int64:"l",int128:"m",int256:"n",uint8:"b",uint8c:"a",uint16:"t",uint32:"u",uint64:"v",uint128:"w",uint256:"y"}),Gi[Xi(t)]||null)}(t)||""),K(this,"_enum",function(t){var e=typeof t;return"number"===e?Se(t)?t:null:"string"===e?Ki(t):"object"===e&&t&&Ut(t.enum)?t.enum:$i(t)?Ki("userdefined_type"):null}(t)||-1),K(this,"_alignment",function(t){var e;return 0===arguments.length?{binary:1,bool:1,complex32:2,complex64:4,complex128:8,float16:2,bfloat16:2,float32:4,float64:8,float128:16,generic:null,int8:1,int16:2,int32:4,int64:8,int128:16,int256:32,uint8:1,uint8c:1,uint16:2,uint32:4,uint64:8,uint128:16,uint256:32}:(void 0===Zi&&(Zi={binary:1,bool:1,complex32:2,complex64:4,complex128:8,float16:2,bfloat16:2,float32:4,float64:8,float128:16,generic:null,int8:1,int16:2,int32:4,int64:8,int128:16,int256:32,uint8:1,uint8c:1,uint16:2,uint32:4,uint64:8,uint128:16,uint256:32}),t?Xt(e=t.alignment)?e:Zi[Xi(t)]||null:null)}(t)||-1),K(this,"_byteLength",Fe(t)||-1),K(this,"_byteOrder","host"),K(this,"_type",i),this}function Qi(t){return t instanceof Hi||"object"==typeof t&&null!==t&&Ut(t.alignment)&&Ut(t.byteLength)&&Wt(t.byteOrder)&&Wt(t.char)&&Ut(t.enum)&&zi(t,"value")}function to(t){return vt(t)&&Xt(t.alignment)&&Xt(t.byteLength)&&vt(t.byteLengthOf)&&vt(t.byteOffsetOf)&&vt(t.bufferOf)&&vt(t.viewOf)||function(t){return t instanceof Hi||"object"==typeof t&&null!==t&&Ut(t.alignment)&&Ut(t.byteLength)&&Wt(t.byteOrder)&&Wt(t.char)&&Ut(t.enum)&&zi(t,"value")}(t)&&to(t.value)}function eo(t,e){if(Ji(t));else if(Qi(t))t=String(t);else{if(!to(t))return!1;t=t.layout}if(Ji(e));else if(Qi(e))e=String(e);else{if(!to(e))return!1;e=e.layout}return t===e}function no(t){return Ji(t)||Qi(t)||to(t)}K(Hi,"name","DataType"),$t(Hi.prototype,"alignment",(function(){return this._alignment})),$t(Hi.prototype,"byteLength",(function(){return this._byteLength})),$t(Hi.prototype,"byteOrder",(function(){return this._byteOrder})),$t(Hi.prototype,"char",(function(){return this._char})),$t(Hi.prototype,"description",(function(){return this._description})),$t(Hi.prototype,"enum",(function(){return this._enum})),$t(Hi.prototype,"value",(function(){return this._value})),K(Hi.prototype,"toJSON",(function(){return{type:"DataType",value:this.toString(),byteOrder:this._byteOrder,description:this._description}})),K(Hi.prototype,"toString",(function(){return"struct"===this._type?this._value.layout:String(this._value)})),K(Hi.prototype,"valueOf",(function(){return this.toString()}));var ro=Pi(vi()),io=["none","equiv","safe","mostly-safe","same-kind","unsafe"];function oo(){return io.slice()}K(oo,"enum",(function(){return{none:0,equiv:1,safe:2,"mostly-safe":3,"same-kind":4,unsafe:5}}));var ao=oo(),uo=ao.length;function fo(t){var e;for(e=0;e<uo;e++)if(t===ao[e])return!0;return!1}var so,lo={float64:{float64:1,float32:0,float16:0,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:0,complex32:0,binary:0,generic:1,bool:0},float32:{float64:1,float32:1,float16:0,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,complex32:0,binary:0,generic:1,bool:0},float16:{float64:1,float32:1,float16:1,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,complex32:1,binary:0,generic:1,bool:0},int64:{float64:0,float32:0,float16:0,int64:1,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:0,complex64:0,complex32:0,binary:0,generic:1,bool:0},int32:{float64:1,float32:0,float16:0,int64:1,int32:1,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:0,complex32:0,binary:0,generic:1,bool:0},int16:{float64:1,float32:1,float16:0,int64:1,int32:1,int16:1,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,complex32:0,binary:0,generic:1,bool:0},int8:{float64:1,float32:1,float16:1,int64:1,int32:1,int16:1,int8:1,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,complex32:1,binary:0,generic:1,bool:0},uint64:{float64:0,float32:0,float16:0,int64:0,int32:0,int16:0,int8:0,uint64:1,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:0,complex64:0,complex32:0,binary:0,generic:1,bool:0},uint32:{float64:1,float32:0,float16:0,int64:1,int32:0,int16:0,int8:0,uint64:1,uint32:1,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:0,complex32:0,binary:0,generic:1,bool:0},uint16:{float64:1,float32:1,float16:0,int64:1,int32:1,int16:0,int8:0,uint64:1,uint32:1,uint16:1,uint8:0,uint8c:0,complex128:1,complex64:1,complex32:0,binary:0,generic:1,bool:0},uint8:{float64:1,float32:1,float16:1,int64:1,int32:1,int16:1,int8:0,uint64:1,uint32:1,uint16:1,uint8:1,uint8c:1,complex128:1,complex64:1,complex32:1,binary:0,generic:1,bool:0},uint8c:{float64:1,float32:1,float16:1,int64:1,int32:1,int16:1,int8:0,uint64:1,uint32:1,uint16:1,uint8:1,uint8c:1,complex128:1,complex64:1,complex32:1,binary:0,generic:1,bool:0},complex128:{float64:0,float32:0,float16:0,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:0,complex32:0,binary:0,generic:1,bool:0},complex64:{float64:0,float32:0,float16:0,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,complex32:0,binary:0,generic:1,bool:0},complex32:{float64:0,float32:0,float16:0,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,complex32:1,binary:0,generic:1,bool:0},generic:{float64:0,float32:0,float16:0,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:0,complex64:0,complex32:0,binary:0,generic:1,bool:0},binary:{float64:0,float32:0,float16:0,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:0,complex64:0,complex32:0,binary:1,generic:0,bool:0},bool:{float64:0,float32:0,float16:0,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:0,complex64:0,complex32:0,binary:0,generic:1,bool:1}};var co=function(t){return 0===arguments.length?function(){var t,e,n,r,i,o,a,u,f;for(n={},e=(t=Ae(lo)).length,f=0;f<e;f++){for(i=t[f],a=lo[i],r={},u=0;u<e;u++)r[o=t[u]]=a[o];n[i]=r}return n}():(void 0===so&&(so=function(){var t,e,n,r,i,o,a,u,f;for(n={},e=(t=Ae(lo)).length,f=0;f<e;f++){for(i=t[f],a=lo[i],r=[],u=0;u<e;u++)1===a[o=t[u]]&&r.push(o);n[i]=r}return n}()),t=Xi(t),n(so,t)?so[t].slice():null)}();var ho,po={float64:{float64:1,float32:1,float16:1,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,complex32:1,binary:0,generic:1,bool:0},float32:{float64:1,float32:1,float16:1,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,complex32:1,binary:0,generic:1,bool:0},float16:{float64:1,float32:1,float16:1,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,complex32:1,binary:0,generic:1,bool:0},int64:{float64:0,float32:0,float16:0,int64:1,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:0,complex64:0,complex32:0,binary:0,generic:1,bool:0},int32:{float64:1,float32:0,float16:0,int64:1,int32:1,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:0,complex32:0,binary:0,generic:1,bool:0},int16:{float64:1,float32:1,float16:0,int64:1,int32:1,int16:1,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,complex32:0,binary:0,generic:1,bool:0},int8:{float64:1,float32:1,float16:1,int64:1,int32:1,int16:1,int8:1,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,complex32:1,binary:0,generic:1,bool:0},uint64:{float64:0,float32:0,float16:0,int64:0,int32:0,int16:0,int8:0,uint64:1,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:0,complex64:0,complex32:0,binary:0,generic:1,bool:0},uint32:{float64:1,float32:0,float16:0,int64:1,int32:0,int16:0,int8:0,uint64:1,uint32:1,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:0,complex32:0,binary:0,generic:1,bool:0},uint16:{float64:1,float32:1,float16:0,int64:1,int32:1,int16:0,int8:0,uint64:1,uint32:1,uint16:1,uint8:0,uint8c:0,complex128:1,complex64:1,complex32:0,binary:0,generic:1,bool:0},uint8:{float64:1,float32:1,float16:1,int64:1,int32:1,int16:1,int8:0,uint64:1,uint32:1,uint16:1,uint8:1,uint8c:1,complex128:1,complex64:1,complex32:1,binary:0,generic:1,bool:0},uint8c:{float64:1,float32:1,float16:1,int64:1,int32:1,int16:1,int8:0,uint64:1,uint32:1,uint16:1,uint8:1,uint8c:1,complex128:1,complex64:1,complex32:1,binary:0,generic:1,bool:0},complex128:{float64:0,float32:0,float16:0,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,complex32:1,binary:0,generic:1,bool:0},complex64:{float64:0,float32:0,float16:0,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,complex32:1,binary:0,generic:1,bool:0},complex32:{float64:0,float32:0,float16:0,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,complex32:1,binary:0,generic:1,bool:0},generic:{float64:0,float32:0,float16:0,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:0,complex64:0,complex32:0,binary:0,generic:1,bool:0},binary:{float64:0,float32:0,float16:0,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:0,complex64:0,complex32:0,binary:1,generic:0,bool:0},bool:{float64:0,float32:0,float16:0,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:0,complex64:0,complex32:0,binary:0,generic:1,bool:1}};var go=function(t){return 0===arguments.length?function(){var t,e,n,r,i,o,a,u,f;for(n={},e=(t=Ae(po)).length,f=0;f<e;f++){for(i=t[f],a=po[i],r={},u=0;u<e;u++)r[o=t[u]]=a[o];n[i]=r}return n}():(void 0===ho&&(ho=function(){var t,e,n,r,i,o,a,u,f;for(n={},e=(t=Ae(po)).length,f=0;f<e;f++){for(i=t[f],a=po[i],r=[],u=0;u<e;u++)1===a[o=t[u]]&&r.push(o);n[i]=r}return n}()),t=Xi(t),n(ho,t)?ho[t].slice():null)}();var yo,mo={float64:{float64:1,float32:1,float16:1,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:0,complex32:0,binary:0,generic:1,bool:0},float32:{float64:1,float32:1,float16:1,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,complex32:0,binary:0,generic:1,bool:0},float16:{float64:1,float32:1,float16:1,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,complex32:1,binary:0,generic:1,bool:0},int64:{float64:0,float32:0,float16:0,int64:1,int32:1,int16:1,int8:1,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:0,complex64:0,complex32:0,binary:0,generic:1,bool:0},int32:{float64:1,float32:0,float16:0,int64:1,int32:1,int16:1,int8:1,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:0,complex32:0,binary:0,generic:1,bool:0},int16:{float64:1,float32:1,float16:0,int64:1,int32:1,int16:1,int8:1,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,complex32:0,binary:0,generic:1,bool:0},int8:{float64:1,float32:1,float16:1,int64:1,int32:1,int16:1,int8:1,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,complex32:0,binary:0,generic:1,bool:0},uint64:{float64:0,float32:0,float16:0,int64:0,int32:0,int16:0,int8:0,uint64:1,uint32:1,uint16:1,uint8:1,uint8c:1,complex128:1,complex64:0,complex32:0,binary:0,generic:1,bool:0},uint32:{float64:1,float32:0,float16:0,int64:1,int32:0,int16:0,int8:0,uint64:1,uint32:1,uint16:1,uint8:1,uint8c:1,complex128:1,complex64:0,complex32:0,binary:0,generic:1,bool:0},uint16:{float64:1,float32:1,float16:0,int64:1,int32:1,int16:0,int8:0,uint64:1,uint32:1,uint16:1,uint8:1,uint8c:1,complex128:1,complex64:1,complex32:0,binary:0,generic:1,bool:0},uint8:{float64:1,float32:1,float16:1,int64:1,int32:1,int16:1,int8:0,uint64:1,uint32:1,uint16:1,uint8:1,uint8c:1,complex128:1,complex64:1,complex32:1,binary:0,generic:1,bool:0},uint8c:{float64:1,float32:1,float16:1,int64:1,int32:1,int16:1,int8:0,uint64:1,uint32:1,uint16:1,uint8:1,uint8c:1,complex128:1,complex64:1,complex32:1,binary:0,generic:1,bool:0},complex128:{float64:0,float32:0,float16:0,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,complex32:1,binary:0,generic:0,bool:0},complex64:{float64:0,float32:0,float16:0,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,complex32:1,binary:0,generic:0,bool:0},complex32:{float64:0,float32:0,float16:0,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:1,complex64:1,complex32:1,binary:0,generic:0,bool:0},generic:{float64:0,float32:0,float16:0,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:0,complex64:0,complex32:0,binary:0,generic:1,bool:0},binary:{float64:0,float32:0,float16:0,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:0,complex64:0,complex32:0,binary:1,generic:0,bool:0},bool:{float64:0,float32:0,float16:0,int64:0,int32:0,int16:0,int8:0,uint64:0,uint32:0,uint16:0,uint8:0,uint8c:0,complex128:0,complex64:0,complex32:0,binary:0,generic:1,bool:1}};var vo=function(t){return 0===arguments.length?function(){var t,e,n,r,i,o,a,u,f;for(n={},e=(t=Ae(mo)).length,f=0;f<e;f++){for(i=t[f],a=mo[i],r={},u=0;u<e;u++)r[o=t[u]]=a[o];n[i]=r}return n}():(void 0===yo&&(yo=function(){var t,e,n,r,i,o,a,u,f;for(n={},e=(t=Ae(mo)).length,f=0;f<e;f++){for(i=t[f],a=mo[i],r=[],u=0;u<e;u++)1===a[o=t[u]]&&r.push(o);n[i]=r}return n}()),t=Xi(t),n(yo,t)?yo[t].slice():null)}();function bo(t,e,n){return"unsafe"===n||(Xi(t)===Xi(e)||"none"!==n&&"equiv"!==n&&("safe"===n?function(t,e){var n;return(t=Xi(t))===(e=Xi(e))||!!(n=co[t])&&n[e]>0}(t,e):"mostly-safe"===n?function(t,e){var n;return(t=Xi(t))===(e=Xi(e))||!!(n=go[t])&&n[e]>0}(t,e):function(t,e){var n;return(t=Xi(t))===(e=Xi(e))||!!(n=vo[t])&&n[e]>0}(t,e)))}function wo(t,e){return qr(e)?function(t){var e,n,r;for(e=[],n=1,r=0;r<t.length;r++)e.push(n),n*=t[r];return e}(t):function(t){var e,n,r,i;for(e=t.length,n=[],i=0;i<e;i++)n.push(0);for(r=1,i=e-1;i>=0;i--)n[i]=r,r*=t[i];return n}(t)}function _o(t,e){var n,r,i;for(r=t.length,n=0,i=0;i<r;i++)e[i]<0&&(n-=e[i]*(t[i]-1));return n}function Eo(t){var e,n,r;if(0===(e=t.length))return 0;for(n=1,r=0;r<e;r++)n*=t[r];return n}function xo(t){if("function"!=typeof t)throw new TypeError(Y("invalid argument. Must provide a function. Value: `%s`.",t));return function(e){var n,r;if(!function(t){return null!=t&&"function"!=typeof t&&"number"==typeof t.length&&Mt(t.length)&&t.length>=0&&t.length<=Wn}(e))return!1;if(n=e.length,0===n)return!1;for(r=0;r<n;r++)if(!1===t(e[r]))return!1;return!0}}K(wo,"assign",(function(t,e,n){return qr(e)?function(t,e){var n,r;for(n=1,r=0;r<t.length;r++)e[r]=n,n*=t[r];return e}(t,n):function(t,e){var n,r;for(n=1,r=t.length-1;r>=0;r--)e[r]=n,n*=t[r];return e}(t,n)}));var To=xo(Dt.isPrimitive),Vo=xo(Dt.isObject),Oo=xo(Dt);K(Oo,"primitives",To),K(Oo,"objects",Vo);var Ao=xo(Pt.isPrimitive),jo=xo(Pt.isObject),So=xo(Pt);function Lo(){return{dtypes:{default:"float64",numeric:"float64",real:"float64",floating_point:"float64",real_floating_point:"float64",complex_floating_point:"complex128",integer:"int32",signed_integer:"int32",unsigned_integer:"uint32",boolean:"bool",index:"int32",integer_index:"int32",boolean_index:"bool",mask_index:"uint8"},order:"row-major",casting:"safe",index_mode:"throw"}}K(So,"primitives",Ao),K(So,"objects",jo);var Fo={dtypes:{default:"float64",numeric:"float64",real:"float64",floating_point:"float64",real_floating_point:"float64",complex_floating_point:"complex128",integer:"int32",signed_integer:"int32",unsigned_integer:"uint32",boolean:"bool",index:"int32",integer_index:"int32",boolean_index:"bool",mask_index:"uint8"},order:"row-major",casting:"safe",index_mode:"throw"},Io={"dtypes.default":Fo.dtypes.default,"dtypes.numeric":Fo.dtypes.numeric,"dtypes.real":Fo.dtypes.real,"dtypes.floating_point":Fo.dtypes.floating_point,"dtypes.real_floating_point":Fo.dtypes.real_floating_point,"dtypes.complex_floating_point":Fo.dtypes.complex_floating_point,"dtypes.integer":Fo.dtypes.integer,"dtypes.signed_integer":Fo.dtypes.signed_integer,"dtypes.unsigned_integer":Fo.dtypes.unsigned_integer,"dtypes.boolean":Fo.dtypes.boolean,"dtypes.index":Fo.dtypes.index,"dtypes.integer_index":Fo.dtypes.integer_index,"dtypes.boolean_index":Fo.dtypes.boolean_index,"dtypes.mask_index":Fo.dtypes.mask_index,order:Fo.order,casting:Fo.casting,index_mode:Fo.index_mode};function Ro(t){var e=typeof t;return null===t||"object"!==e&&"function"!==e?new TypeError(Y("invalid argument. A provided constructor must be either an object (except null) or a function. Value: `%s`.",t)):null}K(Lo,"get",(function(t){var e=Io[t];return void 0===e?null:e}));var Bo=Object.create;function Mo(){}var ko="function"==typeof Bo?Bo:function(t){return Mo.prototype=t,new Mo};function Uo(t,e){return t<0?0:t>e?e:t}function No(t,e){var n=e+1;return t<0?((t+=n)<0&&0!==(t%=n)&&(t+=n),t):t>e?((t-=n)>e&&(t%=n),t):t}function Po(t,e){return t<0?(t+=e+1)<0?-1:t:t>e?-1:t}var Co=Pi(Ti()),Yo={wrap:No,clamp:Uo,normalize:function(t,e){var n=Po(t,e);if(n<0||n>e)throw new RangeError(Y("invalid argument. Index must resolve to a value on the interval: [0, %d]. Value: `%d`.",e,t));return n},throw:function(t,e){if(t<0||t>e)throw new RangeError(Y("invalid argument. Index must resolve to a value on the interval: [0, %d]. Value: `%d`.",e,t));return t}};function Do(t,e,n){var r;if("clamp"===n)return Uo(t,e);if("wrap"===n)return No(t,e);if(r=t,"normalize"===n&&(r=Po(r,e)),r<0||r>e)throw new RangeError(Y("invalid argument. Index must resolve to a value on the interval: [0, %d]. Value: `%d`.",e,t));return r}K(Do,"factory",(function(t){if(!Co(t))throw new TypeError(Y("invalid argument. First argument must be a recognized index mode. Value: `%s`.",t));return Yo[t]}));var Jo=Ui.prototype.iget;var zo=Ui.prototype.iset;function $o(t,e){var n,r;for(n=[],r=0;r<e;r++)n.push(t[r]);return n}var Wo=32767,Go=Lo.get("index_mode"),Zo=!1;function qo(t,e,r,i,o,a,u){var f,s,l,c,h;if(!(this instanceof qo))return arguments.length<7?new qo(t,e,r,i,o,a):new qo(t,e,r,i,o,a,u);if(!no(t))throw new TypeError(Y("invalid argument. First argument must be a supported ndarray data type. Value: `%s`.",t));if(!ve(e))throw new TypeError(Y("invalid argument. Second argument must be an array-like object, typed-array-like, or a Buffer. Value: `%s`.",e));if(e.get&&e.set&&(!vt(e.get)||!vt(e.set)))throw new TypeError(Y("invalid argument. Second argument `get` and `set` properties must be functions. Value: `%s`.",e));if(!To(r)&&(!ve(r)||r.length>0))throw new TypeError(Y("invalid argument. Third argument must be an array-like object containing nonnegative integers. Value: `%s`.",r));if((f=r.length)>Wo)throw new RangeError(Y("invalid argument. Number of dimensions must not exceed %u due to stack limits. Value: `%u`.",Wo,f));if(!Ao(i))throw new TypeError(Y("invalid argument. Fourth argument must be an array-like object containing integers. Value: `%s`.",i));if(f>0){if(i.length!==f)throw new RangeError(Y("invalid argument. Fourth argument length must match the number of dimensions. Expected number of dimensions: `%u`. Strides length: `%u`.",f,i.length))}else{if(1!==i.length)throw new RangeError("invalid argument. Fourth argument length must be equal to 1 when creating a zero-dimensional ndarray.");if(0!==i[0])throw new RangeError(Y("invalid argument. Fourth argument must contain a single element equal to 0. Value: `%d`.",i[0]))}if(!Ct(o))throw new TypeError(Y("invalid argument. Fifth argument must be a nonnegative integer. Value: `%s`.",o));if(!ro(a))throw new TypeError(Y("invalid argument. Sixth argument must be a supported order. Value: `%s`.",a));if(f>0&&!function(t,e,n,r){var i=Zr(e,n,r);return i[0]>=0&&i[1]<t}(e.length,r,i,o)&&Eo(r)>0)throw new Error("invalid arguments. Input buffer is incompatible with the specified meta data. Ensure that the offset is valid with regard to the strides array and that the buffer has enough elements to satisfy the desired array shape.");if((s={}).mode=Go,s.readonly=Zo,arguments.length>6&&(l=function(t,e){var r;if(!Vt(e))return new TypeError(Y("invalid argument. Options argument must be an object. Value: `%s`.",e));if(n(e,"mode")&&(t.mode=e.mode,!Co(t.mode)))return new TypeError(Y("invalid option. `%s` option must be a recognized mode. Option: `%s`.","mode",t.mode));if(n(e,"submode")){if(t.submode=e.submode,!Gn(t.submode))return new TypeError(Y("invalid option. `%s` option must be an array containing recognized modes. Option: `%s`.","submode",t.submode));if(0===t.submode.length)return new TypeError(Y("invalid option. `%s` option must be an array containing recognized modes. Option: `%s`.","submode",t.submode.join(",")));for(r=0;r<t.submode.length;r++)if(!Co(t.submode[r]))return new TypeError(Y("invalid option. Each submode must be a recognized mode. Option: `%s`.",t.submode[r]));t.submode=t.submode.slice()}return n(e,"readonly")&&(t.readonly=e.readonly,!X(t.readonly))?new TypeError(Y("invalid option. `%s` option must be a boolean. Option: `%s`.","readonly",t.readonly)):null}(s,u),l))throw l;return this._mode=s.mode,void 0===s.submode&&(s.submode=[this._mode]),this._submode=s.submode,c=$o(r,f),h=$o(i,f||1),Ui.call(this,t,e,c,h,o,a),this._flags.READONLY=s.readonly,this}!function(t,e){var n=Ro(t);if(n)throw n;if(n=Ro(e))throw n;if(void 0===e.prototype)throw new TypeError(Y("invalid argument. Second argument must have a prototype from which another object can inherit. Value: `%s`.",e.prototype));t.prototype=ko(e.prototype),q(t.prototype,"constructor",{configurable:!0,enumerable:!1,writable:!0,value:t})}(qo,Ui),K(qo,"name","ndarray"),K(qo.prototype,"get",(function(){var t,e,n,r;if(arguments.length!==this._ndims)throw new RangeError(Y("invalid arguments. Number of indices must match the number of dimensions. ndims: `%u`. nargs: `%u`.",this._ndims,arguments.length));for(t=this._offset,n=this._submode.length,r=0;r<arguments.length;r++){if(!Ut(arguments[r]))throw new TypeError(Y("invalid argument. Indices must be integer valued. Argument: `%u`. Value: `%s`.",r,arguments[r]));e=Do(arguments[r],this._shape[r]-1,this._submode[r%n]),t+=this._strides[r]*e}return this._accessors?this._buffer.get(t):this._buffer[t]})),K(qo.prototype,"iget",(function(t){if(this._ndims>0){if(!Ut(t))throw new TypeError(Y("invalid argument. Index must be an integer. Value: `%s`.",t));return t=Do(t,this._length-1,this._mode),Jo.call(this,t)}return Jo.call(this)})),K(qo.prototype,"set",(function(){var t,e,n,r;if(this._flags.READONLY)throw new Error("invalid invocation. Cannot write to a read-only array.");if(arguments.length!==this._ndims+1)throw new RangeError(Y("invalid arguments. Number of indices must match the number of dimensions. ndims: `%u`. nargs: `%u`.",this._ndims,arguments.length));for(t=this._offset,n=this._submode.length,r=0;r<arguments.length-1;r++){if(!Ut(arguments[r]))throw new TypeError(Y("invalid argument. Indices must be integer valued. Argument: `%i`. Value: `%s`.",r,arguments[r]));e=Do(arguments[r],this._shape[r]-1,this._submode[r%n]),t+=this._strides[r]*e}return this._accessors?this._buffer.set(arguments[r],t):this._buffer[t]=arguments[r],this})),K(qo.prototype,"iset",(function(t,e){if(this._flags.READONLY)throw new Error("invalid invocation. Cannot write to a read-only array.");if(this._ndims>0){if(!Ut(t))throw new TypeError(Y("invalid argument. Index must be an integer. Value: `%s`.",t));t=Do(t,this._length-1,this._mode),zo.call(this,t,e)}else zo.call(this,t);return this}));var Ko=Object.prototype.isPrototypeOf;function Xo(t,e,n,r,i,o,a){var u,f,s,l,c,h,p;for(u=e.data,f=i.data,l=e.accessors[0],s=i.accessors[1],c=r,h=a,p=0;p<t;p++)s(f,h,l(u,c)),c+=n,h+=o;return i}var Ho=8;function Qo(t,e,n,r,i){var o,a,u,f,s,l;if(t<=0)return r;if(u=Jr(e),f=Jr(r),u.accessorProtocol||f.accessorProtocol)return Xo(t,u,n,o=n<0?(1-t)*n:0,f,i,a=i<0?(1-t)*i:0),f.data;if(1===n&&1===i){if((s=t%Ho)>0)for(l=0;l<s;l++)r[l]=e[l];if(t<Ho)return r;for(l=s;l<t;l+=Ho)r[l]=e[l],r[l+1]=e[l+1],r[l+2]=e[l+2],r[l+3]=e[l+3],r[l+4]=e[l+4],r[l+5]=e[l+5],r[l+6]=e[l+6],r[l+7]=e[l+7];return r}for(o=n<0?(1-t)*n:0,a=i<0?(1-t)*i:0,l=0;l<t;l++)r[a]=e[o],o+=n,a+=i;return r}var ta=8;function ea(t,e,n,r,i,o,a){var u,f,s,l,c,h;if(t<=0)return i;if(s=Jr(e),l=Jr(i),s.accessorProtocol||l.accessorProtocol)return Xo(t,s,n,r,l,o,a),l.data;if(u=r,f=a,1===n&&1===o){if((c=t%ta)>0)for(h=0;h<c;h++)i[f]=e[u],u+=n,f+=o;if(t<ta)return i;for(h=c;h<t;h+=ta)i[f]=e[u],i[f+1]=e[u+1],i[f+2]=e[u+2],i[f+3]=e[u+3],i[f+4]=e[u+4],i[f+5]=e[u+5],i[f+6]=e[u+6],i[f+7]=e[u+7],u+=ta,f+=ta;return i}for(h=0;h<t;h++)i[f]=e[u],u+=n,f+=o;return i}function na(t,e){return t<e?t:e}function ra(t,e){var n,r;for(n=[],r=0;r<e;r++)n.push(t);return n}K(Qo,"ndarray",ea);var ia="__@@##$$@@__struct_buffer__@@$$##@@__",oa="Struct";function aa(t,e,n,r){q(t,e,{configurable:!1,enumerable:!1,get:n,set:r})}function ua(t,e,n){q(t,e,{configurable:!1,enumerable:!0,get:n})}function fa(t,e,n,r){q(t,e,{configurable:!1,enumerable:!0,get:n,set:r})}var sa={int8:{get:"getInt8",set:"setInt8"},int16:{get:"getInt16",set:"setInt16"},int32:{get:"getInt32",set:"setInt32"},int64:{get:"getBigInt64",set:"setBigInt64"},uint8:{get:"getUint8",set:"setUint8"},uint16:{get:"getUint16",set:"setUint16"},uint32:{get:"getUint32",set:"setUint32"},uint64:{get:"getBigUint64",set:"setBigUint64"},float16:{get:"getFloat16",set:"setFloat16"},float32:{get:"getFloat32",set:"setFloat32"},float64:{get:"getFloat64",set:"setFloat64"},complex32:{get:"getFloat16",set:"setFloat16"},complex64:{get:"getFloat32",set:"setFloat32"},complex128:{get:"getFloat64",set:"setFloat64"},bool:{get:"getUint8",set:"setUint8"}};var la={complex64:ir,complex128:tr};function ca(t){return la[t]||null}var ha={float64:"complex128",float32:"complex64"},pa=ca(ha.float64);var ga={complex128:"float64",complex64:"float32",complex32:"float16"};function ya(t,e){return function(){var n=this[ia],r=n[e](t.byteOffset,oi),i=n[e](t.byteOffset+t.byteLength/2,oi);return function(t,e,n){var r;if(arguments.length>2){if(r=ca(ha[n]))return new r(t,e);throw new TypeError(Y("invalid argument. Must provide a recognized data type. Value: `%s`.",n))}return new pa(t,e)}(r,i,ga[t.type])}}var ma={float64:Ke,float32:en,int16:An,int32:gn,int8:$n,uint16:wn,uint32:un,uint8:Rn,uint8c:Nn,complex64:xr,complex128:Ir,bool:Nr};function da(t){return ma[t]||null}function va(t,e){return new Rn(t.buffer,t.byteOffset+t.BYTES_PER_ELEMENT*e,t.length-e)}function ba(){return{dtypes:{default:"float64",numeric:"float64",real:"float64",floating_point:"float64",real_floating_point:"float64",complex_floating_point:"complex128",integer:"int32",signed_integer:"int32",unsigned_integer:"uint32",boolean:"bool",index:"int32",integer_index:"int32",boolean_index:"bool",mask_index:"uint8"}}}var wa={dtypes:{default:"float64",numeric:"float64",real:"float64",floating_point:"float64",real_floating_point:"float64",complex_floating_point:"complex128",integer:"int32",signed_integer:"int32",unsigned_integer:"uint32",boolean:"bool",index:"int32",integer_index:"int32",boolean_index:"bool",mask_index:"uint8"}},_a={"dtypes.default":wa.dtypes.default,"dtypes.numeric":wa.dtypes.numeric,"dtypes.real":wa.dtypes.real,"dtypes.floating_point":wa.dtypes.floating_point,"dtypes.real_floating_point":wa.dtypes.real_floating_point,"dtypes.complex_floating_point":wa.dtypes.complex_floating_point,"dtypes.integer":wa.dtypes.integer,"dtypes.signed_integer":wa.dtypes.signed_integer,"dtypes.unsigned_integer":wa.dtypes.unsigned_integer,"dtypes.boolean":wa.dtypes.boolean,"dtypes.index":wa.dtypes.index,"dtypes.integer_index":wa.dtypes.integer_index,"dtypes.boolean_index":wa.dtypes.boolean_index,"dtypes.mask_index":wa.dtypes.mask_index};K(ba,"get",(function(t){var e=_a[t];return void 0===e?null:e}));var Ea=ba.get("dtypes.default"),xa=da("complex64"),Ta=da("complex128"),Va=da("bool");function Oa(){var t,e,n,r;if(null===(n=da(e=(t=arguments.length)&&Wt(arguments[t-1])?arguments[t-=1]:Ea)))throw new TypeError(Y("invalid argument. Must provide a recognized data type. Value: `%s`.",e));return t<=0?new n(0):1===t?((r=arguments[0])instanceof xa?r=yr(r,0):r instanceof Ta?r=mr(r,0):r instanceof Va&&(r=va(r,0)),new n(r)):2===t?new n(arguments[0],arguments[1]):new n(arguments[0],arguments[1],arguments[2])}function Aa(t){if(t.length)return t.isStructType?function(t){return function(){var e,n,r,i;for(e=(n=this[ia]).byteOffset+t.byteOffset,r=[],i=0;i<t.length;i++)r.push(new t.type(n.buffer,e,t.byteLength)),e+=t.byteOffset;return r}}(t):function(t){return function(){var e=this[ia];return Oa(e.buffer,e.byteOffset+t.byteOffset,t.length,t.type)}}(t);switch(t.type){case"float64":case"float32":case"float16":case"int8":case"int16":case"int32":case"uint8":case"uint16":case"uint32":case"int64":case"uint64":return function(t,e){return function(){return this[ia][e](t.byteOffset,oi)}}(t,sa[t.type].get);case"bool":return function(t,e){return function(){var n=this[ia];return H(n[e](t.byteOffset,oi))}}(t,sa[t.type].get);case"complex128":case"complex64":case"complex32":return ya(t,sa[t.type].get);default:if(t.isStructType)return function(t){return function(){var e=this[ia];return new t.type(e.buffer,e.byteOffset+t.byteOffset,t.byteLength)}}(t);throw new Error(Y("unexpected error. Unrecognized data type. Value: `%s`.",t.type))}}var ja={all:["bool","complex64","complex128","float32","float64","generic","int16","int32","int8","uint16","uint32","uint8","uint8c"],typed:["bool","complex64","complex128","float32","float64","int16","int32","int8","uint16","uint32","uint8","uint8c"],floating_point:["complex64","complex128","float32","float64"],real_floating_point:["float32","float64"],complex_floating_point:["complex64","complex128"],boolean:["bool"],integer:["int16","int32","int8","uint16","uint32","uint8","uint8c"],signed_integer:["int16","int32","int8"],unsigned_integer:["uint16","uint32","uint8","uint8c"],real:["float32","float64","int16","int32","int8","uint16","uint32","uint8","uint8c"],numeric:["complex64","complex128","float32","float64","int16","int32","int8","uint16","uint32","uint8","uint8c"],index:["int32","uint8","bool","generic"],integer_index:["int32"],boolean_index:["bool"],mask_index:["uint8"],typed_index:["int32","uint8","bool"]},Sa=/_and_generic$/;function La(){var t,e,n;return 0===arguments.length?ja.all.slice():(n=!1,t=arguments[0],Sa.test(t)&&"all"!==(t=ti(t,Sa,""))&&"index"!==t&&(n=!0),e=(e=ja[t])?e.slice():[],n&&e.length>0&&e.push("generic"),e)}var Fa=Pi(La("real_floating_point")),Ia=Pi(La("signed_integer"));function Ra(t){return"bigint"==typeof t}function Ba(t){return"object"==typeof t&&"[object BigInt]"===f(t)&&function(t){try{return"bigint"==typeof t.valueOf()}catch(t){return!1}}(t)}function Ma(t){return Ra(t)||Ba(t)}function ka(t){return function(){return t}}K(Ma,"isPrimitive",Ra),K(Ma,"isObject",Ba);var Ua,Na=ka(!1),Pa=ka(!1),Ca=ka(!1);K(Na,"isPrimitive",Pa),K(Na,"isObject",Ca),Ua=zt()?Ma:Na;const{isPrimitive:Ya}=Ua;var Da=1401298464324817e-60,Ja=16777215,za=-16777215;function $a(t){return t!=t||t===It||t===Rt?"float32":Mt(t)?t>=za&&t<=Ja?"float32":"float64":t>-Da&&t<Da?"float64":"float32"}function Wa(t){return Ot(t)?t!=t||t===It||t===Rt?"float32":Mt(t)?0===t&&(0===(e=t)&&1/e===Rt)?"float32":t<0?t>=Yn?"int8":t>=xn?"int16":t>=ln?"int32":"float64":t<=Sn?"uint8":t<=mn?"uint16":t<=he?"uint32":"float64":t>-Da&&t<Da?"float64":"float32":X(t)?"bool":or(t)?"float64"===$a(t.re)||"float64"===$a(t.im)?"complex128":"complex64":"generic";var e}var Ga={Complex64:"complex64",Complex128:"complex128"};var Za,qa=["complex64","complex128"].slice(),Ka=[];for(Za=0;Za<qa.length;Za++)Ka.push(ca(qa[Za]));var Xa=qa.length;function Ha(t){var e;for(e=0;e<Xa;e++)if(t instanceof Ka[e])return qa[e];return Ga[mt(t)]||null}function Qa(t){return t?1:0}function tu(t){return At(t)}var eu={dtypes:{real:"float64",complex:"complex128"}};function nu(t,e){return function(n){var r,i;Ot(n)?(r=Fa(t.type)?t.type:Ut(n)?Ia(t.type)?function(t){return t<0?t>=Yn?"int8":t>=xn?"int16":t>=ln?"int32":"float64":t<=Cn?"int8":t<=En?"int16":t<=sn?"int32":"float64"}(n):Wa(n):eu.dtypes.real,i=n):or(n)?(r=Ha(n)||("float32"===t.type?"complex64":"complex128"),i=n.re):X(n)?(r="bool",i=Qa(n)):Ya(n)?(r="int64",i=tu(n)):(r="generic",i=n);if(!bo(r,t.type,t.castingMode))throw new TypeError(Y("invalid assignment. Assigned value cannot be cast to the data type of `%s`. Data types: [%s, %s].",t.name,t.type,r));this[ia][e](t.byteOffset,i,oi)}}function ru(t){return H(t)}function iu(t){return H(t.re||t.im)}function ou(t,e){return function(n){var r,i;X(n)?(r="bool",i=Qa(n)):Ot(n)?(r=eu.dtypes.real,i=Qa(ru(n))):Ya(n)?(r="int64",i=Qa(function(t){return H(t)}(n))):or(n)?(r=Ha(n)||eu.dtypes.complex,i=Qa(iu(n))):(r="generic",i=H(n));if(!bo(r,t.type,t.castingMode))throw new TypeError(Y("invalid assignment. Assigned value cannot be cast to the data type of `%s`. Data types: [%s, %s].",t.name,t.type,r));this[ia][e](t.byteOffset,i,oi)}}function au(t,e){return function(n){var r,i;Ya(n)?(r="int64",i=n):Ot(n)?Ut(n)?(r=Wa(n),i=mi(n)):(r=eu.dtypes.real,i=mi(Bt(n))):X(n)?(r="bool",i=function(t){return mi(t?1:0)}(n)):or(n)?(r=Ha(n)||eu.dtypes.complex,i=mi(Bt(n.re))):(r="generic",i=mi(Bt(At(i))));if(!bo(r,t.type,t.castingMode))throw new TypeError(Y("invalid assignment. Assigned value cannot be cast to the data type of `%s`. Data types: [%s, %s].",t.name,t.type,r));this[ia][e](t.byteOffset,i,oi)}}function uu(t){return l(t)&&ci(t[ia])}var fu=Pi(La("complex_floating_point")),su=Pi(La("boolean")),lu=Pi(La("real"));function cu(t,e){if(lr(t))return mr(t,e);if(fr(t))return yr(t,e);throw new TypeError(Y("invalid argument. First argument must be a complex-valued floating-point array. Value: `%s`.",t))}function hu(t,e){return e>0?0:(1-t)*e}var pu=8;function gu(t,e,n,r,i){var o,a,u,f;if(t<=0)return n;if((u=Jr(n)).accessorProtocol)return function(t,e,n,r,i){var o,a,u,f;for(o=n.data,a=n.accessors[1],u=i,f=0;f<t;f++)a(o,u,e),u+=r}(t,e,u,r,i),u.data;if(o=i,1===r){if((a=t%pu)>0)for(f=0;f<a;f++)n[o]=e,o+=r;if(t<pu)return n;for(f=a;f<t;f+=pu)n[o]=e,n[o+1]=e,n[o+2]=e,n[o+3]=e,n[o+4]=e,n[o+5]=e,n[o+6]=e,n[o+7]=e,o+=pu;return n}for(f=0;f<t;f++)n[o]=e,o+=r;return n}function yu(t,e,n,r){return gu(t,e,n,r,hu(t,r))}function mu(t){return ra(0,t)}function du(t,e,n,r,i,o){var a,u;return a=Jr(t),u=Jr(e),a.accessorProtocol||u.accessorProtocol?(function(t,e,n,r,i,o){var a,u,f,s,l,c;for(a=t.data,u=e.data,f=t.accessors[0],s=e.accessors[1],l=r,c=0;c<a.length;c++)s(u,l,i.call(o,f(a,c),c,a)),l+=n}(a,u,n,r,i,o),e):function(t,e,n,r,i,o){var a,u;for(a=r,u=0;u<t.length;u++)e[a]=i.call(o,t[u],u,t),a+=n;return e}(t,e,n,r,i,o)}function vu(t,e,n){return function(t,e){return"function"==typeof t[e]}(t,"map")?t.map(e,n):du(t,mu(t.length),1,0,e,n)}function bu(t){return t.re}function wu(t){if(t.length)return t.isStructType?function(t){return function(e){var n,r,i,o,a,u,f,s;if(!ve(e))throw new TypeError(Y("invalid assignment. `%s` must be an array-like object. Value: `%s`.",t.name,e));if(e.length!==t.length)throw new RangeError(Y("invalid assignment. `%s` must be an array-like object having length %u.",t.name,t.length));if("none"===t.casting)for(s=0;s<e.length;s++)if(!(e[s]instanceof t.type))throw new TypeError(Y("invalid assignment. Assigned value cannot be cast to the data type of `%s`. Value: `%s`.",t.name,e[s]));for(f=t.byteLength/t.length,r=[],s=0;s<e.length;s++){if((u=this.constructor.viewOf(e[s])).byteLength!==f)throw new RangeError(Y("invalid assignment. `%s` must be an array-like object containing `struct` instances having the same byte length.",t.name));a=new Rn(u.buffer,u.byteOffset,f),r.push(a)}for(n=(i=this[ia]).byteOffset+t.byteOffset,s=0;s<e.length;s++)o=new Rn(i.buffer,n,f),Qo(t.length,r[s],1,o,1),n+=f}}(t):function(t){return function(e){var n,r,i;if(!ve(e)||uu(e))throw new TypeError(Y("invalid assignment. `%s` must be an array-like object. Value: `%s`.",t.name,e));if(e.length!==t.length)throw new RangeError(Y("invalid assignment. `%s` must be an array-like object having length %u.",t.name,t.length));if(!bo(i=Dr(e),t.type,t.castingMode))throw new TypeError(Y("invalid assignment. Assigned value cannot be cast to the data type of `%s`. Data types: [%s, %s].",t.name,t.type,i));return n=Oa((r=this[ia]).buffer,r.byteOffset+t.byteOffset,t.length,t.type),i===t.type?fu(i)?void Qo(2*t.length,cu(e,0),1,cu(n,0),1):su(i)?void Qo(t.length,va(e,0),1,va(n,0),1):void Qo(t.length,e,1,n,1):lu(i)?lu(t.type)?void Qo(t.length,e,1,n,1):fu(t.type)?(n=cu(n,0),Qo(t.length,n,2,e,1),void yu.ndarray(t.length,0,n,2,1)):void vu.assign(e,n,1,0,ru):fu(i)?lu(t.type)?void vu.assign(e,n,1,0,bu):fu(t.type)?void Qo(2*t.length,cu(e,0),1,cu(n,0),1):void vu.assign(e,n,1,0,iu):void(lu(t.type)?Qo(t.length,va(e,0),1,n,1):(n=cu(n,0),Qo(t.length,n,2,va(e,0),1),yu.ndarray(t.length,0,n,2,1)))}}(t);switch(t.type){case"float64":case"float32":case"float16":case"int8":case"int16":case"int32":case"uint8":case"uint16":case"uint32":return nu(t,sa[t.type].set);case"int64":case"uint64":return au(t,sa[t.type].set);case"bool":return ou(t,sa[t.type].set);case"complex128":case"complex64":case"complex32":return function(t,e){return function(n){var r,i,o,a;if(or(n)?(i=Ha(n)||t.type,o=n.re,a=n.im):Ot(n)?(i="complex64"===t.type?"float32":"float64",o=n,a=0):Ya(n)?(i="int64",o=tu(n),a=0):X(n)?(i="bool",o=Qa(n),a=0):(i="generic",o=n,a=0),!bo(i,t.type,t.castingMode))throw new TypeError(Y("invalid assignment. Assigned value cannot be cast to the data type of `%s`. Data types: [%s, %s].",t.name,t.type,i));(r=this[ia])[e](t.byteOffset,o,oi),r[e](t.byteOffset+t.byteLength/2,a,oi)}}(t,sa[t.type].set);default:if(t.isStructType)return function(t){return function(e){var n,r,i,o,a;if(!uu(e))throw new TypeError(Y("invalid assignment. `%s` must be a `struct` instance. Value: `%s`.",t.name,e));if("none"===t.casting&&!(e instanceof t.type))throw new TypeError(Y("invalid assignment. Assigned value cannot be cast to the data type of `%s`. Value: `%s`.",t.name,e));if(a=t.byteLength,(o=this.constructor.viewOf(e)).byteLength!==a)throw new RangeError(Y("invalid assignment. `%s` must be a `struct` instance having the same byte length.",t.name));i=new Rn(o.buffer,o.byteOffset,a),n=this[ia],r=new Rn(n.buffer,n.byteOffset+t.byteOffset,a),Qo(t.length,i,1,r,1)}}(t);throw new Error(Y("unexpected error. Unrecognized data type. Value: `%s`.",t.type))}}K(yu,"ndarray",gu),K(vu,"assign",du);var _u=["name","type","description","length","enumerable","writable","default","castingMode"];function Eu(t){return"union"===t.type&&ve(t.fields)}function xu(t){return null==t}function Tu(t,e,n,r,i){var o,a,u,f,s;if(t<=0)return"";if(1===r&&0===i&&t===n.length&&function(t,e){return"function"==typeof t[e]}(n,"join"))return n.join(e);if((u=Jr(n)).accessorProtocol)return function(t,e,n,r,i){var o,a,u,f,s,l;for(o=n.data,a=n.accessors[0],f=i,u="",l=0;l<t;l++)l>0&&(u+=e),xu(s=a(o,f))||(u+=String(s)),f+=r;return u}(t,e,u,r,i);for(a=i,o="",s=0;s<t;s++)s>0&&(o+=e),xu(f=n[a])||(o+=String(f)),a+=r;return o}function Vu(t,e){return Tu(t.length,e,t,1,0)}function Ou(t,e){return X(t)?null:new TypeError(Y("invalid argument. `%s` field must be a boolean. Value: `%s`.",e,t))}K((function(t,e,n,r){return Tu(t,e,n,r,hu(t,r))}),"ndarray",Tu);var Au=["int8","int16","int32","int64","uint8","uint16","uint32","uint64","float32","float64","complex64","complex128","bool"];var ju,Su={int8:1,int16:2,int32:4,int64:8,uint8:1,uint16:2,uint32:4,uint64:8,float16:2,float32:4,float64:8,complex32:2,complex64:4,complex128:8,bool:1},Lu=["name","type"],Fu={name:function(t,e){return Wt(t)||t.length>0?null:new TypeError(Y("invalid argument. `%s` field must be a non-empty string. Value: `%s`.",e,t))},type:function(t){return Ni(Au,t)||$i(t)?null:new TypeError(Y('invalid argument. `%s` field must be either a struct type or one of the following: "%s". Value: `%s`.',"type",Vu(Au,", "),t))},description:function(t,e){return Wt(t)?null:new TypeError(Y("invalid argument. `%s` field must be a string. Value: `%s`.",e,t))},length:function(t,e){return Xt(t)?null:new TypeError(Y("invalid argument. `%s` field must be a positive integer. Value: `%s`.",e,t))},enumerable:Ou,writable:Ou,default:ka(null),castingMode:(ju=["none","safe","mostly-safe","same-kind","unsafe"],function(t,e){return Ni(ju,t)?null:new TypeError(Y('invalid argument. `%s` field must be one of the following: "%s". Value: `%s`.',e,Vu(ju,", "),t))})};function Iu(t,e){var n,r,i,o,a;for(n={isStructType:!1,description:"",byteLength:0,byteOffset:0,alignment:0,padding:0,enumerable:!0,writable:!0,default:void 0,castingMode:"none"},a=0;a<e.length;a++)if(zi(t,o=e[a])){if(i=t[o],r=Fu[o](i,o))return r;n[o]=i}return function(t,e){var n;for(n=0;n<e.length;n++)if(!zi(t,e[n]))return!1;return!0}(n,Lu)?(n.isStructType=$i(n.type),n.byteLength=function(t){var e;return e=t.isStructType?t.type.byteLength:Fe(t.type),t.length&&(e*=t.length),e}(n),n.isStructType?n.alignment=n.type.alignment:n.alignment=Su[n.type],n):new TypeError(Y('invalid argument. Field objects must have the following properties: "%s". Value: `%s`.',Vu(Lu,", "),JSON.stringify(t)))}function Ru(t){var e,n,r;for(e=0,r=0;r<t.length;r++)(n=t[r].alignment)>e&&(e=n);return e}function Bu(t){var e,n,r,i,o,a,u;if(0===(e=t.fields).length)return null;for(r=[],u=0;u<e.length;u++){if(!l(a=e[u]))return null;if(Eu(a))return new TypeError(Y("invalid argument. Union types cannot contain nested union types. Value: `%s`.",JSON.stringify(e)));if(void 0===n&&zi(a,"default"))n=!0;else if(!0===n&&zi(a,"default"))return new TypeError(Y("invalid argument. Union types can only contain one field with a default value. Value: `%s`.",JSON.stringify(e)));if((i=Iu(a,_u))instanceof Error)return i;if(0===u)o=i.byteLength;else if(i.byteLength!==o)return new RangeError(Y("invalid argument. Union types must contain fields having the same byte length. Value: `%s`.",JSON.stringify(e)));r.push(i)}return{type:"union",fields:r,byteLength:o,byteOffset:0,alignment:Ru(r),padding:0}}function Mu(t){var e=Dr(t);return ke(t)?De(e):Ne(e)}function ku(t,e,n){return function(t,e){return"function"==typeof t[e]}(t,"indexOf")?t.indexOf(e,n):(n<0&&(n+=t.length)<0&&(n=0),ve(r=t)&&vt(r.get)&&vt(r.set)?function(t,e,n){var r,i;for(r=Mu(t),i=n;i<t.length;i++)if(e===r(t,i))return i;return-1}(t,e,n):function(t,e,n){var r;for(r=n;r<t.length;r++)if(e===t[r])return r;return-1}(t,e,n));var r}function Uu(t,e){var n;return 0===t.length?new Error("invalid operation. struct does not have any fields."):(n=ku(t,e,0))<0?new TypeError(Y('invalid argument. Field name must be one of the following: "%s". Value: `%s`.',Vu(t,", "),e)):n}function Nu(t,e){var n;for(n=0;n<t.length;n++)t[n].padding=e;return t}function Pu(t){return function(e,n){return Y("[%u,",t+parseInt(n,10))}}function Cu(t){var e,n,r,i,o,a;for(i=t.length,r=/\[(\d{1,}),/g,e=[],a=0;a<i;a++)o=t[a],a>0&&o.byteOffset===t[a-1].byteOffset||(o.isStructType?e.push(ti(o.type.layout,r,Pu(o.byteOffset))):e.push(Y("|<%s>[%u,%u]",o.type,o.byteOffset,o.byteLength)));return"|"===(n=Y("%s|",e.join("")))[n.length-2]&&(n=n.substring(0,n.length-1)),n}var Yu=["none","linear","layout"],Du=Pi(Yu);function Ju(t,e,r){var i;if(!Vt(r))throw new TypeError(Y("invalid argument. Options argument must be an object. Value: `%s`.",r));if(i={format:"none"},n(r,"format")&&(i.format=r.format,!Du(i.format)))throw new TypeError(Y('invalid option. `%s` option must be one of the following: "%s". Option: `%s`.',"format",Vu(Yu,", "),r.format));return"linear"===i.format?function(t,e){var n,r,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x;for(d=e.length,n="%"+(t.byteLength-1).toString().length+"s",y=0,_=0;_<d;_++)(m=(v=e[_]).name.length+1+(v.byteLength-1).toString().length+1)>y&&(y=m);for(r="%"+y+"s",i="// %s",u="%s: %s %s",c=0,s=[],_=0;_<d;_++)if(v=e[_],!(_>0&&v.byteOffset===e[_-1].byteOffset)){for(l=_<d-1&&v.byteOffset===e[_+1].byteOffset,E=0;E<v.byteLength;E++){if(h=Y(n,c.toString()),p=Y(r,Y("%s[%u]",v.name,E)),o=v.alignment>1?" (byte %u)":"",l){for(a=" => union: %s",f=[],x=_+1;x<d&&v.byteOffset===e[x].byteOffset;)w=(b=e[x]).isStructType?"<Struct>":b.type,f.push(Y("%s<%s>[%u]",b.name,w,E%b.alignment)),x+=1;a=Y(a,f.join(", "))}else a="";f=Y(o+a,E%v.alignment),g=v.length?Y(i,Y("%s[%u]%s",v.type,Bt(E/v.alignment),f)):Y(i,Y("%s%s",v.type,f)),s.push(Y(u,h,p,g)),c+=1}for(E=0;E<v.padding;E++)h=Y(n,c.toString()),p=Y(r,"--"),g=Y(i,"padding"),s.push(Y(u,h,p,g)),c+=1}return s.join("\n")}(t,e):"layout"===i.format?Cu(e):"<Struct>"}function zu(){}var $u="foo"===zu.name;var Wu=[Ke,en,gn,un,An,wn,$n,Rn,Nn],Gu=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array"],Zu=Ze()?xt(Ke):qu;function qu(){}Zu="TypedArray"===function(t){if(!1===vt(t))throw new TypeError(Y("invalid argument. Must provide a function. Value: `%s`.",t));return $u?t.name:ht.exec(t.toString())[1]}(Zu)?Zu:qu;var Ku=[Ir,xr],Xu=["Complex64Array","Complex128Array"];function Hu(){return"function"==typeof a&&"symbol"==typeof a("foo")&&n(a,"hasInstance")&&"symbol"==typeof a.hasInstance}var Qu=Hu()?Symbol.hasInstance:null,tf=Hu();function ef(t,e){if("function"!=typeof e&&(!tf||"object"!=typeof e||"function"!=typeof e[Qu]))throw new TypeError(Y("invalid argument. Second argument must be callable. Value: `%s`.",e));return t instanceof e}var nf=[[Ke,"Float64Array"],[en,"Float32Array"],[gn,"Int32Array"],[un,"Uint32Array"],[An,"Int16Array"],[wn,"Uint16Array"],[$n,"Int8Array"],[Rn,"Uint8Array"],[Nn,"Uint8ClampedArray"],[xr,"Complex64Array"],[Ir,"Complex128Array"],[Nr,"BooleanArray"]];function rf(t){var e,n;for(n=0;n<nf.length;n++)if(ef(t,nf[n][0]))return nf[n][1];for(;t;){for(e=mt(t),n=0;n<nf.length;n++)if(e===nf[n][1])return nf[n][1];t=xt(t)}}function of(t){var e,n,r,i;if(function(t){var e,n;if("object"!=typeof t||null===t)return!1;if(t instanceof Zu)return!0;for(n=0;n<Wu.length;n++)if(t instanceof Wu[n])return!0;for(;t;){for(e=mt(t),n=0;n<Gu.length;n++)if(Gu[n]===e)return!0;t=xt(t)}return!1}(t))e=t;else if(function(t){var e,n;if("object"!=typeof t||null===t)return!1;for(n=0;n<Ku.length;n++)if(t instanceof Ku[n])return!0;for(;t;){for(e=mt(t),n=0;n<Xu.length;n++)if(Xu[n]===e)return!0;t=xt(t)}return!1}(t))e=8===t.BYTES_PER_ELEMENT?yr(t,0):mr(t,0);else{if(!((i=t)instanceof Nr||"BooleanArray"===mt(i)))throw new TypeError(Y("invalid argument. Must provide a typed array. Value: `%s`.",t));e=va(t,0)}for(n={type:rf(t),data:[]},r=0;r<e.length;r++)n.data.push(e[r]);return n}function af(t){var e,n,r,i,o,a,u,f;if(!ve(t))throw new TypeError(Y("invalid argument. First argument must be an array-like object. Value: `%s`.",t));if(u=function(t){var e,n,r,i;for(e=[],i=0;i<t.length;i++){if(!l(r=t[i]))return new TypeError(Y("invalid argument. First argument must be an array of objects. Value: `%s`. Index: `%d`.",r,i));if(Eu(r)){if(null===(n=Bu(r)))return new TypeError(Y("invalid argument. Union types must be an array of objects. Value: `%s`. Index: `%d`.",JSON.stringify(r),i));if(n instanceof Error)return n}else if((n=Iu(r,_u))instanceof Error)return n;e.push(n)}return e}(t),u instanceof Error)throw u;if(u=function(t){var e,n,r,i,o,a;for(e={},n=[],i=0;i<t.length;i++)if(a=(r=t[i]).name,Eu(r))for(o=0;o<r.fields.length;o++){if(!0===e[a=r.fields[o].name])return new TypeError(Y("invalid argument. First argument must be an array of objects having unique field names. Value: `%s`.",JSON.stringify(t)));e[a]=!0,n.push(a)}else{if(!0===e[a])return new TypeError(Y("invalid argument. First argument must be an array of objects having unique field names. Value: `%s`.",JSON.stringify(t)));e[a]=!0,n.push(a)}return n}(a=u),u instanceof Error)throw u;function s(t,i,u){var f,c,h,p,g,y,m,d,v,b;if(c=arguments.length,!(this instanceof s))return 0===c?new s:1===c?new s(t):2===c?new s(t,i):new s(t,i,u);if(qn(t)){if(1===c)p=new yi(t,0,n);else{if(!Ct(i))throw new TypeError(Y("invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.",i));if(2===c)p=new yi(t,i,n);else{if(!Ct(u))throw new TypeError(Y("invalid argument. Byte length must be a nonnegative integer. Value: `%s`.",u));p=new yi(t,i,na(u,n))}}if(p.byteLength<n)throw new RangeError(Y("invalid argument. ArrayBuffer has insufficient capacity. Minimum capacity: `%u`.",n))}else if(p=new yi(new si(n)),c>0){if(!l(t))throw new TypeError(Y("invalid argument. First argument must be an object. Value: `%s`.",t));g=t}if(K(this,ia,p),void 0!==g){for(f=ra(void 0,a.length),h={},d=0;d<a.length;d++)if(b=e[d],v=r[d],zi(g,b)){if(h[v])throw new Error("invalid argument. Union types may only be initialized by a single member.");f[d]=g[b],h[v]=!0}for(d=0;d<a.length;d++)h[v=r[d]]||void 0!==(y=a[d]).default&&(f[d]=y.default);for(d=0;d<a.length;d++)void 0!==(m=f[d])&&o[e[d]][1].call(this,m)}return this}return e=u,i=Ru(a),a=function(t,e){var n,r,i,o,a,u,f;for(i=0,u=0;u<t.length;u++){if(i+=r=((n=na((a=t[u]).alignment,e))-i%n)%n,u>0&&((o=t[u-1]).padding=r,Eu(a)&&Nu(o.fields,r)),a.byteOffset=i,Eu(a))for(f=0;f<a.fields.length;f++)a.fields[f].byteOffset=i;i+=a.byteLength}return r=(n-i%n)%n,a.padding=r,Eu(a)&&Nu(a.fields,r),t}(a,i),a=function(t){var e,n,r,i;for(e=[],r=0;r<t.length;r++)if(Eu(n=t[r]))for(i=0;i<n.fields.length;i++)e.push(n.fields[i]);else e.push(n);return e}(a),r=function(t){var e,n,r,i;for(n=t.length,e=[],i=0,r=0;r<n-1;r++)t[r].byteOffset!==t[r+1].byteOffset?(e.push(i),i+=1):e.push(i);return e.push(i),e}(a),f=a[a.length-1],n=f.byteOffset+f.byteLength+f.padding,K(s,"name",oa),K(s,"alignment",i),K(s,"byteLength",n),$t(s,"fields",(function(){return e.slice()})),$t(s,"layout",(function(){return Cu(a)})),K(s,"bufferOf",(function(t){if(!uu(t))throw new TypeError(Y("invalid argument. First argument must be a `struct` instance. Value: `%s`.",t));return t[ia].buffer})),K(s,"byteLengthOf",(function(t){var n=Uu(e,t);if(n instanceof Error)throw n;return a[n].byteLength})),K(s,"byteOffsetOf",(function(t){var n=Uu(e,t);if(n instanceof Error)throw n;return a[n].byteOffset})),K(s,"descriptionOf",(function(t){var n=Uu(e,t);if(n instanceof Error)throw n;return a[n].description})),K(s,"isStruct",(function(t){return t instanceof s||uu(t)&&$i(t.constructor)})),K(s,"typeOf",(function(t){var n=Uu(e,t);if(n instanceof Error)throw n;return a[n].type})),K(s,"viewOf",(function(t){var e;if(!uu(t))throw new TypeError(Y("invalid argument. First argument must be a `struct` instance. Value: `%s`.",t));return e=t[ia],new yi(e.buffer,e.byteOffset,e.byteLength)})),o=function(t,e){var n,r,i,o,a;for(i={},a=0;a<e.length;a++)n=Aa(o=e[a]),r=wu(o),o.enumerable?o.writable?fa(t,o.name,n,r):ua(t,o.name,n):o.writable?aa(t,o.name,n,r):$t(t,o.name,n),i[o.name]=[n,r];return i}(s.prototype,a),K(s.prototype,"toString",(function(){if(!(this instanceof s))throw new Error("invalid invocation. `this` is not a struct instance.");return Ju(s,a,arguments.length>0?arguments[0]:{})})),K(s.prototype,"toJSON",(function(){if(!(this instanceof s))throw new Error("invalid invocation. `this` is not a struct instance.");return function(t,e){var n,r,i,o;for(n={},o=0;o<e.length;o++)ve(i=t[(r=e[o]).name])?i=of(i):(uu(i)||or(i)&&vt(i.toJSON))&&(i=i.toJSON()),n[r.name]=i;return n}(this,a)})),s}function uf(t,e,n){var r,i,o,a,u,f,s,l,c,h,p;for(u={format:"layout"},f=n.length,s=n.get&&n.set?De("default"):Ne("default"),o=t.layout,c=t.byteLength,r=new Rn(e),i=0,p=0;p<f;p++){h=s(n,p);try{a=t.viewOf(h),l=!0}catch(e){try{h=new t(h)}catch(t){return null}a=t.viewOf(h),l=!1}if(l&&h.toString(u)!==o)return null;ea(c,new Rn(a.buffer,a.byteOffset,a.byteLength),1,0,r,1,i),i+=c}return e}var ff=cr(),sf="StructArray";function lf(t){var e,n,r,i;if(ve(t))i=af(t);else{if(!$i(t))throw new TypeError(Y("invalid argument. First argument must be either a struct constructor or struct schema. Value: `%s`.",t));i=t}function o(t,n,r){var a,u,f,s;if(a=arguments.length,!(this instanceof o))return 0===a?new o:1===a?new o(t):2===a?new o(t,n):new o(t,n,r);if(0===a)u=new si(0),f=0;else if(1===a)if(Ct(t))u=new si(t*e),f=t;else if(ve(t)){if(f=t.length,null===(u=uf(i,new si(f*e),t)))throw new TypeError(Y("invalid argument. Each element of a provided input array must be a valid object or a struct instance having the same layout as elements in the desired output array."))}else if(qn(t)){if(!Ut(f=(u=t).byteLength/e))throw new RangeError(Y("invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.",e,u.byteLength))}else{if(!l(t))throw new TypeError(Y("invalid argument. First argument must be a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",t));if(!1===ff)throw new TypeError(Y("invalid argument. Environment lacks Symbol.iterator support. First argument must be a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.",t));if(!vt(t[hr]))throw new TypeError(Y("invalid argument. First argument must be a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",t));if(!vt((u=t[hr]()).next))throw new TypeError(Y("invalid argument. First argument must be a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",t));if(f=(s=function(t){var e,n;for(e=[];!(n=t.next()).done;)e.push(n.value);return e}(u)).length,null===(u=uf(i,new si(f*e),s)))throw new TypeError(Y("invalid argument. Each element of a provided input iterable must be either a valid object or a struct instance having the same layout as elements in the desired output array."))}else{if(!qn(u=arguments[0]))throw new TypeError(Y("invalid argument. First argument must be an ArrayBuffer. Value: `%s`.",t));if(!Ct(n))throw new TypeError(Y("invalid argument. Second argument must be a nonnegative integer. Value: `%s`.",n));if(!Ut(n/e))throw new RangeError(Y("invalid argument. Second argument must be a multiple of %u. Value: `%u`.",e,n));if(n>=u.byteLength)throw new RangeError(Y("invalid argument. Second argument exceeds the bounds of the ArrayBuffer. Value: `%s`.",n));if(2===a){if(!Ut(f=(u.byteLength-n)/e))throw new RangeError(Y("invalid argument. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.",e,u.byteLength-n))}else{if(!Ct(f=r))throw new TypeError(Y("invalid argument. Third argument must be a nonnegative integer. Value: `%s`.",f));if(f*e>u.byteLength-n)throw new RangeError(Y("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",f*e))}}return K(this,"_buffer",u),K(this,"_byteOffset",n||0),K(this,"_byteLength",f*e),K(this,"_length",f),this}return e=i.byteLength,n=i.layout,r=i.fields,K(o,"BYTES_PER_ELEMENT",e),K(o,"name",sf),K(o,"struct",i),$t(o.prototype,"buffer",(function(){return this._buffer})),$t(o.prototype,"byteLength",(function(){return this._byteLength})),$t(o.prototype,"byteOffset",(function(){return this._byteOffset})),K(o.prototype,"BYTES_PER_ELEMENT",o.BYTES_PER_ELEMENT),K(o.prototype,"get",(function(t){if(!a(this))throw new TypeError(Y("invalid invocation. `this` is not a %s.",sf));if(!Ct(t))throw new TypeError(Y("invalid argument. Must provide a nonnegative integer. Value: `%s`.",t));if(!(t>=this._length))return new i(this._buffer,this._byteOffset+t*e,e)})),$t(o.prototype,"length",(function(){return this._length})),K(o.prototype,"set",(function(t){var o,u,f,s,c,h,p,g,y,m,d,v;if(!a(this))throw new TypeError(Y("invalid invocation. `this` is not a %s.",sf));if(s=this._buffer,arguments.length>1){if(!Ct(f=arguments[1]))throw new TypeError(Y("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",f))}else f=0;if(u={format:"layout"},p=i.byteLength,!ve(t)||Ni(r,"length")){if(f>=this._length)throw new RangeError(Y("invalid argument. Index argument is out-of-bounds. Value: `%u`.",f));if(!l(t))throw new TypeError(Y("invalid argument. Must provide either a valid object or a struct instance. Value: `%s`.",t));if(t.toString(u)===n)return o=i.viewOf(t),void ea(p,new Rn(o.buffer,o.byteOffset,p),1,0,new Rn(s,this._byteOffset+f*e,p),1,0);for(y=new i(s,this._byteOffset+f*e,p),d=0;d<r.length;d++)zi(t,m=r[d])&&(y[m]=t[m])}else{if(f+(g=t.length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(h=(o=t).get&&o.set?De("default"):Ne("default"),v=this._byteOffset+f*e,o.buffer===s&&o.byteOffset<v&&o.byteOffset+o.byteLength>v){for(c=[],d=0;d<g;d++)c.push(h(t,d));o=c,h=Ne("default")}for(d=0;d<g;f++,d++)this.set(h(o,d),f)}})),K(o.prototype,"struct",i),o;function a(t){return"object"==typeof t&&null!==t&&(t.constructor.name===sf||function(t,e){var n=typeof e;if(null===e||"object"!==n&&"function"!==n)throw new TypeError(Y("invalid argument. Second argument must be either an object (except null) or a function. Value: `%s`.",e));return n=typeof t,null!==t&&("object"===n||"function"===n)&&Ko.call(e,t)}(t,o.prototype))&&t.BYTES_PER_ELEMENT===e}}var cf="function"==typeof Buffer?Buffer:null;var hf,pf=t.Buffer;hf=function(){var t,e;if("function"!=typeof cf)return!1;try{t=yt(e="function"==typeof cf.from?cf.from([1,2,3,4]):new cf([1,2,3,4]))&&1===e[0]&&2===e[1]&&3===e[2]&&4===e[3]}catch(e){t=!1}return t}()?pf:function(){throw new Error("not implemented")};var gf=hf;function yf(){throw new Error("not implemented")}var mf={binary:gf,float64:Ke,float32:en,float16:yf,generic:Array,int16:An,int32:gn,int8:$n,uint16:wn,uint32:un,uint8:Rn,uint8c:Nn,complex32:yf,complex64:xr,complex128:Ir,bool:Nr},df={};function vf(t){var e,n,r;return!vt(t)&&(r=Xi(t),n=mf[r]||null)?n:to(t)?(r?e=t.value:r=(e=t).layout,(n=df[r])||(n=lf(e),df[r]=n),n):null}var bf=vt(gf.allocUnsafe)?function(t){if(!Dt(t))throw new TypeError(Y("invalid argument. Must provide a nonnegative integer. Value: `%s`.",t));return gf.allocUnsafe(t)}:function(t){if(!Dt(t))throw new TypeError(Y("invalid argument. Must provide a nonnegative integer. Value: `%s`.",t));return new gf(t)};function wf(t){return function(t,e,n,r){var i;return function(t,e){return"function"==typeof t["fill"]}(t)?t.fill(e,n,r):(n<0&&(n+=t.length)<0&&(n=0),r<0?r+=t.length:r>t.length&&(r=t.length),(i=Jr(t)).accessorProtocol?function(t,e,n,r){var i,o,a;for(i=t.data,o=t.accessors[1],a=n;a<r;a++)o(i,a,e);return i}(i,e,n,r):function(t,e,n,r){var i;for(i=n;i<r;i++)t[i]=e;return t}(t,e,n,r))}(bf(t),0,0,t)}function _f(t,e){var n=Xi(t);return"generic"===n?mu(e):"binary"===n?wf(e):function(t,e){var n=vf(t);return n?new n(e):null}(t,e)}var Ef={Buffer:"binary",Float16Array:"float16",Float32Array:"float32",Float64Array:"float64",Array:"generic",Int16Array:"int16",Int32Array:"int32",Int8Array:"int8",Object:"generic",Uint16Array:"uint16",Uint32Array:"uint32",Uint8Array:"uint8",Uint8ClampedArray:"uint8c",Complex32Array:"complex32",Complex64Array:"complex64",Complex128Array:"complex128",BooleanArray:"bool"};function xf(){throw new Error("not implemented")}var Tf=[Ke,en,xf,gn,un,An,wn,$n,Rn,Nn,xf,xr,Ir,Nr],Vf=["float64","float32","float16","int32","uint32","int16","uint16","int8","uint8","uint8c","complex32","complex64","complex128","bool"],Of=Vf.length;function Af(t){return Ji(t)||((e=t)instanceof Hi||"object"==typeof e&&null!==e&&Ut(e.alignment)&&Ut(e.byteLength)&&Wt(e.byteOrder)&&Wt(e.char)&&Ut(e.enum)&&zi(e,"value"))||to(t);var e}function jf(t){var e,n,r,i;if("object"!=typeof t||null===t)throw new TypeError(Y("invalid argument. Must provide an ndarray. Value: `%s`.",t));if(!ve(n=t.shape))throw new TypeError(Y("invalid argument. Must provide an ndarray. Value: `%s`.",t));for(e=[],i=0;i<n.length;i++){if(!Ct(r=n[i]))throw new TypeError(Y("invalid argument. Must provide an ndarray. Value: `%s`.",t));e.push(r)}return e}function Sf(t){var e,n,r,i,o,a;if("object"!=typeof t||null===t)throw new TypeError(Y("invalid argument. Must provide an ndarray. Value: `%s`.",t));if(!ve(i=t.strides)){if(!ve(r=t.shape))throw new TypeError(Y("invalid argument. Must provide an ndarray. Value: `%s`.",t));return 0===r.length?[0]:(n=t.order,ro(n)||(n="row-major"),wo(r,n))}for(e=[],a=0;a<i.length;a++){if(!Ut(o=i[a]))throw new TypeError(Y("invalid argument. Must provide an ndarray. Value: `%s`.",t));e.push(o)}return e}var Lf="row-major",Ff="column-major";function If(t){var e;if("object"!=typeof t||null===t)throw new TypeError(Y("invalid argument. Must provide an ndarray. Value: `%s`.",t));return e=t.order,ro(e)?e:1===(e=Be(Sf(t)))||3===e?Lf:2===e?Ff:0===function(t){var e,n;if("object"!=typeof t||null===t)throw new TypeError(Y("invalid argument. Must provide an ndarray. Value: `%s`.",t));if(Ct(n=t.ndims))return n;if(!ve(e=t.shape))throw new TypeError(Y("invalid argument. Must provide an ndarray. Value: `%s`.",t));return e.length}(t)?Lf:null}function Rf(t,e){var n=e[0];return Gn(n)&&(t.push(n.length),Rf(t,n)),t}function Bf(t,e,n,r,i){var o,a,u;for(o=e[n],u=0;u<r.length;u++){if(!Gn(a=r[u])||a.length!==o)return n;if(i&&(a=Bf(t,e,n+1,a,n+1<t-1))<t)return a}return t}function Mf(t){var e,n;if(!Gn(t))throw new TypeError(Y("invalid argument. Must provide an array-like object. Value: `%s`.",t));return Rf(e=[t.length],t),(n=e.length)>1&&(e.length=Bf(n,e,1,t,n>2)),e}function kf(t,e,n,r,i,o){var a,u,f,s,l;for(a=t.length,u=1,l=0;l<a;l++)u*=t[l];if("clamp"===o)i<0?i=0:i>=u&&(i=u-1);else if("wrap"===o)i<0?(i+=u)<0&&0!==(i%=u)&&(i+=u):i>=u&&(i-=u)>=u&&(i%=u);else if("normalize"===o&&i<0&&(i+=u),i<0||i>=u)throw new RangeError(Y("invalid argument. Linear index must not exceed array dimensions. Number of array elements: `%u`. Value: `%d`.",u,i));if(f=n,qr(r)){for(l=0;l<a;l++)i-=s=i%t[l],i/=t[l],f+=s*e[l];return f}for(l=a-1;l>=0;l--)i-=s=i%t[l],i/=t[l],f+=s*e[l];return f}var Uf=3;function Nf(t,e,n,r){var i,o,a,u,f,s,l;if(t<=0)return e;if((u=Jr(e)).accessorProtocol)return function(t,e,n,r){var i,o,a,u,f,s,l,c;for(i=e.data,a=e.accessors[0],o=e.accessors[1],l=Bt(t/2),s=(f=r)+(t-1)*n,c=0;c<l;c++)u=a(i,f),o(i,f,a(i,s)),o(i,s,u),f+=n,s-=n}(t,u,n,r),u.data;if(s=Bt(t/2),o=r,1===n){if(a=o+t-1,(f=s%Uf)>0)for(l=0;l<f;l++)i=e[o],e[o]=e[a],e[a]=i,o+=n,a-=n;if(s<Uf)return e;for(l=f;l<s;l+=Uf)i=e[o],e[o]=e[a],e[a]=i,i=e[o+1],e[o+1]=e[a-1],e[a-1]=i,i=e[o+2],e[o+2]=e[a-2],e[a-2]=i,o+=Uf,a-=Uf;return e}for(a=o+(t-1)*n,l=0;l<s;l++)i=e[o],e[o]=e[a],e[a]=i,o+=n,a-=n;return e}function Pf(t,e,n){return Nf(t,e,n,hu(t,n))}K(Pf,"ndarray",Nf);var Cf="throw";function Yf(t,e,n,r,i){var o;for(o=0;o<e;o++)n[i]=t[o],i+=r}function Df(t,e,n,r,i,o,a){var u,f,s,l;for(u=(s=r+1)===e,f=n[r],l=0;l<f;l++)u?(i[a]=t[l],a+=o):a=Df(t[l],e,n,s,i,o,a);return a}function Jf(t,e,n,r,i,o){var a=e.length;return 0===a?r:1===a?(Yf(t,e[0],r,i,o),r):n?(function(t,e,n,r,i,o){var a,u,f,s,l,c,h;for(Df(t,e,n,0,u=mu(a=Eo(n)),1,0),l=wo(n,f="row-major"),Yf(n,e,s=mu(e),1,0),Pf(e,s,1),Pf(e,l,1),h=0;h<a;h++)c=kf(s,l,0,f,h,Cf),r[o]=u[c],o+=i}(t,a,e,r,i,o),r):(Df(t,a,e,0,r,i,o),r)}function zf(t,e,n){return Jf(t,e,n,mu(Eo(e)),1,0)}function $f(){var t,e=arguments,n="https://stdlib.io/e/"+e[0]+"?";for(t=1;t<e.length;t++)n+="&arg[]="+encodeURIComponent(e[t]);return n}function Wf(t){return"object"==typeof t&&null!==t&&"number"==typeof t.length&&Mt(t.length)&&t.length>=0&&t.length<It}function Gf(t,e,n){var r,i,o,a,u,f;if(r=Mu(t),eo(n,"generic")){for(o=[],a=0;a<e;a++)o.push(r(t,a));return o}if(eo(n,"binary")){for(o=bf(e),a=0;a<e;a++)o[a]=r(t,a);return o}for(o=new(vf(n))(e),f=Dr(u=o),i=ke(u)?ze(f):Ce(f),a=0;a<e;a++)i(o,a,r(t,a));return o}K(zf,"assign",Jf);var Zf=Pi(Di("complex_floating_point"));var qf=Pi(Di("real"));var Kf=8,Xf=16;function Hf(t){return"object"==typeof t&&null!==t&&("Complex128Array"===t.constructor.name&&t.BYTES_PER_ELEMENT===Xf||"Complex64Array"===t.constructor.name&&t.BYTES_PER_ELEMENT===Kf)}var Qf=1;function ts(t){return"object"==typeof t&&null!==t&&"BooleanArray"===t.constructor.name&&t.BYTES_PER_ELEMENT===Qf}var es="number";function ns(t){var e,n,r;for(n=t.length,e=[],r=0;r<n;r++)e.push(t[r]);return e}var rs="row-major";function is(t,e){var n,r,i;return"object"!=typeof(i=t.strides)||null===i?0===(r=t.shape).length?[0]:(Wt(n=t.order)||(n=rs),wo(r,n)):e?ns(i):i}function os(t){var e,n,r;return Ot(r=t.offset)?r:0===(n=t.shape).length||"object"!=typeof(e=t.strides)||null===e?0:_o(n,e)}var as="row-major",us="column-major";function fs(t){var e,n;return Wt(n=t.order)?n:"object"!=typeof(e=t.strides)||null===e||1===(n=Be(e))||3===n?as:2===n?us:0===t.shape.length?as:null}function ss(t){var e,n,r,i;return e=function(t){return t.data}(t),r=function(t,e){var n=t.shape;return e?ns(n):n}(t,!0),i=function(t){return t.dtype}(t),n=ke(e),{ref:t,dtype:i,data:e,length:Eo(r),shape:r,strides:is(t,!0),offset:os(t),order:fs(t),accessorProtocol:n,accessors:n?[De(i),ze(i)]:[Ne(i),Ce(i)]}}var ls=5;var cs=5;function hs(t,e,n,r,i){var o,a,u,f;if(t<=0||1===e)return n;if((u=Jr(n)).accessorProtocol)return function(t,e,n,r,i){var o,a,u,f,s,l;if(o=n.data,a=n.accessors[0],u=n.accessors[1],f=i,0===r)return u(o,f,a(o,f)*t*e),n;if(1===r){if((s=t%ls)>0)for(l=0;l<s;l++)u(o,f,a(o,f)*e),f+=r;if(t<ls)return n;for(l=s;l<t;l+=ls)u(o,f,a(o,f)*e),u(o,f+1,a(o,f+1)*e),u(o,f+2,a(o,f+2)*e),u(o,f+3,a(o,f+3)*e),u(o,f+4,a(o,f+4)*e),f+=ls;return n}for(l=0;l<t;l++)u(o,f,a(o,f)*e),f+=r}(t,e,u,r,i),n;if(o=i,0===r)return n[o]*=e*t,n;if(1===r){if((a=t%cs)>0)for(f=0;f<a;f++)n[o]*=e,o+=r;if(t<cs)return n;for(f=a;f<t;f+=cs)n[o]*=e,n[o+1]*=e,n[o+2]*=e,n[o+3]*=e,n[o+4]*=e,o+=cs;return n}for(f=0;f<t;f++)n[o]*=e,o+=r;return n}function ps(t,e,n,r){return hs(t,e,n,r,hu(t,r))}function gs(t){var e,n;if(e=[],t<=0)return e;for(n=0;n<t;n++)e.push(n);return e}function ys(t,e,n,r){var i,o,a;for(o=2*n,a=2*r,i=0;a>=0&&a<e.length;)e[a]=i,e[a+1]=0,a+=o,i+=1;return t}function ms(t,e){var n,r;for(n=[],r=0;r<e.length;r++)n.push(t[e[r]]);return n}function ds(t,e,n){var r;return r=gs(t.length),function(t,e){var n,r,i,o,a,u,f,s,l;for(r=1,i=1,l=1;l<t.length;l++){for(n=(u=t[r])<0?-u:u,f=e[i],o=r-1,a=i-1;o>=0&&!(((s=t[o])<0?-s:s)<=n);)t[o+1]=s,e[a+1]=e[a],o-=1,a-=1;t[o+1]=u,e[a+1]=f,r+=1,i+=1}}(e=ns(e),r),{sh:t=ms(t,r),sx:e,sy:n=ms(n,r),idx:r}}K(ps,"ndarray",hs),K(gs,"assign",(function(t,e,n){var r=Jr(t);return r.accessorProtocol?"complex128"===r.dtype?ys(t,mr(t,0),e,n):"complex64"===r.dtype?ys(t,yr(t,0),e,n):function(t,e,n){var r,i,o,a;for(r=t.data,i=t.accessors[1],a=n,o=0;a>=0&&a<r.length;)i(r,a,o),a+=e,o+=1;return r}(r,e,n):function(t,e,n){var r,i;for(i=n,r=0;i>=0&&i<t.length;)t[i]=r,i+=e,r+=1;return t}(t,e,n)}));var vs={BLOCK_SIZE_IN_BYTES:64,BLOCK_SIZE_IN_ELEMENTS:8};function bs(t,e){return function(t){var e,n,r,i;if((n=t.length)<=0)return vs.BLOCK_SIZE_IN_ELEMENTS;if(null===(e=Fe(t[0])))return vs.BLOCK_SIZE_IN_ELEMENTS;for(i=1;i<n;i++){if(null===(r=Fe(t[i])))return vs.BLOCK_SIZE_IN_ELEMENTS;r>e&&(e=r)}return(r=vs.BLOCK_SIZE_IN_BYTES/e|0)>0?r:1}([t,e])}var ws="throw";var _s="throw";var Es=[function(t,e){e.data[e.offset]=t.data[t.offset]},function(t,e){var n,r,i,o,a,u,f,s;for(a=t.shape[0],i=t.strides[0],o=e.strides[0],u=t.offset,f=e.offset,n=t.data,r=e.data,s=0;s<a;s++)r[f]=n[u],u+=i,f+=o},function(t,e,n){var r,i,o,a,u,f,s,l,c,h,p,g,y,m,d;for(s=t.shape,h=t.strides,p=e.strides,n?(l=s[1],c=s[0],o=h[1],a=h[0]-l*h[1],u=p[1],f=p[0]-l*p[1]):(l=s[0],c=s[1],o=h[0],a=h[1]-l*h[0],u=p[0],f=p[1]-l*p[0]),g=t.offset,y=e.offset,r=t.data,i=e.data,d=0;d<c;d++){for(m=0;m<l;m++)i[y]=r[g],g+=o,y+=u;g+=a,y+=f}},function(t,e,n){var r,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_;for(c=t.shape,y=t.strides,m=e.strides,n?(h=c[2],p=c[1],g=c[0],o=y[2],a=y[1]-h*y[2],u=y[0]-p*y[1],f=m[2],s=m[1]-h*m[2],l=m[0]-p*m[1]):(h=c[0],p=c[1],g=c[2],o=y[0],a=y[1]-h*y[0],u=y[2]-p*y[1],f=m[0],s=m[1]-h*m[0],l=m[2]-p*m[1]),d=t.offset,v=e.offset,r=t.data,i=e.data,_=0;_<g;_++){for(w=0;w<p;w++){for(b=0;b<h;b++)i[v]=r[d],d+=o,v+=f;d+=a,v+=s}d+=u,v+=l}},function(t,e,n){var r,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x,T,V;for(p=t.shape,v=t.strides,b=e.strides,n?(g=p[3],y=p[2],m=p[1],d=p[0],o=v[3],a=v[2]-g*v[3],u=v[1]-y*v[2],f=v[0]-m*v[1],s=b[3],l=b[2]-g*b[3],c=b[1]-y*b[2],h=b[0]-m*b[1]):(g=p[0],y=p[1],m=p[2],d=p[3],o=v[0],a=v[1]-g*v[0],u=v[2]-y*v[1],f=v[3]-m*v[2],s=b[0],l=b[1]-g*b[0],c=b[2]-y*b[1],h=b[3]-m*b[2]),w=t.offset,_=e.offset,r=t.data,i=e.data,V=0;V<d;V++){for(T=0;T<m;T++){for(x=0;x<y;x++){for(E=0;E<g;E++)i[_]=r[w],w+=o,_+=s;w+=a,_+=l}w+=u,_+=c}w+=f,_+=h}},function(t,e,n){var r,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x,T,V,O,A,j,S;for(y=t.shape,_=t.strides,E=e.strides,n?(m=y[4],d=y[3],v=y[2],b=y[1],w=y[0],o=_[4],a=_[3]-m*_[4],u=_[2]-d*_[3],f=_[1]-v*_[2],s=_[0]-b*_[1],l=E[4],c=E[3]-m*E[4],h=E[2]-d*E[3],p=E[1]-v*E[2],g=E[0]-b*E[1]):(m=y[0],d=y[1],v=y[2],b=y[3],w=y[4],o=_[0],a=_[1]-m*_[0],u=_[2]-d*_[1],f=_[3]-v*_[2],s=_[4]-b*_[3],l=E[0],c=E[1]-m*E[0],h=E[2]-d*E[1],p=E[3]-v*E[2],g=E[4]-b*E[3]),x=t.offset,T=e.offset,r=t.data,i=e.data,S=0;S<w;S++){for(j=0;j<b;j++){for(A=0;A<v;A++){for(O=0;O<d;O++){for(V=0;V<m;V++)i[T]=r[x],x+=o,T+=l;x+=a,T+=c}x+=u,T+=h}x+=f,T+=p}x+=s,T+=g}},function(t,e,n){var r,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x,T,V,O,A,j,S,L,F,I,R;for(d=t.shape,T=t.strides,V=e.strides,n?(v=d[5],b=d[4],w=d[3],_=d[2],E=d[1],x=d[0],o=T[5],a=T[4]-v*T[5],u=T[3]-b*T[4],f=T[2]-w*T[3],s=T[1]-_*T[2],l=T[0]-E*T[1],c=V[5],h=V[4]-v*V[5],p=V[3]-b*V[4],g=V[2]-w*V[3],y=V[1]-_*V[2],m=V[0]-E*V[1]):(v=d[0],b=d[1],w=d[2],_=d[3],E=d[4],x=d[5],o=T[0],a=T[1]-v*T[0],u=T[2]-b*T[1],f=T[3]-w*T[2],s=T[4]-_*T[3],l=T[5]-E*T[4],c=V[0],h=V[1]-v*V[0],p=V[2]-b*V[1],g=V[3]-w*V[2],y=V[4]-_*V[3],m=V[5]-E*V[4]),O=t.offset,A=e.offset,r=t.data,i=e.data,R=0;R<x;R++){for(I=0;I<E;I++){for(F=0;F<_;F++){for(L=0;L<w;L++){for(S=0;S<b;S++){for(j=0;j<v;j++)i[A]=r[O],O+=o,A+=c;O+=a,A+=h}O+=u,A+=p}O+=f,A+=g}O+=s,A+=y}O+=l,A+=m}},function(t,e,n){var r,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x,T,V,O,A,j,S,L,F,I,R,B,M,k,U;for(b=t.shape,A=t.strides,j=e.strides,n?(w=b[6],_=b[5],E=b[4],x=b[3],T=b[2],V=b[1],O=b[0],o=A[6],a=A[5]-w*A[6],u=A[4]-_*A[5],f=A[3]-E*A[4],s=A[2]-x*A[3],l=A[1]-T*A[2],c=A[0]-V*A[1],h=j[6],p=j[5]-w*j[6],g=j[4]-_*j[5],y=j[3]-E*j[4],m=j[2]-x*j[3],d=j[1]-T*j[2],v=j[0]-V*j[1]):(w=b[0],_=b[1],E=b[2],x=b[3],T=b[4],V=b[5],O=b[6],o=A[0],a=A[1]-w*A[0],u=A[2]-_*A[1],f=A[3]-E*A[2],s=A[4]-x*A[3],l=A[5]-T*A[4],c=A[6]-V*A[5],h=j[0],p=j[1]-w*j[0],g=j[2]-_*j[1],y=j[3]-E*j[2],m=j[4]-x*j[3],d=j[5]-T*j[4],v=j[6]-V*j[5]),S=t.offset,L=e.offset,r=t.data,i=e.data,U=0;U<O;U++){for(k=0;k<V;k++){for(M=0;M<T;M++){for(B=0;B<x;B++){for(R=0;R<E;R++){for(I=0;I<_;I++){for(F=0;F<w;F++)i[L]=r[S],S+=o,L+=h;S+=a,L+=p}S+=u,L+=g}S+=f,L+=y}S+=s,L+=m}S+=l,L+=d}S+=c,L+=v}},function(t,e,n){var r,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x,T,V,O,A,j,S,L,F,I,R,B,M,k,U,N,P,C,Y;for(_=t.shape,L=t.strides,F=e.strides,n?(E=_[7],x=_[6],T=_[5],V=_[4],O=_[3],A=_[2],j=_[1],S=_[0],o=L[7],a=L[6]-E*L[7],u=L[5]-x*L[6],f=L[4]-T*L[5],s=L[3]-V*L[4],l=L[2]-O*L[3],c=L[1]-A*L[2],h=L[0]-j*L[1],p=F[7],g=F[6]-E*F[7],y=F[5]-x*F[6],m=F[4]-T*F[5],d=F[3]-V*F[4],v=F[2]-O*F[3],b=F[1]-A*F[2],w=F[0]-j*F[1]):(E=_[0],x=_[1],T=_[2],V=_[3],O=_[4],A=_[5],j=_[6],S=_[7],o=L[0],a=L[1]-E*L[0],u=L[2]-x*L[1],f=L[3]-T*L[2],s=L[4]-V*L[3],l=L[5]-O*L[4],c=L[6]-A*L[5],h=L[7]-j*L[6],p=F[0],g=F[1]-E*F[0],y=F[2]-x*F[1],m=F[3]-T*F[2],d=F[4]-V*F[3],v=F[5]-O*F[4],b=F[6]-A*F[5],w=F[7]-j*F[6]),I=t.offset,R=e.offset,r=t.data,i=e.data,Y=0;Y<S;Y++){for(C=0;C<j;C++){for(P=0;P<A;P++){for(N=0;N<O;N++){for(U=0;U<V;U++){for(k=0;k<T;k++){for(M=0;M<x;M++){for(B=0;B<E;B++)i[R]=r[I],I+=o,R+=p;I+=a,R+=g}I+=u,R+=y}I+=f,R+=m}I+=s,R+=d}I+=l,R+=v}I+=c,R+=b}I+=h,R+=w}},function(t,e,n){var r,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x,T,V,O,A,j,S,L,F,I,R,B,M,k,U,N,P,C,Y,D,J,z,$;for(x=t.shape,R=t.strides,B=e.strides,n?(T=x[8],V=x[7],O=x[6],A=x[5],j=x[4],S=x[3],L=x[2],F=x[1],I=x[0],o=R[8],a=R[7]-T*R[8],u=R[6]-V*R[7],f=R[5]-O*R[6],s=R[4]-A*R[5],l=R[3]-j*R[4],c=R[2]-S*R[3],h=R[1]-L*R[2],p=R[0]-F*R[1],g=B[8],y=B[7]-T*B[8],m=B[6]-V*B[7],d=B[5]-O*B[6],v=B[4]-A*B[5],b=B[3]-j*B[4],w=B[2]-S*B[3],_=B[1]-L*B[2],E=B[0]-F*B[1]):(T=x[0],V=x[1],O=x[2],A=x[3],j=x[4],S=x[5],L=x[6],F=x[7],I=x[8],o=R[0],a=R[1]-T*R[0],u=R[2]-V*R[1],f=R[3]-O*R[2],s=R[4]-A*R[3],l=R[5]-j*R[4],c=R[6]-S*R[5],h=R[7]-L*R[6],p=R[8]-F*R[7],g=B[0],y=B[1]-T*B[0],m=B[2]-V*B[1],d=B[3]-O*B[2],v=B[4]-A*B[3],b=B[5]-j*B[4],w=B[6]-S*B[5],_=B[7]-L*B[6],E=B[8]-F*B[7]),M=t.offset,k=e.offset,r=t.data,i=e.data,$=0;$<I;$++){for(z=0;z<F;z++){for(J=0;J<L;J++){for(D=0;D<S;D++){for(Y=0;Y<j;Y++){for(C=0;C<A;C++){for(P=0;P<O;P++){for(N=0;N<V;N++){for(U=0;U<T;U++)i[k]=r[M],M+=o,k+=g;M+=a,k+=y}M+=u,k+=m}M+=f,k+=d}M+=s,k+=v}M+=l,k+=b}M+=c,k+=w}M+=h,k+=_}M+=p,k+=E}},function(t,e,n){var r,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x,T,V,O,A,j,S,L,F,I,R,B,M,k,U,N,P,C,Y,D,J,z,$,W,G,Z,q;for(V=t.shape,k=t.strides,U=e.strides,n?(O=V[9],A=V[8],j=V[7],S=V[6],L=V[5],F=V[4],I=V[3],R=V[2],B=V[1],M=V[0],o=k[9],a=k[8]-O*k[9],u=k[7]-A*k[8],f=k[6]-j*k[7],s=k[5]-S*k[6],l=k[4]-L*k[5],c=k[3]-F*k[4],h=k[2]-I*k[3],p=k[1]-R*k[2],g=k[0]-B*k[1],y=U[9],m=U[8]-O*U[9],d=U[7]-A*U[8],v=U[6]-j*U[7],b=U[5]-S*U[6],w=U[4]-L*U[5],_=U[3]-F*U[4],E=U[2]-I*U[3],x=U[1]-R*U[2],T=U[0]-B*U[1]):(O=V[0],A=V[1],j=V[2],S=V[3],L=V[4],F=V[5],I=V[6],R=V[7],B=V[8],M=V[9],o=k[0],a=k[1]-O*k[0],u=k[2]-A*k[1],f=k[3]-j*k[2],s=k[4]-S*k[3],l=k[5]-L*k[4],c=k[6]-F*k[5],h=k[7]-I*k[6],p=k[8]-R*k[7],g=k[9]-B*k[8],y=U[0],m=U[1]-O*U[0],d=U[2]-A*U[1],v=U[3]-j*U[2],b=U[4]-S*U[3],w=U[5]-L*U[4],_=U[6]-F*U[5],E=U[7]-I*U[6],x=U[8]-R*U[7],T=U[9]-B*U[8]),N=t.offset,P=e.offset,r=t.data,i=e.data,q=0;q<M;q++){for(Z=0;Z<B;Z++){for(G=0;G<R;G++){for(W=0;W<I;W++){for($=0;$<F;$++){for(z=0;z<L;z++){for(J=0;J<S;J++){for(D=0;D<j;D++){for(Y=0;Y<A;Y++){for(C=0;C<O;C++)i[P]=r[N],N+=o,P+=y;N+=a,P+=m}N+=u,P+=d}N+=f,P+=v}N+=s,P+=b}N+=l,P+=w}N+=c,P+=_}N+=h,P+=E}N+=p,P+=x}N+=g,P+=T}}],xs=[function(t,e){e.accessors[1](e.data,e.offset,t.accessors[0](t.data,t.offset))},function(t,e){var n,r,i,o,a,u,f,s,l,c;for(f=t.shape[0],a=t.strides[0],u=e.strides[0],s=t.offset,l=e.offset,n=t.data,r=e.data,i=t.accessors[0],o=e.accessors[1],c=0;c<f;c++)o(r,l,i(n,s)),s+=a,l+=u},function(t,e,n){var r,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b;for(c=t.shape,g=t.strides,y=e.strides,n?(h=c[1],p=c[0],u=g[1],f=g[0]-h*g[1],s=y[1],l=y[0]-h*y[1]):(h=c[0],p=c[1],u=g[0],f=g[1]-h*g[0],s=y[0],l=y[1]-h*y[0]),m=t.offset,d=e.offset,r=t.data,i=e.data,o=t.accessors[0],a=e.accessors[1],b=0;b<p;b++){for(v=0;v<h;v++)a(i,d,o(r,m)),m+=u,d+=s;m+=f,d+=l}},function(t,e,n){var r,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x;for(p=t.shape,d=t.strides,v=e.strides,n?(g=p[2],y=p[1],m=p[0],u=d[2],f=d[1]-g*d[2],s=d[0]-y*d[1],l=v[2],c=v[1]-g*v[2],h=v[0]-y*v[1]):(g=p[0],y=p[1],m=p[2],u=d[0],f=d[1]-g*d[0],s=d[2]-y*d[1],l=v[0],c=v[1]-g*v[0],h=v[2]-y*v[1]),b=t.offset,w=e.offset,r=t.data,i=e.data,o=t.accessors[0],a=e.accessors[1],x=0;x<m;x++){for(E=0;E<y;E++){for(_=0;_<g;_++)a(i,w,o(r,b)),b+=u,w+=l;b+=f,w+=c}b+=s,w+=h}},function(t,e,n){var r,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x,T,V,O,A;for(y=t.shape,w=t.strides,_=e.strides,n?(m=y[3],d=y[2],v=y[1],b=y[0],u=w[3],f=w[2]-m*w[3],s=w[1]-d*w[2],l=w[0]-v*w[1],c=_[3],h=_[2]-m*_[3],p=_[1]-d*_[2],g=_[0]-v*_[1]):(m=y[0],d=y[1],v=y[2],b=y[3],u=w[0],f=w[1]-m*w[0],s=w[2]-d*w[1],l=w[3]-v*w[2],c=_[0],h=_[1]-m*_[0],p=_[2]-d*_[1],g=_[3]-v*_[2]),E=t.offset,x=e.offset,r=t.data,i=e.data,o=t.accessors[0],a=e.accessors[1],A=0;A<b;A++){for(O=0;O<v;O++){for(V=0;V<d;V++){for(T=0;T<m;T++)a(i,x,o(r,E)),E+=u,x+=c;E+=f,x+=h}E+=s,x+=p}E+=l,x+=g}},function(t,e,n){var r,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x,T,V,O,A,j,S,L,F;for(d=t.shape,x=t.strides,T=e.strides,n?(v=d[4],b=d[3],w=d[2],_=d[1],E=d[0],u=x[4],f=x[3]-v*x[4],s=x[2]-b*x[3],l=x[1]-w*x[2],c=x[0]-_*x[1],h=T[4],p=T[3]-v*T[4],g=T[2]-b*T[3],y=T[1]-w*T[2],m=T[0]-_*T[1]):(v=d[0],b=d[1],w=d[2],_=d[3],E=d[4],u=x[0],f=x[1]-v*x[0],s=x[2]-b*x[1],l=x[3]-w*x[2],c=x[4]-_*x[3],h=T[0],p=T[1]-v*T[0],g=T[2]-b*T[1],y=T[3]-w*T[2],m=T[4]-_*T[3]),V=t.offset,O=e.offset,r=t.data,i=e.data,o=t.accessors[0],a=e.accessors[1],F=0;F<E;F++){for(L=0;L<_;L++){for(S=0;S<w;S++){for(j=0;j<b;j++){for(A=0;A<v;A++)a(i,O,o(r,V)),V+=u,O+=h;V+=f,O+=p}V+=s,O+=g}V+=l,O+=y}V+=c,O+=m}},function(t,e,n){var r,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x,T,V,O,A,j,S,L,F,I,R,B,M;for(b=t.shape,O=t.strides,A=e.strides,n?(w=b[5],_=b[4],E=b[3],x=b[2],T=b[1],V=b[0],u=O[5],f=O[4]-w*O[5],s=O[3]-_*O[4],l=O[2]-E*O[3],c=O[1]-x*O[2],h=O[0]-T*O[1],p=A[5],g=A[4]-w*A[5],y=A[3]-_*A[4],m=A[2]-E*A[3],d=A[1]-x*A[2],v=A[0]-T*A[1]):(w=b[0],_=b[1],E=b[2],x=b[3],T=b[4],V=b[5],u=O[0],f=O[1]-w*O[0],s=O[2]-_*O[1],l=O[3]-E*O[2],c=O[4]-x*O[3],h=O[5]-T*O[4],p=A[0],g=A[1]-w*A[0],y=A[2]-_*A[1],m=A[3]-E*A[2],d=A[4]-x*A[3],v=A[5]-T*A[4]),j=t.offset,S=e.offset,r=t.data,i=e.data,o=t.accessors[0],a=e.accessors[1],M=0;M<V;M++){for(B=0;B<T;B++){for(R=0;R<x;R++){for(I=0;I<E;I++){for(F=0;F<_;F++){for(L=0;L<w;L++)a(i,S,o(r,j)),j+=u,S+=p;j+=f,S+=g}j+=s,S+=y}j+=l,S+=m}j+=c,S+=d}j+=h,S+=v}},function(t,e,n){var r,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x,T,V,O,A,j,S,L,F,I,R,B,M,k,U,N,P;for(_=t.shape,S=t.strides,L=e.strides,n?(E=_[6],x=_[5],T=_[4],V=_[3],O=_[2],A=_[1],j=_[0],u=S[6],f=S[5]-E*S[6],s=S[4]-x*S[5],l=S[3]-T*S[4],c=S[2]-V*S[3],h=S[1]-O*S[2],p=S[0]-A*S[1],g=L[6],y=L[5]-E*L[6],m=L[4]-x*L[5],d=L[3]-T*L[4],v=L[2]-V*L[3],b=L[1]-O*L[2],w=L[0]-A*L[1]):(E=_[0],x=_[1],T=_[2],V=_[3],O=_[4],A=_[5],j=_[6],u=S[0],f=S[1]-E*S[0],s=S[2]-x*S[1],l=S[3]-T*S[2],c=S[4]-V*S[3],h=S[5]-O*S[4],p=S[6]-A*S[5],g=L[0],y=L[1]-E*L[0],m=L[2]-x*L[1],d=L[3]-T*L[2],v=L[4]-V*L[3],b=L[5]-O*L[4],w=L[6]-A*L[5]),F=t.offset,I=e.offset,r=t.data,i=e.data,o=t.accessors[0],a=e.accessors[1],P=0;P<j;P++){for(N=0;N<A;N++){for(U=0;U<O;U++){for(k=0;k<V;k++){for(M=0;M<T;M++){for(B=0;B<x;B++){for(R=0;R<E;R++)a(i,I,o(r,F)),F+=u,I+=g;F+=f,I+=y}F+=s,I+=m}F+=l,I+=d}F+=c,I+=v}F+=h,I+=b}F+=p,I+=w}},function(t,e,n){var r,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x,T,V,O,A,j,S,L,F,I,R,B,M,k,U,N,P,C,Y,D,J;for(x=t.shape,I=t.strides,R=e.strides,n?(T=x[7],V=x[6],O=x[5],A=x[4],j=x[3],S=x[2],L=x[1],F=x[0],u=I[7],f=I[6]-T*I[7],s=I[5]-V*I[6],l=I[4]-O*I[5],c=I[3]-A*I[4],h=I[2]-j*I[3],p=I[1]-S*I[2],g=I[0]-L*I[1],y=R[7],m=R[6]-T*R[7],d=R[5]-V*R[6],v=R[4]-O*R[5],b=R[3]-A*R[4],w=R[2]-j*R[3],_=R[1]-S*R[2],E=R[0]-L*R[1]):(T=x[0],V=x[1],O=x[2],A=x[3],j=x[4],S=x[5],L=x[6],F=x[7],u=I[0],f=I[1]-T*I[0],s=I[2]-V*I[1],l=I[3]-O*I[2],c=I[4]-A*I[3],h=I[5]-j*I[4],p=I[6]-S*I[5],g=I[7]-L*I[6],y=R[0],m=R[1]-T*R[0],d=R[2]-V*R[1],v=R[3]-O*R[2],b=R[4]-A*R[3],w=R[5]-j*R[4],_=R[6]-S*R[5],E=R[7]-L*R[6]),B=t.offset,M=e.offset,r=t.data,i=e.data,o=t.accessors[0],a=e.accessors[1],J=0;J<F;J++){for(D=0;D<L;D++){for(Y=0;Y<S;Y++){for(C=0;C<j;C++){for(P=0;P<A;P++){for(N=0;N<O;N++){for(U=0;U<V;U++){for(k=0;k<T;k++)a(i,M,o(r,B)),B+=u,M+=y;B+=f,M+=m}B+=s,M+=d}B+=l,M+=v}B+=c,M+=b}B+=h,M+=w}B+=p,M+=_}B+=g,M+=E}},function(t,e,n){var r,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x,T,V,O,A,j,S,L,F,I,R,B,M,k,U,N,P,C,Y,D,J,z,$,W,G;for(V=t.shape,M=t.strides,k=e.strides,n?(O=V[8],A=V[7],j=V[6],S=V[5],L=V[4],F=V[3],I=V[2],R=V[1],B=V[0],u=M[8],f=M[7]-O*M[8],s=M[6]-A*M[7],l=M[5]-j*M[6],c=M[4]-S*M[5],h=M[3]-L*M[4],p=M[2]-F*M[3],g=M[1]-I*M[2],y=M[0]-R*M[1],m=k[8],d=k[7]-O*k[8],v=k[6]-A*k[7],b=k[5]-j*k[6],w=k[4]-S*k[5],_=k[3]-L*k[4],E=k[2]-F*k[3],x=k[1]-I*k[2],T=k[0]-R*k[1]):(O=V[0],A=V[1],j=V[2],S=V[3],L=V[4],F=V[5],I=V[6],R=V[7],B=V[8],u=M[0],f=M[1]-O*M[0],s=M[2]-A*M[1],l=M[3]-j*M[2],c=M[4]-S*M[3],h=M[5]-L*M[4],p=M[6]-F*M[5],g=M[7]-I*M[6],y=M[8]-R*M[7],m=k[0],d=k[1]-O*k[0],v=k[2]-A*k[1],b=k[3]-j*k[2],w=k[4]-S*k[3],_=k[5]-L*k[4],E=k[6]-F*k[5],x=k[7]-I*k[6],T=k[8]-R*k[7]),U=t.offset,N=e.offset,r=t.data,i=e.data,o=t.accessors[0],a=e.accessors[1],G=0;G<B;G++){for(W=0;W<R;W++){for($=0;$<I;$++){for(z=0;z<F;z++){for(J=0;J<L;J++){for(D=0;D<S;D++){for(Y=0;Y<j;Y++){for(C=0;C<A;C++){for(P=0;P<O;P++)a(i,N,o(r,U)),U+=u,N+=m;U+=f,N+=d}U+=s,N+=v}U+=l,N+=b}U+=c,N+=w}U+=h,N+=_}U+=p,N+=E}U+=g,N+=x}U+=y,N+=T}},function(t,e,n){var r,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x,T,V,O,A,j,S,L,F,I,R,B,M,k,U,N,P,C,Y,D,J,z,$,W,G,Z,q,K,X;for(A=t.shape,N=t.strides,P=e.strides,n?(j=A[9],S=A[8],L=A[7],F=A[6],I=A[5],R=A[4],B=A[3],M=A[2],k=A[1],U=A[0],u=N[9],f=N[8]-j*N[9],s=N[7]-S*N[8],l=N[6]-L*N[7],c=N[5]-F*N[6],h=N[4]-I*N[5],p=N[3]-R*N[4],g=N[2]-B*N[3],y=N[1]-M*N[2],m=N[0]-k*N[1],d=P[9],v=P[8]-j*P[9],b=P[7]-S*P[8],w=P[6]-L*P[7],_=P[5]-F*P[6],E=P[4]-I*P[5],x=P[3]-R*P[4],T=P[2]-B*P[3],V=P[1]-M*P[2],O=P[0]-k*P[1]):(j=A[0],S=A[1],L=A[2],F=A[3],I=A[4],R=A[5],B=A[6],M=A[7],k=A[8],U=A[9],u=N[0],f=N[1]-j*N[0],s=N[2]-S*N[1],l=N[3]-L*N[2],c=N[4]-F*N[3],h=N[5]-I*N[4],p=N[6]-R*N[5],g=N[7]-B*N[6],y=N[8]-M*N[7],m=N[9]-k*N[8],d=P[0],v=P[1]-j*P[0],b=P[2]-S*P[1],w=P[3]-L*P[2],_=P[4]-F*P[3],E=P[5]-I*P[4],x=P[6]-R*P[5],T=P[7]-B*P[6],V=P[8]-M*P[7],O=P[9]-k*P[8]),C=t.offset,Y=e.offset,r=t.data,i=e.data,o=t.accessors[0],a=e.accessors[1],X=0;X<U;X++){for(K=0;K<k;K++){for(q=0;q<M;q++){for(Z=0;Z<B;Z++){for(G=0;G<R;G++){for(W=0;W<I;W++){for($=0;$<F;$++){for(z=0;z<L;z++){for(J=0;J<S;J++){for(D=0;D<j;D++)a(i,Y,o(r,C)),C+=u,Y+=d;C+=f,Y+=v}C+=s,Y+=b}C+=l,Y+=w}C+=c,Y+=_}C+=h,Y+=E}C+=p,Y+=x}C+=g,Y+=T}C+=y,Y+=V}C+=m,Y+=O}}],Ts=[function(t,e){var n,r,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x,T;for(c=(T=ds(t.shape,t.strides,e.strides)).sh,g=T.sx,y=T.sy,n=bs(t.dtype,e.dtype),m=t.offset,d=e.offset,r=t.data,i=e.data,o=g[0],u=y[0],x=c[1];x>0;)for(x<n?(p=x,x=0):(p=n,x-=n),s=m+x*g[1],l=d+x*y[1],E=c[0];E>0;)for(E<n?(h=E,E=0):(h=n,E-=n),v=s+E*g[0],b=l+E*y[0],a=g[1]-h*g[0],f=y[1]-h*y[0],_=0;_<p;_++){for(w=0;w<h;w++)i[b]=r[v],v+=o,b+=u;v+=a,b+=f}},function(t,e){var n,r,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x,T,V,O,A,j,S,L,F;for(y=(F=ds(t.shape,t.strides,e.strides)).sh,b=F.sx,w=F.sy,n=bs(t.dtype,e.dtype),_=t.offset,E=e.offset,r=t.data,i=e.data,o=b[0],f=w[0],L=y[2];L>0;)for(L<n?(v=L,L=0):(v=n,L-=n),h=_+L*b[2],g=E+L*w[2],S=y[1];S>0;)for(S<n?(d=S,S=0):(d=n,S-=n),u=b[2]-d*b[1],l=w[2]-d*w[1],c=h+S*b[1],p=g+S*w[1],j=y[0];j>0;)for(j<n?(m=j,j=0):(m=n,j-=n),x=c+j*b[0],T=p+j*w[0],a=b[1]-m*b[0],s=w[1]-m*w[0],A=0;A<v;A++){for(O=0;O<d;O++){for(V=0;V<m;V++)i[T]=r[x],x+=o,T+=f;x+=a,T+=s}x+=u,T+=l}},function(t,e){var n,r,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x,T,V,O,A,j,S,L,F,I,R,B,M,k,U,N;for(b=(N=ds(t.shape,t.strides,e.strides)).sh,T=N.sx,V=N.sy,n=bs(t.dtype,e.dtype),O=t.offset,A=e.offset,r=t.data,i=e.data,o=T[0],s=V[0],U=b[3];U>0;)for(U<n?(x=U,U=0):(x=n,U-=n),y=O+U*T[3],v=A+U*V[3],k=b[2];k>0;)for(k<n?(E=k,k=0):(E=n,k-=n),f=T[3]-E*T[2],h=V[3]-E*V[2],g=y+k*T[2],d=v+k*V[2],M=b[1];M>0;)for(M<n?(_=M,M=0):(_=n,M-=n),u=T[2]-_*T[1],c=V[2]-_*V[1],p=g+M*T[1],m=d+M*V[1],B=b[0];B>0;)for(B<n?(w=B,B=0):(w=n,B-=n),j=p+B*T[0],S=m+B*V[0],a=T[1]-w*T[0],l=V[1]-w*V[0],R=0;R<x;R++){for(I=0;I<E;I++){for(F=0;F<_;F++){for(L=0;L<w;L++)i[S]=r[j],j+=o,S+=s;j+=a,S+=l}j+=u,S+=c}j+=f,S+=h}},function(t,e){var n,r,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x,T,V,O,A,j,S,L,F,I,R,B,M,k,U,N,P,C,Y,D,J,z,$;for(x=($=ds(t.shape,t.strides,e.strides)).sh,S=$.sx,L=$.sy,n=bs(t.dtype,e.dtype),F=t.offset,I=e.offset,r=t.data,i=e.data,o=S[0],l=L[0],z=x[4];z>0;)for(z<n?(j=z,z=0):(j=n,z-=n),v=F+z*S[4],E=I+z*L[4],J=x[3];J>0;)for(J<n?(A=J,J=0):(A=n,J-=n),s=S[4]-A*S[3],g=L[4]-A*L[3],d=v+J*S[3],_=E+J*L[3],D=x[2];D>0;)for(D<n?(O=D,D=0):(O=n,D-=n),f=S[3]-O*S[2],p=L[3]-O*L[2],m=d+D*S[2],w=_+D*L[2],Y=x[1];Y>0;)for(Y<n?(V=Y,Y=0):(V=n,Y-=n),u=S[2]-V*S[1],h=L[2]-V*L[1],y=m+Y*S[1],b=w+Y*L[1],C=x[0];C>0;)for(C<n?(T=C,C=0):(T=n,C-=n),R=y+C*S[0],B=b+C*L[0],a=S[1]-T*S[0],c=L[1]-T*L[0],P=0;P<j;P++){for(N=0;N<A;N++){for(U=0;U<O;U++){for(k=0;k<V;k++){for(M=0;M<T;M++)i[B]=r[R],R+=o,B+=l;R+=a,B+=c}R+=u,B+=h}R+=f,B+=p}R+=s,B+=g}},function(t,e){var n,r,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x,T,V,O,A,j,S,L,F,I,R,B,M,k,U,N,P,C,Y,D,J,z,$,W,G,Z,q,K,X,H;for(A=(H=ds(t.shape,t.strides,e.strides)).sh,B=H.sx,M=H.sy,n=bs(t.dtype,e.dtype),k=t.offset,U=e.offset,r=t.data,i=e.data,o=B[0],c=M[0],X=A[5];X>0;)for(X<n?(R=X,X=0):(R=n,X-=n),_=k+X*B[5],O=U+X*M[5],K=A[4];K>0;)for(K<n?(I=K,K=0):(I=n,K-=n),l=B[5]-I*B[4],m=M[5]-I*M[4],w=_+K*B[4],V=O+K*M[4],q=A[3];q>0;)for(q<n?(F=q,q=0):(F=n,q-=n),s=B[4]-F*B[3],y=M[4]-F*M[3],b=w+q*B[3],T=V+q*M[3],Z=A[2];Z>0;)for(Z<n?(L=Z,Z=0):(L=n,Z-=n),f=B[3]-L*B[2],g=M[3]-L*M[2],v=b+Z*B[2],x=T+Z*M[2],G=A[1];G>0;)for(G<n?(S=G,G=0):(S=n,G-=n),u=B[2]-S*B[1],p=M[2]-S*M[1],d=v+G*B[1],E=x+G*M[1],W=A[0];W>0;)for(W<n?(j=W,W=0):(j=n,W-=n),N=d+W*B[0],P=E+W*M[0],a=B[1]-j*B[0],h=M[1]-j*M[0],$=0;$<R;$++){for(z=0;z<I;z++){for(J=0;J<F;J++){for(D=0;D<L;D++){for(Y=0;Y<S;Y++){for(C=0;C<j;C++)i[P]=r[N],N+=o,P+=c;N+=a,P+=h}N+=u,P+=p}N+=f,P+=g}N+=s,P+=y}N+=l,P+=m}},function(t,e){var n,r,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x,T,V,O,A,j,S,L,F,I,R,B,M,k,U,N,P,C,Y,D,J,z,$,W,G,Z,q,K,X,H,Q,tt,et,nt,rt,it,ot;for(F=(ot=ds(t.shape,t.strides,e.strides)).sh,P=ot.sx,C=ot.sy,n=bs(t.dtype,e.dtype),Y=t.offset,D=e.offset,r=t.data,i=e.data,o=P[0],h=C[0],it=F[6];it>0;)for(it<n?(N=it,it=0):(N=n,it-=n),T=Y+it*P[6],L=D+it*C[6],rt=F[5];rt>0;)for(rt<n?(U=rt,rt=0):(U=n,rt-=n),c=P[6]-U*P[5],v=C[6]-U*C[5],x=T+rt*P[5],S=L+rt*C[5],nt=F[4];nt>0;)for(nt<n?(k=nt,nt=0):(k=n,nt-=n),l=P[5]-k*P[4],d=C[5]-k*C[4],E=x+nt*P[4],j=S+nt*C[4],et=F[3];et>0;)for(et<n?(M=et,et=0):(M=n,et-=n),s=P[4]-M*P[3],m=C[4]-M*C[3],_=E+et*P[3],A=j+et*C[3],tt=F[2];tt>0;)for(tt<n?(B=tt,tt=0):(B=n,tt-=n),f=P[3]-B*P[2],y=C[3]-B*C[2],w=_+tt*P[2],O=A+tt*C[2],Q=F[1];Q>0;)for(Q<n?(R=Q,Q=0):(R=n,Q-=n),u=P[2]-R*P[1],g=C[2]-R*C[1],b=w+Q*P[1],V=O+Q*C[1],H=F[0];H>0;)for(H<n?(I=H,H=0):(I=n,H-=n),J=b+H*P[0],z=V+H*C[0],a=P[1]-I*P[0],p=C[1]-I*C[0],X=0;X<N;X++){for(K=0;K<U;K++){for(q=0;q<k;q++){for(Z=0;Z<M;Z++){for(G=0;G<B;G++){for(W=0;W<R;W++){for($=0;$<I;$++)i[z]=r[J],J+=o,z+=h;J+=a,z+=p}J+=u,z+=g}J+=f,z+=y}J+=s,z+=m}J+=l,z+=d}J+=c,z+=v}},function(t,e){var n,r,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x,T,V,O,A,j,S,L,F,I,R,B,M,k,U,N,P,C,Y,D,J,z,$,W,G,Z,q,K,X,H,Q,tt,et,nt,rt,it,ot,at,ut,ft,st,lt,ct,ht;for(M=(ht=ds(t.shape,t.strides,e.strides)).sh,z=ht.sx,$=ht.sy,n=bs(t.dtype,e.dtype),W=t.offset,G=e.offset,r=t.data,i=e.data,o=z[0],p=$[0],ct=M[7];ct>0;)for(ct<n?(J=ct,ct=0):(J=n,ct-=n),A=W+ct*z[7],B=G+ct*$[7],lt=M[6];lt>0;)for(lt<n?(D=lt,lt=0):(D=n,lt-=n),h=z[7]-D*z[6],w=$[7]-D*$[6],O=A+lt*z[6],R=B+lt*$[6],st=M[5];st>0;)for(st<n?(Y=st,st=0):(Y=n,st-=n),c=z[6]-Y*z[5],b=$[6]-Y*$[5],V=O+st*z[5],I=R+st*$[5],ft=M[4];ft>0;)for(ft<n?(C=ft,ft=0):(C=n,ft-=n),l=z[5]-C*z[4],v=$[5]-C*$[4],T=V+ft*z[4],F=I+ft*$[4],ut=M[3];ut>0;)for(ut<n?(P=ut,ut=0):(P=n,ut-=n),s=z[4]-P*z[3],d=$[4]-P*$[3],x=T+ut*z[3],L=F+ut*$[3],at=M[2];at>0;)for(at<n?(N=at,at=0):(N=n,at-=n),f=z[3]-N*z[2],m=$[3]-N*$[2],E=x+at*z[2],S=L+at*$[2],ot=M[1];ot>0;)for(ot<n?(U=ot,ot=0):(U=n,ot-=n),u=z[2]-U*z[1],y=$[2]-U*$[1],_=E+ot*z[1],j=S+ot*$[1],it=M[0];it>0;)for(it<n?(k=it,it=0):(k=n,it-=n),Z=_+it*z[0],q=j+it*$[0],a=z[1]-k*z[0],g=$[1]-k*$[0],rt=0;rt<J;rt++){for(nt=0;nt<D;nt++){for(et=0;et<Y;et++){for(tt=0;tt<C;tt++){for(Q=0;Q<P;Q++){for(H=0;H<N;H++){for(X=0;X<U;X++){for(K=0;K<k;K++)i[q]=r[Z],Z+=o,q+=p;Z+=a,q+=g}Z+=u,q+=y}Z+=f,q+=m}Z+=s,q+=d}Z+=l,q+=v}Z+=c,q+=b}Z+=h,q+=w}},function(t,e){var n,r,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x,T,V,O,A,j,S,L,F,I,R,B,M,k,U,N,P,C,Y,D,J,z,$,W,G,Z,q,K,X,H,Q,tt,et,nt,rt,it,ot,at,ut,ft,st,lt,ct,ht,pt,gt,yt,mt,dt,vt,bt;for(P=(bt=ds(t.shape,t.strides,e.strides)).sh,q=bt.sx,K=bt.sy,n=bs(t.dtype,e.dtype),X=t.offset,H=e.offset,r=t.data,i=e.data,o=q[0],g=K[0],vt=P[8];vt>0;)for(vt<n?(Z=vt,vt=0):(Z=n,vt-=n),L=X+vt*q[8],N=H+vt*K[8],dt=P[7];dt>0;)for(dt<n?(G=dt,dt=0):(G=n,dt-=n),p=q[8]-G*q[7],E=K[8]-G*K[7],S=L+dt*q[7],U=N+dt*K[7],mt=P[6];mt>0;)for(mt<n?(W=mt,mt=0):(W=n,mt-=n),h=q[7]-W*q[6],_=K[7]-W*K[6],j=S+mt*q[6],k=U+mt*K[6],yt=P[5];yt>0;)for(yt<n?($=yt,yt=0):($=n,yt-=n),c=q[6]-$*q[5],w=K[6]-$*K[5],A=j+yt*q[5],M=k+yt*K[5],gt=P[4];gt>0;)for(gt<n?(z=gt,gt=0):(z=n,gt-=n),l=q[5]-z*q[4],b=K[5]-z*K[4],O=A+gt*q[4],B=M+gt*K[4],pt=P[3];pt>0;)for(pt<n?(J=pt,pt=0):(J=n,pt-=n),s=q[4]-J*q[3],v=K[4]-J*K[3],V=O+pt*q[3],R=B+pt*K[3],ht=P[2];ht>0;)for(ht<n?(D=ht,ht=0):(D=n,ht-=n),f=q[3]-D*q[2],d=K[3]-D*K[2],T=V+ht*q[2],I=R+ht*K[2],ct=P[1];ct>0;)for(ct<n?(Y=ct,ct=0):(Y=n,ct-=n),u=q[2]-Y*q[1],m=K[2]-Y*K[1],x=T+ct*q[1],F=I+ct*K[1],lt=P[0];lt>0;)for(lt<n?(C=lt,lt=0):(C=n,lt-=n),Q=x+lt*q[0],tt=F+lt*K[0],a=q[1]-C*q[0],y=K[1]-C*K[0],st=0;st<Z;st++){for(ft=0;ft<G;ft++){for(ut=0;ut<W;ut++){for(at=0;at<$;at++){for(ot=0;ot<z;ot++){for(it=0;it<J;it++){for(rt=0;rt<D;rt++){for(nt=0;nt<Y;nt++){for(et=0;et<C;et++)i[tt]=r[Q],Q+=o,tt+=g;Q+=a,tt+=y}Q+=u,tt+=m}Q+=f,tt+=d}Q+=s,tt+=v}Q+=l,tt+=b}Q+=c,tt+=w}Q+=h,tt+=_}Q+=p,tt+=E}},function(t,e){var n,r,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x,T,V,O,A,j,S,L,F,I,R,B,M,k,U,N,P,C,Y,D,J,z,$,W,G,Z,q,K,X,H,Q,tt,et,nt,rt,it,ot,at,ut,ft,st,lt,ct,ht,pt,gt,yt,mt,dt,vt,bt,wt,_t,Et,xt,Tt,Vt,Ot;for(J=(Ot=ds(t.shape,t.strides,e.strides)).sh,tt=Ot.sx,et=Ot.sy,n=bs(t.dtype,e.dtype),nt=t.offset,rt=e.offset,r=t.data,i=e.data,o=tt[0],y=et[0],Vt=J[9];Vt>0;)for(Vt<n?(Q=Vt,Vt=0):(Q=n,Vt-=n),R=nt+Vt*tt[9],D=rt+Vt*et[9],Tt=J[8];Tt>0;)for(Tt<n?(H=Tt,Tt=0):(H=n,Tt-=n),g=tt[9]-H*tt[8],T=et[9]-H*et[8],I=R+Tt*tt[8],Y=D+Tt*et[8],xt=J[7];xt>0;)for(xt<n?(X=xt,xt=0):(X=n,xt-=n),p=tt[8]-X*tt[7],x=et[8]-X*et[7],F=I+xt*tt[7],C=Y+xt*et[7],Et=J[6];Et>0;)for(Et<n?(K=Et,Et=0):(K=n,Et-=n),h=tt[7]-K*tt[6],E=et[7]-K*et[6],L=F+Et*tt[6],P=C+Et*et[6],_t=J[5];_t>0;)for(_t<n?(q=_t,_t=0):(q=n,_t-=n),c=tt[6]-q*tt[5],_=et[6]-q*et[5],S=L+_t*tt[5],N=P+_t*et[5],wt=J[4];wt>0;)for(wt<n?(Z=wt,wt=0):(Z=n,wt-=n),l=tt[5]-Z*tt[4],w=et[5]-Z*et[4],j=S+wt*tt[4],U=N+wt*et[4],bt=J[3];bt>0;)for(bt<n?(G=bt,bt=0):(G=n,bt-=n),s=tt[4]-G*tt[3],b=et[4]-G*et[3],A=j+bt*tt[3],k=U+bt*et[3],vt=J[2];vt>0;)for(vt<n?(W=vt,vt=0):(W=n,vt-=n),f=tt[3]-W*tt[2],v=et[3]-W*et[2],O=A+vt*tt[2],M=k+vt*et[2],dt=J[1];dt>0;)for(dt<n?($=dt,dt=0):($=n,dt-=n),u=tt[2]-$*tt[1],d=et[2]-$*et[1],V=O+dt*tt[1],B=M+dt*et[1],mt=J[0];mt>0;)for(mt<n?(z=mt,mt=0):(z=n,mt-=n),it=V+mt*tt[0],ot=B+mt*et[0],a=tt[1]-z*tt[0],m=et[1]-z*et[0],yt=0;yt<Q;yt++){for(gt=0;gt<H;gt++){for(pt=0;pt<X;pt++){for(ht=0;ht<K;ht++){for(ct=0;ct<q;ct++){for(lt=0;lt<Z;lt++){for(st=0;st<G;st++){for(ft=0;ft<W;ft++){for(ut=0;ut<$;ut++){for(at=0;at<z;at++)i[ot]=r[it],it+=o,ot+=y;it+=a,ot+=m}it+=u,ot+=d}it+=f,ot+=v}it+=s,ot+=b}it+=l,ot+=w}it+=c,ot+=_}it+=h,ot+=E}it+=p,ot+=x}it+=g,ot+=T}}],Vs=[function(t,e){var n,r,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x,T,V,O;for(p=(O=ds(t.shape,t.strides,e.strides)).sh,m=O.sx,d=O.sy,n=bs(t.dtype,e.dtype),v=t.offset,b=e.offset,r=t.data,i=e.data,u=m[0],s=d[0],o=t.accessors[0],a=e.accessors[1],V=p[1];V>0;)for(V<n?(y=V,V=0):(y=n,V-=n),c=v+V*m[1],h=b+V*d[1],T=p[0];T>0;)for(T<n?(g=T,T=0):(g=n,T-=n),w=c+T*m[0],_=h+T*d[0],f=m[1]-g*m[0],l=d[1]-g*d[0],x=0;x<y;x++){for(E=0;E<g;E++)a(i,_,o(r,w)),w+=u,_+=s;w+=f,_+=l}},function(t,e){var n,r,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x,T,V,O,A,j,S,L,F,I,R;for(d=(R=ds(t.shape,t.strides,e.strides)).sh,_=R.sx,E=R.sy,n=bs(t.dtype,e.dtype),x=t.offset,T=e.offset,r=t.data,i=e.data,u=_[0],l=E[0],o=t.accessors[0],a=e.accessors[1],I=d[2];I>0;)for(I<n?(w=I,I=0):(w=n,I-=n),g=x+I*_[2],m=T+I*E[2],F=d[1];F>0;)for(F<n?(b=F,F=0):(b=n,F-=n),s=_[2]-b*_[1],h=E[2]-b*E[1],p=g+F*_[1],y=m+F*E[1],L=d[0];L>0;)for(L<n?(v=L,L=0):(v=n,L-=n),V=p+L*_[0],O=y+L*E[0],f=_[1]-v*_[0],c=E[1]-v*E[0],S=0;S<w;S++){for(j=0;j<b;j++){for(A=0;A<v;A++)a(i,O,o(r,V)),V+=u,O+=l;V+=f,O+=c}V+=s,O+=h}},function(t,e){var n,r,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x,T,V,O,A,j,S,L,F,I,R,B,M,k,U,N,P,C;for(_=(C=ds(t.shape,t.strides,e.strides)).sh,O=C.sx,A=C.sy,n=bs(t.dtype,e.dtype),j=t.offset,S=e.offset,r=t.data,i=e.data,u=O[0],c=A[0],o=t.accessors[0],a=e.accessors[1],P=_[3];P>0;)for(P<n?(V=P,P=0):(V=n,P-=n),d=j+P*O[3],w=S+P*A[3],N=_[2];N>0;)for(N<n?(T=N,N=0):(T=n,N-=n),l=O[3]-T*O[2],g=A[3]-T*A[2],m=d+N*O[2],b=w+N*A[2],U=_[1];U>0;)for(U<n?(x=U,U=0):(x=n,U-=n),s=O[2]-x*O[1],p=A[2]-x*A[1],y=m+U*O[1],v=b+U*A[1],k=_[0];k>0;)for(k<n?(E=k,k=0):(E=n,k-=n),L=y+k*O[0],F=v+k*A[0],f=O[1]-E*O[0],h=A[1]-E*A[0],M=0;M<V;M++){for(B=0;B<T;B++){for(R=0;R<x;R++){for(I=0;I<E;I++)a(i,F,o(r,L)),L+=u,F+=c;L+=f,F+=h}L+=s,F+=p}L+=l,F+=g}},function(t,e){var n,r,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x,T,V,O,A,j,S,L,F,I,R,B,M,k,U,N,P,C,Y,D,J,z,$,W,G;for(V=(G=ds(t.shape,t.strides,e.strides)).sh,F=G.sx,I=G.sy,n=bs(t.dtype,e.dtype),R=t.offset,B=e.offset,r=t.data,i=e.data,u=F[0],h=I[0],o=t.accessors[0],a=e.accessors[1],W=V[4];W>0;)for(W<n?(L=W,W=0):(L=n,W-=n),w=R+W*F[4],T=B+W*I[4],$=V[3];$>0;)for($<n?(S=$,$=0):(S=n,$-=n),c=F[4]-S*F[3],m=I[4]-S*I[3],b=w+$*F[3],x=T+$*I[3],z=V[2];z>0;)for(z<n?(j=z,z=0):(j=n,z-=n),l=F[3]-j*F[2],y=I[3]-j*I[2],v=b+z*F[2],E=x+z*I[2],J=V[1];J>0;)for(J<n?(A=J,J=0):(A=n,J-=n),s=F[2]-A*F[1],g=I[2]-A*I[1],d=v+J*F[1],_=E+J*I[1],D=V[0];D>0;)for(D<n?(O=D,D=0):(O=n,D-=n),M=d+D*F[0],k=_+D*I[0],f=F[1]-O*F[0],p=I[1]-O*I[0],Y=0;Y<L;Y++){for(C=0;C<S;C++){for(P=0;P<j;P++){for(N=0;N<A;N++){for(U=0;U<O;U++)a(i,k,o(r,M)),M+=u,k+=h;M+=f,k+=p}M+=s,k+=g}M+=l,k+=y}M+=c,k+=m}},function(t,e){var n,r,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x,T,V,O,A,j,S,L,F,I,R,B,M,k,U,N,P,C,Y,D,J,z,$,W,G,Z,q,K,X,H,Q,tt;for(S=(tt=ds(t.shape,t.strides,e.strides)).sh,k=tt.sx,U=tt.sy,n=bs(t.dtype,e.dtype),N=t.offset,P=e.offset,r=t.data,i=e.data,u=k[0],p=U[0],o=t.accessors[0],a=e.accessors[1],Q=S[5];Q>0;)for(Q<n?(M=Q,Q=0):(M=n,Q-=n),x=N+Q*k[5],j=P+Q*U[5],H=S[4];H>0;)for(H<n?(B=H,H=0):(B=n,H-=n),h=k[5]-B*k[4],v=U[5]-B*U[4],E=x+H*k[4],A=j+H*U[4],X=S[3];X>0;)for(X<n?(R=X,X=0):(R=n,X-=n),c=k[4]-R*k[3],d=U[4]-R*U[3],_=E+X*k[3],O=A+X*U[3],K=S[2];K>0;)for(K<n?(I=K,K=0):(I=n,K-=n),l=k[3]-I*k[2],m=U[3]-I*U[2],w=_+K*k[2],V=O+K*U[2],q=S[1];q>0;)for(q<n?(F=q,q=0):(F=n,q-=n),s=k[2]-F*k[1],y=U[2]-F*U[1],b=w+q*k[1],T=V+q*U[1],Z=S[0];Z>0;)for(Z<n?(L=Z,Z=0):(L=n,Z-=n),C=b+Z*k[0],Y=T+Z*U[0],f=k[1]-L*k[0],g=U[1]-L*U[0],G=0;G<M;G++){for(W=0;W<B;W++){for($=0;$<R;$++){for(z=0;z<I;z++){for(J=0;J<F;J++){for(D=0;D<L;D++)a(i,Y,o(r,C)),C+=u,Y+=p;C+=f,Y+=g}C+=s,Y+=y}C+=l,Y+=m}C+=c,Y+=d}C+=h,Y+=v}},function(t,e){var n,r,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x,T,V,O,A,j,S,L,F,I,R,B,M,k,U,N,P,C,Y,D,J,z,$,W,G,Z,q,K,X,H,Q,tt,et,nt,rt,it,ot,at,ut;for(R=(ut=ds(t.shape,t.strides,e.strides)).sh,Y=ut.sx,D=ut.sy,n=bs(t.dtype,e.dtype),J=t.offset,z=e.offset,r=t.data,i=e.data,u=Y[0],g=D[0],o=t.accessors[0],a=e.accessors[1],at=R[6];at>0;)for(at<n?(C=at,at=0):(C=n,at-=n),O=J+at*Y[6],I=z+at*D[6],ot=R[5];ot>0;)for(ot<n?(P=ot,ot=0):(P=n,ot-=n),p=Y[6]-P*Y[5],w=D[6]-P*D[5],V=O+ot*Y[5],F=I+ot*D[5],it=R[4];it>0;)for(it<n?(N=it,it=0):(N=n,it-=n),h=Y[5]-N*Y[4],b=D[5]-N*D[4],T=V+it*Y[4],L=F+it*D[4],rt=R[3];rt>0;)for(rt<n?(U=rt,rt=0):(U=n,rt-=n),c=Y[4]-U*Y[3],v=D[4]-U*D[3],x=T+rt*Y[3],S=L+rt*D[3],nt=R[2];nt>0;)for(nt<n?(k=nt,nt=0):(k=n,nt-=n),l=Y[3]-k*Y[2],d=D[3]-k*D[2],E=x+nt*Y[2],j=S+nt*D[2],et=R[1];et>0;)for(et<n?(M=et,et=0):(M=n,et-=n),s=Y[2]-M*Y[1],m=D[2]-M*D[1],_=E+et*Y[1],A=j+et*D[1],tt=R[0];tt>0;)for(tt<n?(B=tt,tt=0):(B=n,tt-=n),$=_+tt*Y[0],W=A+tt*D[0],f=Y[1]-B*Y[0],y=D[1]-B*D[0],Q=0;Q<C;Q++){for(H=0;H<P;H++){for(X=0;X<N;X++){for(K=0;K<U;K++){for(q=0;q<k;q++){for(Z=0;Z<M;Z++){for(G=0;G<B;G++)a(i,W,o(r,$)),$+=u,W+=g;$+=f,W+=y}$+=s,W+=m}$+=l,W+=d}$+=c,W+=v}$+=h,W+=b}$+=p,W+=w}},function(t,e){var n,r,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x,T,V,O,A,j,S,L,F,I,R,B,M,k,U,N,P,C,Y,D,J,z,$,W,G,Z,q,K,X,H,Q,tt,et,nt,rt,it,ot,at,ut,ft,st,lt,ct,ht,pt,gt;for(U=(gt=ds(t.shape,t.strides,e.strides)).sh,W=gt.sx,G=gt.sy,n=bs(t.dtype,e.dtype),Z=t.offset,q=e.offset,r=t.data,i=e.data,u=W[0],y=G[0],o=t.accessors[0],a=e.accessors[1],pt=U[7];pt>0;)for(pt<n?($=pt,pt=0):($=n,pt-=n),S=Z+pt*W[7],k=q+pt*G[7],ht=U[6];ht>0;)for(ht<n?(z=ht,ht=0):(z=n,ht-=n),g=W[7]-z*W[6],E=G[7]-z*G[6],j=S+ht*W[6],M=k+ht*G[6],ct=U[5];ct>0;)for(ct<n?(J=ct,ct=0):(J=n,ct-=n),p=W[6]-J*W[5],_=G[6]-J*G[5],A=j+ct*W[5],B=M+ct*G[5],lt=U[4];lt>0;)for(lt<n?(D=lt,lt=0):(D=n,lt-=n),h=W[5]-D*W[4],w=G[5]-D*G[4],O=A+lt*W[4],R=B+lt*G[4],st=U[3];st>0;)for(st<n?(Y=st,st=0):(Y=n,st-=n),c=W[4]-Y*W[3],b=G[4]-Y*G[3],V=O+st*W[3],I=R+st*G[3],ft=U[2];ft>0;)for(ft<n?(C=ft,ft=0):(C=n,ft-=n),l=W[3]-C*W[2],v=G[3]-C*G[2],T=V+ft*W[2],F=I+ft*G[2],ut=U[1];ut>0;)for(ut<n?(P=ut,ut=0):(P=n,ut-=n),s=W[2]-P*W[1],d=G[2]-P*G[1],x=T+ut*W[1],L=F+ut*G[1],at=U[0];at>0;)for(at<n?(N=at,at=0):(N=n,at-=n),K=x+at*W[0],X=L+at*G[0],f=W[1]-N*W[0],m=G[1]-N*G[0],ot=0;ot<$;ot++){for(it=0;it<z;it++){for(rt=0;rt<J;rt++){for(nt=0;nt<D;nt++){for(et=0;et<Y;et++){for(tt=0;tt<C;tt++){for(Q=0;Q<P;Q++){for(H=0;H<N;H++)a(i,X,o(r,K)),K+=u,X+=y;K+=f,X+=m}K+=s,X+=d}K+=l,X+=v}K+=c,X+=b}K+=h,X+=w}K+=p,X+=_}K+=g,X+=E}},function(t,e){var n,r,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x,T,V,O,A,j,S,L,F,I,R,B,M,k,U,N,P,C,Y,D,J,z,$,W,G,Z,q,K,X,H,Q,tt,et,nt,rt,it,ot,at,ut,ft,st,lt,ct,ht,pt,gt,yt,mt,dt,vt,bt,wt,_t;for(Y=(_t=ds(t.shape,t.strides,e.strides)).sh,X=_t.sx,H=_t.sy,n=bs(t.dtype,e.dtype),Q=t.offset,tt=e.offset,r=t.data,i=e.data,u=X[0],m=H[0],o=t.accessors[0],a=e.accessors[1],wt=Y[8];wt>0;)for(wt<n?(K=wt,wt=0):(K=n,wt-=n),I=Q+wt*X[8],C=tt+wt*H[8],bt=Y[7];bt>0;)for(bt<n?(q=bt,bt=0):(q=n,bt-=n),y=X[8]-q*X[7],T=H[8]-q*H[7],F=I+bt*X[7],P=C+bt*H[7],vt=Y[6];vt>0;)for(vt<n?(Z=vt,vt=0):(Z=n,vt-=n),g=X[7]-Z*X[6],x=H[7]-Z*H[6],L=F+vt*X[6],N=P+vt*H[6],dt=Y[5];dt>0;)for(dt<n?(G=dt,dt=0):(G=n,dt-=n),p=X[6]-G*X[5],E=H[6]-G*H[5],S=L+dt*X[5],U=N+dt*H[5],mt=Y[4];mt>0;)for(mt<n?(W=mt,mt=0):(W=n,mt-=n),h=X[5]-W*X[4],_=H[5]-W*H[4],j=S+mt*X[4],k=U+mt*H[4],yt=Y[3];yt>0;)for(yt<n?($=yt,yt=0):($=n,yt-=n),c=X[4]-$*X[3],w=H[4]-$*H[3],A=j+yt*X[3],M=k+yt*H[3],gt=Y[2];gt>0;)for(gt<n?(z=gt,gt=0):(z=n,gt-=n),l=X[3]-z*X[2],b=H[3]-z*H[2],O=A+gt*X[2],B=M+gt*H[2],pt=Y[1];pt>0;)for(pt<n?(J=pt,pt=0):(J=n,pt-=n),s=X[2]-J*X[1],v=H[2]-J*H[1],V=O+pt*X[1],R=B+pt*H[1],ht=Y[0];ht>0;)for(ht<n?(D=ht,ht=0):(D=n,ht-=n),et=V+ht*X[0],nt=R+ht*H[0],f=X[1]-D*X[0],d=H[1]-D*H[0],ct=0;ct<K;ct++){for(lt=0;lt<q;lt++){for(st=0;st<Z;st++){for(ft=0;ft<G;ft++){for(ut=0;ut<W;ut++){for(at=0;at<$;at++){for(ot=0;ot<z;ot++){for(it=0;it<J;it++){for(rt=0;rt<D;rt++)a(i,nt,o(r,et)),et+=u,nt+=m;et+=f,nt+=d}et+=s,nt+=v}et+=l,nt+=b}et+=c,nt+=w}et+=h,nt+=_}et+=p,nt+=E}et+=g,nt+=x}et+=y,nt+=T}},function(t,e){var n,r,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x,T,V,O,A,j,S,L,F,I,R,B,M,k,U,N,P,C,Y,D,J,z,$,W,G,Z,q,K,X,H,Q,tt,et,nt,rt,it,ot,at,ut,ft,st,lt,ct,ht,pt,gt,yt,mt,dt,vt,bt,wt,_t,Et,xt,Tt,Vt,Ot,At,jt;for($=(jt=ds(t.shape,t.strides,e.strides)).sh,nt=jt.sx,rt=jt.sy,n=bs(t.dtype,e.dtype),it=t.offset,ot=e.offset,r=t.data,i=e.data,u=nt[0],d=rt[0],o=t.accessors[0],a=e.accessors[1],At=$[9];At>0;)for(At<n?(et=At,At=0):(et=n,At-=n),M=it+At*nt[9],z=ot+At*rt[9],Ot=$[8];Ot>0;)for(Ot<n?(tt=Ot,Ot=0):(tt=n,Ot-=n),m=nt[9]-tt*nt[8],O=rt[9]-tt*rt[8],B=M+Ot*nt[8],J=z+Ot*rt[8],Vt=$[7];Vt>0;)for(Vt<n?(Q=Vt,Vt=0):(Q=n,Vt-=n),y=nt[8]-Q*nt[7],V=rt[8]-Q*rt[7],R=B+Vt*nt[7],D=J+Vt*rt[7],Tt=$[6];Tt>0;)for(Tt<n?(H=Tt,Tt=0):(H=n,Tt-=n),g=nt[7]-H*nt[6],T=rt[7]-H*rt[6],I=R+Tt*nt[6],Y=D+Tt*rt[6],xt=$[5];xt>0;)for(xt<n?(X=xt,xt=0):(X=n,xt-=n),p=nt[6]-X*nt[5],x=rt[6]-X*rt[5],F=I+xt*nt[5],C=Y+xt*rt[5],Et=$[4];Et>0;)for(Et<n?(K=Et,Et=0):(K=n,Et-=n),h=nt[5]-K*nt[4],E=rt[5]-K*rt[4],L=F+Et*nt[4],P=C+Et*rt[4],_t=$[3];_t>0;)for(_t<n?(q=_t,_t=0):(q=n,_t-=n),c=nt[4]-q*nt[3],_=rt[4]-q*rt[3],S=L+_t*nt[3],N=P+_t*rt[3],wt=$[2];wt>0;)for(wt<n?(Z=wt,wt=0):(Z=n,wt-=n),l=nt[3]-Z*nt[2],w=rt[3]-Z*rt[2],j=S+wt*nt[2],U=N+wt*rt[2],bt=$[1];bt>0;)for(bt<n?(G=bt,bt=0):(G=n,bt-=n),s=nt[2]-G*nt[1],b=rt[2]-G*rt[1],A=j+bt*nt[1],k=U+bt*rt[1],vt=$[0];vt>0;)for(vt<n?(W=vt,vt=0):(W=n,vt-=n),at=A+vt*nt[0],ut=k+vt*rt[0],f=nt[1]-W*nt[0],v=rt[1]-W*rt[0],dt=0;dt<et;dt++){for(mt=0;mt<tt;mt++){for(yt=0;yt<Q;yt++){for(gt=0;gt<H;gt++){for(pt=0;pt<X;pt++){for(ht=0;ht<K;ht++){for(ct=0;ct<q;ct++){for(lt=0;lt<Z;lt++){for(st=0;st<G;st++){for(ft=0;ft<W;ft++)a(i,ut,o(r,at)),at+=u,ut+=d;at+=f,ut+=v}at+=s,ut+=b}at+=l,ut+=w}at+=c,ut+=_}at+=h,ut+=E}at+=p,ut+=x}at+=g,ut+=T}at+=y,ut+=V}at+=m,ut+=O}}],Os=Es.length-1,As={complex128:"float64",complex64:"float32",complex32:"float16"};function js(t){return t.data=va(t.data,0),t.accessorProtocol=!1,t}function Ss(t){var e=t.shape.length;return t.data=cu(t.data,0),t.accessorProtocol=!1,t.dtype=As[String(t.dtype)],t.strides=ps(e,2,t.strides,1),t.offset*=2,t.shape.push(2),0===e?t.strides[0]=1:t.strides.push(1),t}function Ls(t){var e,n,r,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b;if(y=ss(t[0]),m=ss(t[1]),ts(y.data)&&ts(m.data)?(y=js(y),m=js(m)):Hf(y.data)&&Hf(m.data)?(y=Ss(y),m=Ss(m)):(b=y.dtype,qf(String(b))&&function(t){return Zf(String(t))}(m.dtype)&&(y.accessorProtocol=!0,y.accessors[0]=function(t,e,n){var r;if(!vt(t))throw new TypeError(Y("invalid argument. First argument must be a function. Value: `%s`.",t));if(!Ct(e))throw new TypeError(Y("invalid argument. Second argument must be a nonnegative integer. Value: `%s`.",e));if(!vt(n))throw new TypeError(Y("invalid argument. Third argument must be a constructor function. Value: `%s`.",n));return r=[function(){var e=t();return typeof e===es?new n(e,0):e},function(e){var r=t(e);return typeof r===es?new n(r,0):r},function(e,r){var i=t(e,r);return typeof i===es?new n(i,0):i},function(e,r,i){var o=t(e,r,i);return typeof o===es?new n(o,0):o},function(e,r,i,o){var a=t(e,r,i,o);return typeof a===es?new n(a,0):a},function(e,r,i,o,a){var u=t(e,r,i,o,a);return typeof u===es?new n(u,0):u}],e<=5?r[e]:function(){var e,r,i;for(e=[],i=0;i<arguments.length;i++)e.push(arguments[i]);return typeof(r=t.apply(null,e))===es?new n(r,0):r}}(y.accessors[0],2,ca(String(m.dtype))))),i=y.shape,o=m.shape,(e=i.length)!==o.length)throw new Error("invalid arguments. Arrays must have the same number of dimensions (i.e., same rank). ndims(x) == "+e+". ndims(y) == "+o.length+".");if(0===e)return y.accessorProtocol||m.accessorProtocol?xs[e](y,m):Es[e](y,m);for(f=1,g=0,v=0;v<e;v++){if((d=i[v])!==o[v])throw new Error("invalid arguments. Arrays must have the same shape.");f*=d,1===d&&(g+=1)}if(0!==f){if(1===e)return y.accessorProtocol||m.accessorProtocol?xs[e](y,m):Es[e](y,m);if(l=y.strides,c=m.strides,g===e-1){for(v=0;v<e&&1===i[v];v++);return y.shape=[i[v]],m.shape=y.shape,y.strides=[l[v]],m.strides=[c[v]],y.accessorProtocol||m.accessorProtocol?xs[1](y,m):Es[1](y,m)}if(a=Ie(l),u=Ie(c),s=Be(l),0!==a&&0!==u&&s===Be(c)){if(n=Zr(i,l,y.offset),r=Zr(o,c,m.offset),f===n[1]-n[0]+1&&f===r[1]-r[0]+1)return h=1===a?n[0]:n[1],p=1===u?r[0]:r[1],y.shape=[f],m.shape=y.shape,y.strides=[a],m.strides=[u],y.offset=h,m.offset=p,y.accessorProtocol||m.accessorProtocol?xs[1](y,m):Es[1](y,m);if(e<=Os)return y.accessorProtocol||m.accessorProtocol?xs[e](y,m,1===s):Es[e](y,m,1===s)}return e<=Os?y.accessorProtocol||m.accessorProtocol?Vs[e-2](y,m):Ts[e-2](y,m):y.accessorProtocol||m.accessorProtocol?function(t,e){var n,r,i,o,a,u,f,s,l,c,h,p,g,y;for(a=Eo(s=t.shape),n=t.data,r=e.data,l=t.strides,c=e.strides,h=t.offset,p=e.offset,i=t.order,o=e.order,u=t.accessors[0],f=e.accessors[1],y=0;y<a;y++)g=kf(s,l,h,i,y,ws),f(r,kf(s,c,p,o,y,ws),u(n,g))}(y,m):void function(t,e){var n,r,i,o,a,u,f,s,l,c,h,p;for(a=Eo(u=t.shape),n=t.data,r=e.data,f=t.strides,s=e.strides,l=t.offset,c=e.offset,i=t.order,o=e.order,p=0;p<a;p++)h=kf(u,f,l,i,p,_s),r[kf(u,s,c,o,p,_s)]=n[h]}(y,m)}}var Fs={casting:Lo.get("casting"),copy:!1,dtype:Lo.get("dtypes.default"),flatten:!0,mode:Lo.get("index_mode"),ndmin:0,order:Lo.get("order"),readonly:!1};return function(){var t,e,r,i,o,a,u,f,l,c,h,p,g,y,m;if(1===arguments.length)if(Wf(arguments[0]))r=arguments[0],t={};else{if(!Vt(t=arguments[0]))throw new TypeError($f("0hT56",t));if(n(t,"buffer")&&!Wf(r=t.buffer))throw new TypeError($f("0hT57","buffer",r))}else{if(!Wf(r=arguments[0]))throw new TypeError($f("0hT58",r));if(!Vt(t=arguments[1]))throw new TypeError($f("0hT2V",t))}if(r&&((m=r)instanceof Ui||null!==m&&"object"==typeof m&&"object"==typeof m.data&&"object"==typeof m.shape&&"object"==typeof m.strides&&"number"==typeof m.offset&&"string"==typeof m.order&&"number"==typeof m.ndims&&m.dtype&&"number"==typeof m.length&&"object"==typeof m.flags&&"function"==typeof m.get&&"function"==typeof m.set?(u=function(t){var e;if("object"!=typeof t||null===t)throw new TypeError(Y("invalid argument. Must provide an ndarray. Value: `%s`.",t));if(Af(e=t.dtype))return e;throw new TypeError(Y("invalid argument. Must provide an ndarray having a supported data type. Value: `%s`.",e))}(r),y=!0):(u=function(t){var e;if(s(t))return"generic";if(yt(t))return"binary";for(e=0;e<Of;e++)if(t instanceof Tf[e])return Vf[e];return t&&$i(t.struct)?t.struct:Ef[mt(t)]||null}(r)||"generic",y=!1)),c={},h={},n(t,"casting")){if(h.casting=t.casting,!fo(h.casting))throw new TypeError($f("0hT59","casting",h.casting))}else h.casting=Fs.casting;if(n(t,"flatten")){if(h.flatten=t.flatten,!X(h.flatten))throw new TypeError($f("0hT2o","flatten",h.flatten))}else h.flatten=Fs.flatten;if(n(t,"ndmin")){if(h.ndmin=t.ndmin,!Ct(h.ndmin))throw new TypeError($f("0hT2t","ndmin",h.ndmin))}else h.ndmin=Fs.ndmin;if(n(t,"dtype")){if(!no(a=t.dtype))throw new TypeError($f("invalid option. `%s` option must be a supported data type. Option: `%s`.","dtype",a));if(u&&!bo(u,a,h.casting))throw new Error($f("0hT5B",h.casting,u,a))}else a=u?!y&&eo(u,"generic")?Fs.dtype:u:Fs.dtype;if(n(t,"order")){if("any"===(o=t.order)||"same"===o)y?"any"===o?o=3===Be(Sf(r))?Fs.order:If(r):"same"===o&&(o=If(r)):o=Fs.order;else if(!ro(o))throw new TypeError($f("0hT5C","order",o))}else o=Fs.order;if(n(t,"mode")?c.mode=t.mode:c.mode=Fs.mode,n(t,"submode")?c.submode=t.submode:c.submode=[c.mode],n(t,"readonly")?c.readonly=t.readonly:c.readonly=Fs.readonly,n(t,"copy")){if(h.copy=t.copy,!X(h.copy))throw new TypeError($f("0hT2o","copy",h.copy))}else h.copy=Fs.copy;if(n(t,"shape")){if(!Wf(f=t.shape))throw new TypeError($f("0hT5D","shape",f));l=f.length,g=Eo(f)}else{if(!r)throw new Error($f("0hT0X"));y?(l=(f=jf(r)).length,g=Eo(f)):h.flatten&&s(r)?(p=f=Mf(r),l=f.length,g=Eo(f)):(l=1,f=[g=r.length])}if(l<h.ndmin&&(f=function(t,e,n){var r,i;for(r=[],i=0;i<n-t;i++)r.push(1);for(i=0;i<t;i++)r.push(e[i]);return r}(l,f,h.ndmin),l=h.ndmin),y){if(Eo(r.shape)!==g)throw new RangeError($f("0hT0Y"));!eo(u,a)||h.copy?r=function(t,e){var n,r,i,o;return o=jf(t),i=If(t),r=Eo(o),Ls([t,{dtype:e,data:n=eo(e,"generic")?mu(r):eo(e,"binary")?bf(r):new(vf(e))(r),shape:o,strides:wo(o,i),offset:0,order:i}]),n}(r,a):(e=Sf(r),i=function(t){var e,n,r;if("object"!=typeof t||null===t)throw new TypeError(Y("invalid argument. Must provide an ndarray. Value: `%s`.",t));if(Ct(r=t.offset))return r;if(!ve(n=t.shape))throw new TypeError(Y("invalid argument. Must provide an ndarray. Value: `%s`.",t));if(e=t.strides,0===n.length||!ve(e))return 0;if(Ct(r=_o(n,e)))return r;throw new TypeError(Y("invalid argument. Must provide an ndarray. Value: `%s`.",t))}(r),r=function(t){var e;if("object"!=typeof t||null===t)throw new TypeError(Y("invalid argument. Must provide an ndarray. Value: `%s`.",t));if(ve(e=t.data))return e;throw new TypeError(Y("invalid argument. Must provide an ndarray. Value: `%s`.",t))}(r),e.length<l&&(e=function(t,e,n,r){var i,o,a,u,f;if(f=t-(o=n.length),i=[],"row-major"===r){for(a=Re(n[0])*e[f],u=0;u<f;u++)i.push(a);for(u=0;u<o;u++)i.push(n[u])}else{for(u=0;u<f;u++)i.push(1);for(u=0;u<o;u++)i.push(n[u])}return i}(l,f,e,o)))}else if(r){if(eo(u,"generic")&&h.flatten&&s(r)&&(r=zf(r,p||Mf(r),qr(o))),r.length!==g)throw new RangeError($f("0hT0Y"));eo(u,a)&&!h.copy||(r=Gf(r,g,a))}else r=_f(a,g);return void 0===e&&(i=_o(f,e=wo(f,o))),new qo(a,r,f,e,i,o,c)}}));
//# sourceMappingURL=index.js.map