/* COPYRIGHT Esri - https://js.arcgis.com/5.1.0/LICENSE.txt */
import{isSome as r}from"../../core/arrayUtils.js";import{convertToSpatialReferenceUnit as t}from"../../core/units.js";import{supportsCurves as o,executeMany as e}from"./gx/operatorGraphicBuffer.js";import{fromGeometry as i,getSpatialReference as s,fromSpatialReference as a,toPolygon as m}from"./support/apiConverter.js";const n={round:0,miter:1,bevel:2},p={round:0,butt:1,square:2};function u(o,u,c,f,l={}){let{maxDeviation:x=NaN,maxVerticesInFullCircle:j=96,miterLimit:v=10,union:C=!1,unit:b}=l;const d=o.map(i),y=s(o);return b&&(u=u.map(r=>t(r,b,y)),x&&(x=t(x,b,y))),e(d,a(y),u,n[c],p[f],v,x,j,C).map(r=>m(r,y)).filter(r)}const c=o();export{u as executeMany,c as supportsCurves};
