/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
import{generalizeOptimizedGeometry as n,quantizeOptimizedGeometry as r,convertToGeometry as t,convertToPoint as e}from"../featureConversionUtils.js";function o(n,t,o,i=n.hasZ,s=n.hasM){if(null==t)return null;const u=n.hasZ&&i,l=n.hasM&&s;if(o){const n=r(t,"esriGeometryPoint",o,i,s);return e(n,u,l)}return e(t,u,l)}function i(e,o,i,s,u,l){if(null==o)return null;const f="coords"in o?o:o.geometry;if(null==f)return null;const{hasZ:c,hasM:a}=f,h=c&&(u??=c),m=a&&(l??=a);if(i){let o=n(f,e,i,u,l);return s&&(o=r(o,e,s)),t(o,e,h,m)}if(s){const n=r(f,e,s,u,l);return t(n,e,h,m)}return t(f,e,h,m)}function s(n){return n&&u in n?JSON.parse(JSON.stringify(n,l)):n}const u="_geVersion",l=(n,r)=>n===u?void 0:r;export{s as cleanFromGeometryEngine,i as getGeometry,o as transformCentroid};
