define(["require","exports","tslib","../../deps/bluebird_fork","../../Validation","./tools","esri/geometry/geometryEngineAsync"],function(e,t,r,a,l,s,u){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),a=r.__importDefault(a);n.prototype.execute=function(e){for(var t=l.validation.array("geometry1",e.geometry1,l.validation.never),r=[],n=0,i=l.validation.array("geometry2",e.geometry2,l.validation.never);n<i.length;n++){var o=i[n],o=u.intersect(t,o);r.push(o)}return s.inline(a.default.all(r),function(e){for(var t=[],r=0,n=e;r<n.length;r++){var i=n[r];t.push.apply(t,i)}return{geometry:t[0],results:t}})},n.action="gcx:wf:arcgis::IntersectEngineTask",n.suite="gcx:wf:builtin",r=n;function n(){}t.IntersectEngineTask=r});