-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbrowser.js
More file actions
3 lines (3 loc) · 224 KB
/
browser.js
File metadata and controls
3 lines (3 loc) · 224 KB
1
2
3
// Copyright (c) 2026 The Stdlib Authors. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).array=e()}(this,(function(){"use strict";var t=Object.prototype.hasOwnProperty;function e(e,r){return null!=e&&t.call(e,r)}var r="function"==typeof Symbol&&"symbol"==typeof Symbol("foo");function n(){return r&&"symbol"==typeof Symbol.toStringTag}var i=Object.prototype.toString;var o="function"==typeof Symbol?Symbol:void 0,a="function"==typeof o?o.toStringTag:"";var u=n()?function(t){var r,n,o;if(null==t)return i.call(t);n=t[a],r=e(t,a);try{t[a]=void 0}catch(e){return i.call(t)}return o=i.call(t),r?t[a]=n:delete t[a],o}:function(t){return i.call(t)};var f=Array.isArray?Array.isArray:function(t){return"[object Array]"===u(t)};function s(t){return"object"==typeof t&&null!==t&&!f(t)}var l=/./,c="function"==typeof Object.defineProperty?Object.defineProperty:null;var h=Object.defineProperty;function p(t){return"number"==typeof t}function g(t){var e,r="";for(e=0;e<t;e++)r+="0";return r}function y(t,e,r){var n=!1,i=e-t.length;return i<0||(function(t){return"-"===t[0]}(t)&&(n=!0,t=t.substr(1)),t=r?t+g(i):g(i)+t,n&&(t="-"+t)),t}var m=String.prototype.toLowerCase,d=String.prototype.toUpperCase;function v(t){var e,r,n;switch(t.specifier){case"b":e=2;break;case"o":e=8;break;case"x":case"X":e=16;break;default:e=10}if(r=t.arg,n=parseInt(r,10),!isFinite(n)){if(!p(r))throw new Error("invalid integer. Value: "+r);n=0}return n<0&&("u"===t.specifier||10!==e)&&(n=4294967295+n+1),n<0?(r=(-n).toString(e),t.precision&&(r=y(r,t.precision,t.padRight)),r="-"+r):(r=n.toString(e),n||t.precision?t.precision&&(r=y(r,t.precision,t.padRight)):r="",t.sign&&(r=t.sign+r)),16===e&&(t.alternate&&(r="0x"+r),r=t.specifier===d.call(t.specifier)?d.call(r):m.call(r)),8===e&&t.alternate&&"0"!==r.charAt(0)&&(r="0"+r),r}var b=Math.abs,w=String.prototype.toLowerCase,_=String.prototype.toUpperCase,E=String.prototype.replace,x=/e\+(\d)$/,T=/e-(\d)$/,A=/^(\d+)$/,O=/^(\d+)e/,V=/\.0$/,S=/\.0*e/,j=/(\..*[^0])0*e/;function R(t,e){var r,n;switch(e.specifier){case"e":case"E":n=t.toExponential(e.precision);break;case"f":case"F":n=t.toFixed(e.precision);break;case"g":case"G":b(t)<1e-4?((r=e.precision)>0&&(r-=1),n=t.toExponential(r)):n=t.toPrecision(e.precision),e.alternate||(n=E.call(n,j,"$1e"),n=E.call(n,S,"e"),n=E.call(n,V,""));break;default:throw new Error("invalid double notation. Value: "+e.specifier)}return n=E.call(n,x,"e+0$1"),n=E.call(n,T,"e-0$1"),e.alternate&&(n=E.call(n,A,"$1."),n=E.call(n,O,"$1.e")),t>=0&&e.sign&&(n=e.sign+n),n=e.specifier===_.call(e.specifier)?_.call(n):w.call(n)}function L(t){var e,r="";for(e=0;e<t;e++)r+=" ";return r}var I=String.fromCharCode,B=Array.isArray;function F(t){return t!=t}function P(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,r,n,i,o,a,u,f,s,l,c,h,g,m;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(n=t[s],"string"==typeof n)a+=n;else{if(e=void 0!==n.precision,!(n=P(n)).specifier)throw new TypeError("invalid argument. Token is missing `specifier` property. Index: `"+s+"`. Value: `"+n+"`.");for(n.mapping&&(u=n.mapping),r=n.flags,l=0;l<r.length;l++)switch(i=r.charAt(l)){case" ":n.sign=" ";break;case"+":n.sign="+";break;case"-":n.padRight=!0,n.padZeros=!1;break;case"0":n.padZeros=r.indexOf("-")<0;break;case"#":n.alternate=!0;break;default:throw new Error("invalid flag: "+i)}if("*"===n.width){if(n.width=parseInt(arguments[u],10),u+=1,F(n.width))throw new TypeError("the argument for * width at position "+u+" is not a number. Value: `"+n.width+"`.");n.width<0&&(n.padRight=!0,n.width=-n.width)}if(e&&"*"===n.precision){if(n.precision=parseInt(arguments[u],10),u+=1,F(n.precision))throw new TypeError("the argument for * precision at position "+u+" is not a number. Value: `"+n.precision+"`.");n.precision<0&&(n.precision=1,e=!1)}switch(n.arg=arguments[u],n.specifier){case"b":case"o":case"x":case"X":case"d":case"i":case"u":e&&(n.padZeros=!1),n.arg=v(n);break;case"s":n.maxWidth=e?n.precision:-1,n.arg=String(n.arg);break;case"c":if(!F(n.arg)){if((o=parseInt(n.arg,10))<0||o>127)throw new Error("invalid character code. Value: "+n.arg);n.arg=F(o)?String(n.arg):I(o)}break;case"e":case"E":case"f":case"F":case"g":case"G":if(e||(n.precision=6),f=parseFloat(n.arg),!isFinite(f)){if(!p(n.arg))throw new Error("invalid floating-point number. Value: "+a);f=n.arg,n.padZeros=!1}n.arg=R(f,n);break;default:throw new Error("invalid specifier: "+n.specifier)}n.maxWidth>=0&&n.arg.length>n.maxWidth&&(n.arg=n.arg.substring(0,n.maxWidth)),n.padZeros?n.arg=y(n.arg,n.width||n.precision,n.padRight):n.width&&(n.arg=(c=n.arg,h=n.width,g=n.padRight,m=void 0,(m=h-c.length)<0?c:c=g?c+L(m):L(m)+c)),a+=n.arg||"",u+=1}return a}var M=/%(?:([1-9]\d*)\$)?([0 +\-#]*)(\*|\d+)?(?:(\.)(\*|\d+)?)?[hlL]?([%A-Za-z])/g;function k(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,r,n,i;for(r=[],i=0,n=M.exec(t);n;)(e=t.slice(i,M.lastIndex-n[0].length)).length&&r.push(e),"%"===n[6]?r.push("%"):r.push(k(n)),i=M.lastIndex,n=M.exec(t);return(e=t.slice(i)).length&&r.push(e),r}function N(t){var e,r;if("string"!=typeof t)throw new TypeError(N("invalid argument. First argument must be a string. Value: `%s`.",t));for(e=[C(t)],r=1;r<arguments.length;r++)e.push(arguments[r]);return U.apply(null,e)}var Y,D=Object.prototype,z=D.toString,J=D.__defineGetter__,W=D.__defineSetter__,$=D.__lookupGetter__,G=D.__lookupSetter__;Y=function(){try{return c({},"x",{}),!0}catch(t){return!1}}()?h:function(t,e,r){var n,i,o,a;if("object"!=typeof t||null===t||"[object Array]"===z.call(t))throw new TypeError(N("invalid argument. First argument must be an object. Value: `%s`.",t));if("object"!=typeof r||null===r||"[object Array]"===z.call(r))throw new TypeError(N("invalid argument. Property descriptor must be an object. Value: `%s`.",r));if((i="value"in r)&&($.call(t,e)||G.call(t,e)?(n=t.__proto__,t.__proto__=D,delete t[e],t[e]=r.value,t.__proto__=n):t[e]=r.value),o="get"in r,a="set"in r,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&&J&&J.call(t,e,r.get),a&&W&&W.call(t,e,r.set),t};var Z=Y;function q(t,e,r){Z(t,e,{configurable:!1,enumerable:!1,writable:!1,value:r})}function X(t){return"boolean"==typeof t}var K=Boolean,H=Boolean.prototype.toString;var Q=n();function tt(t){return"object"==typeof t&&(t instanceof K||(Q?function(t){try{return H.call(t),!0}catch(t){return!1}}(t):"[object Boolean]"===u(t)))}function et(t){return X(t)||tt(t)}q(et,"isPrimitive",X),q(et,"isObject",tt);var rt="object"==typeof self?self:null,nt="object"==typeof window?window:null,it="object"==typeof globalThis?globalThis:null;function ot(t){if(arguments.length){if(!X(t))throw new TypeError(N("invalid argument. Must provide a boolean. Value: `%s`.",t));if(t)return new Function("return this;")()}if(it)return it;if(rt)return rt;if(nt)return nt;throw new Error("unexpected error. Unable to resolve global object.")}var at=ot(),ut=at.document&&at.document.childNodes,ft=Int8Array;function st(){return/^\s*function\s*([^(]*)/i}var lt=/^\s*function\s*([^(]*)/i;function ct(t){if("function"!=typeof t)throw new TypeError(N("invalid argument. Must provide a function. Value: `%s`.",t));return function(e){var r,n;if(!f(e))return!1;if(r=e.length,0===r)return!1;for(n=0;n<r;n++)if(!1===t(e[n]))return!1;return!0}}function ht(t){return null!==t&&"object"==typeof t}function pt(t){return ht(t)&&(t._isBuffer||t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t))}function gt(t){var e,r,n;if(("Object"===(r=u(t).slice(8,-1))||"Error"===r)&&t.constructor){if("string"==typeof(n=t.constructor).name)return n.name;if(e=lt.exec(n.toString()))return e[1]}return pt(t)?"Buffer":r}q(st,"REGEXP",lt),q(ht,"isObjectLikeArray",ct(ht));var yt="function"==typeof l||"object"==typeof ft||"function"==typeof ut?function(t){return gt(t).toLowerCase()}:function(t){var e;return null===t?"null":"object"===(e=typeof t)?gt(t).toLowerCase():e};function mt(t){return"function"===yt(t)}var dt,vt=Object,bt=Object.getPrototypeOf;dt=mt(Object.getPrototypeOf)?bt:function(t){var e=function(t){return t.__proto__}(t);return e||null===e?e:"[object Function]"===u(t.constructor)?t.constructor.prototype:t instanceof vt?vt.prototype:null};var wt=dt;function _t(t){return null==t?null:(t=vt(t),wt(t))}var Et=Object.prototype;function xt(t){var r;return!!s(t)&&(!(r=_t(t))||!e(t,"constructor")&&e(r,"constructor")&&mt(r.constructor)&&"[object Function]"===u(r.constructor)&&e(r,"isPrototypeOf")&&mt(r.isPrototypeOf)&&(r===Et||function(t){var r;for(r in t)if(!e(t,r))return!1;return!0}(t)))}function Tt(t){return"number"==typeof t}var At=Number,Ot=At.prototype.toString;var Vt=n();function St(t){return"object"==typeof t&&(t instanceof At||(Vt?function(t){try{return Ot.call(t),!0}catch(t){return!1}}(t):"[object Number]"===u(t)))}function jt(t){return Tt(t)||St(t)}q(jt,"isPrimitive",Tt),q(jt,"isObject",St);var Rt=Number.POSITIVE_INFINITY,Lt=At.NEGATIVE_INFINITY,It=Math.floor;function Bt(t){return It(t)===t}function Ft(t){return t<Rt&&t>Lt&&Bt(t)}function Pt(t){return Tt(t)&&Ft(t)}function Ut(t){return St(t)&&Ft(t.valueOf())}function Mt(t){return Pt(t)||Ut(t)}function kt(t){return Pt(t)&&t>=0}function Ct(t){return Ut(t)&&t.valueOf()>=0}function Nt(t){return kt(t)||Ct(t)}q(Mt,"isPrimitive",Pt),q(Mt,"isObject",Ut),q(Nt,"isPrimitive",kt),q(Nt,"isObject",Ct);var Yt=ot();function Dt(){return"function"==typeof Yt.BigInt&&"function"==typeof BigInt&&"bigint"==typeof Yt.BigInt("1")&&"bigint"==typeof BigInt("1")}function zt(t,e,r){Z(t,e,{configurable:!1,enumerable:!1,get:r})}function Jt(t){return"string"==typeof t}var Wt=String.prototype.valueOf;var $t=n();function Gt(t){return"object"==typeof t&&(t instanceof String||($t?function(t){try{return Wt.call(t),!0}catch(t){return!1}}(t):"[object String]"===u(t)))}function Zt(t){return Jt(t)||Gt(t)}function qt(t){return Pt(t)&&t>0}function Xt(t){return Ut(t)&&t.valueOf()>0}function Kt(t){return qt(t)||Xt(t)}function Ht(t){return Object.keys(Object(t))}q(Zt,"isPrimitive",Jt),q(Zt,"isObject",Gt),q(Kt,"isPrimitive",qt),q(Kt,"isObject",Xt);var Qt,te=void 0!==Object.keys;function ee(t){return"[object Arguments]"===u(t)}Qt=function(){return ee(arguments)}();var re=Qt;function ne(t){return t!=t}function ie(t){return Tt(t)&&ne(t)}function oe(t){return St(t)&&ne(t.valueOf())}function ae(t){return ie(t)||oe(t)}q(ae,"isPrimitive",ie),q(ae,"isObject",oe);var ue=Object.prototype.propertyIsEnumerable;var fe=!ue.call("beep","0");function se(t,e){var r;return null!=t&&(!(r=ue.call(t,e))&&fe&&Zt(t)?!ie(e=+e)&&Pt(e)&&e>=0&&e<t.length:r)}var le=4294967295;var ce=re?ee:function(t){return null!==t&&"object"==typeof t&&!f(t)&&"number"==typeof t.length&&Bt(t.length)&&t.length>=0&&t.length<=le&&e(t,"callee")&&!se(t,"callee")},he=Array.prototype.slice;var pe=se((function(){}),"prototype"),ge=!se({toString:null},"toString"),ye=9007199254740991;function me(t){return"object"==typeof t&&null!==t&&"number"==typeof t.length&&Bt(t.length)&&t.length>=0&&t.length<=ye}function de(t,e,r){var n,i;if(!me(t)&&!Jt(t))throw new TypeError(N("invalid argument. First argument must be an array-like object. Value: `%s`.",t));if(0===(n=t.length))return-1;if(3===arguments.length){if(!Pt(r))throw new TypeError(N("invalid argument. Third argument must be an integer. Value: `%s`.",r));if(r>=0){if(r>=n)return-1;i=r}else(i=n+r)<0&&(i=0)}else i=0;if(ae(e)){for(;i<n;i++)if(ae(t[i]))return i}else for(;i<n;i++)if(t[i]===e)return i;return-1}function ve(t){return t.constructor&&t.constructor.prototype===t}var be=["console","external","frame","frameElement","frames","innerHeight","innerWidth","outerHeight","outerWidth","pageXOffset","pageYOffset","parent","scrollLeft","scrollTop","scrollX","scrollY","self","webkitIndexedDB","webkitStorageInfo","window"],we="undefined"==typeof window?void 0:window;var _e=function(){var t;if("undefined"===yt(we))return!1;for(t in we)try{-1===de(be,t)&&e(we,t)&&null!==we[t]&&"object"===yt(we[t])&&ve(we[t])}catch(t){return!0}return!1}(),Ee="undefined"!=typeof window;var xe,Te=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];xe=te?function(){return 2!==(Ht(arguments)||"").length}(1,2)?function(t){return ce(t)?Ht(he.call(t)):Ht(t)}:Ht:function(t){var r,n,i,o,a,u,f;if(o=[],ce(t)){for(f=0;f<t.length;f++)o.push(f.toString());return o}if("string"==typeof t){if(t.length>0&&!e(t,"0"))for(f=0;f<t.length;f++)o.push(f.toString())}else{if(!1==(i="function"==typeof t)&&!ht(t))return o;n=pe&&i}for(a in t)n&&"prototype"===a||!e(t,a)||o.push(String(a));if(ge)for(r=function(t){if(!1===Ee&&!_e)return ve(t);try{return ve(t)}catch(t){return!1}}(t),f=0;f<Te.length;f++)u=Te[f],r&&"constructor"===u||!e(t,u)||o.push(String(u));return o};var Ae=xe;var Oe=function(t,r){var n,i,o,a,u,s,l,c=!0;if(!ht(t))throw new TypeError(N("invalid argument. First argument must be an object (except null). Value: `%s`.",t));if(arguments.length>1){if(!xt(r))throw new TypeError(N("invalid argument. Options argument must be an object. Value: `%s`.",r));if(e(r,"duplicates")&&!X(c=r.duplicates))throw new TypeError(N("invalid option. `%s` option must be a boolean. Option: `%s`.","duplicates",c))}if(i=(n=Ae(t)).length,u={},c)for(l=0;l<i;l++)e(u,a=t[o=n[l]])?(s=u[a],f(s)?u[a].push(o):u[a]=[s,o]):u[a]=o;else for(l=0;l<i;l++)u[t[o=n[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 Ve(t){var e=Oe[t];return Jt(e)?e:null}var Se={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 je(t){var e;return Jt(t)?Se[t]||null:Tt(t)?Se[Ve(t)]||null:t&&qt(e=t.byteLength)?e:null}function Re(t){var e,r;for(e=0,r=0;r<t.length;r++)t[r]<0&&(e+=1);return 0===e?1:e===t.length?-1:0}function Le(t){return Math.abs(t)}function Ie(t){var e,r,n,i,o,a;if(0===(r=t.length))return 0;for(e=!0,n=!0,i=Le(t[0]),a=1;a<r;a++){if(o=Le(t[a]),e&&o<i?e=!1:n&&o>i&&(n=!1),!n&&!e)return 0;i=o}return n&&e?3:n?1:2}var Be="function";function Fe(t){return typeof t.get===Be&&typeof t.set===Be}var Pe={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 Ue(t){var e=Pe[t];return"function"==typeof e?e:Pe.default}var Me={float64:function(t,e,r){t[e]=r},float32:function(t,e,r){t[e]=r},int32:function(t,e,r){t[e]=r},int16:function(t,e,r){t[e]=r},int8:function(t,e,r){t[e]=r},uint32:function(t,e,r){t[e]=r},uint16:function(t,e,r){t[e]=r},uint8:function(t,e,r){t[e]=r},uint8c:function(t,e,r){t[e]=r},generic:function(t,e,r){t[e]=r},default:function(t,e,r){t[e]=r}};function ke(t){var e=Me[t];return"function"==typeof e?e:Me.default}var Ce={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 Ne(t){var e=Ce[t];return"function"==typeof e?e:Ce.default}var Ye={complex128:function(t,e,r){t.set(r,e)},complex64:function(t,e,r){t.set(r,e)},default:function(t,e,r){t.set(r,e)}};function De(t){var e=Ye[t];return"function"==typeof e?e:Ye.default}var ze={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"},Je="function"==typeof Float64Array;var We="function"==typeof Float64Array?Float64Array:null;function $e(){var t,e,r;if("function"!=typeof We)return!1;try{e=new We([1,3.14,-3.14,NaN]),r=e,t=(Je&&r instanceof Float64Array||"[object Float64Array]"===u(r))&&1===e[0]&&3.14===e[1]&&-3.14===e[2]&&e[3]!=e[3]}catch(e){t=!1}return t}var Ge="function"==typeof Float64Array?Float64Array:void 0;var Ze=$e()?Ge:function(){throw new Error("not implemented")},qe="function"==typeof Float32Array;var Xe="function"==typeof Float32Array?Float32Array:null;var Ke,He="function"==typeof Float32Array?Float32Array:void 0;Ke=function(){var t,e,r;if("function"!=typeof Xe)return!1;try{e=new Xe([1,3.14,-3.14,5e40]),r=e,t=(qe&&r instanceof Float32Array||"[object Float32Array]"===u(r))&&1===e[0]&&3.140000104904175===e[1]&&-3.140000104904175===e[2]&&e[3]===Rt}catch(e){t=!1}return t}()?He:function(){throw new Error("not implemented")};var Qe=Ke,tr="function"==typeof Uint32Array;var er="function"==typeof Uint32Array?Uint32Array:null;var rr,nr="function"==typeof Uint32Array?Uint32Array:void 0;rr=function(){var t,e,r;if("function"!=typeof er)return!1;try{e=new er(e=[1,3.14,-3.14,le+1,le+2]),r=e,t=(tr&&r instanceof Uint32Array||"[object Uint32Array]"===u(r))&&1===e[0]&&3===e[1]&&e[2]===le-2&&0===e[3]&&1===e[4]}catch(e){t=!1}return t}()?nr:function(){throw new Error("not implemented")};var ir=rr,or="function"==typeof Int32Array;var ar=2147483647,ur=-2147483648,fr="function"==typeof Int32Array?Int32Array:null;var sr,lr="function"==typeof Int32Array?Int32Array:void 0;sr=function(){var t,e,r;if("function"!=typeof fr)return!1;try{e=new fr([1,3.14,-3.14,ar+1]),r=e,t=(or&&r instanceof Int32Array||"[object Int32Array]"===u(r))&&1===e[0]&&3===e[1]&&-3===e[2]&&e[3]===ur}catch(e){t=!1}return t}()?lr:function(){throw new Error("not implemented")};var cr=sr,hr="function"==typeof Uint16Array;var pr=65535,gr="function"==typeof Uint16Array?Uint16Array:null;var yr,mr="function"==typeof Uint16Array?Uint16Array:void 0;yr=function(){var t,e,r;if("function"!=typeof gr)return!1;try{e=new gr(e=[1,3.14,-3.14,pr+1,pr+2]),r=e,t=(hr&&r instanceof Uint16Array||"[object Uint16Array]"===u(r))&&1===e[0]&&3===e[1]&&e[2]===pr-2&&0===e[3]&&1===e[4]}catch(e){t=!1}return t}()?mr:function(){throw new Error("not implemented")};var dr=yr,vr="function"==typeof Int16Array;var br=32767,wr=-32768,_r="function"==typeof Int16Array?Int16Array:null;var Er,xr="function"==typeof Int16Array?Int16Array:void 0;Er=function(){var t,e,r;if("function"!=typeof _r)return!1;try{e=new _r([1,3.14,-3.14,br+1]),r=e,t=(vr&&r instanceof Int16Array||"[object Int16Array]"===u(r))&&1===e[0]&&3===e[1]&&-3===e[2]&&e[3]===wr}catch(e){t=!1}return t}()?xr:function(){throw new Error("not implemented")};var Tr=Er,Ar="function"==typeof Uint8Array;var Or=255,Vr="function"==typeof Uint8Array?Uint8Array:null;var Sr,jr="function"==typeof Uint8Array?Uint8Array:void 0;Sr=function(){var t,e,r;if("function"!=typeof Vr)return!1;try{e=new Vr(e=[1,3.14,-3.14,Or+1,Or+2]),r=e,t=(Ar&&r instanceof Uint8Array||"[object Uint8Array]"===u(r))&&1===e[0]&&3===e[1]&&e[2]===Or-2&&0===e[3]&&1===e[4]}catch(e){t=!1}return t}()?jr:function(){throw new Error("not implemented")};var Rr=Sr,Lr="function"==typeof Uint8ClampedArray;var Ir="function"==typeof Uint8ClampedArray?Uint8ClampedArray:null;var Br,Fr="function"==typeof Uint8ClampedArray?Uint8ClampedArray:void 0;Br=function(){var t,e,r;if("function"!=typeof Ir)return!1;try{e=new Ir([-1,0,1,3.14,4.99,255,256]),r=e,t=(Lr&&r instanceof Uint8ClampedArray||"[object Uint8ClampedArray]"===u(r))&&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}()?Fr:function(){throw new Error("not implemented")};var Pr=Br,Ur="function"==typeof Int8Array;var Mr=127,kr=-128,Cr="function"==typeof Int8Array?Int8Array:null;var Nr,Yr="function"==typeof Int8Array?Int8Array:void 0;Nr=function(){var t,e,r;if("function"!=typeof Cr)return!1;try{e=new Cr([1,3.14,-3.14,Mr+1]),r=e,t=(Ur&&r instanceof Int8Array||"[object Int8Array]"===u(r))&&1===e[0]&&3===e[1]&&-3===e[2]&&e[3]===kr}catch(e){t=!1}return t}()?Yr:function(){throw new Error("not implemented")};var Dr=Nr,zr=4294967295;function Jr(t){return"object"==typeof t&&null!==t&&"number"==typeof t.length&&Bt(t.length)&&t.length>=0&&t.length<=zr}var Wr="function"==typeof ArrayBuffer;function $r(t){return Wr&&t instanceof ArrayBuffer||"[object ArrayBuffer]"===u(t)}var Gr=ct(Zt.isPrimitive),Zr=ct(Zt.isObject),qr=ct(Zt);function Xr(t,e,r){Z(t,e,{configurable:!1,enumerable:!0,writable:!1,value:r})}function Kr(t,e){if(!(this instanceof Kr))throw new TypeError("invalid invocation. Constructor must be called with the `new` keyword.");if(!Tt(t))throw new TypeError(N("invalid argument. Real component must be a number. Value: `%s`.",t));if(!Tt(e))throw new TypeError(N("invalid argument. Imaginary component must be a number. Value: `%s`.",e));return Xr(this,"re",t),Xr(this,"im",e),this}q(qr,"primitives",Gr),q(qr,"objects",Zr),q(Kr,"name","Complex128"),q(Kr,"BYTES_PER_ELEMENT",8),q(Kr.prototype,"BYTES_PER_ELEMENT",8),q(Kr.prototype,"byteLength",16),q(Kr.prototype,"toString",(function(){var t=""+this.re;return this.im<0?t+=" - "+-this.im:t+=" + "+this.im,t+="i"})),q(Kr.prototype,"toJSON",(function(){var t={type:"Complex128"};return t.re=this.re,t.im=this.im,t}));var Hr="function"==typeof Math.fround?Math.fround:null,Qr=new Qe(1);var tn="function"==typeof Hr?Hr:function(t){return Qr[0]=t,Qr[0]};function en(t,e){if(!(this instanceof en))throw new TypeError("invalid invocation. Constructor must be called with the `new` keyword.");if(!Tt(t))throw new TypeError(N("invalid argument. Real component must be a number. Value: `%s`.",t));if(!Tt(e))throw new TypeError(N("invalid argument. Imaginary component must be a number. Value: `%s`.",e));return Xr(this,"re",tn(t)),Xr(this,"im",tn(e)),this}function rn(t){return t instanceof Kr||t instanceof en||"object"==typeof t&&null!==t&&"number"==typeof t.re&&"number"==typeof t.im}function nn(t){return Bt(t/2)}q(en,"name","Complex64"),q(en,"BYTES_PER_ELEMENT",4),q(en.prototype,"BYTES_PER_ELEMENT",4),q(en.prototype,"byteLength",8),q(en.prototype,"toString",(function(){var t=""+this.re;return this.im<0?t+=" - "+-this.im:t+=" + "+this.im,t+="i"})),q(en.prototype,"toJSON",(function(){var t={type:"Complex64"};return t.re=this.re,t.im=this.im,t}));var on=8;function an(t){return"object"==typeof t&&null!==t&&"Complex64Array"===t.constructor.name&&t.BYTES_PER_ELEMENT===on}var un=16;function fn(t){return"object"==typeof t&&null!==t&&"Complex128Array"===t.constructor.name&&t.BYTES_PER_ELEMENT===un}function sn(){return"function"==typeof o&&"symbol"==typeof o("foo")&&e(o,"iterator")&&"symbol"==typeof o.iterator}var ln=sn()?Symbol.iterator:null;function cn(t){return t.re}function hn(t){return t.im}function pn(t,e){return new Qe(t.buffer,t.byteOffset+t.BYTES_PER_ELEMENT*e,2*(t.length-e))}function gn(t,e){return new Ze(t.buffer,t.byteOffset+t.BYTES_PER_ELEMENT*e,2*(t.length-e))}function yn(t){var e,r,n;for(e=[];!(r=t.next()).done;)if(Jr(n=r.value)&&n.length>=2)e.push(n[0],n[1]);else{if(!rn(n))return new TypeError(N("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",n));e.push(cn(n),hn(n))}return e}var mn=2*Qe.BYTES_PER_ELEMENT,dn=sn();function vn(t){return t instanceof _n||"object"==typeof t&&null!==t&&("Complex64Array"===t.constructor.name||"Complex128Array"===t.constructor.name)&&"number"==typeof t._length&&"object"==typeof t._buffer}function bn(t){return t===_n||"Complex128Array"===t.name}function wn(t,e){return new en(t[e*=2],t[e+1])}function _n(){var t,e,r,n;if(e=arguments.length,!(this instanceof _n))return 0===e?new _n:1===e?new _n(arguments[0]):2===e?new _n(arguments[0],arguments[1]):new _n(arguments[0],arguments[1],arguments[2]);if(0===e)r=new Qe(0);else if(1===e)if(kt(arguments[0]))r=new Qe(2*arguments[0]);else if(me(arguments[0]))if((n=(r=arguments[0]).length)&&f(r)&&rn(r[0])){if(r=function(t,e){var r,n,i,o;for(r=e.length,o=0,i=0;i<r;i++){if(!rn(n=e[i]))return null;t[o]=cn(n),t[o+1]=hn(n),o+=2}return t}(new Qe(2*n),r),null===r){if(!nn(n))throw new RangeError(N("invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.",n));r=new Qe(arguments[0])}}else{if(an(r))r=pn(r,0);else if(fn(r))r=gn(r,0);else if(!nn(n))throw new RangeError(N("invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.",n));r=new Qe(r)}else if($r(arguments[0])){if(!Bt((r=arguments[0]).byteLength/mn))throw new RangeError(N("invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.",mn,r.byteLength));r=new Qe(r)}else{if(!s(arguments[0]))throw new TypeError(N("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",arguments[0]));if(r=arguments[0],!1===dn)throw new TypeError(N("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.",r));if(!mt(r[ln]))throw new TypeError(N("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",r));if(!mt((r=r[ln]()).next))throw new TypeError(N("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",r));if((r=yn(r))instanceof Error)throw r;r=new Qe(r)}else{if(!$r(r=arguments[0]))throw new TypeError(N("invalid argument. First argument must be an ArrayBuffer. Value: `%s`.",r));if(!kt(t=arguments[1]))throw new TypeError(N("invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.",t));if(!Bt(t/mn))throw new RangeError(N("invalid argument. Byte offset must be a multiple of %u. Value: `%u`.",mn,t));if(2===e){if(!Bt((n=r.byteLength-t)/mn))throw new RangeError(N("invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.",mn,n));r=new Qe(r,t)}else{if(!kt(n=arguments[2]))throw new TypeError(N("invalid argument. Length must be a nonnegative integer. Value: `%s`.",n));if(n*mn>r.byteLength-t)throw new RangeError(N("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*mn));r=new Qe(r,t,2*n)}}return q(this,"_buffer",r),q(this,"_length",r.length/2),this}function En(t){return t.re}function xn(t){return t.im}function Tn(t){var e,r,n;for(e=[];!(r=t.next()).done;)if(Jr(n=r.value)&&n.length>=2)e.push(n[0],n[1]);else{if(!rn(n))return new TypeError(N("invalid argument. An iterator must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",n));e.push(En(n),xn(n))}return e}q(_n,"BYTES_PER_ELEMENT",mn),q(_n,"name","Complex64Array"),q(_n,"from",(function(t){var e,r,n,i,o,a,u,f,l,c,h,p;if(!mt(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!bn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((r=arguments.length)>1){if(!mt(n=arguments[1]))throw new TypeError(N("invalid argument. Second argument must be a function. Value: `%s`.",n));r>2&&(e=arguments[2])}if(vn(t)){if(f=t.length,n){for(o=(i=new this(f))._buffer,p=0,h=0;h<f;h++){if(rn(c=n.call(e,t.get(h),h)))o[p]=cn(c),o[p+1]=hn(c);else{if(!(Jr(c)&&c.length>=2))throw new TypeError(N("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(me(t)){if(n){for(f=t.length,u=t.get&&t.set?Ne("default"):Ue("default"),h=0;h<f;h++)if(!rn(u(t,h))){l=!0;break}if(l){if(!nn(f))throw new RangeError(N("invalid argument. First argument must have a length which is a multiple of %u. Length: `%u`.",2,f));for(o=(i=new this(f/2))._buffer,h=0;h<f;h++)o[h]=n.call(e,u(t,h),h);return i}for(o=(i=new this(f))._buffer,p=0,h=0;h<f;h++){if(rn(c=n.call(e,u(t,h),h)))o[p]=cn(c),o[p+1]=hn(c);else{if(!(Jr(c)&&c.length>=2))throw new TypeError(N("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(s(t)&&dn&&mt(t[ln])){if(!mt((o=t[ln]()).next))throw new TypeError(N("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",t));if(a=n?function(t,e,r){var n,i,o,a;for(n=[],a=-1;!(i=t.next()).done;)if(a+=1,Jr(o=e.call(r,i.value,a))&&o.length>=2)n.push(o[0],o[1]);else{if(!rn(o))return new TypeError(N("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",o));n.push(cn(o),hn(o))}return n}(o,n,e):yn(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(N("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",t))})),q(_n,"of",(function(){var t,e;if(!mt(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!bn(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)})),q(_n.prototype,"at",(function(t){if(!vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Bt(t))throw new TypeError(N("invalid argument. Must provide an integer. Value: `%s`.",t));if(t<0&&(t+=this._length),!(t<0||t>=this._length))return wn(this._buffer,t)})),zt(_n.prototype,"buffer",(function(){return this._buffer.buffer})),zt(_n.prototype,"byteLength",(function(){return this._buffer.byteLength})),zt(_n.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),q(_n.prototype,"BYTES_PER_ELEMENT",_n.BYTES_PER_ELEMENT),q(_n.prototype,"copyWithin",(function(t,e){if(!vn(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})),q(_n.prototype,"entries",(function(){var t,e,r,n,i,o;if(!vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return t=this,n=this._buffer,r=this._length,o=-1,q(e={},"next",(function(){if(o+=1,i||o>=r)return{done:!0};return{value:[o,wn(n,o)],done:!1}})),q(e,"return",(function(t){if(i=!0,arguments.length)return{value:t,done:!0};return{done:!0}})),ln&&q(e,ln,(function(){return t.entries()})),e})),q(_n.prototype,"every",(function(t,e){var r,n;if(!vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!mt(t))throw new TypeError(N("invalid argument. First argument must be a function. Value: `%s`.",t));for(r=this._buffer,n=0;n<this._length;n++)if(!t.call(e,wn(r,n),n,this))return!1;return!0})),q(_n.prototype,"fill",(function(t,e,r){var n,i,o,a,u,f;if(!vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!rn(t))throw new TypeError(N("invalid argument. First argument must be a complex number. Value: `%s`.",t));if(n=this._buffer,i=this._length,arguments.length>1){if(!Bt(e))throw new TypeError(N("invalid argument. Second argument must be an integer. Value: `%s`.",e));if(e<0&&(e+=i)<0&&(e=0),arguments.length>2){if(!Bt(r))throw new TypeError(N("invalid argument. Third argument must be an integer. Value: `%s`.",r));r<0&&(r+=i)<0&&(r=0),r>i&&(r=i)}else r=i}else e=0,r=i;for(a=cn(t),u=hn(t),f=e;f<r;f++)n[o=2*f]=a,n[o+1]=u;return this})),q(_n.prototype,"filter",(function(t,e){var r,n,i,o;if(!vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!mt(t))throw new TypeError(N("invalid argument. First argument must be a function. Value: `%s`.",t));for(r=this._buffer,n=[],i=0;i<this._length;i++)o=wn(r,i),t.call(e,o,i,this)&&n.push(o);return new this.constructor(n)})),q(_n.prototype,"find",(function(t,e){var r,n,i;if(!vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!mt(t))throw new TypeError(N("invalid argument. First argument must be a function. Value: `%s`.",t));for(r=this._buffer,n=0;n<this._length;n++)if(i=wn(r,n),t.call(e,i,n,this))return i})),q(_n.prototype,"findIndex",(function(t,e){var r,n,i;if(!vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!mt(t))throw new TypeError(N("invalid argument. First argument must be a function. Value: `%s`.",t));for(r=this._buffer,n=0;n<this._length;n++)if(i=wn(r,n),t.call(e,i,n,this))return n;return-1})),q(_n.prototype,"findLast",(function(t,e){var r,n,i;if(!vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!mt(t))throw new TypeError(N("invalid argument. First argument must be a function. Value: `%s`.",t));for(r=this._buffer,n=this._length-1;n>=0;n--)if(i=wn(r,n),t.call(e,i,n,this))return i})),q(_n.prototype,"findLastIndex",(function(t,e){var r,n,i;if(!vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!mt(t))throw new TypeError(N("invalid argument. First argument must be a function. Value: `%s`.",t));for(r=this._buffer,n=this._length-1;n>=0;n--)if(i=wn(r,n),t.call(e,i,n,this))return n;return-1})),q(_n.prototype,"forEach",(function(t,e){var r,n,i;if(!vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!mt(t))throw new TypeError(N("invalid argument. First argument must be a function. Value: `%s`.",t));for(r=this._buffer,n=0;n<this._length;n++)i=wn(r,n),t.call(e,i,n,this)})),q(_n.prototype,"get",(function(t){if(!vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!kt(t))throw new TypeError(N("invalid argument. Must provide a nonnegative integer. Value: `%s`.",t));if(!(t>=this._length))return wn(this._buffer,t)})),q(_n.prototype,"includes",(function(t,e){var r,n,i,o,a;if(!vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!rn(t))throw new TypeError(N("invalid argument. First argument must be a complex number. Value: `%s`.",t));if(arguments.length>1){if(!Bt(e))throw new TypeError(N("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0&&(e+=this._length)<0&&(e=0)}else e=0;for(i=cn(t),o=hn(t),r=this._buffer,a=e;a<this._length;a++)if(i===r[n=2*a]&&o===r[n+1])return!0;return!1})),q(_n.prototype,"indexOf",(function(t,e){var r,n,i,o,a;if(!vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!rn(t))throw new TypeError(N("invalid argument. First argument must be a complex number. Value: `%s`.",t));if(arguments.length>1){if(!Bt(e))throw new TypeError(N("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0&&(e+=this._length)<0&&(e=0)}else e=0;for(i=cn(t),o=hn(t),r=this._buffer,a=e;a<this._length;a++)if(i===r[n=2*a]&&o===r[n+1])return a;return-1})),q(_n.prototype,"join",(function(t){var e,r,n,i;if(!vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(0===arguments.length)n=",";else{if(!Jt(t))throw new TypeError(N("invalid argument. First argument must be a string. Value: `%s`.",t));n=t}for(e=[],r=this._buffer,i=0;i<this._length;i++)e.push(wn(r,i).toString());return e.join(n)})),q(_n.prototype,"keys",(function(){var t,e,r,n,i;if(!vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return t=this,r=this._length,i=-1,q(e={},"next",(function(){if(i+=1,n||i>=r)return{done:!0};return{value:i,done:!1}})),q(e,"return",(function(t){if(n=!0,arguments.length)return{value:t,done:!0};return{done:!0}})),ln&&q(e,ln,(function(){return t.keys()})),e})),q(_n.prototype,"lastIndexOf",(function(t,e){var r,n,i,o,a;if(!vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!rn(t))throw new TypeError(N("invalid argument. First argument must be a complex number. Value: `%s`.",t));if(arguments.length>1){if(!Bt(e))throw new TypeError(N("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=cn(t),o=hn(t),r=this._buffer,a=e;a>=0;a--)if(i===r[n=2*a]&&o===r[n+1])return a;return-1})),zt(_n.prototype,"length",(function(){return this._length})),q(_n.prototype,"map",(function(t,e){var r,n,i,o,a;if(!vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!mt(t))throw new TypeError(N("invalid argument. First argument must be a function. Value: `%s`.",t));for(n=this._buffer,r=(i=new this.constructor(this._length))._buffer,o=0;o<this._length;o++)if(rn(a=t.call(e,wn(n,o),o,this)))r[2*o]=cn(a),r[2*o+1]=hn(a);else{if(!Jr(a)||2!==a.length)throw new TypeError(N("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",a));r[2*o]=a[0],r[2*o+1]=a[1]}return i})),q(_n.prototype,"reduce",(function(t,e){var r,n,i,o;if(!vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!mt(t))throw new TypeError(N("invalid argument. First argument must be a function. Value: `%s`.",t));if(r=this._buffer,i=this._length,arguments.length>1)n=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.");n=wn(r,0),o=1}for(;o<i;o++)n=t(n,wn(r,o),o,this);return n})),q(_n.prototype,"reduceRight",(function(t,e){var r,n,i,o;if(!vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!mt(t))throw new TypeError(N("invalid argument. First argument must be a function. Value: `%s`.",t));if(r=this._buffer,i=this._length,arguments.length>1)n=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.");n=wn(r,i-1),o=i-2}for(;o>=0;o--)n=t(n,wn(r,o),o,this);return n})),q(_n.prototype,"reverse",(function(){var t,e,r,n,i,o;if(!vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(r=this._length,t=this._buffer,n=It(r/2),i=0;i<n;i++)o=r-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})),q(_n.prototype,"set",(function(t){var e,r,n,i,o,a,u,f,s;if(!vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,arguments.length>1){if(!kt(r=arguments[1]))throw new TypeError(N("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",r))}else r=0;if(rn(t)){if(r>=this._length)throw new RangeError(N("invalid argument. Index argument is out-of-bounds. Value: `%u`.",r));return n[r*=2]=cn(t),void(n[r+1]=hn(t))}if(vn(t)){if(r+(a=t._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(e=t._buffer,s=n.byteOffset+r*mn,e.buffer===n.buffer&&e.byteOffset<s&&e.byteOffset+e.byteLength>s){for(i=new Qe(e.length),f=0;f<e.length;f++)i[f]=e[f];e=i}for(r*=2,s=0,f=0;f<a;f++)n[r]=e[s],n[r+1]=e[s+1],r+=2,s+=2}else{if(!me(t))throw new TypeError(N("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(!rn(t[f])){o=!0;break}if(o){if(!nn(a))throw new RangeError(N("invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.",a));if(r+a/2>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(e=t,s=n.byteOffset+r*mn,e.buffer===n.buffer&&e.byteOffset<s&&e.byteOffset+e.byteLength>s){for(i=new Qe(a),f=0;f<a;f++)i[f]=e[f];e=i}for(r*=2,a/=2,s=0,f=0;f<a;f++)n[r]=e[s],n[r+1]=e[s+1],r+=2,s+=2;return}if(r+a>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(r*=2,f=0;f<a;f++)u=t[f],n[r]=cn(u),n[r+1]=hn(u),r+=2}})),q(_n.prototype,"slice",(function(t,e){var r,n,i,o,a,u,f;if(!vn(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(!Bt(t))throw new TypeError(N("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(!Bt(e))throw new TypeError(N("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0?(e+=u)<0&&(e=0):e>u&&(e=u)}}for(r=t<e?e-t:0,n=(i=new this.constructor(r))._buffer,f=0;f<r;f++)o=2*(f+t),n[2*f]=a[o],n[2*f+1]=a[o+1];return i})),q(_n.prototype,"some",(function(t,e){var r,n;if(!vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!mt(t))throw new TypeError(N("invalid argument. First argument must be a function. Value: `%s`.",t));for(r=this._buffer,n=0;n<this._length;n++)if(t.call(e,wn(r,n),n,this))return!0;return!1})),q(_n.prototype,"sort",(function(t){var e,r,n,i,o;if(!vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!mt(t))throw new TypeError(N("invalid argument. First argument must be a function. Value: `%s`.",t));for(r=this._buffer,n=this._length,e=[],i=0;i<n;i++)e.push(wn(r,i));for(e.sort(t),i=0;i<n;i++)r[o=2*i]=cn(e[i]),r[o+1]=hn(e[i]);return this})),q(_n.prototype,"subarray",(function(t,e){var r,n,i;if(!vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,i=this._length,0===arguments.length)t=0,e=i;else{if(!Bt(t))throw new TypeError(N("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(!Bt(e))throw new TypeError(N("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,r=n.byteLength):t>=e?(i=0,r=n.byteOffset+t*mn):(i=e-t,r=n.byteOffset+t*mn),new this.constructor(n.buffer,r,i<0?0:i)})),q(_n.prototype,"toLocaleString",(function(t,e){var r,n,i,o,a;if(!vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(0===arguments.length)n=[];else{if(!Jt(t)&&!Gr(t))throw new TypeError(N("invalid argument. First argument must be a string or an array of strings. Value: `%s`.",t));n=t}if(arguments.length<2)r={};else{if(!s(e))throw new TypeError(N("invalid argument. Options argument must be an object. Value: `%s`.",e));r=e}for(o=this._buffer,i=[],a=0;a<this._length;a++)i.push(wn(o,a).toLocaleString(n,r));return i.join(",")})),q(_n.prototype,"toReversed",(function(){var t,e,r,n,i,o;if(!vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(r=this._length,e=new this.constructor(r),n=this._buffer,t=e._buffer,i=0;i<r;i++)o=r-i-1,t[2*i]=n[2*o],t[2*i+1]=n[2*o+1];return e})),q(_n.prototype,"toSorted",(function(t){var e,r,n,i;if(!vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!mt(t))throw new TypeError(N("invalid argument. First argument must be a function. Value: `%s`.",t));for(r=this._buffer,n=this._length,e=[],i=0;i<n;i++)e.push(wn(r,i));return e.sort(t),new _n(e)})),q(_n.prototype,"toString",(function(){var t,e,r;if(!vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(t=[],e=this._buffer,r=0;r<this._length;r++)t.push(wn(e,r).toString());return t.join(",")})),q(_n.prototype,"values",(function(){var t,e,r,n,i,o;if(!vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return e=this,i=this._buffer,r=this._length,o=-1,q(t={},"next",(function(){if(o+=1,n||o>=r)return{done:!0};return{value:wn(i,o),done:!1}})),q(t,"return",(function(t){if(n=!0,arguments.length)return{value:t,done:!0};return{done:!0}})),ln&&q(t,ln,(function(){return e.values()})),t})),q(_n.prototype,"with",(function(t,e){var r,n,i;if(!vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Bt(t))throw new TypeError(N("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(N("invalid argument. Index argument is out-of-bounds. Value: `%s`.",t));if(!rn(e))throw new TypeError(N("invalid argument. Second argument must be a complex number. Value: `%s`.",e));return(r=(n=new this.constructor(this._buffer))._buffer)[2*t]=cn(e),r[2*t+1]=hn(e),n}));var An=2*Ze.BYTES_PER_ELEMENT,On=sn();function Vn(t){return t instanceof Rn||"object"==typeof t&&null!==t&&("Complex64Array"===t.constructor.name||"Complex128Array"===t.constructor.name)&&"number"==typeof t._length&&"object"==typeof t._buffer}function Sn(t){return t===Rn||"Complex64Array"===t.name}function jn(t,e){return new Kr(t[e*=2],t[e+1])}function Rn(){var t,e,r,n;if(e=arguments.length,!(this instanceof Rn))return 0===e?new Rn:1===e?new Rn(arguments[0]):2===e?new Rn(arguments[0],arguments[1]):new Rn(arguments[0],arguments[1],arguments[2]);if(0===e)r=new Ze(0);else if(1===e)if(kt(arguments[0]))r=new Ze(2*arguments[0]);else if(me(arguments[0]))if((n=(r=arguments[0]).length)&&f(r)&&rn(r[0])){if(r=function(t,e){var r,n,i,o;for(r=e.length,o=0,i=0;i<r;i++){if(!rn(n=e[i]))return null;t[o]=En(n),t[o+1]=xn(n),o+=2}return t}(new Ze(2*n),r),null===r){if(!nn(n))throw new RangeError(N("invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.",n));r=new Ze(arguments[0])}}else{if(an(r))r=pn(r,0);else if(fn(r))r=gn(r,0);else if(!nn(n))throw new RangeError(N("invalid argument. Array-like object and typed array arguments must have a length which is a multiple of two. Length: `%u`.",n));r=new Ze(r)}else if($r(arguments[0])){if(!Bt((r=arguments[0]).byteLength/An))throw new RangeError(N("invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.",An,r.byteLength));r=new Ze(r)}else{if(!s(arguments[0]))throw new TypeError(N("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",arguments[0]));if(r=arguments[0],!1===On)throw new TypeError(N("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.",r));if(!mt(r[ln]))throw new TypeError(N("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",r));if(!mt((r=r[ln]()).next))throw new TypeError(N("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",r));if((r=Tn(r))instanceof Error)throw r;r=new Ze(r)}else{if(!$r(r=arguments[0]))throw new TypeError(N("invalid argument. First argument must be an ArrayBuffer. Value: `%s`.",r));if(!kt(t=arguments[1]))throw new TypeError(N("invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.",t));if(!Bt(t/An))throw new RangeError(N("invalid argument. Byte offset must be a multiple of %u. Value: `%u`.",An,t));if(2===e){if(!Bt((n=r.byteLength-t)/An))throw new RangeError(N("invalid arguments. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.",An,n));r=new Ze(r,t)}else{if(!kt(n=arguments[2]))throw new TypeError(N("invalid argument. Length must be a nonnegative integer. Value: `%s`.",n));if(n*An>r.byteLength-t)throw new RangeError(N("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*An));r=new Ze(r,t,2*n)}}return q(this,"_buffer",r),q(this,"_length",r.length/2),this}function Ln(t){var e,r;for(e=[];!(r=t.next()).done;)e.push(K(r.value));return e}q(Rn,"BYTES_PER_ELEMENT",An),q(Rn,"name","Complex128Array"),q(Rn,"from",(function(t){var e,r,n,i,o,a,u,f,l,c,h,p;if(!mt(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Sn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if((r=arguments.length)>1){if(!mt(n=arguments[1]))throw new TypeError(N("invalid argument. Second argument must be a function. Value: `%s`.",n));r>2&&(e=arguments[2])}if(Vn(t)){if(f=t.length,n){for(o=(i=new this(f))._buffer,p=0,h=0;h<f;h++){if(rn(c=n.call(e,t.get(h),h)))o[p]=En(c),o[p+1]=xn(c);else{if(!(Jr(c)&&c.length>=2))throw new TypeError(N("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(me(t)){if(n){for(f=t.length,u=t.get&&t.set?Ne("default"):Ue("default"),h=0;h<f;h++)if(!rn(u(t,h))){l=!0;break}if(l){if(!nn(f))throw new RangeError(N("invalid argument. First argument must have a length which is a multiple of two. Length: `%u`.",f));for(o=(i=new this(f/2))._buffer,h=0;h<f;h++)o[h]=n.call(e,u(t,h),h);return i}for(o=(i=new this(f))._buffer,p=0,h=0;h<f;h++){if(rn(c=n.call(e,u(t,h),h)))o[p]=En(c),o[p+1]=xn(c);else{if(!(Jr(c)&&c.length>=2))throw new TypeError(N("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(s(t)&&On&&mt(t[ln])){if(!mt((o=t[ln]()).next))throw new TypeError(N("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",t));if(a=n?function(t,e,r){var n,i,o,a;for(n=[],a=-1;!(i=t.next()).done;)if(a+=1,Jr(o=e.call(r,i.value,a))&&o.length>=2)n.push(o[0],o[1]);else{if(!rn(o))return new TypeError(N("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",o));n.push(En(o),xn(o))}return n}(o,n,e):Tn(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(N("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",t))})),q(Rn,"of",(function(){var t,e;if(!mt(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Sn(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)})),q(Rn.prototype,"at",(function(t){if(!Vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Bt(t))throw new TypeError(N("invalid argument. Must provide an integer. Value: `%s`.",t));if(t<0&&(t+=this._length),!(t<0||t>=this._length))return jn(this._buffer,t)})),zt(Rn.prototype,"buffer",(function(){return this._buffer.buffer})),zt(Rn.prototype,"byteLength",(function(){return this._buffer.byteLength})),zt(Rn.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),q(Rn.prototype,"BYTES_PER_ELEMENT",Rn.BYTES_PER_ELEMENT),q(Rn.prototype,"copyWithin",(function(t,e){if(!Vn(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})),q(Rn.prototype,"entries",(function(){var t,e,r,n,i,o,a;if(!Vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return e=this,t=this._buffer,n=this._length,o=-1,a=-2,q(r={},"next",(function(){var e;if(o+=1,i||o>=n)return{done:!0};return e=new Kr(t[a+=2],t[a+1]),{value:[o,e],done:!1}})),q(r,"return",(function(t){if(i=!0,arguments.length)return{value:t,done:!0};return{done:!0}})),ln&&q(r,ln,(function(){return e.entries()})),r})),q(Rn.prototype,"every",(function(t,e){var r,n;if(!Vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!mt(t))throw new TypeError(N("invalid argument. First argument must be a function. Value: `%s`.",t));for(r=this._buffer,n=0;n<this._length;n++)if(!t.call(e,jn(r,n),n,this))return!1;return!0})),q(Rn.prototype,"fill",(function(t,e,r){var n,i,o,a,u,f;if(!Vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!rn(t))throw new TypeError(N("invalid argument. First argument must be a complex number. Value: `%s`.",t));if(n=this._buffer,i=this._length,arguments.length>1){if(!Bt(e))throw new TypeError(N("invalid argument. Second argument must be an integer. Value: `%s`.",e));if(e<0&&(e+=i)<0&&(e=0),arguments.length>2){if(!Bt(r))throw new TypeError(N("invalid argument. Third argument must be an integer. Value: `%s`.",r));r<0&&(r+=i)<0&&(r=0),r>i&&(r=i)}else r=i}else e=0,r=i;for(a=En(t),u=xn(t),f=e;f<r;f++)n[o=2*f]=a,n[o+1]=u;return this})),q(Rn.prototype,"filter",(function(t,e){var r,n,i,o;if(!Vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!mt(t))throw new TypeError(N("invalid argument. First argument must be a function. Value: `%s`.",t));for(r=this._buffer,n=[],i=0;i<this._length;i++)o=jn(r,i),t.call(e,o,i,this)&&n.push(o);return new this.constructor(n)})),q(Rn.prototype,"find",(function(t,e){var r,n,i;if(!Vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!mt(t))throw new TypeError(N("invalid argument. First argument must be a function. Value: `%s`.",t));for(r=this._buffer,n=0;n<this._length;n++)if(i=jn(r,n),t.call(e,i,n,this))return i})),q(Rn.prototype,"findIndex",(function(t,e){var r,n,i;if(!Vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!mt(t))throw new TypeError(N("invalid argument. First argument must be a function. Value: `%s`.",t));for(r=this._buffer,n=0;n<this._length;n++)if(i=jn(r,n),t.call(e,i,n,this))return n;return-1})),q(Rn.prototype,"findLast",(function(t,e){var r,n,i;if(!Vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!mt(t))throw new TypeError(N("invalid argument. First argument must be a function. Value: `%s`.",t));for(r=this._buffer,n=this._length-1;n>=0;n--)if(i=jn(r,n),t.call(e,i,n,this))return i})),q(Rn.prototype,"findLastIndex",(function(t,e){var r,n,i;if(!Vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!mt(t))throw new TypeError(N("invalid argument. First argument must be a function. Value: `%s`.",t));for(r=this._buffer,n=this._length-1;n>=0;n--)if(i=jn(r,n),t.call(e,i,n,this))return n;return-1})),q(Rn.prototype,"forEach",(function(t,e){var r,n,i;if(!Vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!mt(t))throw new TypeError(N("invalid argument. First argument must be a function. Value: `%s`.",t));for(r=this._buffer,n=0;n<this._length;n++)i=jn(r,n),t.call(e,i,n,this)})),q(Rn.prototype,"get",(function(t){if(!Vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!kt(t))throw new TypeError(N("invalid argument. Must provide a nonnegative integer. Value: `%s`.",t));if(!(t>=this._length))return jn(this._buffer,t)})),zt(Rn.prototype,"length",(function(){return this._length})),q(Rn.prototype,"includes",(function(t,e){var r,n,i,o,a;if(!Vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!rn(t))throw new TypeError(N("invalid argument. First argument must be a complex number. Value: `%s`.",t));if(arguments.length>1){if(!Bt(e))throw new TypeError(N("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0&&(e+=this._length)<0&&(e=0)}else e=0;for(i=En(t),o=xn(t),r=this._buffer,a=e;a<this._length;a++)if(i===r[n=2*a]&&o===r[n+1])return!0;return!1})),q(Rn.prototype,"indexOf",(function(t,e){var r,n,i,o,a;if(!Vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!rn(t))throw new TypeError(N("invalid argument. First argument must be a complex number. Value: `%s`.",t));if(arguments.length>1){if(!Bt(e))throw new TypeError(N("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0&&(e+=this._length)<0&&(e=0)}else e=0;for(i=En(t),o=xn(t),r=this._buffer,a=e;a<this._length;a++)if(i===r[n=2*a]&&o===r[n+1])return a;return-1})),q(Rn.prototype,"join",(function(t){var e,r,n,i;if(!Vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(0===arguments.length)n=",";else{if(!Zt(t))throw new TypeError(N("invalid argument. First argument must be a string. Value: `%s`.",t));n=t}for(e=[],r=this._buffer,i=0;i<this._length;i++)e.push(jn(r,i).toString());return e.join(n)})),q(Rn.prototype,"keys",(function(){var t,e,r,n,i;if(!Vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return t=this,r=this._length,i=-1,q(e={},"next",(function(){if(i+=1,n||i>=r)return{done:!0};return{value:i,done:!1}})),q(e,"return",(function(t){if(n=!0,arguments.length)return{value:t,done:!0};return{done:!0}})),ln&&q(e,ln,(function(){return t.keys()})),e})),q(Rn.prototype,"lastIndexOf",(function(t,e){var r,n,i,o,a;if(!Vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!rn(t))throw new TypeError(N("invalid argument. First argument must be a complex number. Value: `%s`.",t));if(arguments.length>1){if(!Bt(e))throw new TypeError(N("invalid argument. Second argument must be an integer. Value: `%s`.",e));e>=this._length?e=this._length-1:e<0&&(e+=this._length)}else e=this._length-1;for(i=En(t),o=xn(t),r=this._buffer,a=e;a>=0;a--)if(i===r[n=2*a]&&o===r[n+1])return a;return-1})),q(Rn.prototype,"map",(function(t,e){var r,n,i,o,a;if(!Vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!mt(t))throw new TypeError(N("invalid argument. First argument must be a function. Value: `%s`.",t));for(n=this._buffer,r=(i=new this.constructor(this._length))._buffer,o=0;o<this._length;o++)if(rn(a=t.call(e,jn(n,o),o,this)))r[2*o]=En(a),r[2*o+1]=xn(a);else{if(!Jr(a)||2!==a.length)throw new TypeError(N("invalid argument. Callback must return either a two-element array containing real and imaginary components or a complex number. Value: `%s`.",a));r[2*o]=a[0],r[2*o+1]=a[1]}return i})),q(Rn.prototype,"reduce",(function(t,e){var r,n,i,o;if(!Vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!mt(t))throw new TypeError(N("invalid argument. First argument must be a function. Value: `%s`.",t));if(r=this._buffer,i=this._length,arguments.length>1)n=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.");n=jn(r,0),o=1}for(;o<i;o++)n=t(n,jn(r,o),o,this);return n})),q(Rn.prototype,"reduceRight",(function(t,e){var r,n,i,o;if(!Vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!mt(t))throw new TypeError(N("invalid argument. First argument must be a function. Value: `%s`.",t));if(r=this._buffer,i=this._length,arguments.length>1)n=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.");n=jn(r,i-1),o=i-2}for(;o>=0;o--)n=t(n,jn(r,o),o,this);return n})),q(Rn.prototype,"reverse",(function(){var t,e,r,n,i,o;if(!Vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(r=this._length,t=this._buffer,n=It(r/2),i=0;i<n;i++)o=r-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})),q(Rn.prototype,"set",(function(t){var e,r,n,i,o,a,u,f,s;if(!Vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,arguments.length>1){if(!kt(r=arguments[1]))throw new TypeError(N("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",r))}else r=0;if(rn(t)){if(r>=this._length)throw new RangeError(N("invalid argument. Index argument is out-of-bounds. Value: `%u`.",r));return n[r*=2]=En(t),void(n[r+1]=xn(t))}if(Vn(t)){if(r+(a=t._length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(e=t._buffer,s=n.byteOffset+r*An,e.buffer===n.buffer&&e.byteOffset<s&&e.byteOffset+e.byteLength>s){for(i=new Ze(e.length),f=0;f<e.length;f++)i[f]=e[f];e=i}for(r*=2,s=0,f=0;f<a;f++)n[r]=e[s],n[r+1]=e[s+1],r+=2,s+=2}else{if(!me(t))throw new TypeError(N("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(!rn(t[f])){o=!0;break}if(o){if(!nn(a))throw new RangeError(N("invalid argument. Array-like object arguments must have a length which is a multiple of two. Length: `%u`.",a));if(r+a/2>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(e=t,s=n.byteOffset+r*An,e.buffer===n.buffer&&e.byteOffset<s&&e.byteOffset+e.byteLength>s){for(i=new Ze(a),f=0;f<a;f++)i[f]=e[f];e=i}for(r*=2,a/=2,s=0,f=0;f<a;f++)n[r]=e[s],n[r+1]=e[s+1],r+=2,s+=2;return}if(r+a>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");for(r*=2,f=0;f<a;f++)u=t[f],n[r]=En(u),n[r+1]=xn(u),r+=2}})),q(Rn.prototype,"slice",(function(t,e){var r,n,i,o,a,u,f;if(!Vn(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(!Bt(t))throw new TypeError(N("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(!Bt(e))throw new TypeError(N("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0?(e+=u)<0&&(e=0):e>u&&(e=u)}}for(r=t<e?e-t:0,n=(i=new this.constructor(r))._buffer,f=0;f<r;f++)o=2*(f+t),n[2*f]=a[o],n[2*f+1]=a[o+1];return i})),q(Rn.prototype,"some",(function(t,e){var r,n;if(!Vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!mt(t))throw new TypeError(N("invalid argument. First argument must be a function. Value: `%s`.",t));for(r=this._buffer,n=0;n<this._length;n++)if(t.call(e,jn(r,n),n,this))return!0;return!1})),q(Rn.prototype,"sort",(function(t){var e,r,n,i,o;if(!Vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!mt(t))throw new TypeError(N("invalid argument. First argument must be a function. Value: `%s`.",t));for(r=this._buffer,n=this._length,e=[],i=0;i<n;i++)e.push(jn(r,i));for(e.sort(t),i=0;i<n;i++)r[o=2*i]=En(e[i]),r[o+1]=xn(e[i]);return this})),q(Rn.prototype,"subarray",(function(t,e){var r,n,i;if(!Vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(n=this._buffer,i=this._length,0===arguments.length)t=0,e=i;else{if(!Bt(t))throw new TypeError(N("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(!Bt(e))throw new TypeError(N("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,r=n.byteLength):t>=e?(i=0,r=n.byteOffset+t*An):(i=e-t,r=n.byteOffset+t*An),new this.constructor(n.buffer,r,i<0?0:i)})),q(Rn.prototype,"toLocaleString",(function(t,e){var r,n,i,o,a;if(!Vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(0===arguments.length)n=[];else{if(!Zt(t)&&!Gr(t))throw new TypeError(N("invalid argument. First argument must be a string or an array of strings. Value: `%s`.",t));n=t}if(arguments.length<2)r={};else{if(!s(e))throw new TypeError(N("invalid argument. Options argument must be an object. Value: `%s`.",e));r=e}for(o=this._buffer,i=[],a=0;a<this._length;a++)i.push(jn(o,a).toLocaleString(n,r));return i.join(",")})),q(Rn.prototype,"toReversed",(function(){var t,e,r,n,i,o;if(!Vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(r=this._length,e=new this.constructor(r),n=this._buffer,t=e._buffer,i=0;i<r;i++)o=r-i-1,t[2*i]=n[2*o],t[2*i+1]=n[2*o+1];return e})),q(Rn.prototype,"toSorted",(function(t){var e,r,n,i;if(!Vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!mt(t))throw new TypeError(N("invalid argument. First argument must be a function. Value: `%s`.",t));for(r=this._buffer,n=this._length,e=[],i=0;i<n;i++)e.push(jn(r,i));return e.sort(t),new Rn(e)})),q(Rn.prototype,"toString",(function(){var t,e,r;if(!Vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");for(t=[],e=this._buffer,r=0;r<this._length;r++)t.push(jn(e,r).toString());return t.join(",")})),q(Rn.prototype,"values",(function(){var t,e,r,n,i,o;if(!Vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");return e=this,i=this._buffer,r=this._length,o=-1,q(t={},"next",(function(){if(o+=1,n||o>=r)return{done:!0};return{value:jn(i,o),done:!1}})),q(t,"return",(function(t){if(n=!0,arguments.length)return{value:t,done:!0};return{done:!0}})),ln&&q(t,ln,(function(){return e.values()})),t})),q(Rn.prototype,"with",(function(t,e){var r,n,i;if(!Vn(this))throw new TypeError("invalid invocation. `this` is not a complex number array.");if(!Bt(t))throw new TypeError(N("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(N("invalid argument. Index argument is out-of-bounds. Value: `%s`.",t));if(!rn(e))throw new TypeError(N("invalid argument. Second argument must be a complex number. Value: `%s`.",e));return(r=(n=new this.constructor(this._buffer))._buffer)[2*t]=En(e),r[2*t+1]=xn(e),n}));var In=Rr.BYTES_PER_ELEMENT,Bn=sn();function Fn(t){return"object"==typeof t&&null!==t&&"BooleanArray"===t.constructor.name&&t.BYTES_PER_ELEMENT===In}function Pn(t){return t===Un}function Un(){var t,e,r,n,i;if(e=arguments.length,!(this instanceof Un))return 0===e?new Un:1===e?new Un(arguments[0]):2===e?new Un(arguments[0],arguments[1]):new Un(arguments[0],arguments[1],arguments[2]);if(0===e)r=new Rr(0);else if(1===e)if(kt(i=arguments[0]))r=new Rr(i);else if(me(i))r=function(t,e){var r,n;for(r=e.length,n=0;n<r;n++)t[n]=K(e[n]);return t}(new Rr(i.length),i);else if($r(i))r=new Rr(i);else{if(!s(i))throw new TypeError(N("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",i));if(!1===Bn)throw new TypeError(N("invalid argument. Environment lacks Symbol.iterator support. Must provide a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.",i));if(!mt(i[ln]))throw new TypeError(N("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",i));if(!mt((r=i[ln]()).next))throw new TypeError(N("invalid argument. Must provide a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",i));r=new Rr(Ln(r))}else{if(!$r(r=arguments[0]))throw new TypeError(N("invalid argument. First argument must be an ArrayBuffer. Value: `%s`.",r));if(!kt(t=arguments[1]))throw new TypeError(N("invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.",t));if(2===e)r=new Rr(r,t);else{if(!kt(n=arguments[2]))throw new TypeError(N("invalid argument. Length must be a nonnegative integer. Value: `%s`.",n));if(n*In>r.byteLength-t)throw new RangeError(N("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",n*In));r=new Rr(r,t,n)}}return q(this,"_buffer",r),q(this,"_length",r.length),this}q(Un,"BYTES_PER_ELEMENT",In),q(Un,"name","BooleanArray"),q(Un,"from",(function(t){var e,r,n,i,o,a,u,f,l;if(!mt(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Pn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if((r=arguments.length)>1){if(!mt(n=arguments[1]))throw new TypeError(N("invalid argument. Second argument must be a function. Value: `%s`.",n));r>2&&(e=arguments[2])}if(me(t)){if(n){for(f=t.length,u=t.get&&t.set?Ne("default"):Ue("default"),o=(i=new this(f))._buffer,l=0;l<f;l++)o[l]=K(n.call(e,u(t,l),l));return i}return new this(t)}if(s(t)&&Bn&&mt(t[ln])){if(!mt((o=t[ln]()).next))throw new TypeError(N("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",t));for(a=n?function(t,e,r){var n,i,o;for(n=[],o=-1;!(i=t.next()).done;)o+=1,n.push(K(e.call(r,i.value,o)));return n}(o,n,e):Ln(o),o=(i=new this(f=a.length))._buffer,l=0;l<f;l++)o[l]=a[l];return i}throw new TypeError(N("invalid argument. First argument must be an array-like object or an iterable. Value: `%s`.",t))})),q(Un,"of",(function(){var t,e;if(!mt(this))throw new TypeError("invalid invocation. `this` context must be a constructor.");if(!Pn(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)})),q(Un.prototype,"at",(function(t){var e,r;if(!Fn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Pt(t))throw new TypeError(N("invalid argument. Must provide an integer. Value: `%s`.",t));if(r=this._length,e=this._buffer,t<0&&(t+=r),!(t<0||t>=r))return K(e[t])})),zt(Un.prototype,"buffer",(function(){return this._buffer.buffer})),zt(Un.prototype,"byteLength",(function(){return this._buffer.byteLength})),zt(Un.prototype,"byteOffset",(function(){return this._buffer.byteOffset})),q(Un.prototype,"BYTES_PER_ELEMENT",Un.BYTES_PER_ELEMENT),q(Un.prototype,"copyWithin",(function(t,e){if(!Fn(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})),q(Un.prototype,"entries",(function(){var t,e,r,n,i,o;if(!Fn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");return t=this,n=this._buffer,r=this._length,o=-1,q(e={},"next",(function(){if(o+=1,i||o>=r)return{done:!0};return{value:[o,K(n[o])],done:!1}})),q(e,"return",(function(t){if(i=!0,arguments.length)return{value:t,done:!0};return{done:!0}})),ln&&q(e,ln,(function(){return t.entries()})),e})),q(Un.prototype,"every",(function(t,e){var r,n;if(!Fn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!mt(t))throw new TypeError(N("invalid argument. First argument must be a function. Value: `%s`.",t));for(r=this._buffer,n=0;n<this._length;n++)if(!t.call(e,K(r[n]),n,this))return!1;return!0})),q(Un.prototype,"fill",(function(t,e,r){var n,i,o,a;if(!Fn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!X(t))throw new TypeError(N("invalid argument. First argument must be a boolean. Value: `%s`.",t));if(n=this._buffer,i=this._length,arguments.length>1){if(!Pt(e))throw new TypeError(N("invalid argument. Second argument must be an integer. Value: `%s`.",e));if(e<0&&(e+=i)<0&&(e=0),arguments.length>2){if(!Pt(r))throw new TypeError(N("invalid argument. Third argument must be an integer. Value: `%s`.",r));r<0&&(r+=i)<0&&(r=0),r>i&&(r=i)}else r=i}else e=0,r=i;for(o=t?1:0,a=e;a<r;a++)n[a]=o;return this})),q(Un.prototype,"filter",(function(t,e){var r,n,i,o;if(!Fn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!mt(t))throw new TypeError(N("invalid argument. First argument must be a function. Value: `%s`.",t));for(r=this._buffer,n=[],i=0;i<this._length;i++)o=K(r[i]),t.call(e,o,i,this)&&n.push(o);return new this.constructor(n)})),q(Un.prototype,"find",(function(t,e){var r,n,i;if(!Fn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!mt(t))throw new TypeError(N("invalid argument. First argument must be a function. Value: `%s`.",t));for(r=this._buffer,i=0;i<this._length;i++)if(n=K(r[i]),t.call(e,n,i,this))return n})),q(Un.prototype,"findIndex",(function(t,e){var r,n,i;if(!Fn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!mt(t))throw new TypeError(N("invalid argument. First argument must be a function. Value: `%s`.",t));for(r=this._buffer,i=0;i<this._length;i++)if(n=K(r[i]),t.call(e,n,i,this))return i;return-1})),q(Un.prototype,"findLast",(function(t,e){var r,n,i;if(!Fn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!mt(t))throw new TypeError(N("invalid argument. First argument must be a function. Value: `%s`.",t));for(r=this._buffer,i=this._length-1;i>=0;i--)if(n=K(r[i]),t.call(e,n,i,this))return n})),q(Un.prototype,"findLastIndex",(function(t,e){var r,n,i;if(!Fn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!mt(t))throw new TypeError(N("invalid argument. First argument must be a function. Value: `%s`.",t));for(r=this._buffer,i=this._length-1;i>=0;i--)if(n=K(r[i]),t.call(e,n,i,this))return i;return-1})),q(Un.prototype,"forEach",(function(t,e){var r,n;if(!Fn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!mt(t))throw new TypeError(N("invalid argument. First argument must be a function. Value: `%s`.",t));for(r=this._buffer,n=0;n<this._length;n++)t.call(e,K(r[n]),n,this)})),q(Un.prototype,"get",(function(t){if(!Fn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!kt(t))throw new TypeError(N("invalid argument. Must provide a nonnegative integer. Value: `%s`.",t));if(!(t>=this._length))return K(this._buffer[t])})),q(Un.prototype,"includes",(function(t,e){var r,n;if(!Fn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!X(t))throw new TypeError(N("invalid argument. First argument must be a boolean. Value: `%s`.",t));if(arguments.length>1){if(!Pt(e))throw new TypeError(N("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0&&(e+=this._length)<0&&(e=0)}else e=0;for(r=this._buffer,n=e;n<this._length;n++)if(t===K(r[n]))return!0;return!1})),q(Un.prototype,"indexOf",(function(t,e){var r,n;if(!Fn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!X(t))throw new TypeError(N("invalid argument. First argument must be a boolean. Value: `%s`.",t));if(arguments.length>1){if(!Pt(e))throw new TypeError(N("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0&&(e+=this._length)<0&&(e=0)}else e=0;for(r=this._buffer,n=e;n<this._length;n++)if(t===K(r[n]))return n;return-1})),q(Un.prototype,"join",(function(t){var e,r,n;if(!Fn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(arguments.length>0){if(!Jt(t))throw new TypeError(N("invalid argument. First argument must be a string. Value: `%s`.",t))}else t=",";for(e=this._buffer,r=[],n=0;n<this._length;n++)e[n]?r.push("true"):r.push("false");return r.join(t)})),q(Un.prototype,"keys",(function(){var t,e,r,n,i;if(!Fn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");return t=this,r=this._length,i=-1,q(e={},"next",(function(){if(i+=1,n||i>=r)return{done:!0};return{value:i,done:!1}})),q(e,"return",(function(t){if(n=!0,arguments.length)return{value:t,done:!0};return{done:!0}})),ln&&q(e,ln,(function(){return t.keys()})),e})),q(Un.prototype,"lastIndexOf",(function(t,e){var r,n;if(!Fn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!X(t))throw new TypeError(N("invalid argument. First argument must be a boolean. Value: `%s`.",t));if(arguments.length>1){if(!Pt(e))throw new TypeError(N("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(r=this._buffer,n=e;n>=0;n--)if(t===K(r[n]))return n;return-1})),zt(Un.prototype,"length",(function(){return this._length})),q(Un.prototype,"map",(function(t,e){var r,n,i,o;if(!Fn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!mt(t))throw new TypeError("invalid argument. First argument must be a function. Value: `%s`.",t);for(i=this._buffer,r=(n=new this.constructor(this._length))._buffer,o=0;o<this._length;o++)r[o]=K(t.call(e,K(i[o]),o,this));return n})),q(Un.prototype,"reduce",(function(t,e){var r,n,i,o;if(!Fn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!mt(t))throw new TypeError(N("invalid argument. First argument must be a function. Value: `%s`.",t));if(r=this._buffer,n=this._length,arguments.length>1)i=e,o=0;else{if(0===n)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");i=K(r[0]),o=1}for(;o<n;o++)i=t(i,K(r[o]),o,this);return i})),q(Un.prototype,"reduceRight",(function(t,e){var r,n,i,o;if(!Fn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!mt(t))throw new TypeError(N("invalid argument. First argument must be a function. Value: `%s`.",t));if(r=this._buffer,n=this._length,arguments.length>1)i=e,o=n-1;else{if(0===n)throw new Error("invalid operation. If not provided an initial value, an array must contain at least one element.");i=K(r[n-1]),o=n-2}for(;o>=0;o--)i=t(i,K(r[o]),o,this);return i})),q(Un.prototype,"reverse",(function(){var t,e,r,n,i,o;if(!Fn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");for(t=this._buffer,r=this._length,n=It(r/2),i=0;i<n;i++)o=r-i-1,e=t[i],t[i]=t[o],t[o]=e;return this})),q(Un.prototype,"set",(function(t){var e,r,n,i,o,a,u;if(!Fn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(n=this._buffer,arguments.length>1){if(!kt(r=arguments[1]))throw new TypeError(N("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",r))}else r=0;if(me(t)){if(r+(o=t.length)>this._length)throw new RangeError("invalid arguments. Target array lacks sufficient storage to accommodate source values.");if(e=Fn(t)?t._buffer:t,u=n.byteOffset+r*In,e.buffer===n.buffer&&e.byteOffset<u&&e.byteOffset+e.byteLength>u){for(i=new Rr(e.length),a=0;a<e.length;a++)i[a]=e[a];e=i}for(a=0;a<o;r++,a++)n[r]=e[a]?1:0}else{if(r>=this._length)throw new RangeError(N("invalid argument. Index argument is out-of-bounds. Value: `%u`.",r));n[r]=t?1:0}})),q(Un.prototype,"slice",(function(t,e){var r,n,i,o,a,u;if(!Fn(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(!Pt(t))throw new TypeError(N("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(!Pt(e))throw new TypeError(N("invalid argument. Second argument must be an integer. Value: `%s`.",e));e<0?(e+=a)<0&&(e=0):e>a&&(e=a)}}for(r=t<e?e-t:0,n=(i=new this.constructor(r))._buffer,u=0;u<r;u++)n[u]=o[u+t];return i})),q(Un.prototype,"some",(function(t,e){var r,n;if(!Fn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!mt(t))throw new TypeError(N("invalid argument. First argument must be a function. Value: `%s`.",t));for(r=this._buffer,n=0;n<this._length;n++)if(t.call(e,K(r[n]),n,this))return!0;return!1})),q(Un.prototype,"sort",(function(t){var e;if(!Fn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(e=this._buffer,0===arguments.length)return e.sort(),this;if(!mt(t))throw new TypeError(N("invalid argument. First argument must be a function. Value: `%s`.",t));return e.sort((function(e,r){return t(K(e),K(r))})),this})),q(Un.prototype,"subarray",(function(t,e){var r,n,i;if(!Fn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(n=this._buffer,i=this._length,0===arguments.length)t=0,e=i;else{if(!Pt(t))throw new TypeError(N("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(!Pt(e))throw new TypeError(N("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,r=n.byteLength):t>=e?(i=0,r=n.byteOffset+t*In):(i=e-t,r=n.byteOffset+t*In),new this.constructor(n.buffer,r,i<0?0:i)})),q(Un.prototype,"toLocaleString",(function(t,e){var r,n,i,o,a;if(!Fn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(0===arguments.length)n=[];else{if(!Jt(t)&&!Gr(t))throw new TypeError(N("invalid argument. First argument must be a string or an array of strings. Value: `%s`.",t));n=t}if(arguments.length<2)r={};else{if(!s(e))throw new TypeError(N("invalid argument. Options argument must be an object. Value: `%s`.",e));r=e}for(o=this._buffer,i=[],a=0;a<this._length;a++)i.push(K(o[a]).toLocaleString(n,r));return i.join(",")})),q(Un.prototype,"toReversed",(function(){var t,e,r,n,i;if(!Fn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");for(r=this._length,e=new this.constructor(r),n=this._buffer,t=e._buffer,i=0;i<r;i++)t[i]=n[r-i-1];return e})),q(Un.prototype,"toSorted",(function(t){var e,r,n,i,o;if(!Fn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");for(n=this._length,r=new this.constructor(n),i=this._buffer,e=r._buffer,o=0;o<n;o++)e[o]=i[o];if(0===arguments.length)return e.sort(),r;if(!mt(t))throw new TypeError(N("invalid argument. First argument must be a function. Value: `%s`.",t));return e.sort((function(e,r){return t(K(e),K(r))})),r})),q(Un.prototype,"toString",(function(){var t,e,r;if(!Fn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");for(t=[],e=this._buffer,r=0;r<this._length;r++)e[r]?t.push("true"):t.push("false");return t.join(",")})),q(Un.prototype,"values",(function(){var t,e,r,n,i,o;if(!Fn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");return e=this,i=this._buffer,r=this._length,o=-1,q(t={},"next",(function(){if(o+=1,n||o>=r)return{done:!0};return{value:K(i[o]),done:!1}})),q(t,"return",(function(t){if(n=!0,arguments.length)return{value:t,done:!0};return{done:!0}})),ln&&q(t,ln,(function(){return e.values()})),t})),q(Un.prototype,"with",(function(t,e){var r,n;if(!Fn(this))throw new TypeError("invalid invocation. `this` is not a boolean array.");if(!Pt(t))throw new TypeError(N("invalid argument. First argument must be an integer. Value: `%s`.",t));if(n=this._length,t<0&&(t+=n),t<0||t>=n)throw new RangeError(N("invalid argument. Index argument is out-of-bounds. Value: `%s`.",t));if(!X(e))throw new TypeError(N("invalid argument. Second argument must be a boolean. Value: `%s`.",e));return(r=new this.constructor(this._buffer))._buffer[t]=e?1:0,r}));var Mn=[Ze,Qe,cr,ir,Tr,dr,Dr,Rr,Pr,_n,Rn,Un],kn=["float64","float32","int32","uint32","int16","uint16","int8","uint8","uint8c","complex64","complex128","bool"],Cn=kn.length;function Nn(t){var e;if(f(t))return"generic";if(pt(t))return null;for(e=0;e<Cn;e++)if(t instanceof Mn[e])return kn[e];return ze[gt(t)]||null}function Yn(t){var e=Nn(t);return Fe(t)?{data:t,dtype:e,accessorProtocol:!0,accessors:[Ne(e),De(e)]}:{data:t,dtype:e,accessorProtocol:!1,accessors:[Ue(e),ke(e)]}}var Dn=Array.prototype.slice;function zn(t,e,r){var n;return function(t,e){return"function"==typeof t[e]}(t,"slice")?t.slice(e,r):(n=Yn(t)).accessorProtocol?function(t,e,r){var n,i,o,a;for(n=t.data,i=t.accessors[0],o=[],a=e;a<r;a++)o.push(i(n,a));return o}(n,e,r):function(t,e,r){return Dn.call(t,e,r)}(t,e,r)}function Jn(t,e){return e&&(2===t||3===t)}function Wn(t,e){return e&&(1===t||3===t)}function $n(t,e,r){var n,i,o,a,u;for(n=t.length,i=r,o=r,u=0;u<n;u++){if(0===t[u])return[r,r];(a=e[u])>0?o+=a*(t[u]-1):a<0&&(i+=a*(t[u]-1))}return[i,o]}function Gn(t){return"column-major"===t}q($n,"assign",(function(t,e,r,n){var i,o,a,u,f;for(i=t.length,o=r,a=r,f=0;f<i;f++){if(0===t[f])return n[0]=r,n[1]=r,n;(u=e[f])>0?a+=u*(t[f]-1):u<0&&(o+=u*(t[f]-1))}return n[0]=o,n[1]=a,n}));var Zn=/[-\/\\^$*+?.()|[\]{}]/g;var qn=RegExp.prototype.exec;var Xn=n();function Kn(t){return"object"==typeof t&&(t instanceof RegExp||(Xn?function(t){try{return qn.call(t),!0}catch(t){return!1}}(t):"[object RegExp]"===u(t)))}function Hn(t,e,r){return t.replace(e,r)}function Qn(t,e,r){if(!Jt(t))throw new TypeError(N("invalid argument. First argument must be a string. Value: `%s`.",t));if(Jt(e))e=new RegExp(function(t){var e,r;if(!Jt(t))throw new TypeError(N("invalid argument. Must provide a regular expression string. Value: `%s`.",t));if("/"===t[0])for(r=t.length-1;r>=0&&"/"!==t[r];r--);return void 0===r||r<=0?t.replace(Zn,"\\$&"):(e=(e=t.substring(1,r)).replace(Zn,"\\$&"),t=t[0]+e+t.substring(r))}(e),"g");else if(!Kn(e))throw new TypeError(N("invalid argument. Second argument must be a string or regular expression. Value: `%s`.",e));if(!Jt(r)&&!mt(r))throw new TypeError(N("invalid argument. Third argument must be a string or replacement function. Value: `%s`.",r));return Hn(t,e,r)}var ti={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 ei,ri={uint16:dr,uint8:Rr};(ei=new ri.uint16(1))[0]=4660;var ni=52===new ri.uint8(ei.buffer)[0],ii="function"==typeof ArrayBuffer?ArrayBuffer:null;var oi,ai="function"==typeof ArrayBuffer?ArrayBuffer:void 0;oi=function(){var t,e,r;if("function"!=typeof ii)return!1;try{(t=$r(r=new ii(16))&&"function"==typeof ii.isView)&&((e=new Ze(r))[0]=-3.14,e[1]=NaN,t=t&&ii.isView(e)&&16===r.byteLength&&-3.14===e[0]&&e[1]!=e[1])}catch(e){t=!1}return t}()?ai:function(){throw new Error("not implemented")};var ui=oi,fi="function"==typeof DataView;function si(t){return fi&&t instanceof DataView||"[object DataView]"===u(t)}var li="function"==typeof DataView?DataView:null;var ci,hi="function"==typeof DataView?DataView:void 0;ci=function(){var t,e,r;if("function"!=typeof li)return!1;try{r=new ui(24),(t=si(e=new li(r,8))&&"function"==typeof e.getFloat64&&"function"==typeof e.setFloat64)&&(e.setFloat64(0,-3.14),e.setFloat64(8,NaN),t=t&&e.buffer===r&&16===e.byteLength&&8===e.byteOffset&&-3.14===e.getFloat64(0)&&e.getFloat64(8)!=e.getFloat64(8))}catch(e){t=!1}return t}()?hi:function(){throw new Error("not implemented")};var pi=ci,gi="function"==typeof BigInt?BigInt:void 0,yi=["row-major","column-major"];function mi(){return yi.slice()}var di=["row-major","column-major"];function vi(){return{"row-major":101,"column-major":102}}q((function(){return di.slice()}),"enum",vi);var bi={"row-major":101,"column-major":102};function wi(){return{"row-major":bi["row-major"],"column-major":bi["column-major"]}}q(mi,"enum",wi);var _i=["throw","normalize","clamp","wrap"];function Ei(){return _i.slice()}function xi(){return{throw:1,clamp:2,wrap:3,normalize:4}}q(Ei,"enum",xi);var Ti={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=wi(),Oi={throw:1,clamp:2,wrap:3,normalize:4};var Vi=4294967295,Si=4294967296,ji=new Rr(8),Ri=new pi(ji.buffer);function Li(t,e,r,n){var i,o,a;if(0===t){for(a=0;a<ji.length;a++)e[n]=0,n+=r;return e}for(o=(t&Vi)>>>0,i=It(t/Si),ni?(Ri.setUint32(0,o,ni),Ri.setUint32(4,i,ni)):(Ri.setUint32(0,i,ni),Ri.setUint32(4,o,ni)),a=0;a<ji.length;a++)e[n]=ji[a],n+=r;return e}q((function(t){var e,r,n,i;return e=new Rr(8),0===t||(i=(4294967295&t)>>>0,n=It(t/4294967296),r=new pi(e.buffer),ni?(r.setUint32(0,i,ni),r.setUint32(4,n,ni)):(r.setUint32(0,n,ni),r.setUint32(4,i,ni))),e}),"assign",Li);var Ii={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},Bi=wi(),Fi={throw:1,clamp:2,wrap:3,normalize:4};function Pi(t,e,r,n,i,o){var a,u,f,s,l;if(!(this instanceof Pi))return new Pi(t,e,r,n,i,o);for(s=1,l=0;l<r.length;l++)s*=r[l];return u=e.BYTES_PER_ELEMENT?e.BYTES_PER_ELEMENT*s:null,this._byteLength=u,this._bytesPerElement=je(t),this._buffer=e,this._dtype=t,this._length=s,this._ndims=r.length,this._offset=i,this._order=o,this._shape=r,this._strides=n,this._accessors=K(e.get&&e.set),this._iterationOrder=Re(n),a=function(t,e,r,n,i){var o;return 0!==t&&0!==i&&t===(o=$n(e,r,n))[1]-o[0]+1}(s,r,n,i,this._iterationOrder),f=Ie(n),this._flags={ROW_MAJOR_CONTIGUOUS:Wn(f,a),COLUMN_MAJOR_CONTIGUOUS:Jn(f,a),READONLY:!1},this.__meta_dataview__=null,this}function Ui(t,e){var r,n,i,o;for(i=Nn(t),n=Fe(t)?Ne(i):Ue(i),r=t.length,o=0;o<r;o++)if(n(t,o)===e)return!0;return!1}function Mi(t){var e,r,n;if(!me(t))throw new TypeError(N("invalid argument. Must provide an array-like object. Value: `%s`.",t));return n=Nn(t),Fe(t)&&(e=Ne(n)),r=t.length,void 0===e?function(e){var n;for(n=0;n<r;n++)if(t[n]===e)return!0;return!1}:function(n){var i;for(i=0;i<r;i++)if(e(t,i)===n)return!0;return!1}}q(Pi,"name","ndarray"),zt(Pi.prototype,"byteLength",(function(){return this._byteLength})),zt(Pi.prototype,"BYTES_PER_ELEMENT",(function(){return this._bytesPerElement})),zt(Pi.prototype,"data",(function(){return this._buffer})),zt(Pi.prototype,"dtype",(function(){return this._dtype})),zt(Pi.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})),zt(Pi.prototype,"length",(function(){return this._length})),zt(Pi.prototype,"ndims",(function(){return this._ndims})),zt(Pi.prototype,"offset",(function(){return this._offset})),zt(Pi.prototype,"order",(function(){return this._order})),zt(Pi.prototype,"shape",(function(){return zn(this._shape,0,this._shape.length)})),zt(Pi.prototype,"strides",(function(){return zn(this._strides,0,this._strides.length)})),q(Pi.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]})),q(Pi.prototype,"iget",(function(t){var e,r,n,i,o,a;if(0===(n=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(r=this._shape,e=this._strides,i=this._offset,Gn(this._order)){for(a=0;a<n;a++)t-=o=t%r[a],t/=r[a],i+=o*e[a];return this._accessors?this._buffer.get(i):this._buffer[i]}for(a=n-1;a>=0;a--)t-=o=t%r[a],t/=r[a],i+=o*e[a];return this._accessors?this._buffer.get(i):this._buffer[i]})),q(Pi.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})),q(Pi.prototype,"iset",(function(t,e){var r,n,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(n=this._shape,r=this._strides,o=this._offset,Gn(this._order)){for(u=0;u<i;u++)t-=a=t%n[u],t/=n[u],o+=a*r[u];return this._accessors?this._buffer.set(e,o):this._buffer[o]=e,this}for(u=i-1;u>=0;u--)t-=a=t%n[u],t/=n[u],o+=a*r[u];return this._accessors?this._buffer.set(e,o):this._buffer[o]=e,this})),q(Pi.prototype,"toString",(function(){var t,e,r,n,i,o;if(e=this._shape.length,r="ndarray( '"+(n=this._dtype)+"', ",t="",this._length<=100)if("complex64"===n||"complex128"===n)for(o=0;o<this._length;o++)t+=En(i=this.iget(o))+", "+xn(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"===n||"complex128"===n)for(o=0;o<3;o++)t+=En(i=this.iget(o))+", "+xn(i),o<2&&(t+=", ");else for(o=0;o<3;o++)t+=this.iget(o),o<2&&(t+=", ");if(t+=", ..., ","complex64"===n||"complex128"===n)for(o=2;o>=0;o--)t+=En(i=this.iget(this._length-1-o))+", "+xn(i),o>0&&(t+=", ");else for(o=2;o>=0;o--)t+=this.iget(this._length-1-o),o>0&&(t+=", ")}if(r+=Qn(ti[this.dtype],"{{data}}",t),r+=", ",r+=0===e?"[]":"[ "+this._shape.join(", ")+" ]",r+=", ",r+="[ ",0===e)r+="0";else for(o=0;o<e;o++)this._strides[o]<0?r+=-this._strides[o]:r+=this._strides[o],o<e-1&&(r+=", ");return r+=" ]",r+=", ",r+="0",r+=", ",r+="'"+this._order+"'",r+=" )"})),q(Pi.prototype,"toJSON",(function(){var t,e,r,n;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(),n=0;n<t.strides.length;n++)t.strides[n]<0&&(t.strides[n]*=-1);if(t.data=[],"complex64"===t.dtype||"complex128"===t.dtype)for(n=0;n<e;n++)r=this.iget(n),t.data.push(En(r),xn(r));else for(n=0;n<e;n++)t.data.push(this.iget(n));return t})),q(Pi.prototype,"valueOf",(function(){return 0===this._ndims?this.iget():this})),q(Pi.prototype,"__array_meta_dataview__",Dt()?function(){var t,e,r,n,i,o,a,u,f,s,l,c,h,p;if(f=this._mode||"throw",a=this._submode||[f],r=33+16*(c=this._ndims)+(h=a.length),(u=this.__meta_dataview__)&&u.byteLength===r)return u;for(u=new pi(new ui(r)),i=this._shape,o=this._strides,n=this._dtype,t=this._bytesPerElement,s=0,u.setInt8(s,ni?1:0),s+=1,u.setInt16(s,Ti[n],ni),s+=2,u.setBigInt64(s,gi(c),ni),l=8*c,s+=8,p=0;p<c;p++)u.setBigInt64(s,gi(i[p]),ni),u.setBigInt64(s+l,gi(o[p]*t),ni),s+=8;for(s+=l,u.setBigInt64(s,gi(this._offset*t),ni),s+=8,u.setInt8(s,Ai[this._order]),s+=1,u.setInt8(s,Oi[f]),s+=1,u.setBigInt64(s,gi(h),ni),s+=8,p=0;p<h;p++)u.setInt8(s,Oi[a[p]]),s+=1;return e=0,e|=this._flags.READONLY?4:0,u.setInt32(s,e,ni),this.__meta_dataview__=u,u}:function(){var t,e,r,n,i,o,a,u,f,s,l,c,h,p,g;if(s=this._mode||"throw",u=this._submode||[s],n=33+16*(h=this._ndims)+(p=u.length),(f=this.__meta_dataview__)&&f.byteLength===n)return f;for(f=new pi(new ui(n)),e=new Rr(f.buffer),o=this._shape,a=this._strides,i=this._dtype,t=this._bytesPerElement,l=0,f.setInt8(l,ni?1:0),l+=1,f.setInt16(l,Ii[i],ni),Li(h,e,1,l+=2),c=8*h,l+=8,g=0;g<h;g++)Li(o[g],e,1,l),Li(a[g]*t,e,1,l+c),l+=8;for(l+=c,Li(this._offset*t,e,1,l),l+=8,f.setInt8(l,Bi[this._order]),l+=1,f.setInt8(l,Fi[s]),Li(p,e,1,l+=1),l+=8,g=0;g<p;g++)f.setInt8(l,Fi[u[g]]),l+=1;return r=0,r|=this._flags.READONLY?4:0,f.setInt32(l,r,ni),this.__meta_dataview__=f,f}),q(Ui,"factory",Mi);var ki={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"]},Ci=/_and_generic$/;function Ni(){var t,e,r;return 0===arguments.length?ki.all.slice():(r=!1,t=arguments[0],Ci.test(t)&&"all"!==(t=Hn(t,Ci,""))&&"index"!==t&&(r=!0),e=(e=ki[t])?e.slice():[],r&&e.length>0&&e.push("generic"),e)}var Yi=Mi(Ni());function Di(t,e){return null!=t&&("symbol"==typeof e?e in Object(t):String(e)in Object(t))}function zi(t){return mt(t)&&qt(t.alignment)&&qt(t.byteLength)&&mt(t.byteLengthOf)&&mt(t.byteOffsetOf)&&mt(t.bufferOf)&&mt(t.isStruct)&&mt(t.viewOf)&&e(t,"fields")&&e(t,"layout")}var Ji,Wi,$i,Gi={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 Zi(t){var e=Gi[t];return Tt(e)?e:null}function qi(t){var e=typeof t;return"string"===e?null===Zi(t)?null:t:"number"===e?Ve(t):"object"===e&&t?String(t):zi(t)?t.layout:null}function Xi(t,r){var n,i,o;if(n=arguments.length,!(this instanceof Xi))return n<2?new Xi(t):new Xi(t,r);if(Yi(t))i="builtin";else{if(function(t){return t instanceof Xi||"object"==typeof t&&null!==t&&"DataType"===t.constructor.name&&Jt(t.char)&&Jt(t.description)&&Jt(t.byteOrder)&&Di(t,"value")}(t))return new Xi(t.value,{description:t.description});if(!zi(t))throw new TypeError(N("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(n>1){if(!xt(o=r))throw new TypeError(N("invalid argument. Options argument must be an object. Value: `%s`.",o));if(e(o,"description")&&!Jt(o.description))throw new TypeError(N("invalid option. `%s` option must be a string. Option: `%s`.","description",o.description))}else o={};return q(this,"_value",t),q(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===Ji&&(Ji={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"}),Ji[qi(t)]||null)}(t)||""),q(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===Wi&&(Wi={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"}),Wi[qi(t)]||null)}(t)||""),q(this,"_enum",function(t){var e=typeof t;return"number"===e?Ve(t)?t:null:"string"===e?Zi(t):"object"===e&&t&&Pt(t.enum)?t.enum:zi(t)?Zi("userdefined_type"):null}(t)||-1),q(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===$i&&($i={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?qt(e=t.alignment)?e:$i[qi(t)]||null:null)}(t)||-1),q(this,"_byteLength",je(t)||-1),q(this,"_byteOrder","host"),q(this,"_type",i),this}function Ki(t){return t instanceof Xi||"object"==typeof t&&null!==t&&Pt(t.alignment)&&Pt(t.byteLength)&&Jt(t.byteOrder)&&Jt(t.char)&&Pt(t.enum)&&Di(t,"value")}function Hi(t){return mt(t)&&qt(t.alignment)&&qt(t.byteLength)&&mt(t.byteLengthOf)&&mt(t.byteOffsetOf)&&mt(t.bufferOf)&&mt(t.viewOf)||function(t){return t instanceof Xi||"object"==typeof t&&null!==t&&Pt(t.alignment)&&Pt(t.byteLength)&&Jt(t.byteOrder)&&Jt(t.char)&&Pt(t.enum)&&Di(t,"value")}(t)&&Hi(t.value)}function Qi(t,e){if(Yi(t));else if(Ki(t))t=String(t);else{if(!Hi(t))return!1;t=t.layout}if(Yi(e));else if(Ki(e))e=String(e);else{if(!Hi(e))return!1;e=e.layout}return t===e}function to(t){return Yi(t)||Ki(t)||Hi(t)}q(Xi,"name","DataType"),zt(Xi.prototype,"alignment",(function(){return this._alignment})),zt(Xi.prototype,"byteLength",(function(){return this._byteLength})),zt(Xi.prototype,"byteOrder",(function(){return this._byteOrder})),zt(Xi.prototype,"char",(function(){return this._char})),zt(Xi.prototype,"description",(function(){return this._description})),zt(Xi.prototype,"enum",(function(){return this._enum})),zt(Xi.prototype,"value",(function(){return this._value})),q(Xi.prototype,"toJSON",(function(){return{type:"DataType",value:this.toString(),byteOrder:this._byteOrder,description:this._description}})),q(Xi.prototype,"toString",(function(){return"struct"===this._type?this._value.layout:String(this._value)})),q(Xi.prototype,"valueOf",(function(){return this.toString()}));var eo=Mi(mi()),ro=["none","equiv","safe","mostly-safe","same-kind","unsafe"];function no(){return ro.slice()}q(no,"enum",(function(){return{none:0,equiv:1,safe:2,"mostly-safe":3,"same-kind":4,unsafe:5}}));var io=no(),oo=io.length;function ao(t){var e;for(e=0;e<oo;e++)if(t===io[e])return!0;return!1}var uo,fo={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 so=function(t){return 0===arguments.length?function(){var t,e,r,n,i,o,a,u,f;for(r={},e=(t=Ae(fo)).length,f=0;f<e;f++){for(i=t[f],a=fo[i],n={},u=0;u<e;u++)n[o=t[u]]=a[o];r[i]=n}return r}():(void 0===uo&&(uo=function(){var t,e,r,n,i,o,a,u,f;for(r={},e=(t=Ae(fo)).length,f=0;f<e;f++){for(i=t[f],a=fo[i],n=[],u=0;u<e;u++)1===a[o=t[u]]&&n.push(o);r[i]=n}return r}()),t=qi(t),e(uo,t)?uo[t].slice():null)}();var lo,co={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 ho=function(t){return 0===arguments.length?function(){var t,e,r,n,i,o,a,u,f;for(r={},e=(t=Ae(co)).length,f=0;f<e;f++){for(i=t[f],a=co[i],n={},u=0;u<e;u++)n[o=t[u]]=a[o];r[i]=n}return r}():(void 0===lo&&(lo=function(){var t,e,r,n,i,o,a,u,f;for(r={},e=(t=Ae(co)).length,f=0;f<e;f++){for(i=t[f],a=co[i],n=[],u=0;u<e;u++)1===a[o=t[u]]&&n.push(o);r[i]=n}return r}()),t=qi(t),e(lo,t)?lo[t].slice():null)}();var po,go={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 yo=function(t){return 0===arguments.length?function(){var t,e,r,n,i,o,a,u,f;for(r={},e=(t=Ae(go)).length,f=0;f<e;f++){for(i=t[f],a=go[i],n={},u=0;u<e;u++)n[o=t[u]]=a[o];r[i]=n}return r}():(void 0===po&&(po=function(){var t,e,r,n,i,o,a,u,f;for(r={},e=(t=Ae(go)).length,f=0;f<e;f++){for(i=t[f],a=go[i],n=[],u=0;u<e;u++)1===a[o=t[u]]&&n.push(o);r[i]=n}return r}()),t=qi(t),e(po,t)?po[t].slice():null)}();function mo(t,e,r){return"unsafe"===r||(qi(t)===qi(e)||"none"!==r&&"equiv"!==r&&("safe"===r?function(t,e){var r;return(t=qi(t))===(e=qi(e))||!!(r=so[t])&&r[e]>0}(t,e):"mostly-safe"===r?function(t,e){var r;return(t=qi(t))===(e=qi(e))||!!(r=ho[t])&&r[e]>0}(t,e):function(t,e){var r;return(t=qi(t))===(e=qi(e))||!!(r=yo[t])&&r[e]>0}(t,e)))}function vo(t,e){return Gn(e)?function(t){var e,r,n;for(e=[],r=1,n=0;n<t.length;n++)e.push(r),r*=t[n];return e}(t):function(t){var e,r,n,i;for(e=t.length,r=[],i=0;i<e;i++)r.push(0);for(n=1,i=e-1;i>=0;i--)r[i]=n,n*=t[i];return r}(t)}function bo(t,e){var r,n,i;for(n=t.length,r=0,i=0;i<n;i++)e[i]<0&&(r-=e[i]*(t[i]-1));return r}function wo(t){var e,r,n;if(0===(e=t.length))return 0;for(r=1,n=0;n<e;n++)r*=t[n];return r}function _o(t){if("function"!=typeof t)throw new TypeError(N("invalid argument. Must provide a function. Value: `%s`.",t));return function(e){var r,n;if(!function(t){return null!=t&&"function"!=typeof t&&"number"==typeof t.length&&Bt(t.length)&&t.length>=0&&t.length<=zr}(e))return!1;if(r=e.length,0===r)return!1;for(n=0;n<r;n++)if(!1===t(e[n]))return!1;return!0}}q(vo,"assign",(function(t,e,r){return Gn(e)?function(t,e){var r,n;for(r=1,n=0;n<t.length;n++)e[n]=r,r*=t[n];return e}(t,r):function(t,e){var r,n;for(r=1,n=t.length-1;n>=0;n--)e[n]=r,r*=t[n];return e}(t,r)}));var Eo=_o(Nt.isPrimitive),xo=_o(Nt.isObject),To=_o(Nt);q(To,"primitives",Eo),q(To,"objects",xo);var Ao=_o(Mt.isPrimitive),Oo=_o(Mt.isObject),Vo=_o(Mt);function So(){return{dtypes:{default:"float64",numeric:"float64",real:"float64",floating_point:"float64",real_floating_point:"float64",complex_floating_point:"complex128",integer:"int32",signed_integer:"int32",unsigned_integer:"uint32",boolean:"bool",index:"int32",integer_index:"int32",boolean_index:"bool",mask_index:"uint8"},order:"row-major",casting:"safe",index_mode:"throw"}}q(Vo,"primitives",Ao),q(Vo,"objects",Oo);var jo={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"},Ro={"dtypes.default":jo.dtypes.default,"dtypes.numeric":jo.dtypes.numeric,"dtypes.real":jo.dtypes.real,"dtypes.floating_point":jo.dtypes.floating_point,"dtypes.real_floating_point":jo.dtypes.real_floating_point,"dtypes.complex_floating_point":jo.dtypes.complex_floating_point,"dtypes.integer":jo.dtypes.integer,"dtypes.signed_integer":jo.dtypes.signed_integer,"dtypes.unsigned_integer":jo.dtypes.unsigned_integer,"dtypes.boolean":jo.dtypes.boolean,"dtypes.index":jo.dtypes.index,"dtypes.integer_index":jo.dtypes.integer_index,"dtypes.boolean_index":jo.dtypes.boolean_index,"dtypes.mask_index":jo.dtypes.mask_index,order:jo.order,casting:jo.casting,index_mode:jo.index_mode};function Lo(t){var e=typeof t;return null===t||"object"!==e&&"function"!==e?new TypeError(N("invalid argument. A provided constructor must be either an object (except null) or a function. Value: `%s`.",t)):null}q(So,"get",(function(t){var e=Ro[t];return void 0===e?null:e}));var Io=Object.create;function Bo(){}var Fo="function"==typeof Io?Io:function(t){return Bo.prototype=t,new Bo};function Po(t,e){return t<0?0:t>e?e:t}function Uo(t,e){var r=e+1;return t<0?((t+=r)<0&&0!==(t%=r)&&(t+=r),t):t>e?((t-=r)>e&&(t%=r),t):t}function Mo(t,e){return t<0?(t+=e+1)<0?-1:t:t>e?-1:t}var ko=Mi(Ei()),Co={wrap:Uo,clamp:Po,normalize:function(t,e){var r=Mo(t,e);if(r<0||r>e)throw new RangeError(N("invalid argument. Index must resolve to a value on the interval: [0, %d]. Value: `%d`.",e,t));return r},throw:function(t,e){if(t<0||t>e)throw new RangeError(N("invalid argument. Index must resolve to a value on the interval: [0, %d]. Value: `%d`.",e,t));return t}};function No(t,e,r){var n;if("clamp"===r)return Po(t,e);if("wrap"===r)return Uo(t,e);if(n=t,"normalize"===r&&(n=Mo(n,e)),n<0||n>e)throw new RangeError(N("invalid argument. Index must resolve to a value on the interval: [0, %d]. Value: `%d`.",e,t));return n}q(No,"factory",(function(t){if(!ko(t))throw new TypeError(N("invalid argument. First argument must be a recognized index mode. Value: `%s`.",t));return Co[t]}));var Yo=Pi.prototype.iget;var Do=Pi.prototype.iset;function zo(t,e){var r,n;for(r=[],n=0;n<e;n++)r.push(t[n]);return r}var Jo=32767,Wo=So.get("index_mode"),$o=!1;function Go(t,r,n,i,o,a,u){var f,s,l,c,h;if(!(this instanceof Go))return arguments.length<7?new Go(t,r,n,i,o,a):new Go(t,r,n,i,o,a,u);if(!to(t))throw new TypeError(N("invalid argument. First argument must be a supported ndarray data type. Value: `%s`.",t));if(!me(r))throw new TypeError(N("invalid argument. Second argument must be an array-like object, typed-array-like, or a Buffer. Value: `%s`.",r));if(r.get&&r.set&&(!mt(r.get)||!mt(r.set)))throw new TypeError(N("invalid argument. Second argument `get` and `set` properties must be functions. Value: `%s`.",r));if(!Eo(n)&&(!me(n)||n.length>0))throw new TypeError(N("invalid argument. Third argument must be an array-like object containing nonnegative integers. Value: `%s`.",n));if((f=n.length)>Jo)throw new RangeError(N("invalid argument. Number of dimensions must not exceed %u due to stack limits. Value: `%u`.",Jo,f));if(!Ao(i))throw new TypeError(N("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(N("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(N("invalid argument. Fourth argument must contain a single element equal to 0. Value: `%d`.",i[0]))}if(!kt(o))throw new TypeError(N("invalid argument. Fifth argument must be a nonnegative integer. Value: `%s`.",o));if(!eo(a))throw new TypeError(N("invalid argument. Sixth argument must be a supported order. Value: `%s`.",a));if(f>0&&!function(t,e,r,n){var i=$n(e,r,n);return i[0]>=0&&i[1]<t}(r.length,n,i,o)&&wo(n)>0)throw new Error("invalid arguments. Input buffer is incompatible with the specified meta data. Ensure that the offset is valid with regard to the strides array and that the buffer has enough elements to satisfy the desired array shape.");if((s={}).mode=Wo,s.readonly=$o,arguments.length>6&&(l=function(t,r){var n;if(!xt(r))return new TypeError(N("invalid argument. Options argument must be an object. Value: `%s`.",r));if(e(r,"mode")&&(t.mode=r.mode,!ko(t.mode)))return new TypeError(N("invalid option. `%s` option must be a recognized mode. Option: `%s`.","mode",t.mode));if(e(r,"submode")){if(t.submode=r.submode,!Jr(t.submode))return new TypeError(N("invalid option. `%s` option must be an array containing recognized modes. Option: `%s`.","submode",t.submode));if(0===t.submode.length)return new TypeError(N("invalid option. `%s` option must be an array containing recognized modes. Option: `%s`.","submode",t.submode.join(",")));for(n=0;n<t.submode.length;n++)if(!ko(t.submode[n]))return new TypeError(N("invalid option. Each submode must be a recognized mode. Option: `%s`.",t.submode[n]));t.submode=t.submode.slice()}return e(r,"readonly")&&(t.readonly=r.readonly,!X(t.readonly))?new TypeError(N("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=zo(n,f),h=zo(i,f||1),Pi.call(this,t,r,c,h,o,a),this._flags.READONLY=s.readonly,this}!function(t,e){var r=Lo(t);if(r)throw r;if(r=Lo(e))throw r;if(void 0===e.prototype)throw new TypeError(N("invalid argument. Second argument must have a prototype from which another object can inherit. Value: `%s`.",e.prototype));t.prototype=Fo(e.prototype),Z(t.prototype,"constructor",{configurable:!0,enumerable:!1,writable:!0,value:t})}(Go,Pi),q(Go,"name","ndarray"),q(Go.prototype,"get",(function(){var t,e,r,n;if(arguments.length!==this._ndims)throw new RangeError(N("invalid arguments. Number of indices must match the number of dimensions. ndims: `%u`. nargs: `%u`.",this._ndims,arguments.length));for(t=this._offset,r=this._submode.length,n=0;n<arguments.length;n++){if(!Pt(arguments[n]))throw new TypeError(N("invalid argument. Indices must be integer valued. Argument: `%u`. Value: `%s`.",n,arguments[n]));e=No(arguments[n],this._shape[n]-1,this._submode[n%r]),t+=this._strides[n]*e}return this._accessors?this._buffer.get(t):this._buffer[t]})),q(Go.prototype,"iget",(function(t){if(this._ndims>0){if(!Pt(t))throw new TypeError(N("invalid argument. Index must be an integer. Value: `%s`.",t));return t=No(t,this._length-1,this._mode),Yo.call(this,t)}return Yo.call(this)})),q(Go.prototype,"set",(function(){var t,e,r,n;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(N("invalid arguments. Number of indices must match the number of dimensions. ndims: `%u`. nargs: `%u`.",this._ndims,arguments.length));for(t=this._offset,r=this._submode.length,n=0;n<arguments.length-1;n++){if(!Pt(arguments[n]))throw new TypeError(N("invalid argument. Indices must be integer valued. Argument: `%i`. Value: `%s`.",n,arguments[n]));e=No(arguments[n],this._shape[n]-1,this._submode[n%r]),t+=this._strides[n]*e}return this._accessors?this._buffer.set(arguments[n],t):this._buffer[t]=arguments[n],this})),q(Go.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(!Pt(t))throw new TypeError(N("invalid argument. Index must be an integer. Value: `%s`.",t));t=No(t,this._length-1,this._mode),Do.call(this,t,e)}else Do.call(this,t);return this}));var Zo=Object.prototype.isPrototypeOf;function qo(t,e,r,n,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=n,h=a,p=0;p<t;p++)s(f,h,l(u,c)),c+=r,h+=o;return i}var Xo=8;function Ko(t,e,r,n,i){var o,a,u,f,s,l;if(t<=0)return n;if(u=Yn(e),f=Yn(n),u.accessorProtocol||f.accessorProtocol)return qo(t,u,r,o=r<0?(1-t)*r:0,f,i,a=i<0?(1-t)*i:0),f.data;if(1===r&&1===i){if((s=t%Xo)>0)for(l=0;l<s;l++)n[l]=e[l];if(t<Xo)return n;for(l=s;l<t;l+=Xo)n[l]=e[l],n[l+1]=e[l+1],n[l+2]=e[l+2],n[l+3]=e[l+3],n[l+4]=e[l+4],n[l+5]=e[l+5],n[l+6]=e[l+6],n[l+7]=e[l+7];return n}for(o=r<0?(1-t)*r:0,a=i<0?(1-t)*i:0,l=0;l<t;l++)n[a]=e[o],o+=r,a+=i;return n}var Ho=8;function Qo(t,e,r,n,i,o,a){var u,f,s,l,c,h;if(t<=0)return i;if(s=Yn(e),l=Yn(i),s.accessorProtocol||l.accessorProtocol)return qo(t,s,r,n,l,o,a),l.data;if(u=n,f=a,1===r&&1===o){if((c=t%Ho)>0)for(h=0;h<c;h++)i[f]=e[u],u+=r,f+=o;if(t<Ho)return i;for(h=c;h<t;h+=Ho)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+=Ho,f+=Ho;return i}for(h=0;h<t;h++)i[f]=e[u],u+=r,f+=o;return i}function ta(t,e){return t<e?t:e}function ea(t,e){var r,n;for(r=[],n=0;n<e;n++)r.push(t);return r}q(Ko,"ndarray",Qo);var ra="__@@##$$@@__struct_buffer__@@$$##@@__",na="Struct";function ia(t,e,r,n){Z(t,e,{configurable:!1,enumerable:!1,get:r,set:n})}function oa(t,e,r){Z(t,e,{configurable:!1,enumerable:!0,get:r})}function aa(t,e,r,n){Z(t,e,{configurable:!1,enumerable:!0,get:r,set:n})}var ua={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 fa={complex64:en,complex128:Kr};function sa(t){return fa[t]||null}var la={float64:"complex128",float32:"complex64"},ca=sa(la.float64);var ha={complex128:"float64",complex64:"float32",complex32:"float16"};function pa(t,e){return function(){var r=this[ra],n=r[e](t.byteOffset,ni),i=r[e](t.byteOffset+t.byteLength/2,ni);return function(t,e,r){var n;if(arguments.length>2){if(n=sa(la[r]))return new n(t,e);throw new TypeError(N("invalid argument. Must provide a recognized data type. Value: `%s`.",r))}return new ca(t,e)}(n,i,ha[t.type])}}var ga={float64:Ze,float32:Qe,int16:Tr,int32:cr,int8:Dr,uint16:dr,uint32:ir,uint8:Rr,uint8c:Pr,complex64:_n,complex128:Rn,bool:Un};function ya(t){return ga[t]||null}function ma(t,e){return new Rr(t.buffer,t.byteOffset+t.BYTES_PER_ELEMENT*e,t.length-e)}function da(){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 va={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"}},ba={"dtypes.default":va.dtypes.default,"dtypes.numeric":va.dtypes.numeric,"dtypes.real":va.dtypes.real,"dtypes.floating_point":va.dtypes.floating_point,"dtypes.real_floating_point":va.dtypes.real_floating_point,"dtypes.complex_floating_point":va.dtypes.complex_floating_point,"dtypes.integer":va.dtypes.integer,"dtypes.signed_integer":va.dtypes.signed_integer,"dtypes.unsigned_integer":va.dtypes.unsigned_integer,"dtypes.boolean":va.dtypes.boolean,"dtypes.index":va.dtypes.index,"dtypes.integer_index":va.dtypes.integer_index,"dtypes.boolean_index":va.dtypes.boolean_index,"dtypes.mask_index":va.dtypes.mask_index};q(da,"get",(function(t){var e=ba[t];return void 0===e?null:e}));var wa=da.get("dtypes.default"),_a=ya("complex64"),Ea=ya("complex128"),xa=ya("bool");function Ta(){var t,e,r,n;if(null===(r=ya(e=(t=arguments.length)&&Jt(arguments[t-1])?arguments[t-=1]:wa)))throw new TypeError(N("invalid argument. Must provide a recognized data type. Value: `%s`.",e));return t<=0?new r(0):1===t?((n=arguments[0])instanceof _a?n=pn(n,0):n instanceof Ea?n=gn(n,0):n instanceof xa&&(n=ma(n,0)),new r(n)):2===t?new r(arguments[0],arguments[1]):new r(arguments[0],arguments[1],arguments[2])}function Aa(t){if(t.length)return t.isStructType?function(t){return function(){var e,r,n,i;for(e=(r=this[ra]).byteOffset+t.byteOffset,n=[],i=0;i<t.length;i++)n.push(new t.type(r.buffer,e,t.byteLength)),e+=t.byteOffset;return n}}(t):function(t){return function(){var e=this[ra];return Ta(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[ra][e](t.byteOffset,ni)}}(t,ua[t.type].get);case"bool":return function(t,e){return function(){var r=this[ra];return K(r[e](t.byteOffset,ni))}}(t,ua[t.type].get);case"complex128":case"complex64":case"complex32":return pa(t,ua[t.type].get);default:if(t.isStructType)return function(t){return function(){var e=this[ra];return new t.type(e.buffer,e.byteOffset+t.byteOffset,t.byteLength)}}(t);throw new Error(N("unexpected error. Unrecognized data type. Value: `%s`.",t.type))}}var Oa={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"]},Va=/_and_generic$/;function Sa(){var t,e,r;return 0===arguments.length?Oa.all.slice():(r=!1,t=arguments[0],Va.test(t)&&"all"!==(t=Hn(t,Va,""))&&"index"!==t&&(r=!0),e=(e=Oa[t])?e.slice():[],r&&e.length>0&&e.push("generic"),e)}var ja=Mi(Sa("real_floating_point")),Ra=Mi(Sa("signed_integer"));function La(t){return"bigint"==typeof t}function Ia(t){return"object"==typeof t&&"[object BigInt]"===u(t)&&function(t){try{return"bigint"==typeof t.valueOf()}catch(t){return!1}}(t)}function Ba(t){return La(t)||Ia(t)}function Fa(t){return function(){return t}}q(Ba,"isPrimitive",La),q(Ba,"isObject",Ia);var Pa,Ua=Fa(!1),Ma=Fa(!1),ka=Fa(!1);q(Ua,"isPrimitive",Ma),q(Ua,"isObject",ka),Pa=Dt()?Ba:Ua;const{isPrimitive:Ca}=Pa;var Na=1401298464324817e-60,Ya=16777215,Da=-16777215;function za(t){return t!=t||t===Rt||t===Lt?"float32":Bt(t)?t>=Da&&t<=Ya?"float32":"float64":t>-Na&&t<Na?"float64":"float32"}function Ja(t){return Tt(t)?t!=t||t===Rt||t===Lt?"float32":Bt(t)?0===t&&(0===(e=t)&&1/e===Lt)?"float32":t<0?t>=kr?"int8":t>=wr?"int16":t>=ur?"int32":"float64":t<=Or?"uint8":t<=pr?"uint16":t<=le?"uint32":"float64":t>-Na&&t<Na?"float64":"float32":X(t)?"bool":rn(t)?"float64"===za(t.re)||"float64"===za(t.im)?"complex128":"complex64":"generic";var e}var Wa={Complex64:"complex64",Complex128:"complex128"};var $a,Ga=["complex64","complex128"].slice(),Za=[];for($a=0;$a<Ga.length;$a++)Za.push(sa(Ga[$a]));var qa=Ga.length;function Xa(t){var e;for(e=0;e<qa;e++)if(t instanceof Za[e])return Ga[e];return Wa[gt(t)]||null}function Ka(t){return t?1:0}function Ha(t){return At(t)}var Qa={dtypes:{real:"float64",complex:"complex128"}};function tu(t,e){return function(r){var n,i;Tt(r)?(n=ja(t.type)?t.type:Pt(r)?Ra(t.type)?function(t){return t<0?t>=kr?"int8":t>=wr?"int16":t>=ur?"int32":"float64":t<=Mr?"int8":t<=br?"int16":t<=ar?"int32":"float64"}(r):Ja(r):Qa.dtypes.real,i=r):rn(r)?(n=Xa(r)||("float32"===t.type?"complex64":"complex128"),i=r.re):X(r)?(n="bool",i=Ka(r)):Ca(r)?(n="int64",i=Ha(r)):(n="generic",i=r);if(!mo(n,t.type,t.castingMode))throw new TypeError(N("invalid assignment. Assigned value cannot be cast to the data type of `%s`. Data types: [%s, %s].",t.name,t.type,n));this[ra][e](t.byteOffset,i,ni)}}function eu(t){return K(t)}function ru(t){return K(t.re||t.im)}function nu(t,e){return function(r){var n,i;X(r)?(n="bool",i=Ka(r)):Tt(r)?(n=Qa.dtypes.real,i=Ka(eu(r))):Ca(r)?(n="int64",i=Ka(function(t){return K(t)}(r))):rn(r)?(n=Xa(r)||Qa.dtypes.complex,i=Ka(ru(r))):(n="generic",i=K(r));if(!mo(n,t.type,t.castingMode))throw new TypeError(N("invalid assignment. Assigned value cannot be cast to the data type of `%s`. Data types: [%s, %s].",t.name,t.type,n));this[ra][e](t.byteOffset,i,ni)}}function iu(t,e){return function(r){var n,i;Ca(r)?(n="int64",i=r):Tt(r)?Pt(r)?(n=Ja(r),i=gi(r)):(n=Qa.dtypes.real,i=gi(It(r))):X(r)?(n="bool",i=function(t){return gi(t?1:0)}(r)):rn(r)?(n=Xa(r)||Qa.dtypes.complex,i=gi(It(r.re))):(n="generic",i=gi(It(At(i))));if(!mo(n,t.type,t.castingMode))throw new TypeError(N("invalid assignment. Assigned value cannot be cast to the data type of `%s`. Data types: [%s, %s].",t.name,t.type,n));this[ra][e](t.byteOffset,i,ni)}}function ou(t){return s(t)&&si(t[ra])}var au=Mi(Sa("complex_floating_point")),uu=Mi(Sa("boolean")),fu=Mi(Sa("real"));function su(t,e){if(fn(t))return gn(t,e);if(an(t))return pn(t,e);throw new TypeError(N("invalid argument. First argument must be a complex-valued floating-point array. Value: `%s`.",t))}function lu(t,e){return e>0?0:(1-t)*e}var cu=8;function hu(t,e,r,n,i){var o,a,u,f;if(t<=0)return r;if((u=Yn(r)).accessorProtocol)return function(t,e,r,n,i){var o,a,u,f;for(o=r.data,a=r.accessors[1],u=i,f=0;f<t;f++)a(o,u,e),u+=n}(t,e,u,n,i),u.data;if(o=i,1===n){if((a=t%cu)>0)for(f=0;f<a;f++)r[o]=e,o+=n;if(t<cu)return r;for(f=a;f<t;f+=cu)r[o]=e,r[o+1]=e,r[o+2]=e,r[o+3]=e,r[o+4]=e,r[o+5]=e,r[o+6]=e,r[o+7]=e,o+=cu;return r}for(f=0;f<t;f++)r[o]=e,o+=n;return r}function pu(t,e,r,n){return hu(t,e,r,n,lu(t,n))}function gu(t){return ea(0,t)}function yu(t,e,r,n,i,o){var a,u;return a=Yn(t),u=Yn(e),a.accessorProtocol||u.accessorProtocol?(function(t,e,r,n,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=n,c=0;c<a.length;c++)s(u,l,i.call(o,f(a,c),c,a)),l+=r}(a,u,r,n,i,o),e):function(t,e,r,n,i,o){var a,u;for(a=n,u=0;u<t.length;u++)e[a]=i.call(o,t[u],u,t),a+=r;return e}(t,e,r,n,i,o)}function mu(t,e,r){return function(t,e){return"function"==typeof t[e]}(t,"map")?t.map(e,r):yu(t,gu(t.length),1,0,e,r)}function du(t){return t.re}function vu(t){if(t.length)return t.isStructType?function(t){return function(e){var r,n,i,o,a,u,f,s;if(!me(e))throw new TypeError(N("invalid assignment. `%s` must be an array-like object. Value: `%s`.",t.name,e));if(e.length!==t.length)throw new RangeError(N("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(N("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,n=[],s=0;s<e.length;s++){if((u=this.constructor.viewOf(e[s])).byteLength!==f)throw new RangeError(N("invalid assignment. `%s` must be an array-like object containing `struct` instances having the same byte length.",t.name));a=new Rr(u.buffer,u.byteOffset,f),n.push(a)}for(r=(i=this[ra]).byteOffset+t.byteOffset,s=0;s<e.length;s++)o=new Rr(i.buffer,r,f),Ko(t.length,n[s],1,o,1),r+=f}}(t):function(t){return function(e){var r,n,i;if(!me(e)||ou(e))throw new TypeError(N("invalid assignment. `%s` must be an array-like object. Value: `%s`.",t.name,e));if(e.length!==t.length)throw new RangeError(N("invalid assignment. `%s` must be an array-like object having length %u.",t.name,t.length));if(!mo(i=Nn(e),t.type,t.castingMode))throw new TypeError(N("invalid assignment. Assigned value cannot be cast to the data type of `%s`. Data types: [%s, %s].",t.name,t.type,i));return r=Ta((n=this[ra]).buffer,n.byteOffset+t.byteOffset,t.length,t.type),i===t.type?au(i)?void Ko(2*t.length,su(e,0),1,su(r,0),1):uu(i)?void Ko(t.length,ma(e,0),1,ma(r,0),1):void Ko(t.length,e,1,r,1):fu(i)?fu(t.type)?void Ko(t.length,e,1,r,1):au(t.type)?(r=su(r,0),Ko(t.length,r,2,e,1),void pu.ndarray(t.length,0,r,2,1)):void mu.assign(e,r,1,0,eu):au(i)?fu(t.type)?void mu.assign(e,r,1,0,du):au(t.type)?void Ko(2*t.length,su(e,0),1,su(r,0),1):void mu.assign(e,r,1,0,ru):void(fu(t.type)?Ko(t.length,ma(e,0),1,r,1):(r=su(r,0),Ko(t.length,r,2,ma(e,0),1),pu.ndarray(t.length,0,r,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 tu(t,ua[t.type].set);case"int64":case"uint64":return iu(t,ua[t.type].set);case"bool":return nu(t,ua[t.type].set);case"complex128":case"complex64":case"complex32":return function(t,e){return function(r){var n,i,o,a;if(rn(r)?(i=Xa(r)||t.type,o=r.re,a=r.im):Tt(r)?(i="complex64"===t.type?"float32":"float64",o=r,a=0):Ca(r)?(i="int64",o=Ha(r),a=0):X(r)?(i="bool",o=Ka(r),a=0):(i="generic",o=r,a=0),!mo(i,t.type,t.castingMode))throw new TypeError(N("invalid assignment. Assigned value cannot be cast to the data type of `%s`. Data types: [%s, %s].",t.name,t.type,i));(n=this[ra])[e](t.byteOffset,o,ni),n[e](t.byteOffset+t.byteLength/2,a,ni)}}(t,ua[t.type].set);default:if(t.isStructType)return function(t){return function(e){var r,n,i,o,a;if(!ou(e))throw new TypeError(N("invalid assignment. `%s` must be a `struct` instance. Value: `%s`.",t.name,e));if("none"===t.casting&&!(e instanceof t.type))throw new TypeError(N("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(N("invalid assignment. `%s` must be a `struct` instance having the same byte length.",t.name));i=new Rr(o.buffer,o.byteOffset,a),r=this[ra],n=new Rr(r.buffer,r.byteOffset+t.byteOffset,a),Ko(t.length,i,1,n,1)}}(t);throw new Error(N("unexpected error. Unrecognized data type. Value: `%s`.",t.type))}}q(pu,"ndarray",hu),q(mu,"assign",yu);var bu=["name","type","description","length","enumerable","writable","default","castingMode"];function wu(t){return"union"===t.type&&me(t.fields)}function _u(t){return null==t}function Eu(t,e,r,n,i){var o,a,u,f,s;if(t<=0)return"";if(1===n&&0===i&&t===r.length&&function(t,e){return"function"==typeof t[e]}(r,"join"))return r.join(e);if((u=Yn(r)).accessorProtocol)return function(t,e,r,n,i){var o,a,u,f,s,l;for(o=r.data,a=r.accessors[0],f=i,u="",l=0;l<t;l++)l>0&&(u+=e),_u(s=a(o,f))||(u+=String(s)),f+=n;return u}(t,e,u,n,i);for(a=i,o="",s=0;s<t;s++)s>0&&(o+=e),_u(f=r[a])||(o+=String(f)),a+=n;return o}function xu(t,e){return Eu(t.length,e,t,1,0)}function Tu(t,e){return X(t)?null:new TypeError(N("invalid argument. `%s` field must be a boolean. Value: `%s`.",e,t))}q((function(t,e,r,n){return Eu(t,e,r,n,lu(t,n))}),"ndarray",Eu);var Au=["int8","int16","int32","int64","uint8","uint16","uint32","uint64","float32","float64","complex64","complex128","bool"];var Ou,Vu={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},Su=["name","type"],ju={name:function(t,e){return Jt(t)||t.length>0?null:new TypeError(N("invalid argument. `%s` field must be a non-empty string. Value: `%s`.",e,t))},type:function(t){return Ui(Au,t)||zi(t)?null:new TypeError(N('invalid argument. `%s` field must be either a struct type or one of the following: "%s". Value: `%s`.',"type",xu(Au,", "),t))},description:function(t,e){return Jt(t)?null:new TypeError(N("invalid argument. `%s` field must be a string. Value: `%s`.",e,t))},length:function(t,e){return qt(t)?null:new TypeError(N("invalid argument. `%s` field must be a positive integer. Value: `%s`.",e,t))},enumerable:Tu,writable:Tu,default:Fa(null),castingMode:(Ou=["none","safe","mostly-safe","same-kind","unsafe"],function(t,e){return Ui(Ou,t)?null:new TypeError(N('invalid argument. `%s` field must be one of the following: "%s". Value: `%s`.',e,xu(Ou,", "),t))})};function Ru(t,e){var r,n,i,o,a;for(r={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(Di(t,o=e[a])){if(i=t[o],n=ju[o](i,o))return n;r[o]=i}return function(t,e){var r;for(r=0;r<e.length;r++)if(!Di(t,e[r]))return!1;return!0}(r,Su)?(r.isStructType=zi(r.type),r.byteLength=function(t){var e;return e=t.isStructType?t.type.byteLength:je(t.type),t.length&&(e*=t.length),e}(r),r.isStructType?r.alignment=r.type.alignment:r.alignment=Vu[r.type],r):new TypeError(N('invalid argument. Field objects must have the following properties: "%s". Value: `%s`.',xu(Su,", "),JSON.stringify(t)))}function Lu(t){var e,r,n;for(e=0,n=0;n<t.length;n++)(r=t[n].alignment)>e&&(e=r);return e}function Iu(t){var e,r,n,i,o,a,u;if(0===(e=t.fields).length)return null;for(n=[],u=0;u<e.length;u++){if(!s(a=e[u]))return null;if(wu(a))return new TypeError(N("invalid argument. Union types cannot contain nested union types. Value: `%s`.",JSON.stringify(e)));if(void 0===r&&Di(a,"default"))r=!0;else if(!0===r&&Di(a,"default"))return new TypeError(N("invalid argument. Union types can only contain one field with a default value. Value: `%s`.",JSON.stringify(e)));if((i=Ru(a,bu))instanceof Error)return i;if(0===u)o=i.byteLength;else if(i.byteLength!==o)return new RangeError(N("invalid argument. Union types must contain fields having the same byte length. Value: `%s`.",JSON.stringify(e)));n.push(i)}return{type:"union",fields:n,byteLength:o,byteOffset:0,alignment:Lu(n),padding:0}}function Bu(t){var e=Nn(t);return Fe(t)?Ne(e):Ue(e)}function Fu(t,e,r){return function(t,e){return"function"==typeof t[e]}(t,"indexOf")?t.indexOf(e,r):(r<0&&(r+=t.length)<0&&(r=0),me(n=t)&&mt(n.get)&&mt(n.set)?function(t,e,r){var n,i;for(n=Bu(t),i=r;i<t.length;i++)if(e===n(t,i))return i;return-1}(t,e,r):function(t,e,r){var n;for(n=r;n<t.length;n++)if(e===t[n])return n;return-1}(t,e,r));var n}function Pu(t,e){var r;return 0===t.length?new Error("invalid operation. struct does not have any fields."):(r=Fu(t,e,0))<0?new TypeError(N('invalid argument. Field name must be one of the following: "%s". Value: `%s`.',xu(t,", "),e)):r}function Uu(t,e){var r;for(r=0;r<t.length;r++)t[r].padding=e;return t}function Mu(t){return function(e,r){return N("[%u,",t+parseInt(r,10))}}function ku(t){var e,r,n,i,o,a;for(i=t.length,n=/\[(\d{1,}),/g,e=[],a=0;a<i;a++)o=t[a],a>0&&o.byteOffset===t[a-1].byteOffset||(o.isStructType?e.push(Hn(o.type.layout,n,Mu(o.byteOffset))):e.push(N("|<%s>[%u,%u]",o.type,o.byteOffset,o.byteLength)));return"|"===(r=N("%s|",e.join("")))[r.length-2]&&(r=r.substring(0,r.length-1)),r}var Cu=["none","linear","layout"],Nu=Mi(Cu);function Yu(t,r,n){var i;if(!xt(n))throw new TypeError(N("invalid argument. Options argument must be an object. Value: `%s`.",n));if(i={format:"none"},e(n,"format")&&(i.format=n.format,!Nu(i.format)))throw new TypeError(N('invalid option. `%s` option must be one of the following: "%s". Option: `%s`.',"format",xu(Cu,", "),n.format));return"linear"===i.format?function(t,e){var r,n,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x;for(d=e.length,r="%"+(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(n="%"+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=N(r,c.toString()),p=N(n,N("%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(N("%s<%s>[%u]",b.name,w,E%b.alignment)),x+=1;a=N(a,f.join(", "))}else a="";f=N(o+a,E%v.alignment),g=v.length?N(i,N("%s[%u]%s",v.type,It(E/v.alignment),f)):N(i,N("%s%s",v.type,f)),s.push(N(u,h,p,g)),c+=1}for(E=0;E<v.padding;E++)h=N(r,c.toString()),p=N(n,"--"),g=N(i,"padding"),s.push(N(u,h,p,g)),c+=1}return s.join("\n")}(t,r):"layout"===i.format?ku(r):"<Struct>"}function Du(){}var zu="foo"===Du.name;var Ju=[Ze,Qe,cr,ir,Tr,dr,Dr,Rr,Pr],Wu=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array"],$u=$e()?_t(Ze):Gu;function Gu(){}$u="TypedArray"===function(t){if(!1===mt(t))throw new TypeError(N("invalid argument. Must provide a function. Value: `%s`.",t));return zu?t.name:lt.exec(t.toString())[1]}($u)?$u:Gu;var Zu=[Rn,_n],qu=["Complex64Array","Complex128Array"];function Xu(){return"function"==typeof o&&"symbol"==typeof o("foo")&&e(o,"hasInstance")&&"symbol"==typeof o.hasInstance}var Ku=Xu()?Symbol.hasInstance:null,Hu=Xu();function Qu(t,e){if("function"!=typeof e&&(!Hu||"object"!=typeof e||"function"!=typeof e[Ku]))throw new TypeError(N("invalid argument. Second argument must be callable. Value: `%s`.",e));return t instanceof e}var tf=[[Ze,"Float64Array"],[Qe,"Float32Array"],[cr,"Int32Array"],[ir,"Uint32Array"],[Tr,"Int16Array"],[dr,"Uint16Array"],[Dr,"Int8Array"],[Rr,"Uint8Array"],[Pr,"Uint8ClampedArray"],[_n,"Complex64Array"],[Rn,"Complex128Array"],[Un,"BooleanArray"]];function ef(t){var e,r;for(r=0;r<tf.length;r++)if(Qu(t,tf[r][0]))return tf[r][1];for(;t;){for(e=gt(t),r=0;r<tf.length;r++)if(e===tf[r][1])return tf[r][1];t=_t(t)}}function rf(t){var e,r,n,i;if(function(t){var e,r;if("object"!=typeof t||null===t)return!1;if(t instanceof $u)return!0;for(r=0;r<Ju.length;r++)if(t instanceof Ju[r])return!0;for(;t;){for(e=gt(t),r=0;r<Wu.length;r++)if(Wu[r]===e)return!0;t=_t(t)}return!1}(t))e=t;else if(function(t){var e,r;if("object"!=typeof t||null===t)return!1;for(r=0;r<Zu.length;r++)if(t instanceof Zu[r])return!0;for(;t;){for(e=gt(t),r=0;r<qu.length;r++)if(qu[r]===e)return!0;t=_t(t)}return!1}(t))e=8===t.BYTES_PER_ELEMENT?pn(t,0):gn(t,0);else{if(!((i=t)instanceof Un||"BooleanArray"===gt(i)))throw new TypeError(N("invalid argument. Must provide a typed array. Value: `%s`.",t));e=ma(t,0)}for(r={type:ef(t),data:[]},n=0;n<e.length;n++)r.data.push(e[n]);return r}function nf(t){var e,r,n,i,o,a,u,f;if(!me(t))throw new TypeError(N("invalid argument. First argument must be an array-like object. Value: `%s`.",t));if(u=function(t){var e,r,n,i;for(e=[],i=0;i<t.length;i++){if(!s(n=t[i]))return new TypeError(N("invalid argument. First argument must be an array of objects. Value: `%s`. Index: `%d`.",n,i));if(wu(n)){if(null===(r=Iu(n)))return new TypeError(N("invalid argument. Union types must be an array of objects. Value: `%s`. Index: `%d`.",JSON.stringify(n),i));if(r instanceof Error)return r}else if((r=Ru(n,bu))instanceof Error)return r;e.push(r)}return e}(t),u instanceof Error)throw u;if(u=function(t){var e,r,n,i,o,a;for(e={},r=[],i=0;i<t.length;i++)if(a=(n=t[i]).name,wu(n))for(o=0;o<n.fields.length;o++){if(!0===e[a=n.fields[o].name])return new TypeError(N("invalid argument. First argument must be an array of objects having unique field names. Value: `%s`.",JSON.stringify(t)));e[a]=!0,r.push(a)}else{if(!0===e[a])return new TypeError(N("invalid argument. First argument must be an array of objects having unique field names. Value: `%s`.",JSON.stringify(t)));e[a]=!0,r.push(a)}return r}(a=u),u instanceof Error)throw u;function l(t,i,u){var f,c,h,p,g,y,m,d,v,b;if(c=arguments.length,!(this instanceof l))return 0===c?new l:1===c?new l(t):2===c?new l(t,i):new l(t,i,u);if($r(t)){if(1===c)p=new pi(t,0,r);else{if(!kt(i))throw new TypeError(N("invalid argument. Byte offset must be a nonnegative integer. Value: `%s`.",i));if(2===c)p=new pi(t,i,r);else{if(!kt(u))throw new TypeError(N("invalid argument. Byte length must be a nonnegative integer. Value: `%s`.",u));p=new pi(t,i,ta(u,r))}}if(p.byteLength<r)throw new RangeError(N("invalid argument. ArrayBuffer has insufficient capacity. Minimum capacity: `%u`.",r))}else if(p=new pi(new ui(r)),c>0){if(!s(t))throw new TypeError(N("invalid argument. First argument must be an object. Value: `%s`.",t));g=t}if(q(this,ra,p),void 0!==g){for(f=ea(void 0,a.length),h={},d=0;d<a.length;d++)if(b=e[d],v=n[d],Di(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=n[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=Lu(a),a=function(t,e){var r,n,i,o,a,u,f;for(i=0,u=0;u<t.length;u++){if(i+=n=((r=ta((a=t[u]).alignment,e))-i%r)%r,u>0&&((o=t[u-1]).padding=n,wu(a)&&Uu(o.fields,n)),a.byteOffset=i,wu(a))for(f=0;f<a.fields.length;f++)a.fields[f].byteOffset=i;i+=a.byteLength}return n=(r-i%r)%r,a.padding=n,wu(a)&&Uu(a.fields,n),t}(a,i),a=function(t){var e,r,n,i;for(e=[],n=0;n<t.length;n++)if(wu(r=t[n]))for(i=0;i<r.fields.length;i++)e.push(r.fields[i]);else e.push(r);return e}(a),n=function(t){var e,r,n,i;for(r=t.length,e=[],i=0,n=0;n<r-1;n++)t[n].byteOffset!==t[n+1].byteOffset?(e.push(i),i+=1):e.push(i);return e.push(i),e}(a),f=a[a.length-1],r=f.byteOffset+f.byteLength+f.padding,q(l,"name",na),q(l,"alignment",i),q(l,"byteLength",r),zt(l,"fields",(function(){return e.slice()})),zt(l,"layout",(function(){return ku(a)})),q(l,"bufferOf",(function(t){if(!ou(t))throw new TypeError(N("invalid argument. First argument must be a `struct` instance. Value: `%s`.",t));return t[ra].buffer})),q(l,"byteLengthOf",(function(t){var r=Pu(e,t);if(r instanceof Error)throw r;return a[r].byteLength})),q(l,"byteOffsetOf",(function(t){var r=Pu(e,t);if(r instanceof Error)throw r;return a[r].byteOffset})),q(l,"descriptionOf",(function(t){var r=Pu(e,t);if(r instanceof Error)throw r;return a[r].description})),q(l,"isStruct",(function(t){return t instanceof l||ou(t)&&zi(t.constructor)})),q(l,"typeOf",(function(t){var r=Pu(e,t);if(r instanceof Error)throw r;return a[r].type})),q(l,"viewOf",(function(t){var e;if(!ou(t))throw new TypeError(N("invalid argument. First argument must be a `struct` instance. Value: `%s`.",t));return e=t[ra],new pi(e.buffer,e.byteOffset,e.byteLength)})),o=function(t,e){var r,n,i,o,a;for(i={},a=0;a<e.length;a++)r=Aa(o=e[a]),n=vu(o),o.enumerable?o.writable?aa(t,o.name,r,n):oa(t,o.name,r):o.writable?ia(t,o.name,r,n):zt(t,o.name,r),i[o.name]=[r,n];return i}(l.prototype,a),q(l.prototype,"toString",(function(){if(!(this instanceof l))throw new Error("invalid invocation. `this` is not a struct instance.");return Yu(l,a,arguments.length>0?arguments[0]:{})})),q(l.prototype,"toJSON",(function(){if(!(this instanceof l))throw new Error("invalid invocation. `this` is not a struct instance.");return function(t,e){var r,n,i,o;for(r={},o=0;o<e.length;o++)me(i=t[(n=e[o]).name])?i=rf(i):(ou(i)||rn(i)&&mt(i.toJSON))&&(i=i.toJSON()),r[n.name]=i;return r}(this,a)})),l}function of(t,e,r){var n,i,o,a,u,f,s,l,c,h,p;for(u={format:"layout"},f=r.length,s=r.get&&r.set?Ne("default"):Ue("default"),o=t.layout,c=t.byteLength,n=new Rr(e),i=0,p=0;p<f;p++){h=s(r,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;Qo(c,new Rr(a.buffer,a.byteOffset,a.byteLength),1,0,n,1,i),i+=c}return e}var af=sn(),uf="StructArray";function ff(t){var e,r,n,i;if(me(t))i=nf(t);else{if(!zi(t))throw new TypeError(N("invalid argument. First argument must be either a struct constructor or struct schema. Value: `%s`.",t));i=t}function o(t,r,n){var a,u,f,l;if(a=arguments.length,!(this instanceof o))return 0===a?new o:1===a?new o(t):2===a?new o(t,r):new o(t,r,n);if(0===a)u=new ui(0),f=0;else if(1===a)if(kt(t))u=new ui(t*e),f=t;else if(me(t)){if(f=t.length,null===(u=of(i,new ui(f*e),t)))throw new TypeError(N("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($r(t)){if(!Pt(f=(u=t).byteLength/e))throw new RangeError(N("invalid argument. ArrayBuffer byte length must be a multiple of %u. Byte length: `%u`.",e,u.byteLength))}else{if(!s(t))throw new TypeError(N("invalid argument. First argument must be a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",t));if(!1===af)throw new TypeError(N("invalid argument. Environment lacks Symbol.iterator support. First argument must be a length, ArrayBuffer, typed array, or array-like object. Value: `%s`.",t));if(!mt(t[ln]))throw new TypeError(N("invalid argument. First argument must be a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",t));if(!mt((u=t[ln]()).next))throw new TypeError(N("invalid argument. First argument must be a length, ArrayBuffer, typed array, array-like object, or an iterable. Value: `%s`.",t));if(f=(l=function(t){var e,r;for(e=[];!(r=t.next()).done;)e.push(r.value);return e}(u)).length,null===(u=of(i,new ui(f*e),l)))throw new TypeError(N("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(!$r(u=arguments[0]))throw new TypeError(N("invalid argument. First argument must be an ArrayBuffer. Value: `%s`.",t));if(!kt(r))throw new TypeError(N("invalid argument. Second argument must be a nonnegative integer. Value: `%s`.",r));if(!Pt(r/e))throw new RangeError(N("invalid argument. Second argument must be a multiple of %u. Value: `%u`.",e,r));if(r>=u.byteLength)throw new RangeError(N("invalid argument. Second argument exceeds the bounds of the ArrayBuffer. Value: `%s`.",r));if(2===a){if(!Pt(f=(u.byteLength-r)/e))throw new RangeError(N("invalid argument. ArrayBuffer view byte length must be a multiple of %u. View byte length: `%u`.",e,u.byteLength-r))}else{if(!kt(f=n))throw new TypeError(N("invalid argument. Third argument must be a nonnegative integer. Value: `%s`.",f));if(f*e>u.byteLength-r)throw new RangeError(N("invalid arguments. ArrayBuffer has insufficient capacity. Either decrease the array length or provide a bigger buffer. Minimum capacity: `%u`.",f*e))}}return q(this,"_buffer",u),q(this,"_byteOffset",r||0),q(this,"_byteLength",f*e),q(this,"_length",f),this}return e=i.byteLength,r=i.layout,n=i.fields,q(o,"BYTES_PER_ELEMENT",e),q(o,"name",uf),q(o,"struct",i),zt(o.prototype,"buffer",(function(){return this._buffer})),zt(o.prototype,"byteLength",(function(){return this._byteLength})),zt(o.prototype,"byteOffset",(function(){return this._byteOffset})),q(o.prototype,"BYTES_PER_ELEMENT",o.BYTES_PER_ELEMENT),q(o.prototype,"get",(function(t){if(!a(this))throw new TypeError(N("invalid invocation. `this` is not a %s.",uf));if(!kt(t))throw new TypeError(N("invalid argument. Must provide a nonnegative integer. Value: `%s`.",t));if(!(t>=this._length))return new i(this._buffer,this._byteOffset+t*e,e)})),zt(o.prototype,"length",(function(){return this._length})),q(o.prototype,"set",(function(t){var o,u,f,l,c,h,p,g,y,m,d,v;if(!a(this))throw new TypeError(N("invalid invocation. `this` is not a %s.",uf));if(l=this._buffer,arguments.length>1){if(!kt(f=arguments[1]))throw new TypeError(N("invalid argument. Index argument must be a nonnegative integer. Value: `%s`.",f))}else f=0;if(u={format:"layout"},p=i.byteLength,!me(t)||Ui(n,"length")){if(f>=this._length)throw new RangeError(N("invalid argument. Index argument is out-of-bounds. Value: `%u`.",f));if(!s(t))throw new TypeError(N("invalid argument. Must provide either a valid object or a struct instance. Value: `%s`.",t));if(t.toString(u)===r)return o=i.viewOf(t),void Qo(p,new Rr(o.buffer,o.byteOffset,p),1,0,new Rr(l,this._byteOffset+f*e,p),1,0);for(y=new i(l,this._byteOffset+f*e,p),d=0;d<n.length;d++)Di(t,m=n[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?Ne("default"):Ue("default"),v=this._byteOffset+f*e,o.buffer===l&&o.byteOffset<v&&o.byteOffset+o.byteLength>v){for(c=[],d=0;d<g;d++)c.push(h(t,d));o=c,h=Ue("default")}for(d=0;d<g;f++,d++)this.set(h(o,d),f)}})),q(o.prototype,"struct",i),o;function a(t){return"object"==typeof t&&null!==t&&(t.constructor.name===uf||function(t,e){var r=typeof e;if(null===e||"object"!==r&&"function"!==r)throw new TypeError(N("invalid argument. Second argument must be either an object (except null) or a function. Value: `%s`.",e));return r=typeof t,null!==t&&("object"===r||"function"===r)&&Zo.call(e,t)}(t,o.prototype))&&t.BYTES_PER_ELEMENT===e}}function sf(t){if(t.__esModule)return t;var e=t.default;if("function"==typeof e){var r=function t(){return this instanceof t?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach((function(e){var n=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,n.get?n:{enumerable:!0,get:function(){return t[e]}})})),r}var lf="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},cf=[],hf=[],pf="undefined"!=typeof Uint8Array?Uint8Array:Array,gf=!1;function yf(){gf=!0;for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0;e<64;++e)cf[e]=t[e],hf[t.charCodeAt(e)]=e;hf["-".charCodeAt(0)]=62,hf["_".charCodeAt(0)]=63}function mf(t,e,r){for(var n,i,o=[],a=e;a<r;a+=3)n=(t[a]<<16)+(t[a+1]<<8)+t[a+2],o.push(cf[(i=n)>>18&63]+cf[i>>12&63]+cf[i>>6&63]+cf[63&i]);return o.join("")}function df(t){var e;gf||yf();for(var r=t.length,n=r%3,i="",o=[],a=16383,u=0,f=r-n;u<f;u+=a)o.push(mf(t,u,u+a>f?f:u+a));return 1===n?(e=t[r-1],i+=cf[e>>2],i+=cf[e<<4&63],i+="=="):2===n&&(e=(t[r-2]<<8)+t[r-1],i+=cf[e>>10],i+=cf[e>>4&63],i+=cf[e<<2&63],i+="="),o.push(i),o.join("")}function vf(t,e,r,n,i){var o,a,u=8*i-n-1,f=(1<<u)-1,s=f>>1,l=-7,c=r?i-1:0,h=r?-1:1,p=t[e+c];for(c+=h,o=p&(1<<-l)-1,p>>=-l,l+=u;l>0;o=256*o+t[e+c],c+=h,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=n;l>0;a=256*a+t[e+c],c+=h,l-=8);if(0===o)o=1-s;else{if(o===f)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,n),o-=s}return(p?-1:1)*a*Math.pow(2,o-n)}function bf(t,e,r,n,i,o){var a,u,f,s=8*o-i-1,l=(1<<s)-1,c=l>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,g=n?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(u=isNaN(e)?1:0,a=l):(a=Math.floor(Math.log(e)/Math.LN2),e*(f=Math.pow(2,-a))<1&&(a--,f*=2),(e+=a+c>=1?h/f:h*Math.pow(2,1-c))*f>=2&&(a++,f/=2),a+c>=l?(u=0,a=l):a+c>=1?(u=(e*f-1)*Math.pow(2,i),a+=c):(u=e*Math.pow(2,c-1)*Math.pow(2,i),a=0));i>=8;t[r+p]=255&u,p+=g,u/=256,i-=8);for(a=a<<i|u,s+=i;s>0;t[r+p]=255&a,p+=g,a/=256,s-=8);t[r+p-g]|=128*y}var wf={}.toString,_f=Array.isArray||function(t){return"[object Array]"==wf.call(t)};Af.TYPED_ARRAY_SUPPORT=void 0===lf.TYPED_ARRAY_SUPPORT||lf.TYPED_ARRAY_SUPPORT;var Ef=xf();function xf(){return Af.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Tf(t,e){if(xf()<e)throw new RangeError("Invalid typed array length");return Af.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=Af.prototype:(null===t&&(t=new Af(e)),t.length=e),t}function Af(t,e,r){if(!(Af.TYPED_ARRAY_SUPPORT||this instanceof Af))return new Af(t,e,r);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return Sf(this,t)}return Of(this,t,e,r)}function Of(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");e=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n);Af.TYPED_ARRAY_SUPPORT?(t=e).__proto__=Af.prototype:t=jf(t,e);return t}(t,e,r,n):"string"==typeof e?function(t,e,r){"string"==typeof r&&""!==r||(r="utf8");if(!Af.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|If(e,r);t=Tf(t,n);var i=t.write(e,r);i!==n&&(t=t.slice(0,i));return t}(t,e,r):function(t,e){if(Lf(e)){var r=0|Rf(e.length);return 0===(t=Tf(t,r)).length||e.copy(t,0,0,r),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(n=e.length)!=n?Tf(t,0):jf(t,e);if("Buffer"===e.type&&_f(e.data))return jf(t,e.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function Vf(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function Sf(t,e){if(Vf(e),t=Tf(t,e<0?0:0|Rf(e)),!Af.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function jf(t,e){var r=e.length<0?0:0|Rf(e.length);t=Tf(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function Rf(t){if(t>=xf())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+xf().toString(16)+" bytes");return 0|t}function Lf(t){return!(null==t||!t._isBuffer)}function If(t,e){if(Lf(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return os(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return as(t).length;default:if(n)return os(t).length;e=(""+e).toLowerCase(),n=!0}}function Bf(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return Zf(this,e,r);case"utf8":case"utf-8":return Jf(this,e,r);case"ascii":return $f(this,e,r);case"latin1":case"binary":return Gf(this,e,r);case"base64":return zf(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return qf(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function Ff(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function Pf(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=Af.from(e,n)),Lf(e))return 0===e.length?-1:Uf(t,e,r,n,i);if("number"==typeof e)return e&=255,Af.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):Uf(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function Uf(t,e,r,n,i){var o,a=1,u=t.length,f=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,u/=2,f/=2,r/=2}function s(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var l=-1;for(o=r;o<u;o++)if(s(t,o)===s(e,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===f)return l*a}else-1!==l&&(o-=o-l),l=-1}else for(r+f>u&&(r=u-f),o=r;o>=0;o--){for(var c=!0,h=0;h<f;h++)if(s(t,o+h)!==s(e,h)){c=!1;break}if(c)return o}return-1}function Mf(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;a<n;++a){var u=parseInt(e.substr(2*a,2),16);if(isNaN(u))return a;t[r+a]=u}return a}function kf(t,e,r,n){return us(os(e,t.length-r),t,r,n)}function Cf(t,e,r,n){return us(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function Nf(t,e,r,n){return Cf(t,e,r,n)}function Yf(t,e,r,n){return us(as(e),t,r,n)}function Df(t,e,r,n){return us(function(t,e){for(var r,n,i,o=[],a=0;a<t.length&&!((e-=2)<0);++a)n=(r=t.charCodeAt(a))>>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function zf(t,e,r){return 0===e&&r===t.length?df(t):df(t.slice(e,r))}function Jf(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o,a,u,f,s=t[i],l=null,c=s>239?4:s>223?3:s>191?2:1;if(i+c<=r)switch(c){case 1:s<128&&(l=s);break;case 2:128==(192&(o=t[i+1]))&&(f=(31&s)<<6|63&o)>127&&(l=f);break;case 3:o=t[i+1],a=t[i+2],128==(192&o)&&128==(192&a)&&(f=(15&s)<<12|(63&o)<<6|63&a)>2047&&(f<55296||f>57343)&&(l=f);break;case 4:o=t[i+1],a=t[i+2],u=t[i+3],128==(192&o)&&128==(192&a)&&128==(192&u)&&(f=(15&s)<<18|(63&o)<<12|(63&a)<<6|63&u)>65535&&f<1114112&&(l=f)}null===l?(l=65533,c=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=c}return function(t){var e=t.length;if(e<=Wf)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=Wf));return r}(n)}Af.poolSize=8192,Af._augment=function(t){return t.__proto__=Af.prototype,t},Af.from=function(t,e,r){return Of(null,t,e,r)},Af.TYPED_ARRAY_SUPPORT&&(Af.prototype.__proto__=Uint8Array.prototype,Af.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&Af[Symbol.species]),Af.alloc=function(t,e,r){return function(t,e,r,n){return Vf(e),e<=0?Tf(t,e):void 0!==r?"string"==typeof n?Tf(t,e).fill(r,n):Tf(t,e).fill(r):Tf(t,e)}(null,t,e,r)},Af.allocUnsafe=function(t){return Sf(null,t)},Af.allocUnsafeSlow=function(t){return Sf(null,t)},Af.isBuffer=fs,Af.compare=function(t,e){if(!Lf(t)||!Lf(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},Af.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},Af.concat=function(t,e){if(!_f(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return Af.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=Af.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var o=t[r];if(!Lf(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,i),i+=o.length}return n},Af.byteLength=If,Af.prototype._isBuffer=!0,Af.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)Ff(this,e,e+1);return this},Af.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)Ff(this,e,e+3),Ff(this,e+1,e+2);return this},Af.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)Ff(this,e,e+7),Ff(this,e+1,e+6),Ff(this,e+2,e+5),Ff(this,e+3,e+4);return this},Af.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?Jf(this,0,t):Bf.apply(this,arguments)},Af.prototype.equals=function(t){if(!Lf(t))throw new TypeError("Argument must be a Buffer");return this===t||0===Af.compare(this,t)},Af.prototype.inspect=function(){var t="";return this.length>0&&(t=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(t+=" ... ")),"<Buffer "+t+">"},Af.prototype.compare=function(t,e,r,n,i){if(!Lf(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(e>>>=0),u=Math.min(o,a),f=this.slice(n,i),s=t.slice(e,r),l=0;l<u;++l)if(f[l]!==s[l]){o=f[l],a=s[l];break}return o<a?-1:a<o?1:0},Af.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},Af.prototype.indexOf=function(t,e,r){return Pf(this,t,e,r,!0)},Af.prototype.lastIndexOf=function(t,e,r){return Pf(this,t,e,r,!1)},Af.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return Mf(this,t,e,r);case"utf8":case"utf-8":return kf(this,t,e,r);case"ascii":return Cf(this,t,e,r);case"latin1":case"binary":return Nf(this,t,e,r);case"base64":return Yf(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Df(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},Af.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Wf=4096;function $f(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function Gf(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function Zf(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o<r;++o)i+=is(t[o]);return i}function qf(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function Xf(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function Kf(t,e,r,n,i,o){if(!Lf(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function Hf(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);i<o;++i)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function Qf(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);i<o;++i)t[r+i]=e>>>8*(n?i:3-i)&255}function ts(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function es(t,e,r,n,i){return i||ts(t,0,r,4),bf(t,e,r,n,23,4),r+4}function rs(t,e,r,n,i){return i||ts(t,0,r,8),bf(t,e,r,n,52,8),r+8}Af.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t),Af.TYPED_ARRAY_SUPPORT)(r=this.subarray(t,e)).__proto__=Af.prototype;else{var i=e-t;r=new Af(i,void 0);for(var o=0;o<i;++o)r[o]=this[o+t]}return r},Af.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||Xf(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},Af.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||Xf(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},Af.prototype.readUInt8=function(t,e){return e||Xf(t,1,this.length),this[t]},Af.prototype.readUInt16LE=function(t,e){return e||Xf(t,2,this.length),this[t]|this[t+1]<<8},Af.prototype.readUInt16BE=function(t,e){return e||Xf(t,2,this.length),this[t]<<8|this[t+1]},Af.prototype.readUInt32LE=function(t,e){return e||Xf(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},Af.prototype.readUInt32BE=function(t,e){return e||Xf(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},Af.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||Xf(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},Af.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||Xf(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},Af.prototype.readInt8=function(t,e){return e||Xf(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},Af.prototype.readInt16LE=function(t,e){e||Xf(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},Af.prototype.readInt16BE=function(t,e){e||Xf(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},Af.prototype.readInt32LE=function(t,e){return e||Xf(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},Af.prototype.readInt32BE=function(t,e){return e||Xf(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},Af.prototype.readFloatLE=function(t,e){return e||Xf(t,4,this.length),vf(this,t,!0,23,4)},Af.prototype.readFloatBE=function(t,e){return e||Xf(t,4,this.length),vf(this,t,!1,23,4)},Af.prototype.readDoubleLE=function(t,e){return e||Xf(t,8,this.length),vf(this,t,!0,52,8)},Af.prototype.readDoubleBE=function(t,e){return e||Xf(t,8,this.length),vf(this,t,!1,52,8)},Af.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||Kf(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},Af.prototype.writeUIntBE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||Kf(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},Af.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||Kf(this,t,e,1,255,0),Af.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},Af.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||Kf(this,t,e,2,65535,0),Af.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):Hf(this,t,e,!0),e+2},Af.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||Kf(this,t,e,2,65535,0),Af.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):Hf(this,t,e,!1),e+2},Af.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||Kf(this,t,e,4,4294967295,0),Af.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):Qf(this,t,e,!0),e+4},Af.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||Kf(this,t,e,4,4294967295,0),Af.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):Qf(this,t,e,!1),e+4},Af.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);Kf(this,t,e,r,i-1,-i)}var o=0,a=1,u=0;for(this[e]=255&t;++o<r&&(a*=256);)t<0&&0===u&&0!==this[e+o-1]&&(u=1),this[e+o]=(t/a>>0)-u&255;return e+r},Af.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);Kf(this,t,e,r,i-1,-i)}var o=r-1,a=1,u=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===u&&0!==this[e+o+1]&&(u=1),this[e+o]=(t/a>>0)-u&255;return e+r},Af.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||Kf(this,t,e,1,127,-128),Af.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},Af.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||Kf(this,t,e,2,32767,-32768),Af.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):Hf(this,t,e,!0),e+2},Af.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||Kf(this,t,e,2,32767,-32768),Af.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):Hf(this,t,e,!1),e+2},Af.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||Kf(this,t,e,4,2147483647,-2147483648),Af.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):Qf(this,t,e,!0),e+4},Af.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||Kf(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),Af.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):Qf(this,t,e,!1),e+4},Af.prototype.writeFloatLE=function(t,e,r){return es(this,t,e,!0,r)},Af.prototype.writeFloatBE=function(t,e,r){return es(this,t,e,!1,r)},Af.prototype.writeDoubleLE=function(t,e,r){return rs(this,t,e,!0,r)},Af.prototype.writeDoubleBE=function(t,e,r){return rs(this,t,e,!1,r)},Af.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i,o=n-r;if(this===t&&r<e&&e<n)for(i=o-1;i>=0;--i)t[i+e]=this[i+r];else if(o<1e3||!Af.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+e]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+o),e);return o},Af.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!Af.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var o;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o<r;++o)this[o]=t;else{var a=Lf(t)?t:os(new Af(t,n).toString()),u=a.length;for(o=0;o<r-e;++o)this[o+e]=a[o%u]}return this};var ns=/[^+\/0-9A-Za-z-_]/g;function is(t){return t<16?"0"+t.toString(16):t.toString(16)}function os(t,e){var r;e=e||1/0;for(var n=t.length,i=null,o=[],a=0;a<n;++a){if((r=t.charCodeAt(a))>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function as(t){return function(t){var e,r,n,i,o,a;gf||yf();var u=t.length;if(u%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o="="===t[u-2]?2:"="===t[u-1]?1:0,a=new pf(3*u/4-o),n=o>0?u-4:u;var f=0;for(e=0,r=0;e<n;e+=4,r+=3)i=hf[t.charCodeAt(e)]<<18|hf[t.charCodeAt(e+1)]<<12|hf[t.charCodeAt(e+2)]<<6|hf[t.charCodeAt(e+3)],a[f++]=i>>16&255,a[f++]=i>>8&255,a[f++]=255&i;return 2===o?(i=hf[t.charCodeAt(e)]<<2|hf[t.charCodeAt(e+1)]>>4,a[f++]=255&i):1===o&&(i=hf[t.charCodeAt(e)]<<10|hf[t.charCodeAt(e+1)]<<4|hf[t.charCodeAt(e+2)]>>2,a[f++]=i>>8&255,a[f++]=255&i),a}(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(ns,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function us(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function fs(t){return null!=t&&(!!t._isBuffer||ss(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&ss(t.slice(0,0))}(t))}function ss(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}sf(Object.freeze({__proto__:null,Buffer:Af,INSPECT_MAX_BYTES:50,SlowBuffer:function(t){return+t!=t&&(t=0),Af.alloc(+t)},isBuffer:fs,kMaxLength:Ef})).Buffer;var ls=function(){throw new Error("not implemented")};function cs(){throw new Error("not implemented")}var hs={binary:ls,float64:Ze,float32:Qe,float16:cs,generic:Array,int16:Tr,int32:cr,int8:Dr,uint16:dr,uint32:ir,uint8:Rr,uint8c:Pr,complex32:cs,complex64:_n,complex128:Rn,bool:Un},ps={};function gs(t){var e,r,n;return!mt(t)&&(n=qi(t),r=hs[n]||null)?r:Hi(t)?(n?e=t.value:n=(e=t).layout,(r=ps[n])||(r=ff(e),ps[n]=r),r):null}var ys=mt(ls.allocUnsafe)?function(t){if(!Nt(t))throw new TypeError(N("invalid argument. Must provide a nonnegative integer. Value: `%s`.",t));return ls.allocUnsafe(t)}:function(t){if(!Nt(t))throw new TypeError(N("invalid argument. Must provide a nonnegative integer. Value: `%s`.",t));return new ls(t)};function ms(t){return function(t,e,r,n){var i;return function(t,e){return"function"==typeof t["fill"]}(t)?t.fill(e,r,n):(r<0&&(r+=t.length)<0&&(r=0),n<0?n+=t.length:n>t.length&&(n=t.length),(i=Yn(t)).accessorProtocol?function(t,e,r,n){var i,o,a;for(i=t.data,o=t.accessors[1],a=r;a<n;a++)o(i,a,e);return i}(i,e,r,n):function(t,e,r,n){var i;for(i=r;i<n;i++)t[i]=e;return t}(t,e,r,n))}(ys(t),0,0,t)}function ds(t,e){var r=qi(t);return"generic"===r?gu(e):"binary"===r?ms(e):function(t,e){var r=gs(t);return r?new r(e):null}(t,e)}var vs={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 bs(){throw new Error("not implemented")}var ws=[Ze,Qe,bs,cr,ir,Tr,dr,Dr,Rr,Pr,bs,_n,Rn,Un],_s=["float64","float32","float16","int32","uint32","int16","uint16","int8","uint8","uint8c","complex32","complex64","complex128","bool"],Es=_s.length;function xs(t){return Yi(t)||((e=t)instanceof Xi||"object"==typeof e&&null!==e&&Pt(e.alignment)&&Pt(e.byteLength)&&Jt(e.byteOrder)&&Jt(e.char)&&Pt(e.enum)&&Di(e,"value"))||Hi(t);var e}function Ts(t){var e,r,n,i;if("object"!=typeof t||null===t)throw new TypeError(N("invalid argument. Must provide an ndarray. Value: `%s`.",t));if(!me(r=t.shape))throw new TypeError(N("invalid argument. Must provide an ndarray. Value: `%s`.",t));for(e=[],i=0;i<r.length;i++){if(!kt(n=r[i]))throw new TypeError(N("invalid argument. Must provide an ndarray. Value: `%s`.",t));e.push(n)}return e}function As(t){var e,r,n,i,o,a;if("object"!=typeof t||null===t)throw new TypeError(N("invalid argument. Must provide an ndarray. Value: `%s`.",t));if(!me(i=t.strides)){if(!me(n=t.shape))throw new TypeError(N("invalid argument. Must provide an ndarray. Value: `%s`.",t));return 0===n.length?[0]:(r=t.order,eo(r)||(r="row-major"),vo(n,r))}for(e=[],a=0;a<i.length;a++){if(!Pt(o=i[a]))throw new TypeError(N("invalid argument. Must provide an ndarray. Value: `%s`.",t));e.push(o)}return e}var Os="row-major",Vs="column-major";function Ss(t){var e;if("object"!=typeof t||null===t)throw new TypeError(N("invalid argument. Must provide an ndarray. Value: `%s`.",t));return e=t.order,eo(e)?e:1===(e=Ie(As(t)))||3===e?Os:2===e?Vs:0===function(t){var e,r;if("object"!=typeof t||null===t)throw new TypeError(N("invalid argument. Must provide an ndarray. Value: `%s`.",t));if(kt(r=t.ndims))return r;if(!me(e=t.shape))throw new TypeError(N("invalid argument. Must provide an ndarray. Value: `%s`.",t));return e.length}(t)?Os:null}function js(t,e){var r=e[0];return Jr(r)&&(t.push(r.length),js(t,r)),t}function Rs(t,e,r,n,i){var o,a,u;for(o=e[r],u=0;u<n.length;u++){if(!Jr(a=n[u])||a.length!==o)return r;if(i&&(a=Rs(t,e,r+1,a,r+1<t-1))<t)return a}return t}function Ls(t){var e,r;if(!Jr(t))throw new TypeError(N("invalid argument. Must provide an array-like object. Value: `%s`.",t));return js(e=[t.length],t),(r=e.length)>1&&(e.length=Rs(r,e,1,t,r>2)),e}function Is(t,e,r,n,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(N("invalid argument. Linear index must not exceed array dimensions. Number of array elements: `%u`. Value: `%d`.",u,i));if(f=r,Gn(n)){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 Bs=3;function Fs(t,e,r,n){var i,o,a,u,f,s,l;if(t<=0)return e;if((u=Yn(e)).accessorProtocol)return function(t,e,r,n){var i,o,a,u,f,s,l,c;for(i=e.data,a=e.accessors[0],o=e.accessors[1],l=It(t/2),s=(f=n)+(t-1)*r,c=0;c<l;c++)u=a(i,f),o(i,f,a(i,s)),o(i,s,u),f+=r,s-=r}(t,u,r,n),u.data;if(s=It(t/2),o=n,1===r){if(a=o+t-1,(f=s%Bs)>0)for(l=0;l<f;l++)i=e[o],e[o]=e[a],e[a]=i,o+=r,a-=r;if(s<Bs)return e;for(l=f;l<s;l+=Bs)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+=Bs,a-=Bs;return e}for(a=o+(t-1)*r,l=0;l<s;l++)i=e[o],e[o]=e[a],e[a]=i,o+=r,a-=r;return e}function Ps(t,e,r){return Fs(t,e,r,lu(t,r))}q(Ps,"ndarray",Fs);var Us="throw";function Ms(t,e,r,n,i){var o;for(o=0;o<e;o++)r[i]=t[o],i+=n}function ks(t,e,r,n,i,o,a){var u,f,s,l;for(u=(s=n+1)===e,f=r[n],l=0;l<f;l++)u?(i[a]=t[l],a+=o):a=ks(t[l],e,r,s,i,o,a);return a}function Cs(t,e,r,n,i,o){var a=e.length;return 0===a?n:1===a?(Ms(t,e[0],n,i,o),n):r?(function(t,e,r,n,i,o){var a,u,f,s,l,c,h;for(ks(t,e,r,0,u=gu(a=wo(r)),1,0),l=vo(r,f="row-major"),Ms(r,e,s=gu(e),1,0),Ps(e,s,1),Ps(e,l,1),h=0;h<a;h++)c=Is(s,l,0,f,h,Us),n[o]=u[c],o+=i}(t,a,e,n,i,o),n):(ks(t,a,e,0,n,i,o),n)}function Ns(t,e,r){return Cs(t,e,r,gu(wo(e)),1,0)}function Ys(){var t,e=arguments,r="https://stdlib.io/e/"+e[0]+"?";for(t=1;t<e.length;t++)r+="&arg[]="+encodeURIComponent(e[t]);return r}function Ds(t){return"object"==typeof t&&null!==t&&"number"==typeof t.length&&Bt(t.length)&&t.length>=0&&t.length<Rt}function zs(t,e,r){var n,i,o,a,u,f;if(n=Bu(t),Qi(r,"generic")){for(o=[],a=0;a<e;a++)o.push(n(t,a));return o}if(Qi(r,"binary")){for(o=ys(e),a=0;a<e;a++)o[a]=n(t,a);return o}for(o=new(gs(r))(e),f=Nn(u=o),i=Fe(u)?De(f):ke(f),a=0;a<e;a++)i(o,a,n(t,a));return o}q(Ns,"assign",Cs);var Js=Mi(Ni("complex_floating_point"));var Ws=Mi(Ni("real"));var $s=8,Gs=16;function Zs(t){return"object"==typeof t&&null!==t&&("Complex128Array"===t.constructor.name&&t.BYTES_PER_ELEMENT===Gs||"Complex64Array"===t.constructor.name&&t.BYTES_PER_ELEMENT===$s)}var qs=1;function Xs(t){return"object"==typeof t&&null!==t&&"BooleanArray"===t.constructor.name&&t.BYTES_PER_ELEMENT===qs}var Ks="number";function Hs(t){var e,r,n;for(r=t.length,e=[],n=0;n<r;n++)e.push(t[n]);return e}var Qs="row-major";function tl(t,e){var r,n,i;return"object"!=typeof(i=t.strides)||null===i?0===(n=t.shape).length?[0]:(Jt(r=t.order)||(r=Qs),vo(n,r)):e?Hs(i):i}function el(t){var e,r,n;return Tt(n=t.offset)?n:0===(r=t.shape).length||"object"!=typeof(e=t.strides)||null===e?0:bo(r,e)}var rl="row-major",nl="column-major";function il(t){var e,r;return Jt(r=t.order)?r:"object"!=typeof(e=t.strides)||null===e||1===(r=Ie(e))||3===r?rl:2===r?nl:0===t.shape.length?rl:null}function ol(t){var e,r,n,i;return e=function(t){return t.data}(t),n=function(t,e){var r=t.shape;return e?Hs(r):r}(t,!0),i=function(t){return t.dtype}(t),r=Fe(e),{ref:t,dtype:i,data:e,length:wo(n),shape:n,strides:tl(t,!0),offset:el(t),order:il(t),accessorProtocol:r,accessors:r?[Ne(i),De(i)]:[Ue(i),ke(i)]}}var al=5;var ul=5;function fl(t,e,r,n,i){var o,a,u,f;if(t<=0||1===e)return r;if((u=Yn(r)).accessorProtocol)return function(t,e,r,n,i){var o,a,u,f,s,l;if(o=r.data,a=r.accessors[0],u=r.accessors[1],f=i,0===n)return u(o,f,a(o,f)*t*e),r;if(1===n){if((s=t%al)>0)for(l=0;l<s;l++)u(o,f,a(o,f)*e),f+=n;if(t<al)return r;for(l=s;l<t;l+=al)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+=al;return r}for(l=0;l<t;l++)u(o,f,a(o,f)*e),f+=n}(t,e,u,n,i),r;if(o=i,0===n)return r[o]*=e*t,r;if(1===n){if((a=t%ul)>0)for(f=0;f<a;f++)r[o]*=e,o+=n;if(t<ul)return r;for(f=a;f<t;f+=ul)r[o]*=e,r[o+1]*=e,r[o+2]*=e,r[o+3]*=e,r[o+4]*=e,o+=ul;return r}for(f=0;f<t;f++)r[o]*=e,o+=n;return r}function sl(t,e,r,n){return fl(t,e,r,n,lu(t,n))}function ll(t){var e,r;if(e=[],t<=0)return e;for(r=0;r<t;r++)e.push(r);return e}function cl(t,e,r,n){var i,o,a;for(o=2*r,a=2*n,i=0;a>=0&&a<e.length;)e[a]=i,e[a+1]=0,a+=o,i+=1;return t}function hl(t,e){var r,n;for(r=[],n=0;n<e.length;n++)r.push(t[e[n]]);return r}function pl(t,e,r){var n;return n=ll(t.length),function(t,e){var r,n,i,o,a,u,f,s,l;for(n=1,i=1,l=1;l<t.length;l++){for(r=(u=t[n])<0?-u:u,f=e[i],o=n-1,a=i-1;o>=0&&!(((s=t[o])<0?-s:s)<=r);)t[o+1]=s,e[a+1]=e[a],o-=1,a-=1;t[o+1]=u,e[a+1]=f,n+=1,i+=1}}(e=Hs(e),n),{sh:t=hl(t,n),sx:e,sy:r=hl(r,n),idx:n}}q(sl,"ndarray",fl),q(ll,"assign",(function(t,e,r){var n=Yn(t);return n.accessorProtocol?"complex128"===n.dtype?cl(t,gn(t,0),e,r):"complex64"===n.dtype?cl(t,pn(t,0),e,r):function(t,e,r){var n,i,o,a;for(n=t.data,i=t.accessors[1],a=r,o=0;a>=0&&a<n.length;)i(n,a,o),a+=e,o+=1;return n}(n,e,r):function(t,e,r){var n,i;for(i=r,n=0;i>=0&&i<t.length;)t[i]=n,i+=e,n+=1;return t}(t,e,r)}));var gl={BLOCK_SIZE_IN_BYTES:64,BLOCK_SIZE_IN_ELEMENTS:8};function yl(t,e){return function(t){var e,r,n,i;if((r=t.length)<=0)return gl.BLOCK_SIZE_IN_ELEMENTS;if(null===(e=je(t[0])))return gl.BLOCK_SIZE_IN_ELEMENTS;for(i=1;i<r;i++){if(null===(n=je(t[i])))return gl.BLOCK_SIZE_IN_ELEMENTS;n>e&&(e=n)}return(n=gl.BLOCK_SIZE_IN_BYTES/e|0)>0?n:1}([t,e])}var ml="throw";var dl="throw";var vl=[function(t,e){e.data[e.offset]=t.data[t.offset]},function(t,e){var r,n,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,r=t.data,n=e.data,s=0;s<a;s++)n[f]=r[u],u+=i,f+=o},function(t,e,r){var n,i,o,a,u,f,s,l,c,h,p,g,y,m,d;for(s=t.shape,h=t.strides,p=e.strides,r?(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,n=t.data,i=e.data,d=0;d<c;d++){for(m=0;m<l;m++)i[y]=n[g],g+=o,y+=u;g+=a,y+=f}},function(t,e,r){var n,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,r?(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,n=t.data,i=e.data,_=0;_<g;_++){for(w=0;w<p;w++){for(b=0;b<h;b++)i[v]=n[d],d+=o,v+=f;d+=a,v+=s}d+=u,v+=l}},function(t,e,r){var n,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x,T,A;for(p=t.shape,v=t.strides,b=e.strides,r?(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,n=t.data,i=e.data,A=0;A<d;A++){for(T=0;T<m;T++){for(x=0;x<y;x++){for(E=0;E<g;E++)i[_]=n[w],w+=o,_+=s;w+=a,_+=l}w+=u,_+=c}w+=f,_+=h}},function(t,e,r){var n,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x,T,A,O,V,S,j;for(y=t.shape,_=t.strides,E=e.strides,r?(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,n=t.data,i=e.data,j=0;j<w;j++){for(S=0;S<b;S++){for(V=0;V<v;V++){for(O=0;O<d;O++){for(A=0;A<m;A++)i[T]=n[x],x+=o,T+=l;x+=a,T+=c}x+=u,T+=h}x+=f,T+=p}x+=s,T+=g}},function(t,e,r){var n,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x,T,A,O,V,S,j,R,L,I,B;for(d=t.shape,T=t.strides,A=e.strides,r?(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=A[5],h=A[4]-v*A[5],p=A[3]-b*A[4],g=A[2]-w*A[3],y=A[1]-_*A[2],m=A[0]-E*A[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=A[0],h=A[1]-v*A[0],p=A[2]-b*A[1],g=A[3]-w*A[2],y=A[4]-_*A[3],m=A[5]-E*A[4]),O=t.offset,V=e.offset,n=t.data,i=e.data,B=0;B<x;B++){for(I=0;I<E;I++){for(L=0;L<_;L++){for(R=0;R<w;R++){for(j=0;j<b;j++){for(S=0;S<v;S++)i[V]=n[O],O+=o,V+=c;O+=a,V+=h}O+=u,V+=p}O+=f,V+=g}O+=s,V+=y}O+=l,V+=m}},function(t,e,r){var n,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x,T,A,O,V,S,j,R,L,I,B,F,P,U,M;for(b=t.shape,V=t.strides,S=e.strides,r?(w=b[6],_=b[5],E=b[4],x=b[3],T=b[2],A=b[1],O=b[0],o=V[6],a=V[5]-w*V[6],u=V[4]-_*V[5],f=V[3]-E*V[4],s=V[2]-x*V[3],l=V[1]-T*V[2],c=V[0]-A*V[1],h=S[6],p=S[5]-w*S[6],g=S[4]-_*S[5],y=S[3]-E*S[4],m=S[2]-x*S[3],d=S[1]-T*S[2],v=S[0]-A*S[1]):(w=b[0],_=b[1],E=b[2],x=b[3],T=b[4],A=b[5],O=b[6],o=V[0],a=V[1]-w*V[0],u=V[2]-_*V[1],f=V[3]-E*V[2],s=V[4]-x*V[3],l=V[5]-T*V[4],c=V[6]-A*V[5],h=S[0],p=S[1]-w*S[0],g=S[2]-_*S[1],y=S[3]-E*S[2],m=S[4]-x*S[3],d=S[5]-T*S[4],v=S[6]-A*S[5]),j=t.offset,R=e.offset,n=t.data,i=e.data,M=0;M<O;M++){for(U=0;U<A;U++){for(P=0;P<T;P++){for(F=0;F<x;F++){for(B=0;B<E;B++){for(I=0;I<_;I++){for(L=0;L<w;L++)i[R]=n[j],j+=o,R+=h;j+=a,R+=p}j+=u,R+=g}j+=f,R+=y}j+=s,R+=m}j+=l,R+=d}j+=c,R+=v}},function(t,e,r){var n,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x,T,A,O,V,S,j,R,L,I,B,F,P,U,M,k,C,N,Y;for(_=t.shape,R=t.strides,L=e.strides,r?(E=_[7],x=_[6],T=_[5],A=_[4],O=_[3],V=_[2],S=_[1],j=_[0],o=R[7],a=R[6]-E*R[7],u=R[5]-x*R[6],f=R[4]-T*R[5],s=R[3]-A*R[4],l=R[2]-O*R[3],c=R[1]-V*R[2],h=R[0]-S*R[1],p=L[7],g=L[6]-E*L[7],y=L[5]-x*L[6],m=L[4]-T*L[5],d=L[3]-A*L[4],v=L[2]-O*L[3],b=L[1]-V*L[2],w=L[0]-S*L[1]):(E=_[0],x=_[1],T=_[2],A=_[3],O=_[4],V=_[5],S=_[6],j=_[7],o=R[0],a=R[1]-E*R[0],u=R[2]-x*R[1],f=R[3]-T*R[2],s=R[4]-A*R[3],l=R[5]-O*R[4],c=R[6]-V*R[5],h=R[7]-S*R[6],p=L[0],g=L[1]-E*L[0],y=L[2]-x*L[1],m=L[3]-T*L[2],d=L[4]-A*L[3],v=L[5]-O*L[4],b=L[6]-V*L[5],w=L[7]-S*L[6]),I=t.offset,B=e.offset,n=t.data,i=e.data,Y=0;Y<j;Y++){for(N=0;N<S;N++){for(C=0;C<V;C++){for(k=0;k<O;k++){for(M=0;M<A;M++){for(U=0;U<T;U++){for(P=0;P<x;P++){for(F=0;F<E;F++)i[B]=n[I],I+=o,B+=p;I+=a,B+=g}I+=u,B+=y}I+=f,B+=m}I+=s,B+=d}I+=l,B+=v}I+=c,B+=b}I+=h,B+=w}},function(t,e,r){var n,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x,T,A,O,V,S,j,R,L,I,B,F,P,U,M,k,C,N,Y,D,z,J,W;for(x=t.shape,B=t.strides,F=e.strides,r?(T=x[8],A=x[7],O=x[6],V=x[5],S=x[4],j=x[3],R=x[2],L=x[1],I=x[0],o=B[8],a=B[7]-T*B[8],u=B[6]-A*B[7],f=B[5]-O*B[6],s=B[4]-V*B[5],l=B[3]-S*B[4],c=B[2]-j*B[3],h=B[1]-R*B[2],p=B[0]-L*B[1],g=F[8],y=F[7]-T*F[8],m=F[6]-A*F[7],d=F[5]-O*F[6],v=F[4]-V*F[5],b=F[3]-S*F[4],w=F[2]-j*F[3],_=F[1]-R*F[2],E=F[0]-L*F[1]):(T=x[0],A=x[1],O=x[2],V=x[3],S=x[4],j=x[5],R=x[6],L=x[7],I=x[8],o=B[0],a=B[1]-T*B[0],u=B[2]-A*B[1],f=B[3]-O*B[2],s=B[4]-V*B[3],l=B[5]-S*B[4],c=B[6]-j*B[5],h=B[7]-R*B[6],p=B[8]-L*B[7],g=F[0],y=F[1]-T*F[0],m=F[2]-A*F[1],d=F[3]-O*F[2],v=F[4]-V*F[3],b=F[5]-S*F[4],w=F[6]-j*F[5],_=F[7]-R*F[6],E=F[8]-L*F[7]),P=t.offset,U=e.offset,n=t.data,i=e.data,W=0;W<I;W++){for(J=0;J<L;J++){for(z=0;z<R;z++){for(D=0;D<j;D++){for(Y=0;Y<S;Y++){for(N=0;N<V;N++){for(C=0;C<O;C++){for(k=0;k<A;k++){for(M=0;M<T;M++)i[U]=n[P],P+=o,U+=g;P+=a,U+=y}P+=u,U+=m}P+=f,U+=d}P+=s,U+=v}P+=l,U+=b}P+=c,U+=w}P+=h,U+=_}P+=p,U+=E}},function(t,e,r){var n,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x,T,A,O,V,S,j,R,L,I,B,F,P,U,M,k,C,N,Y,D,z,J,W,$,G,Z,q;for(A=t.shape,U=t.strides,M=e.strides,r?(O=A[9],V=A[8],S=A[7],j=A[6],R=A[5],L=A[4],I=A[3],B=A[2],F=A[1],P=A[0],o=U[9],a=U[8]-O*U[9],u=U[7]-V*U[8],f=U[6]-S*U[7],s=U[5]-j*U[6],l=U[4]-R*U[5],c=U[3]-L*U[4],h=U[2]-I*U[3],p=U[1]-B*U[2],g=U[0]-F*U[1],y=M[9],m=M[8]-O*M[9],d=M[7]-V*M[8],v=M[6]-S*M[7],b=M[5]-j*M[6],w=M[4]-R*M[5],_=M[3]-L*M[4],E=M[2]-I*M[3],x=M[1]-B*M[2],T=M[0]-F*M[1]):(O=A[0],V=A[1],S=A[2],j=A[3],R=A[4],L=A[5],I=A[6],B=A[7],F=A[8],P=A[9],o=U[0],a=U[1]-O*U[0],u=U[2]-V*U[1],f=U[3]-S*U[2],s=U[4]-j*U[3],l=U[5]-R*U[4],c=U[6]-L*U[5],h=U[7]-I*U[6],p=U[8]-B*U[7],g=U[9]-F*U[8],y=M[0],m=M[1]-O*M[0],d=M[2]-V*M[1],v=M[3]-S*M[2],b=M[4]-j*M[3],w=M[5]-R*M[4],_=M[6]-L*M[5],E=M[7]-I*M[6],x=M[8]-B*M[7],T=M[9]-F*M[8]),k=t.offset,C=e.offset,n=t.data,i=e.data,q=0;q<P;q++){for(Z=0;Z<F;Z++){for(G=0;G<B;G++){for($=0;$<I;$++){for(W=0;W<L;W++){for(J=0;J<R;J++){for(z=0;z<j;z++){for(D=0;D<S;D++){for(Y=0;Y<V;Y++){for(N=0;N<O;N++)i[C]=n[k],k+=o,C+=y;k+=a,C+=m}k+=u,C+=d}k+=f,C+=v}k+=s,C+=b}k+=l,C+=w}k+=c,C+=_}k+=h,C+=E}k+=p,C+=x}k+=g,C+=T}}],bl=[function(t,e){e.accessors[1](e.data,e.offset,t.accessors[0](t.data,t.offset))},function(t,e){var r,n,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,r=t.data,n=e.data,i=t.accessors[0],o=e.accessors[1],c=0;c<f;c++)o(n,l,i(r,s)),s+=a,l+=u},function(t,e,r){var n,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,r?(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,n=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(n,m)),m+=u,d+=s;m+=f,d+=l}},function(t,e,r){var n,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,r?(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,n=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(n,b)),b+=u,w+=l;b+=f,w+=c}b+=s,w+=h}},function(t,e,r){var n,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x,T,A,O,V;for(y=t.shape,w=t.strides,_=e.strides,r?(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,n=t.data,i=e.data,o=t.accessors[0],a=e.accessors[1],V=0;V<b;V++){for(O=0;O<v;O++){for(A=0;A<d;A++){for(T=0;T<m;T++)a(i,x,o(n,E)),E+=u,x+=c;E+=f,x+=h}E+=s,x+=p}E+=l,x+=g}},function(t,e,r){var n,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x,T,A,O,V,S,j,R,L;for(d=t.shape,x=t.strides,T=e.strides,r?(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]),A=t.offset,O=e.offset,n=t.data,i=e.data,o=t.accessors[0],a=e.accessors[1],L=0;L<E;L++){for(R=0;R<_;R++){for(j=0;j<w;j++){for(S=0;S<b;S++){for(V=0;V<v;V++)a(i,O,o(n,A)),A+=u,O+=h;A+=f,O+=p}A+=s,O+=g}A+=l,O+=y}A+=c,O+=m}},function(t,e,r){var n,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x,T,A,O,V,S,j,R,L,I,B,F,P;for(b=t.shape,O=t.strides,V=e.strides,r?(w=b[5],_=b[4],E=b[3],x=b[2],T=b[1],A=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=V[5],g=V[4]-w*V[5],y=V[3]-_*V[4],m=V[2]-E*V[3],d=V[1]-x*V[2],v=V[0]-T*V[1]):(w=b[0],_=b[1],E=b[2],x=b[3],T=b[4],A=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=V[0],g=V[1]-w*V[0],y=V[2]-_*V[1],m=V[3]-E*V[2],d=V[4]-x*V[3],v=V[5]-T*V[4]),S=t.offset,j=e.offset,n=t.data,i=e.data,o=t.accessors[0],a=e.accessors[1],P=0;P<A;P++){for(F=0;F<T;F++){for(B=0;B<x;B++){for(I=0;I<E;I++){for(L=0;L<_;L++){for(R=0;R<w;R++)a(i,j,o(n,S)),S+=u,j+=p;S+=f,j+=g}S+=s,j+=y}S+=l,j+=m}S+=c,j+=d}S+=h,j+=v}},function(t,e,r){var n,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x,T,A,O,V,S,j,R,L,I,B,F,P,U,M,k,C;for(_=t.shape,j=t.strides,R=e.strides,r?(E=_[6],x=_[5],T=_[4],A=_[3],O=_[2],V=_[1],S=_[0],u=j[6],f=j[5]-E*j[6],s=j[4]-x*j[5],l=j[3]-T*j[4],c=j[2]-A*j[3],h=j[1]-O*j[2],p=j[0]-V*j[1],g=R[6],y=R[5]-E*R[6],m=R[4]-x*R[5],d=R[3]-T*R[4],v=R[2]-A*R[3],b=R[1]-O*R[2],w=R[0]-V*R[1]):(E=_[0],x=_[1],T=_[2],A=_[3],O=_[4],V=_[5],S=_[6],u=j[0],f=j[1]-E*j[0],s=j[2]-x*j[1],l=j[3]-T*j[2],c=j[4]-A*j[3],h=j[5]-O*j[4],p=j[6]-V*j[5],g=R[0],y=R[1]-E*R[0],m=R[2]-x*R[1],d=R[3]-T*R[2],v=R[4]-A*R[3],b=R[5]-O*R[4],w=R[6]-V*R[5]),L=t.offset,I=e.offset,n=t.data,i=e.data,o=t.accessors[0],a=e.accessors[1],C=0;C<S;C++){for(k=0;k<V;k++){for(M=0;M<O;M++){for(U=0;U<A;U++){for(P=0;P<T;P++){for(F=0;F<x;F++){for(B=0;B<E;B++)a(i,I,o(n,L)),L+=u,I+=g;L+=f,I+=y}L+=s,I+=m}L+=l,I+=d}L+=c,I+=v}L+=h,I+=b}L+=p,I+=w}},function(t,e,r){var n,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x,T,A,O,V,S,j,R,L,I,B,F,P,U,M,k,C,N,Y,D,z;for(x=t.shape,I=t.strides,B=e.strides,r?(T=x[7],A=x[6],O=x[5],V=x[4],S=x[3],j=x[2],R=x[1],L=x[0],u=I[7],f=I[6]-T*I[7],s=I[5]-A*I[6],l=I[4]-O*I[5],c=I[3]-V*I[4],h=I[2]-S*I[3],p=I[1]-j*I[2],g=I[0]-R*I[1],y=B[7],m=B[6]-T*B[7],d=B[5]-A*B[6],v=B[4]-O*B[5],b=B[3]-V*B[4],w=B[2]-S*B[3],_=B[1]-j*B[2],E=B[0]-R*B[1]):(T=x[0],A=x[1],O=x[2],V=x[3],S=x[4],j=x[5],R=x[6],L=x[7],u=I[0],f=I[1]-T*I[0],s=I[2]-A*I[1],l=I[3]-O*I[2],c=I[4]-V*I[3],h=I[5]-S*I[4],p=I[6]-j*I[5],g=I[7]-R*I[6],y=B[0],m=B[1]-T*B[0],d=B[2]-A*B[1],v=B[3]-O*B[2],b=B[4]-V*B[3],w=B[5]-S*B[4],_=B[6]-j*B[5],E=B[7]-R*B[6]),F=t.offset,P=e.offset,n=t.data,i=e.data,o=t.accessors[0],a=e.accessors[1],z=0;z<L;z++){for(D=0;D<R;D++){for(Y=0;Y<j;Y++){for(N=0;N<S;N++){for(C=0;C<V;C++){for(k=0;k<O;k++){for(M=0;M<A;M++){for(U=0;U<T;U++)a(i,P,o(n,F)),F+=u,P+=y;F+=f,P+=m}F+=s,P+=d}F+=l,P+=v}F+=c,P+=b}F+=h,P+=w}F+=p,P+=_}F+=g,P+=E}},function(t,e,r){var n,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x,T,A,O,V,S,j,R,L,I,B,F,P,U,M,k,C,N,Y,D,z,J,W,$,G;for(A=t.shape,P=t.strides,U=e.strides,r?(O=A[8],V=A[7],S=A[6],j=A[5],R=A[4],L=A[3],I=A[2],B=A[1],F=A[0],u=P[8],f=P[7]-O*P[8],s=P[6]-V*P[7],l=P[5]-S*P[6],c=P[4]-j*P[5],h=P[3]-R*P[4],p=P[2]-L*P[3],g=P[1]-I*P[2],y=P[0]-B*P[1],m=U[8],d=U[7]-O*U[8],v=U[6]-V*U[7],b=U[5]-S*U[6],w=U[4]-j*U[5],_=U[3]-R*U[4],E=U[2]-L*U[3],x=U[1]-I*U[2],T=U[0]-B*U[1]):(O=A[0],V=A[1],S=A[2],j=A[3],R=A[4],L=A[5],I=A[6],B=A[7],F=A[8],u=P[0],f=P[1]-O*P[0],s=P[2]-V*P[1],l=P[3]-S*P[2],c=P[4]-j*P[3],h=P[5]-R*P[4],p=P[6]-L*P[5],g=P[7]-I*P[6],y=P[8]-B*P[7],m=U[0],d=U[1]-O*U[0],v=U[2]-V*U[1],b=U[3]-S*U[2],w=U[4]-j*U[3],_=U[5]-R*U[4],E=U[6]-L*U[5],x=U[7]-I*U[6],T=U[8]-B*U[7]),M=t.offset,k=e.offset,n=t.data,i=e.data,o=t.accessors[0],a=e.accessors[1],G=0;G<F;G++){for($=0;$<B;$++){for(W=0;W<I;W++){for(J=0;J<L;J++){for(z=0;z<R;z++){for(D=0;D<j;D++){for(Y=0;Y<S;Y++){for(N=0;N<V;N++){for(C=0;C<O;C++)a(i,k,o(n,M)),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}M+=g,k+=x}M+=y,k+=T}},function(t,e,r){var n,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x,T,A,O,V,S,j,R,L,I,B,F,P,U,M,k,C,N,Y,D,z,J,W,$,G,Z,q,X,K;for(V=t.shape,k=t.strides,C=e.strides,r?(S=V[9],j=V[8],R=V[7],L=V[6],I=V[5],B=V[4],F=V[3],P=V[2],U=V[1],M=V[0],u=k[9],f=k[8]-S*k[9],s=k[7]-j*k[8],l=k[6]-R*k[7],c=k[5]-L*k[6],h=k[4]-I*k[5],p=k[3]-B*k[4],g=k[2]-F*k[3],y=k[1]-P*k[2],m=k[0]-U*k[1],d=C[9],v=C[8]-S*C[9],b=C[7]-j*C[8],w=C[6]-R*C[7],_=C[5]-L*C[6],E=C[4]-I*C[5],x=C[3]-B*C[4],T=C[2]-F*C[3],A=C[1]-P*C[2],O=C[0]-U*C[1]):(S=V[0],j=V[1],R=V[2],L=V[3],I=V[4],B=V[5],F=V[6],P=V[7],U=V[8],M=V[9],u=k[0],f=k[1]-S*k[0],s=k[2]-j*k[1],l=k[3]-R*k[2],c=k[4]-L*k[3],h=k[5]-I*k[4],p=k[6]-B*k[5],g=k[7]-F*k[6],y=k[8]-P*k[7],m=k[9]-U*k[8],d=C[0],v=C[1]-S*C[0],b=C[2]-j*C[1],w=C[3]-R*C[2],_=C[4]-L*C[3],E=C[5]-I*C[4],x=C[6]-B*C[5],T=C[7]-F*C[6],A=C[8]-P*C[7],O=C[9]-U*C[8]),N=t.offset,Y=e.offset,n=t.data,i=e.data,o=t.accessors[0],a=e.accessors[1],K=0;K<M;K++){for(X=0;X<U;X++){for(q=0;q<P;q++){for(Z=0;Z<F;Z++){for(G=0;G<B;G++){for($=0;$<I;$++){for(W=0;W<L;W++){for(J=0;J<R;J++){for(z=0;z<j;z++){for(D=0;D<S;D++)a(i,Y,o(n,N)),N+=u,Y+=d;N+=f,Y+=v}N+=s,Y+=b}N+=l,Y+=w}N+=c,Y+=_}N+=h,Y+=E}N+=p,Y+=x}N+=g,Y+=T}N+=y,Y+=A}N+=m,Y+=O}}],wl=[function(t,e){var r,n,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x,T;for(c=(T=pl(t.shape,t.strides,e.strides)).sh,g=T.sx,y=T.sy,r=yl(t.dtype,e.dtype),m=t.offset,d=e.offset,n=t.data,i=e.data,o=g[0],u=y[0],x=c[1];x>0;)for(x<r?(p=x,x=0):(p=r,x-=r),s=m+x*g[1],l=d+x*y[1],E=c[0];E>0;)for(E<r?(h=E,E=0):(h=r,E-=r),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]=n[v],v+=o,b+=u;v+=a,b+=f}},function(t,e){var r,n,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x,T,A,O,V,S,j,R,L;for(y=(L=pl(t.shape,t.strides,e.strides)).sh,b=L.sx,w=L.sy,r=yl(t.dtype,e.dtype),_=t.offset,E=e.offset,n=t.data,i=e.data,o=b[0],f=w[0],R=y[2];R>0;)for(R<r?(v=R,R=0):(v=r,R-=r),h=_+R*b[2],g=E+R*w[2],j=y[1];j>0;)for(j<r?(d=j,j=0):(d=r,j-=r),u=b[2]-d*b[1],l=w[2]-d*w[1],c=h+j*b[1],p=g+j*w[1],S=y[0];S>0;)for(S<r?(m=S,S=0):(m=r,S-=r),x=c+S*b[0],T=p+S*w[0],a=b[1]-m*b[0],s=w[1]-m*w[0],V=0;V<v;V++){for(O=0;O<d;O++){for(A=0;A<m;A++)i[T]=n[x],x+=o,T+=f;x+=a,T+=s}x+=u,T+=l}},function(t,e){var r,n,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x,T,A,O,V,S,j,R,L,I,B,F,P,U,M,k;for(b=(k=pl(t.shape,t.strides,e.strides)).sh,T=k.sx,A=k.sy,r=yl(t.dtype,e.dtype),O=t.offset,V=e.offset,n=t.data,i=e.data,o=T[0],s=A[0],M=b[3];M>0;)for(M<r?(x=M,M=0):(x=r,M-=r),y=O+M*T[3],v=V+M*A[3],U=b[2];U>0;)for(U<r?(E=U,U=0):(E=r,U-=r),f=T[3]-E*T[2],h=A[3]-E*A[2],g=y+U*T[2],d=v+U*A[2],P=b[1];P>0;)for(P<r?(_=P,P=0):(_=r,P-=r),u=T[2]-_*T[1],c=A[2]-_*A[1],p=g+P*T[1],m=d+P*A[1],F=b[0];F>0;)for(F<r?(w=F,F=0):(w=r,F-=r),S=p+F*T[0],j=m+F*A[0],a=T[1]-w*T[0],l=A[1]-w*A[0],B=0;B<x;B++){for(I=0;I<E;I++){for(L=0;L<_;L++){for(R=0;R<w;R++)i[j]=n[S],S+=o,j+=s;S+=a,j+=l}S+=u,j+=c}S+=f,j+=h}},function(t,e){var r,n,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x,T,A,O,V,S,j,R,L,I,B,F,P,U,M,k,C,N,Y,D,z,J,W;for(x=(W=pl(t.shape,t.strides,e.strides)).sh,j=W.sx,R=W.sy,r=yl(t.dtype,e.dtype),L=t.offset,I=e.offset,n=t.data,i=e.data,o=j[0],l=R[0],J=x[4];J>0;)for(J<r?(S=J,J=0):(S=r,J-=r),v=L+J*j[4],E=I+J*R[4],z=x[3];z>0;)for(z<r?(V=z,z=0):(V=r,z-=r),s=j[4]-V*j[3],g=R[4]-V*R[3],d=v+z*j[3],_=E+z*R[3],D=x[2];D>0;)for(D<r?(O=D,D=0):(O=r,D-=r),f=j[3]-O*j[2],p=R[3]-O*R[2],m=d+D*j[2],w=_+D*R[2],Y=x[1];Y>0;)for(Y<r?(A=Y,Y=0):(A=r,Y-=r),u=j[2]-A*j[1],h=R[2]-A*R[1],y=m+Y*j[1],b=w+Y*R[1],N=x[0];N>0;)for(N<r?(T=N,N=0):(T=r,N-=r),B=y+N*j[0],F=b+N*R[0],a=j[1]-T*j[0],c=R[1]-T*R[0],C=0;C<S;C++){for(k=0;k<V;k++){for(M=0;M<O;M++){for(U=0;U<A;U++){for(P=0;P<T;P++)i[F]=n[B],B+=o,F+=l;B+=a,F+=c}B+=u,F+=h}B+=f,F+=p}B+=s,F+=g}},function(t,e){var r,n,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x,T,A,O,V,S,j,R,L,I,B,F,P,U,M,k,C,N,Y,D,z,J,W,$,G,Z,q,X,K,H;for(V=(H=pl(t.shape,t.strides,e.strides)).sh,F=H.sx,P=H.sy,r=yl(t.dtype,e.dtype),U=t.offset,M=e.offset,n=t.data,i=e.data,o=F[0],c=P[0],K=V[5];K>0;)for(K<r?(B=K,K=0):(B=r,K-=r),_=U+K*F[5],O=M+K*P[5],X=V[4];X>0;)for(X<r?(I=X,X=0):(I=r,X-=r),l=F[5]-I*F[4],m=P[5]-I*P[4],w=_+X*F[4],A=O+X*P[4],q=V[3];q>0;)for(q<r?(L=q,q=0):(L=r,q-=r),s=F[4]-L*F[3],y=P[4]-L*P[3],b=w+q*F[3],T=A+q*P[3],Z=V[2];Z>0;)for(Z<r?(R=Z,Z=0):(R=r,Z-=r),f=F[3]-R*F[2],g=P[3]-R*P[2],v=b+Z*F[2],x=T+Z*P[2],G=V[1];G>0;)for(G<r?(j=G,G=0):(j=r,G-=r),u=F[2]-j*F[1],p=P[2]-j*P[1],d=v+G*F[1],E=x+G*P[1],$=V[0];$>0;)for($<r?(S=$,$=0):(S=r,$-=r),k=d+$*F[0],C=E+$*P[0],a=F[1]-S*F[0],h=P[1]-S*P[0],W=0;W<B;W++){for(J=0;J<I;J++){for(z=0;z<L;z++){for(D=0;D<R;D++){for(Y=0;Y<j;Y++){for(N=0;N<S;N++)i[C]=n[k],k+=o,C+=c;k+=a,C+=h}k+=u,C+=p}k+=f,C+=g}k+=s,C+=y}k+=l,C+=m}},function(t,e){var r,n,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x,T,A,O,V,S,j,R,L,I,B,F,P,U,M,k,C,N,Y,D,z,J,W,$,G,Z,q,X,K,H,Q,tt,et,rt,nt,it,ot;for(L=(ot=pl(t.shape,t.strides,e.strides)).sh,C=ot.sx,N=ot.sy,r=yl(t.dtype,e.dtype),Y=t.offset,D=e.offset,n=t.data,i=e.data,o=C[0],h=N[0],it=L[6];it>0;)for(it<r?(k=it,it=0):(k=r,it-=r),T=Y+it*C[6],R=D+it*N[6],nt=L[5];nt>0;)for(nt<r?(M=nt,nt=0):(M=r,nt-=r),c=C[6]-M*C[5],v=N[6]-M*N[5],x=T+nt*C[5],j=R+nt*N[5],rt=L[4];rt>0;)for(rt<r?(U=rt,rt=0):(U=r,rt-=r),l=C[5]-U*C[4],d=N[5]-U*N[4],E=x+rt*C[4],S=j+rt*N[4],et=L[3];et>0;)for(et<r?(P=et,et=0):(P=r,et-=r),s=C[4]-P*C[3],m=N[4]-P*N[3],_=E+et*C[3],V=S+et*N[3],tt=L[2];tt>0;)for(tt<r?(F=tt,tt=0):(F=r,tt-=r),f=C[3]-F*C[2],y=N[3]-F*N[2],w=_+tt*C[2],O=V+tt*N[2],Q=L[1];Q>0;)for(Q<r?(B=Q,Q=0):(B=r,Q-=r),u=C[2]-B*C[1],g=N[2]-B*N[1],b=w+Q*C[1],A=O+Q*N[1],H=L[0];H>0;)for(H<r?(I=H,H=0):(I=r,H-=r),z=b+H*C[0],J=A+H*N[0],a=C[1]-I*C[0],p=N[1]-I*N[0],K=0;K<k;K++){for(X=0;X<M;X++){for(q=0;q<U;q++){for(Z=0;Z<P;Z++){for(G=0;G<F;G++){for($=0;$<B;$++){for(W=0;W<I;W++)i[J]=n[z],z+=o,J+=h;z+=a,J+=p}z+=u,J+=g}z+=f,J+=y}z+=s,J+=m}z+=l,J+=d}z+=c,J+=v}},function(t,e){var r,n,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x,T,A,O,V,S,j,R,L,I,B,F,P,U,M,k,C,N,Y,D,z,J,W,$,G,Z,q,X,K,H,Q,tt,et,rt,nt,it,ot,at,ut,ft,st,lt,ct,ht;for(P=(ht=pl(t.shape,t.strides,e.strides)).sh,J=ht.sx,W=ht.sy,r=yl(t.dtype,e.dtype),$=t.offset,G=e.offset,n=t.data,i=e.data,o=J[0],p=W[0],ct=P[7];ct>0;)for(ct<r?(z=ct,ct=0):(z=r,ct-=r),V=$+ct*J[7],F=G+ct*W[7],lt=P[6];lt>0;)for(lt<r?(D=lt,lt=0):(D=r,lt-=r),h=J[7]-D*J[6],w=W[7]-D*W[6],O=V+lt*J[6],B=F+lt*W[6],st=P[5];st>0;)for(st<r?(Y=st,st=0):(Y=r,st-=r),c=J[6]-Y*J[5],b=W[6]-Y*W[5],A=O+st*J[5],I=B+st*W[5],ft=P[4];ft>0;)for(ft<r?(N=ft,ft=0):(N=r,ft-=r),l=J[5]-N*J[4],v=W[5]-N*W[4],T=A+ft*J[4],L=I+ft*W[4],ut=P[3];ut>0;)for(ut<r?(C=ut,ut=0):(C=r,ut-=r),s=J[4]-C*J[3],d=W[4]-C*W[3],x=T+ut*J[3],R=L+ut*W[3],at=P[2];at>0;)for(at<r?(k=at,at=0):(k=r,at-=r),f=J[3]-k*J[2],m=W[3]-k*W[2],E=x+at*J[2],j=R+at*W[2],ot=P[1];ot>0;)for(ot<r?(M=ot,ot=0):(M=r,ot-=r),u=J[2]-M*J[1],y=W[2]-M*W[1],_=E+ot*J[1],S=j+ot*W[1],it=P[0];it>0;)for(it<r?(U=it,it=0):(U=r,it-=r),Z=_+it*J[0],q=S+it*W[0],a=J[1]-U*J[0],g=W[1]-U*W[0],nt=0;nt<z;nt++){for(rt=0;rt<D;rt++){for(et=0;et<Y;et++){for(tt=0;tt<N;tt++){for(Q=0;Q<C;Q++){for(H=0;H<k;H++){for(K=0;K<M;K++){for(X=0;X<U;X++)i[q]=n[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 r,n,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x,T,A,O,V,S,j,R,L,I,B,F,P,U,M,k,C,N,Y,D,z,J,W,$,G,Z,q,X,K,H,Q,tt,et,rt,nt,it,ot,at,ut,ft,st,lt,ct,ht,pt,gt,yt,mt,dt,vt,bt;for(C=(bt=pl(t.shape,t.strides,e.strides)).sh,q=bt.sx,X=bt.sy,r=yl(t.dtype,e.dtype),K=t.offset,H=e.offset,n=t.data,i=e.data,o=q[0],g=X[0],vt=C[8];vt>0;)for(vt<r?(Z=vt,vt=0):(Z=r,vt-=r),R=K+vt*q[8],k=H+vt*X[8],dt=C[7];dt>0;)for(dt<r?(G=dt,dt=0):(G=r,dt-=r),p=q[8]-G*q[7],E=X[8]-G*X[7],j=R+dt*q[7],M=k+dt*X[7],mt=C[6];mt>0;)for(mt<r?($=mt,mt=0):($=r,mt-=r),h=q[7]-$*q[6],_=X[7]-$*X[6],S=j+mt*q[6],U=M+mt*X[6],yt=C[5];yt>0;)for(yt<r?(W=yt,yt=0):(W=r,yt-=r),c=q[6]-W*q[5],w=X[6]-W*X[5],V=S+yt*q[5],P=U+yt*X[5],gt=C[4];gt>0;)for(gt<r?(J=gt,gt=0):(J=r,gt-=r),l=q[5]-J*q[4],b=X[5]-J*X[4],O=V+gt*q[4],F=P+gt*X[4],pt=C[3];pt>0;)for(pt<r?(z=pt,pt=0):(z=r,pt-=r),s=q[4]-z*q[3],v=X[4]-z*X[3],A=O+pt*q[3],B=F+pt*X[3],ht=C[2];ht>0;)for(ht<r?(D=ht,ht=0):(D=r,ht-=r),f=q[3]-D*q[2],d=X[3]-D*X[2],T=A+ht*q[2],I=B+ht*X[2],ct=C[1];ct>0;)for(ct<r?(Y=ct,ct=0):(Y=r,ct-=r),u=q[2]-Y*q[1],m=X[2]-Y*X[1],x=T+ct*q[1],L=I+ct*X[1],lt=C[0];lt>0;)for(lt<r?(N=lt,lt=0):(N=r,lt-=r),Q=x+lt*q[0],tt=L+lt*X[0],a=q[1]-N*q[0],y=X[1]-N*X[0],st=0;st<Z;st++){for(ft=0;ft<G;ft++){for(ut=0;ut<$;ut++){for(at=0;at<W;at++){for(ot=0;ot<J;ot++){for(it=0;it<z;it++){for(nt=0;nt<D;nt++){for(rt=0;rt<Y;rt++){for(et=0;et<N;et++)i[tt]=n[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 r,n,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x,T,A,O,V,S,j,R,L,I,B,F,P,U,M,k,C,N,Y,D,z,J,W,$,G,Z,q,X,K,H,Q,tt,et,rt,nt,it,ot,at,ut,ft,st,lt,ct,ht,pt,gt,yt,mt,dt,vt,bt,wt,_t,Et,xt,Tt,At,Ot;for(z=(Ot=pl(t.shape,t.strides,e.strides)).sh,tt=Ot.sx,et=Ot.sy,r=yl(t.dtype,e.dtype),rt=t.offset,nt=e.offset,n=t.data,i=e.data,o=tt[0],y=et[0],At=z[9];At>0;)for(At<r?(Q=At,At=0):(Q=r,At-=r),B=rt+At*tt[9],D=nt+At*et[9],Tt=z[8];Tt>0;)for(Tt<r?(H=Tt,Tt=0):(H=r,Tt-=r),g=tt[9]-H*tt[8],T=et[9]-H*et[8],I=B+Tt*tt[8],Y=D+Tt*et[8],xt=z[7];xt>0;)for(xt<r?(K=xt,xt=0):(K=r,xt-=r),p=tt[8]-K*tt[7],x=et[8]-K*et[7],L=I+xt*tt[7],N=Y+xt*et[7],Et=z[6];Et>0;)for(Et<r?(X=Et,Et=0):(X=r,Et-=r),h=tt[7]-X*tt[6],E=et[7]-X*et[6],R=L+Et*tt[6],C=N+Et*et[6],_t=z[5];_t>0;)for(_t<r?(q=_t,_t=0):(q=r,_t-=r),c=tt[6]-q*tt[5],_=et[6]-q*et[5],j=R+_t*tt[5],k=C+_t*et[5],wt=z[4];wt>0;)for(wt<r?(Z=wt,wt=0):(Z=r,wt-=r),l=tt[5]-Z*tt[4],w=et[5]-Z*et[4],S=j+wt*tt[4],M=k+wt*et[4],bt=z[3];bt>0;)for(bt<r?(G=bt,bt=0):(G=r,bt-=r),s=tt[4]-G*tt[3],b=et[4]-G*et[3],V=S+bt*tt[3],U=M+bt*et[3],vt=z[2];vt>0;)for(vt<r?($=vt,vt=0):($=r,vt-=r),f=tt[3]-$*tt[2],v=et[3]-$*et[2],O=V+vt*tt[2],P=U+vt*et[2],dt=z[1];dt>0;)for(dt<r?(W=dt,dt=0):(W=r,dt-=r),u=tt[2]-W*tt[1],d=et[2]-W*et[1],A=O+dt*tt[1],F=P+dt*et[1],mt=z[0];mt>0;)for(mt<r?(J=mt,mt=0):(J=r,mt-=r),it=A+mt*tt[0],ot=F+mt*et[0],a=tt[1]-J*tt[0],m=et[1]-J*et[0],yt=0;yt<Q;yt++){for(gt=0;gt<H;gt++){for(pt=0;pt<K;pt++){for(ht=0;ht<X;ht++){for(ct=0;ct<q;ct++){for(lt=0;lt<Z;lt++){for(st=0;st<G;st++){for(ft=0;ft<$;ft++){for(ut=0;ut<W;ut++){for(at=0;at<J;at++)i[ot]=n[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}}],_l=[function(t,e){var r,n,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x,T,A,O;for(p=(O=pl(t.shape,t.strides,e.strides)).sh,m=O.sx,d=O.sy,r=yl(t.dtype,e.dtype),v=t.offset,b=e.offset,n=t.data,i=e.data,u=m[0],s=d[0],o=t.accessors[0],a=e.accessors[1],A=p[1];A>0;)for(A<r?(y=A,A=0):(y=r,A-=r),c=v+A*m[1],h=b+A*d[1],T=p[0];T>0;)for(T<r?(g=T,T=0):(g=r,T-=r),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(n,w)),w+=u,_+=s;w+=f,_+=l}},function(t,e){var r,n,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x,T,A,O,V,S,j,R,L,I,B;for(d=(B=pl(t.shape,t.strides,e.strides)).sh,_=B.sx,E=B.sy,r=yl(t.dtype,e.dtype),x=t.offset,T=e.offset,n=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<r?(w=I,I=0):(w=r,I-=r),g=x+I*_[2],m=T+I*E[2],L=d[1];L>0;)for(L<r?(b=L,L=0):(b=r,L-=r),s=_[2]-b*_[1],h=E[2]-b*E[1],p=g+L*_[1],y=m+L*E[1],R=d[0];R>0;)for(R<r?(v=R,R=0):(v=r,R-=r),A=p+R*_[0],O=y+R*E[0],f=_[1]-v*_[0],c=E[1]-v*E[0],j=0;j<w;j++){for(S=0;S<b;S++){for(V=0;V<v;V++)a(i,O,o(n,A)),A+=u,O+=l;A+=f,O+=c}A+=s,O+=h}},function(t,e){var r,n,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x,T,A,O,V,S,j,R,L,I,B,F,P,U,M,k,C,N;for(_=(N=pl(t.shape,t.strides,e.strides)).sh,O=N.sx,V=N.sy,r=yl(t.dtype,e.dtype),S=t.offset,j=e.offset,n=t.data,i=e.data,u=O[0],c=V[0],o=t.accessors[0],a=e.accessors[1],C=_[3];C>0;)for(C<r?(A=C,C=0):(A=r,C-=r),d=S+C*O[3],w=j+C*V[3],k=_[2];k>0;)for(k<r?(T=k,k=0):(T=r,k-=r),l=O[3]-T*O[2],g=V[3]-T*V[2],m=d+k*O[2],b=w+k*V[2],M=_[1];M>0;)for(M<r?(x=M,M=0):(x=r,M-=r),s=O[2]-x*O[1],p=V[2]-x*V[1],y=m+M*O[1],v=b+M*V[1],U=_[0];U>0;)for(U<r?(E=U,U=0):(E=r,U-=r),R=y+U*O[0],L=v+U*V[0],f=O[1]-E*O[0],h=V[1]-E*V[0],P=0;P<A;P++){for(F=0;F<T;F++){for(B=0;B<x;B++){for(I=0;I<E;I++)a(i,L,o(n,R)),R+=u,L+=c;R+=f,L+=h}R+=s,L+=p}R+=l,L+=g}},function(t,e){var r,n,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x,T,A,O,V,S,j,R,L,I,B,F,P,U,M,k,C,N,Y,D,z,J,W,$,G;for(A=(G=pl(t.shape,t.strides,e.strides)).sh,L=G.sx,I=G.sy,r=yl(t.dtype,e.dtype),B=t.offset,F=e.offset,n=t.data,i=e.data,u=L[0],h=I[0],o=t.accessors[0],a=e.accessors[1],$=A[4];$>0;)for($<r?(R=$,$=0):(R=r,$-=r),w=B+$*L[4],T=F+$*I[4],W=A[3];W>0;)for(W<r?(j=W,W=0):(j=r,W-=r),c=L[4]-j*L[3],m=I[4]-j*I[3],b=w+W*L[3],x=T+W*I[3],J=A[2];J>0;)for(J<r?(S=J,J=0):(S=r,J-=r),l=L[3]-S*L[2],y=I[3]-S*I[2],v=b+J*L[2],E=x+J*I[2],z=A[1];z>0;)for(z<r?(V=z,z=0):(V=r,z-=r),s=L[2]-V*L[1],g=I[2]-V*I[1],d=v+z*L[1],_=E+z*I[1],D=A[0];D>0;)for(D<r?(O=D,D=0):(O=r,D-=r),P=d+D*L[0],U=_+D*I[0],f=L[1]-O*L[0],p=I[1]-O*I[0],Y=0;Y<R;Y++){for(N=0;N<j;N++){for(C=0;C<S;C++){for(k=0;k<V;k++){for(M=0;M<O;M++)a(i,U,o(n,P)),P+=u,U+=h;P+=f,U+=p}P+=s,U+=g}P+=l,U+=y}P+=c,U+=m}},function(t,e){var r,n,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x,T,A,O,V,S,j,R,L,I,B,F,P,U,M,k,C,N,Y,D,z,J,W,$,G,Z,q,X,K,H,Q,tt;for(j=(tt=pl(t.shape,t.strides,e.strides)).sh,U=tt.sx,M=tt.sy,r=yl(t.dtype,e.dtype),k=t.offset,C=e.offset,n=t.data,i=e.data,u=U[0],p=M[0],o=t.accessors[0],a=e.accessors[1],Q=j[5];Q>0;)for(Q<r?(P=Q,Q=0):(P=r,Q-=r),x=k+Q*U[5],S=C+Q*M[5],H=j[4];H>0;)for(H<r?(F=H,H=0):(F=r,H-=r),h=U[5]-F*U[4],v=M[5]-F*M[4],E=x+H*U[4],V=S+H*M[4],K=j[3];K>0;)for(K<r?(B=K,K=0):(B=r,K-=r),c=U[4]-B*U[3],d=M[4]-B*M[3],_=E+K*U[3],O=V+K*M[3],X=j[2];X>0;)for(X<r?(I=X,X=0):(I=r,X-=r),l=U[3]-I*U[2],m=M[3]-I*M[2],w=_+X*U[2],A=O+X*M[2],q=j[1];q>0;)for(q<r?(L=q,q=0):(L=r,q-=r),s=U[2]-L*U[1],y=M[2]-L*M[1],b=w+q*U[1],T=A+q*M[1],Z=j[0];Z>0;)for(Z<r?(R=Z,Z=0):(R=r,Z-=r),N=b+Z*U[0],Y=T+Z*M[0],f=U[1]-R*U[0],g=M[1]-R*M[0],G=0;G<P;G++){for($=0;$<F;$++){for(W=0;W<B;W++){for(J=0;J<I;J++){for(z=0;z<L;z++){for(D=0;D<R;D++)a(i,Y,o(n,N)),N+=u,Y+=p;N+=f,Y+=g}N+=s,Y+=y}N+=l,Y+=m}N+=c,Y+=d}N+=h,Y+=v}},function(t,e){var r,n,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x,T,A,O,V,S,j,R,L,I,B,F,P,U,M,k,C,N,Y,D,z,J,W,$,G,Z,q,X,K,H,Q,tt,et,rt,nt,it,ot,at,ut;for(B=(ut=pl(t.shape,t.strides,e.strides)).sh,Y=ut.sx,D=ut.sy,r=yl(t.dtype,e.dtype),z=t.offset,J=e.offset,n=t.data,i=e.data,u=Y[0],g=D[0],o=t.accessors[0],a=e.accessors[1],at=B[6];at>0;)for(at<r?(N=at,at=0):(N=r,at-=r),O=z+at*Y[6],I=J+at*D[6],ot=B[5];ot>0;)for(ot<r?(C=ot,ot=0):(C=r,ot-=r),p=Y[6]-C*Y[5],w=D[6]-C*D[5],A=O+ot*Y[5],L=I+ot*D[5],it=B[4];it>0;)for(it<r?(k=it,it=0):(k=r,it-=r),h=Y[5]-k*Y[4],b=D[5]-k*D[4],T=A+it*Y[4],R=L+it*D[4],nt=B[3];nt>0;)for(nt<r?(M=nt,nt=0):(M=r,nt-=r),c=Y[4]-M*Y[3],v=D[4]-M*D[3],x=T+nt*Y[3],j=R+nt*D[3],rt=B[2];rt>0;)for(rt<r?(U=rt,rt=0):(U=r,rt-=r),l=Y[3]-U*Y[2],d=D[3]-U*D[2],E=x+rt*Y[2],S=j+rt*D[2],et=B[1];et>0;)for(et<r?(P=et,et=0):(P=r,et-=r),s=Y[2]-P*Y[1],m=D[2]-P*D[1],_=E+et*Y[1],V=S+et*D[1],tt=B[0];tt>0;)for(tt<r?(F=tt,tt=0):(F=r,tt-=r),W=_+tt*Y[0],$=V+tt*D[0],f=Y[1]-F*Y[0],y=D[1]-F*D[0],Q=0;Q<N;Q++){for(H=0;H<C;H++){for(K=0;K<k;K++){for(X=0;X<M;X++){for(q=0;q<U;q++){for(Z=0;Z<P;Z++){for(G=0;G<F;G++)a(i,$,o(n,W)),W+=u,$+=g;W+=f,$+=y}W+=s,$+=m}W+=l,$+=d}W+=c,$+=v}W+=h,$+=b}W+=p,$+=w}},function(t,e){var r,n,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x,T,A,O,V,S,j,R,L,I,B,F,P,U,M,k,C,N,Y,D,z,J,W,$,G,Z,q,X,K,H,Q,tt,et,rt,nt,it,ot,at,ut,ft,st,lt,ct,ht,pt,gt;for(M=(gt=pl(t.shape,t.strides,e.strides)).sh,$=gt.sx,G=gt.sy,r=yl(t.dtype,e.dtype),Z=t.offset,q=e.offset,n=t.data,i=e.data,u=$[0],y=G[0],o=t.accessors[0],a=e.accessors[1],pt=M[7];pt>0;)for(pt<r?(W=pt,pt=0):(W=r,pt-=r),j=Z+pt*$[7],U=q+pt*G[7],ht=M[6];ht>0;)for(ht<r?(J=ht,ht=0):(J=r,ht-=r),g=$[7]-J*$[6],E=G[7]-J*G[6],S=j+ht*$[6],P=U+ht*G[6],ct=M[5];ct>0;)for(ct<r?(z=ct,ct=0):(z=r,ct-=r),p=$[6]-z*$[5],_=G[6]-z*G[5],V=S+ct*$[5],F=P+ct*G[5],lt=M[4];lt>0;)for(lt<r?(D=lt,lt=0):(D=r,lt-=r),h=$[5]-D*$[4],w=G[5]-D*G[4],O=V+lt*$[4],B=F+lt*G[4],st=M[3];st>0;)for(st<r?(Y=st,st=0):(Y=r,st-=r),c=$[4]-Y*$[3],b=G[4]-Y*G[3],A=O+st*$[3],I=B+st*G[3],ft=M[2];ft>0;)for(ft<r?(N=ft,ft=0):(N=r,ft-=r),l=$[3]-N*$[2],v=G[3]-N*G[2],T=A+ft*$[2],L=I+ft*G[2],ut=M[1];ut>0;)for(ut<r?(C=ut,ut=0):(C=r,ut-=r),s=$[2]-C*$[1],d=G[2]-C*G[1],x=T+ut*$[1],R=L+ut*G[1],at=M[0];at>0;)for(at<r?(k=at,at=0):(k=r,at-=r),X=x+at*$[0],K=R+at*G[0],f=$[1]-k*$[0],m=G[1]-k*G[0],ot=0;ot<W;ot++){for(it=0;it<J;it++){for(nt=0;nt<z;nt++){for(rt=0;rt<D;rt++){for(et=0;et<Y;et++){for(tt=0;tt<N;tt++){for(Q=0;Q<C;Q++){for(H=0;H<k;H++)a(i,K,o(n,X)),X+=u,K+=y;X+=f,K+=m}X+=s,K+=d}X+=l,K+=v}X+=c,K+=b}X+=h,K+=w}X+=p,K+=_}X+=g,K+=E}},function(t,e){var r,n,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x,T,A,O,V,S,j,R,L,I,B,F,P,U,M,k,C,N,Y,D,z,J,W,$,G,Z,q,X,K,H,Q,tt,et,rt,nt,it,ot,at,ut,ft,st,lt,ct,ht,pt,gt,yt,mt,dt,vt,bt,wt,_t;for(Y=(_t=pl(t.shape,t.strides,e.strides)).sh,K=_t.sx,H=_t.sy,r=yl(t.dtype,e.dtype),Q=t.offset,tt=e.offset,n=t.data,i=e.data,u=K[0],m=H[0],o=t.accessors[0],a=e.accessors[1],wt=Y[8];wt>0;)for(wt<r?(X=wt,wt=0):(X=r,wt-=r),I=Q+wt*K[8],N=tt+wt*H[8],bt=Y[7];bt>0;)for(bt<r?(q=bt,bt=0):(q=r,bt-=r),y=K[8]-q*K[7],T=H[8]-q*H[7],L=I+bt*K[7],C=N+bt*H[7],vt=Y[6];vt>0;)for(vt<r?(Z=vt,vt=0):(Z=r,vt-=r),g=K[7]-Z*K[6],x=H[7]-Z*H[6],R=L+vt*K[6],k=C+vt*H[6],dt=Y[5];dt>0;)for(dt<r?(G=dt,dt=0):(G=r,dt-=r),p=K[6]-G*K[5],E=H[6]-G*H[5],j=R+dt*K[5],M=k+dt*H[5],mt=Y[4];mt>0;)for(mt<r?($=mt,mt=0):($=r,mt-=r),h=K[5]-$*K[4],_=H[5]-$*H[4],S=j+mt*K[4],U=M+mt*H[4],yt=Y[3];yt>0;)for(yt<r?(W=yt,yt=0):(W=r,yt-=r),c=K[4]-W*K[3],w=H[4]-W*H[3],V=S+yt*K[3],P=U+yt*H[3],gt=Y[2];gt>0;)for(gt<r?(J=gt,gt=0):(J=r,gt-=r),l=K[3]-J*K[2],b=H[3]-J*H[2],O=V+gt*K[2],F=P+gt*H[2],pt=Y[1];pt>0;)for(pt<r?(z=pt,pt=0):(z=r,pt-=r),s=K[2]-z*K[1],v=H[2]-z*H[1],A=O+pt*K[1],B=F+pt*H[1],ht=Y[0];ht>0;)for(ht<r?(D=ht,ht=0):(D=r,ht-=r),et=A+ht*K[0],rt=B+ht*H[0],f=K[1]-D*K[0],d=H[1]-D*H[0],ct=0;ct<X;ct++){for(lt=0;lt<q;lt++){for(st=0;st<Z;st++){for(ft=0;ft<G;ft++){for(ut=0;ut<$;ut++){for(at=0;at<W;at++){for(ot=0;ot<J;ot++){for(it=0;it<z;it++){for(nt=0;nt<D;nt++)a(i,rt,o(n,et)),et+=u,rt+=m;et+=f,rt+=d}et+=s,rt+=v}et+=l,rt+=b}et+=c,rt+=w}et+=h,rt+=_}et+=p,rt+=E}et+=g,rt+=x}et+=y,rt+=T}},function(t,e){var r,n,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b,w,_,E,x,T,A,O,V,S,j,R,L,I,B,F,P,U,M,k,C,N,Y,D,z,J,W,$,G,Z,q,X,K,H,Q,tt,et,rt,nt,it,ot,at,ut,ft,st,lt,ct,ht,pt,gt,yt,mt,dt,vt,bt,wt,_t,Et,xt,Tt,At,Ot,Vt,St;for(W=(St=pl(t.shape,t.strides,e.strides)).sh,rt=St.sx,nt=St.sy,r=yl(t.dtype,e.dtype),it=t.offset,ot=e.offset,n=t.data,i=e.data,u=rt[0],d=nt[0],o=t.accessors[0],a=e.accessors[1],Vt=W[9];Vt>0;)for(Vt<r?(et=Vt,Vt=0):(et=r,Vt-=r),P=it+Vt*rt[9],J=ot+Vt*nt[9],Ot=W[8];Ot>0;)for(Ot<r?(tt=Ot,Ot=0):(tt=r,Ot-=r),m=rt[9]-tt*rt[8],O=nt[9]-tt*nt[8],F=P+Ot*rt[8],z=J+Ot*nt[8],At=W[7];At>0;)for(At<r?(Q=At,At=0):(Q=r,At-=r),y=rt[8]-Q*rt[7],A=nt[8]-Q*nt[7],B=F+At*rt[7],D=z+At*nt[7],Tt=W[6];Tt>0;)for(Tt<r?(H=Tt,Tt=0):(H=r,Tt-=r),g=rt[7]-H*rt[6],T=nt[7]-H*nt[6],I=B+Tt*rt[6],Y=D+Tt*nt[6],xt=W[5];xt>0;)for(xt<r?(K=xt,xt=0):(K=r,xt-=r),p=rt[6]-K*rt[5],x=nt[6]-K*nt[5],L=I+xt*rt[5],N=Y+xt*nt[5],Et=W[4];Et>0;)for(Et<r?(X=Et,Et=0):(X=r,Et-=r),h=rt[5]-X*rt[4],E=nt[5]-X*nt[4],R=L+Et*rt[4],C=N+Et*nt[4],_t=W[3];_t>0;)for(_t<r?(q=_t,_t=0):(q=r,_t-=r),c=rt[4]-q*rt[3],_=nt[4]-q*nt[3],j=R+_t*rt[3],k=C+_t*nt[3],wt=W[2];wt>0;)for(wt<r?(Z=wt,wt=0):(Z=r,wt-=r),l=rt[3]-Z*rt[2],w=nt[3]-Z*nt[2],S=j+wt*rt[2],M=k+wt*nt[2],bt=W[1];bt>0;)for(bt<r?(G=bt,bt=0):(G=r,bt-=r),s=rt[2]-G*rt[1],b=nt[2]-G*nt[1],V=S+bt*rt[1],U=M+bt*nt[1],vt=W[0];vt>0;)for(vt<r?($=vt,vt=0):($=r,vt-=r),at=V+vt*rt[0],ut=U+vt*nt[0],f=rt[1]-$*rt[0],v=nt[1]-$*nt[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<K;pt++){for(ht=0;ht<X;ht++){for(ct=0;ct<q;ct++){for(lt=0;lt<Z;lt++){for(st=0;st<G;st++){for(ft=0;ft<$;ft++)a(i,ut,o(n,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+=A}at+=m,ut+=O}}],El=vl.length-1,xl={complex128:"float64",complex64:"float32",complex32:"float16"};function Tl(t){return t.data=ma(t.data,0),t.accessorProtocol=!1,t}function Al(t){var e=t.shape.length;return t.data=su(t.data,0),t.accessorProtocol=!1,t.dtype=xl[String(t.dtype)],t.strides=sl(e,2,t.strides,1),t.offset*=2,t.shape.push(2),0===e?t.strides[0]=1:t.strides.push(1),t}function Ol(t){var e,r,n,i,o,a,u,f,s,l,c,h,p,g,y,m,d,v,b;if(y=ol(t[0]),m=ol(t[1]),Xs(y.data)&&Xs(m.data)?(y=Tl(y),m=Tl(m)):Zs(y.data)&&Zs(m.data)?(y=Al(y),m=Al(m)):(b=y.dtype,Ws(String(b))&&function(t){return Js(String(t))}(m.dtype)&&(y.accessorProtocol=!0,y.accessors[0]=function(t,e,r){var n;if(!mt(t))throw new TypeError(N("invalid argument. First argument must be a function. Value: `%s`.",t));if(!kt(e))throw new TypeError(N("invalid argument. Second argument must be a nonnegative integer. Value: `%s`.",e));if(!mt(r))throw new TypeError(N("invalid argument. Third argument must be a constructor function. Value: `%s`.",r));return n=[function(){var e=t();return typeof e===Ks?new r(e,0):e},function(e){var n=t(e);return typeof n===Ks?new r(n,0):n},function(e,n){var i=t(e,n);return typeof i===Ks?new r(i,0):i},function(e,n,i){var o=t(e,n,i);return typeof o===Ks?new r(o,0):o},function(e,n,i,o){var a=t(e,n,i,o);return typeof a===Ks?new r(a,0):a},function(e,n,i,o,a){var u=t(e,n,i,o,a);return typeof u===Ks?new r(u,0):u}],e<=5?n[e]:function(){var e,n,i;for(e=[],i=0;i<arguments.length;i++)e.push(arguments[i]);return typeof(n=t.apply(null,e))===Ks?new r(n,0):n}}(y.accessors[0],2,sa(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?bl[e](y,m):vl[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?bl[e](y,m):vl[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?bl[1](y,m):vl[1](y,m)}if(a=Re(l),u=Re(c),s=Ie(l),0!==a&&0!==u&&s===Ie(c)){if(r=$n(i,l,y.offset),n=$n(o,c,m.offset),f===r[1]-r[0]+1&&f===n[1]-n[0]+1)return h=1===a?r[0]:r[1],p=1===u?n[0]:n[1],y.shape=[f],m.shape=y.shape,y.strides=[a],m.strides=[u],y.offset=h,m.offset=p,y.accessorProtocol||m.accessorProtocol?bl[1](y,m):vl[1](y,m);if(e<=El)return y.accessorProtocol||m.accessorProtocol?bl[e](y,m,1===s):vl[e](y,m,1===s)}return e<=El?y.accessorProtocol||m.accessorProtocol?_l[e-2](y,m):wl[e-2](y,m):y.accessorProtocol||m.accessorProtocol?function(t,e){var r,n,i,o,a,u,f,s,l,c,h,p,g,y;for(a=wo(s=t.shape),r=t.data,n=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=Is(s,l,h,i,y,ml),f(n,Is(s,c,p,o,y,ml),u(r,g))}(y,m):void function(t,e){var r,n,i,o,a,u,f,s,l,c,h,p;for(a=wo(u=t.shape),r=t.data,n=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=Is(u,f,l,i,p,dl),n[Is(u,s,c,o,p,dl)]=r[h]}(y,m)}}var Vl={casting:So.get("casting"),copy:!1,dtype:So.get("dtypes.default"),flatten:!0,mode:So.get("index_mode"),ndmin:0,order:So.get("order"),readonly:!1};return function(){var t,r,n,i,o,a,u,s,l,c,h,p,g,y,m;if(1===arguments.length)if(Ds(arguments[0]))n=arguments[0],t={};else{if(!xt(t=arguments[0]))throw new TypeError(Ys("0hT56",t));if(e(t,"buffer")&&!Ds(n=t.buffer))throw new TypeError(Ys("0hT57","buffer",n))}else{if(!Ds(n=arguments[0]))throw new TypeError(Ys("0hT58",n));if(!xt(t=arguments[1]))throw new TypeError(Ys("0hT2V",t))}if(n&&((m=n)instanceof Pi||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(N("invalid argument. Must provide an ndarray. Value: `%s`.",t));if(xs(e=t.dtype))return e;throw new TypeError(N("invalid argument. Must provide an ndarray having a supported data type. Value: `%s`.",e))}(n),y=!0):(u=function(t){var e;if(f(t))return"generic";if(pt(t))return"binary";for(e=0;e<Es;e++)if(t instanceof ws[e])return _s[e];return t&&zi(t.struct)?t.struct:vs[gt(t)]||null}(n)||"generic",y=!1)),c={},h={},e(t,"casting")){if(h.casting=t.casting,!ao(h.casting))throw new TypeError(Ys("0hT59","casting",h.casting))}else h.casting=Vl.casting;if(e(t,"flatten")){if(h.flatten=t.flatten,!X(h.flatten))throw new TypeError(Ys("0hT2o","flatten",h.flatten))}else h.flatten=Vl.flatten;if(e(t,"ndmin")){if(h.ndmin=t.ndmin,!kt(h.ndmin))throw new TypeError(Ys("0hT2t","ndmin",h.ndmin))}else h.ndmin=Vl.ndmin;if(e(t,"dtype")){if(!to(a=t.dtype))throw new TypeError(Ys("invalid option. `%s` option must be a supported data type. Option: `%s`.","dtype",a));if(u&&!mo(u,a,h.casting))throw new Error(Ys("0hT5B",h.casting,u,a))}else a=u?!y&&Qi(u,"generic")?Vl.dtype:u:Vl.dtype;if(e(t,"order")){if("any"===(o=t.order)||"same"===o)y?"any"===o?o=3===Ie(As(n))?Vl.order:Ss(n):"same"===o&&(o=Ss(n)):o=Vl.order;else if(!eo(o))throw new TypeError(Ys("0hT5C","order",o))}else o=Vl.order;if(e(t,"mode")?c.mode=t.mode:c.mode=Vl.mode,e(t,"submode")?c.submode=t.submode:c.submode=[c.mode],e(t,"readonly")?c.readonly=t.readonly:c.readonly=Vl.readonly,e(t,"copy")){if(h.copy=t.copy,!X(h.copy))throw new TypeError(Ys("0hT2o","copy",h.copy))}else h.copy=Vl.copy;if(e(t,"shape")){if(!Ds(s=t.shape))throw new TypeError(Ys("0hT5D","shape",s));l=s.length,g=wo(s)}else{if(!n)throw new Error(Ys("0hT0X"));y?(l=(s=Ts(n)).length,g=wo(s)):h.flatten&&f(n)?(p=s=Ls(n),l=s.length,g=wo(s)):(l=1,s=[g=n.length])}if(l<h.ndmin&&(s=function(t,e,r){var n,i;for(n=[],i=0;i<r-t;i++)n.push(1);for(i=0;i<t;i++)n.push(e[i]);return n}(l,s,h.ndmin),l=h.ndmin),y){if(wo(n.shape)!==g)throw new RangeError(Ys("0hT0Y"));!Qi(u,a)||h.copy?n=function(t,e){var r,n,i,o;return o=Ts(t),i=Ss(t),n=wo(o),Ol([t,{dtype:e,data:r=Qi(e,"generic")?gu(n):Qi(e,"binary")?ys(n):new(gs(e))(n),shape:o,strides:vo(o,i),offset:0,order:i}]),r}(n,a):(r=As(n),i=function(t){var e,r,n;if("object"!=typeof t||null===t)throw new TypeError(N("invalid argument. Must provide an ndarray. Value: `%s`.",t));if(kt(n=t.offset))return n;if(!me(r=t.shape))throw new TypeError(N("invalid argument. Must provide an ndarray. Value: `%s`.",t));if(e=t.strides,0===r.length||!me(e))return 0;if(kt(n=bo(r,e)))return n;throw new TypeError(N("invalid argument. Must provide an ndarray. Value: `%s`.",t))}(n),n=function(t){var e;if("object"!=typeof t||null===t)throw new TypeError(N("invalid argument. Must provide an ndarray. Value: `%s`.",t));if(me(e=t.data))return e;throw new TypeError(N("invalid argument. Must provide an ndarray. Value: `%s`.",t))}(n),r.length<l&&(r=function(t,e,r,n){var i,o,a,u,f;if(f=t-(o=r.length),i=[],"row-major"===n){for(a=Le(r[0])*e[f],u=0;u<f;u++)i.push(a);for(u=0;u<o;u++)i.push(r[u])}else{for(u=0;u<f;u++)i.push(1);for(u=0;u<o;u++)i.push(r[u])}return i}(l,s,r,o)))}else if(n){if(Qi(u,"generic")&&h.flatten&&f(n)&&(n=Ns(n,p||Ls(n),Gn(o))),n.length!==g)throw new RangeError(Ys("0hT0Y"));Qi(u,a)&&!h.copy||(n=zs(n,g,a))}else n=ds(a,g);return void 0===r&&(i=bo(s,r=vo(s,o))),new Go(a,n,s,r,i,o,c)}}));
//# sourceMappingURL=browser.js.map