import*as e from"@arcgis/core/geometry/operators/equalsOperator";import{caseInsensitiveEquals as t}from"../../utilities/string.js";export var QueryOptions;!function(l){l.DEFAULTS={returnGeometry:!0,outFields:["*"]},l.fromFeatureSource=function(e){return{outFields:e.featureSettings.outFields,returnGeometry:e.featureSettings.returnGeometry,outSpatialReference:e.featureSettings.outSpatialReference,maxAllowableOffset:e.featureSettings.maxAllowableOffset}},l.areSameOptions=async function(l,u){return l===u||l.cancelToken===u.cancelToken&&(l.returnGeometry===u.returnGeometry&&l.maxAllowableOffset===u.maxAllowableOffset&&l.maxResults===u.maxResults&&(!(null==l.outSpatialReference&&null!=u.outSpatialReference||null!=l.outSpatialReference&&null==u.outSpatialReference)&&(!(null!=l.outSpatialReference&&null!=u.outSpatialReference&&!l.outSpatialReference.equals(u.outSpatialReference))&&(!(null==l.outFields&&null!=u.outFields||null!=l.outFields&&null==u.outFields)&&(!!(null==l.outFields||null==u.outFields||l.outFields.length===u.outFields.length&&l.outFields.every((e=>u.outFields.some((l=>t(e,l))))))&&(!(null==l.spatialFilter&&null!=u.spatialFilter||null!=l.spatialFilter&&null==u.spatialFilter)&&!(null!=l.spatialFilter&&null!=u.spatialFilter&&!e.execute(l.spatialFilter,u.spatialFilter))))))))}}(QueryOptions||(QueryOptions={}));