// All material copyright Esri, All Rights Reserved, unless otherwise specified. // See https://js.arcgis.com/4.30/esri/copyright.txt for details. //>>built define(["exports","../../core/Logger","./storageLayouts"],function(u,x,v){const g=(()=>{var b=new ArrayBuffer(2);const a=new Uint8Array(b);b=new Uint16Array(b);a[0]=170;a[1]=187;return 48042===b[0]})(),w=()=>x.getLogger("esri.views.webgl.UniformBufferLayout");class y{constructor(b){this._layout=new Map;this.byteLength=this._buildLayout(b);this.array=new ArrayBuffer(this.byteLength);this.arrayView32=new Float32Array(this.array);this._dataView=new DataView(this.array)}setValues(b,a){for(const c in b)this.setValue(c, b[c],a)}setValue(b,a,c){if(this._layout.has(b)){var f=this.byteLength/4,e=0,{type:q,offset:h,arrayLength:r}=this._layout.get(b),{numberType:m,elementLength:k,elementCount:t,arrayStride:l}=v.STD140_LAYOUT[q],d="number"!==typeof a;b=r*t;(d?"byteLength"in a?a.byteLength/4:a.length:1)!==b*k&&w().warn("Attempting to set layout array member value with the wrong length!");if(d)for(d=0;d