/* COPYRIGHT Esri - https://js.arcgis.com/5.1.2/LICENSE.txt */
import{isTypedArray as r}from"./typedArrayUtil.js";function t(r){return 32+r.length}const n=16;function e(r){if(!r)return 0;let t=s;for(const n in r)r.hasOwnProperty(n)&&(t+=f(r[n],!1));return t}function u(r){if(!r)return 0;if("number"==typeof r[0])return i(r);if(Array.isArray(r))return o(r);let t=s;for(const n in r)r.hasOwnProperty(n)&&(t+=f(r[n]));return t}function o(r){const t=r.length;if(0===t||"number"==typeof r[0])return c(r,8);let n=a;for(let e=0;e<t;e++)n+=f(r[e]);return n}function f(r,e=!0){switch(typeof r){case"object":return e?u(r):s;case"string":return t(r);case"number":return n;case"boolean":return 4;default:return 8}}function i(...t){return t.reduce((t,e)=>t+(e?r(e)?e.byteLength+y:Array.isArray(e)?c(e,n):0:0),0)}function c(r,t){return a+r.length*t}const s=32,a=16,y=145,l=64;export{a as baseArrayMemory,s as baseObjectMemory,y as baseTypedArrayMemory,l as baseTypedSubArrayMemory,e as estimateAttributesMemory,c as estimateFixedArrayMemory,u as estimateNestedObjectMemory,i as estimateNumberArrayMemory,n as estimateNumberMemory,t as estimateStringMemory};
