/*
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","../../../../geometry/support/aaBoundingBox","../../../../layers/graphics/centroid","../../../../layers/graphics/OptimizedGeometry","./I3SUtil"],(function(t,e,i,r,n,o){"use strict";let u=function(){function t(t){this.objectIdField=t.objectIdField,this.getFeatureExtent=t.getFeatureExtent}var i=t.prototype;return i.getObjectId=function(t){return t.id},i.getAttributes=function(t){const{meta:i,index:r}=t,n={};this.objectIdField&&(n[this.objectIdField]=t.id);const u=e.isSome(i.attributeInfo)&&i.attributeInfo.attributeData;if(e.isSome(u))for(const e of Object.keys(u))n[e]=o.getCachedAttributeValue(u[e],r);return n},i.getAttribute=function(t,i){if(i===this.objectIdField)return t.id;const{meta:r,index:n}=t,u=e.isSome(r.attributeInfo)&&r.attributeInfo.attributeData;return e.isSome(u)?o.getCachedAttributeValue(u[i],n):null},i.getGeometry=function(t){if(t.geometry)return t.geometry;const[e,i,r,o,u]=this.getFeatureExtent(t,a);return new n([5],[e,i,r,o,i,r,o,u,r,e,u,r,e,i,r])},i.getCentroid=function(t,e){if(t.geometry)return r.getCentroidOptimizedGeometry(new n,t.geometry,e.hasZ,e.hasM);const[i,o,u,c,d,s]=this.getFeatureExtent(t,a);return new n([0],[(i+c)/2,(o+d)/2,(u+s)/2])},i.cloneWithGeometry=function(t,e){const{id:i,index:r,meta:n}=t;return{id:i,index:r,meta:n,geometry:e}},t}();const a=i.create();t.I3SQueryFeatureAdapter=u,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
