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