// All material copyright Esri, All Rights Reserved, unless otherwise specified. // See https://js.arcgis.com/4.30/esri/copyright.txt for details. //>>built define("require exports ../../request ../../core/Error ../../core/LRUCache ../../core/libs/gl-matrix-2/factories/vec3f64 ../../geometry/support/aaBoundingBox ./symbolLayerUtils3D".split(" "),function(l,d,m,e,h,k,f,n){function p(a){return m(a,{responseType:"image"}).then(b=>b.data)}let g=new h.LRUCache(50);d.clearBoundingBoxCache=function(){g=new h.LRUCache(50)};d.computeIconLayerResourceSize=async function(a,b){if(a.resource?.href)return p(a.resource.href).then(c=>[c.width,c.height]);if(a.resource?.primitive)return null!= b?[b,b]:[256,256];throw new e("symbol3d:invalid-symbol-layer","symbol layers of type Icon must have either an href or a primitive resource");};d.computeObjectLayerResourceSize=async function(a,b=null){if(!a.isPrimitive){b=a.resource?.href;if(!b)throw new e("symbol:invalid-resource","The symbol does not have a valid resource");a=g.get(b);if(void 0!==a)return a;({fetch:a}=await new Promise((c,q)=>l(["../../views/3d/layers/graphics/objectResourceUtils"],c,q)));a=await a(b,{disableTextures:!0});a=f.size(a.referenceBoundingBox, k.create());g.put(b,a);return a}if(!a.resource?.primitive)throw new e("symbol:invalid-resource","The symbol does not have a valid resource");a=f.create(n.objectSymbolLayerPrimitiveBoundingBox(a.resource.primitive));if(null!=b)for(let c=0;c