"use strict";var m=function(r,t){return function(){return t||r((t={exports:{}}).exports,t),t.exports}};var A=m(function(vr,h){
var S=require('@stdlib/array-int8/dist'),N=require('@stdlib/array-uint8/dist'),U=require('@stdlib/array-uint8c/dist'),C=require('@stdlib/array-int16/dist'),l=require('@stdlib/array-uint16/dist'),B=require('@stdlib/array-int32/dist'),D=require('@stdlib/array-uint32/dist'),K=require('@stdlib/array-float32/dist'),M=require('@stdlib/array-float64/dist'),w;function T(r){return new S(r)}function V(r){return new N(r)}function G(r){return new U(r)}function H(r){return new C(r)}function J(r){return new l(r)}function L(r){return new B(r)}function Q(r){return new D(r)}function R(r){return new K(r)}function W(r){return new M(r)}function X(){var r={int8array:T,uint8array:V,uint8clampedarray:G,int16array:H,uint16array:J,int32array:L,uint32array:Q,float32array:R,float64array:W};return r}w=X();h.exports=w
});var z=m(function(qr,I){
var g=require('@stdlib/assert-has-own-property/dist'),O=require('@stdlib/assert-is-array/dist'),x=require('@stdlib/assert-is-buffer/dist'),Y=require('@stdlib/assert-is-error/dist'),k=require('@stdlib/utils-type-of/dist'),Z=require('@stdlib/utils-regexp-from-string/dist'),_=require('@stdlib/utils-index-of/dist'),E=require('@stdlib/utils-keys/dist'),$=require('@stdlib/utils-property-names/dist'),v=require('@stdlib/utils-property-descriptor/dist'),rr=require('@stdlib/utils-get-prototype-of/dist'),q=require('@stdlib/utils-define-property/dist'),er=require('@stdlib/buffer-from-buffer/dist'),tr=A();function nr(r){var t,i,f,s,y,a,e,n;for(t=[],s=[],e=Object.create(rr(r)),t.push(r),s.push(e),i=$(r),n=0;n<i.length;n++)f=i[n],y=v(r,f),g(y,"value")&&(a=O(r[f])?[]:{},y.value=p(r[f],a,t,s,-1)),q(e,f,y);return Object.isExtensible(r)||Object.preventExtensions(e),Object.isSealed(r)&&Object.seal(e),Object.isFrozen(r)&&Object.freeze(e),e}function ar(r){var t=[],i=[],f,s,y,a,e,n;for(e=new r.constructor(r.message),t.push(r),i.push(e),r.stack&&(e.stack=r.stack),r.code&&(e.code=r.code),r.errno&&(e.errno=r.errno),r.syscall&&(e.syscall=r.syscall),f=E(r),n=0;n<f.length;n++)a=f[n],s=v(r,a),g(s,"value")&&(y=O(r[a])?[]:{},s.value=p(r[a],y,t,i,-1)),q(e,a,s);return e}function p(r,t,i,f,s){var y,a,e,n,j,u,b,o,d,c;if(s-=1,typeof r!="object"||r===null)return r;if(x(r))return er(r);if(Y(r))return ar(r);if(e=k(r),e==="date")return new Date(+r);if(e==="regexp")return Z(r.toString());if(e==="set")return new Set(r);if(e==="map")return new Map(r);if(e==="string"||e==="boolean"||e==="number")return r.valueOf();if(j=tr[e],j)return j(r);if(e!=="array"&&e!=="object")return typeof Object.freeze=="function"?nr(r):{};if(a=E(r),s>0)for(y=e,c=0;c<a.length;c++){if(u=a[c],o=r[u],e=k(o),typeof o!="object"||o===null||e!=="array"&&e!=="object"||x(o)){y==="object"?(n=v(r,u),g(n,"value")&&(n.value=p(o)),q(t,u,n)):t[u]=p(o);continue}if(d=_(i,o),d!==-1){t[u]=f[d];continue}b=O(o)?new Array(o.length):{},i.push(o),f.push(b),y==="array"?t[u]=p(o,b,i,f,s):(n=v(r,u),g(n,"value")&&(n.value=p(o,b,i,f,s)),q(t,u,n))}else if(e==="array")for(c=0;c<a.length;c++)u=a[c],t[u]=r[u];else for(c=0;c<a.length;c++)u=a[c],n=v(r,u),q(t,u,n);return Object.isExtensible(r)||Object.preventExtensions(t),Object.isSealed(r)&&Object.seal(t),Object.isFrozen(r)&&Object.freeze(t),t}I.exports=p
});var P=m(function(br,F){
var ir=require('@stdlib/assert-is-array/dist'),ur=require('@stdlib/assert-is-nonnegative-integer/dist').isPrimitive,fr=require('@stdlib/error-tools-fmtprodmsg/dist'),sr=require('@stdlib/constants-float64-pinf/dist'),or=z();function cr(r,t){var i;if(arguments.length>1){if(!ur(t))throw new TypeError(fr('1SJ3X',t));if(t===0)return r}else t=sr;return i=ir(r)?new Array(r.length):{},or(r,i,[r],[i],t)}F.exports=cr
});var yr=P();module.exports=yr;
/** @license Apache-2.0 */
//# sourceMappingURL=index.js.map
