/* COPYRIGHT Esri - https://js.arcgis.com/5.0.18/LICENSE.txt */
import{getInfo as o}from"../../../geometry/support/spatialReferenceUtils.js";function r(o,r){if(!r.supported)return;let p=1/0,e=-1/0;const u=r.upperBoundX-r.lowerBoundX;o.forEach(o=>{let n=o.pos[0];for(;n<r.lowerBoundX;)n+=u;for(;n>r.upperBoundX;)n-=u;p=Math.min(p,n),e=Math.max(e,n),o.pos[0]=n});const n=e-p;u-n<n&&o.forEach(o=>{o.pos[0]<0&&(o.pos[0]+=u)})}function p(r,p){const e=o(r);return 1===p&&e?{supported:!0,lowerBoundX:e.valid[0],upperBoundX:e.valid[1]}:{supported:!1,lowerBoundX:null,upperBoundX:null}}export{p as getUnnormalizationInfo,r as unnormalize};
