/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["exports","../../../../core/maybe","../../../../chunks/vec3","../../../../chunks/vec3f64","../../../../geometry/projection","../../../../geometry/support/aaBoundingBox"],(function(e,t,n,o,r,a){"use strict";function u(e,t,o,r){const a=t.getComponentAabb(o,e,i),u=t.getObjectTransform(o);for(let c=0;c<8;++c)f[0]=1&c?a[0]:a[3],f[1]=2&c?a[1]:a[4],f[2]=4&c?a[2]:a[5],n.transformMat3(f,f,u.rotationScale),n.add(f,f,u.position),r[3*c]=f[0],r[3*c+1]=f[1],r[3*c+2]=f[2];return r}function c(e,n,o){const c=new Float64Array(24);return s=>{let i=s.meta.featureExtents;if(t.isNone(i)){i=new Float64Array(6*s.meta.featureIds.length),s.meta.featureExtents=i;for(let e=0;e<i.length;e+=6)i[e]=Number.POSITIVE_INFINITY}const f=new Float64Array(i.buffer,6*s.index*Float64Array.BYTES_PER_ELEMENT,6);return f[0]===Number.POSITIVE_INFINITY&&(u(s.index,o,s.meta.objectHandle,c),r.projectBuffer(c,n,0,c,e,0,8)?(a.set(f,a.NEGATIVE_INFINITY),a.expandWithBuffer(f,c,0,8)):a.set(f,a.ZERO)),f}}function s(e,t,o,r){const a=t.getComponentAabb(o,e,i),u=t.getObjectTransform(o);r[0]=0,r[1]=0,r[2]=0;for(let c=0;c<8;++c)f[0]=1&c?a[0]:a[3],f[1]=2&c?a[1]:a[4],f[2]=a[5],n.transformMat3(f,f,u.rotationScale),n.add(f,f,u.position),r[0]+=f[0],r[1]+=f[1],r[2]+=f[2];return r[0]/=8,r[1]/=8,r[2]/=8,r}const i=a.create(),f=o.create();e.boundingBoxCornerPoints=u,e.boundingBoxTop=s,e.createGetFeatureExtent=c,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
