import Bluebird from"../../deps/bluebird_fork.js";import{validation}from"../../Validation.js";import{inline,featuresToArray}from"./tools.js";import{union}from"@arcgis/core/geometry/geometryEngineAsync";class GetFeatureGeometries{execute(e){const r=featuresToArray(validation.exists("features",e.features));var t=validation.boolean("union",e.union,!1),e=r.map(e=>e.geometry),e=t?union(e):Bluebird.resolve(e);return inline(e,function(e){e=e instanceof Array?e:[e];return{geometry:e[0],geometries:e}})}}GetFeatureGeometries.action="gcx:wf:arcgis::GetFeatureGeometries",GetFeatureGeometries.suite="gcx:wf:builtin";export{GetFeatureGeometries};