/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
import{nativeArrayMaxSize as r,isFloat16Array as t,isUint16Array as o}from"../../../../core/typedArrayUtil.js";import{getFloat16ArrayConstructor as a}from"../../../../geometry/support/float16.js";function e(e){if(e.length<r)return Array.from(e);if(Array.isArray(e))return Float64Array.from(e);if(!("BYTES_PER_ELEMENT"in e))return Array.from(e);switch(e.BYTES_PER_ELEMENT){case 1:return Uint8Array.from(e);case 2:return t(e)?a().from(e):o(e)?Uint16Array.from(e):Int16Array.from(e);case 4:return Float32Array.from(e);default:return Float64Array.from(e)}}export{e as cloneAttributeData};
