import{validation}from"../../Validation.js";import{inline,extentOf}from"./tools.js";import{clip}from"@arcgis/core/geometry/geometryEngineAsync";class ClipEngineTask{execute(e){var i=validation.exists("geometry",e.geometry);let t=validation.exists("extent",e.extent);t&&"polygon"==t.type&&(t=extentOf([t]));i=clip(i,t);return inline(i,function(e){return{geometry:e}})}}ClipEngineTask.action="gcx:wf:arcgis::ClipEngineTask",ClipEngineTask.suite="gcx:wf:builtin";export{ClipEngineTask};