/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["exports","../Utils"],(function(e,t){"use strict";let r=function(){function e(e,t){this.data=e,this.stride=t}return e.decode=function(r){return new e(t.allocateTypedArrayBufferwithData(r.data,r.stride),r.stride)},e.fromVertexVector=function(r){return new e(t.allocateTypedArrayBufferwithData(r.data.buffer(),r.stride),r.stride)},e}(),n=function(){function e(e,t,r){this.geometryType=e,this.indexBuffer=new Uint32Array(t),this.namedBuffers=r}return e.decode=function(t){const n=t.geometryType,o=t.indexBuffer,f={};for(const e in t.namedBuffers)f[e]=r.decode(t.namedBuffers[e]);return new e(n,o,f)},e.fromVertexData=function(n,o){const f=n.indices,i=t.allocateTypedArrayBufferwithData(n.vertices,n.stride),u=n.stride;return new e(o,f,{geometry:new r(i,u)})},e.fromVertexVectors=function(t){const n=t.geometryType,o=t.indexVector.buffer(),f={};for(const e in t.namedVectors)f[e]=r.fromVertexVector(t.namedVectors[e]);return new e(n,o,f)},e}();e.VertexBuffers=n,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
