/* COPYRIGHT Esri - https://js.arcgis.com/5.1.2/LICENSE.txt */
import e from"../../request.js";import r from"../../geometry/Polygon.js";import{parseUrl as t,asValidOptions as o}from"../utils.js";async function n(n,s,i){const a=t(n),f={...a.query,f:"json",...s.toJSON()},m=s.outSpatialReference||s.geometries[0].spatialReference,p=o(f,i);return e(a.path+"/buffer",p).then(e=>(e.data.geometries||[]).map(({rings:e})=>new r({spatialReference:m,rings:e})))}export{n as buffer};
