/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["exports","../../chunks/_rollupPluginBabelHelpers","../../request","../../core/urlUtils","../../geometry/support/jsonUtils"],(function(e,t,r,n,o){"use strict";function i(e,t,r){return s.apply(this,arguments)}function s(){return(s=t._asyncToGenerator((function*(e,t,i){const s="string"==typeof e?n.urlToObject(e):e,l=t[0].spatialReference,y=o.getJsonType(t[0]),a={...i,query:{...s.query,f:"json",sr:l.wkid?l.wkid:JSON.stringify(l),geometries:JSON.stringify(u(t))}};return p((yield r(s.path+"/simplify",a)).data,y,l)}))).apply(this,arguments)}function u(e){return{geometryType:o.getJsonType(e[0]),geometries:e.map((e=>e.toJSON()))}}function p(e,t,r){const n=o.getGeometryType(t);return e.map((e=>{const t=n.fromJSON(e);return t.spatialReference=r,t}))}e.simplify=i,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
