!function(e){"object"==typeof module&&"object"==typeof module.exports?e(require,exports):"function"==typeof define&&define.amd&&define(["require","exports","../../Validation","./tools","esri/geometry/geometryEngineAsync"],e)}(function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e("../../Validation"),a=e("./tools"),u=e("esri/geometry/geometryEngineAsync"),e=(i.prototype.executeUsing=function(e,n,i,t,o){return e?u.geodesicBuffer(n,i,t,o):u.buffer(n,i,t,o)},i.prototype.execute=function(e){var n=r.validation.array("geometry",e.geometry,r.validation.never),i=r.validation.array("distance",e.distance,r.validation.never),t=r.validation.boolean("geodesic",e.geodesic,!1),o=r.validation.boolean("union",e.union,!1),o=this.executeUsing(t,n,i,e.unit,o);return a.inline(o,function(e){e=Array.isArray(e)?e:[e];return{geometry:e[0],results:e}})},i.action="gcx:wf:arcgis::BufferEngineTask",i.suite="gcx:wf:builtin",i);function i(){}n.BufferEngineTask=e});