qa-regulatory-gwj-vue/static/map/cesium91/CesiumUnminified/Workers/arrayRemoveDuplicates-cea3b...

2 lines
587 B
JavaScript

define(["exports","./Check-741c5f3c","./defaultValue-81eec7ed","./Math-e73894ab"],(function(e,n,t,d){"use strict";const i=d.CesiumMath.EPSILON10;e.arrayRemoveDuplicates=function(e,n,d,f){if(!t.defined(e))return;d=t.defaultValue(d,!1);const u=t.defined(f),c=e.length;if(c<2)return e;let s,l,r,a=e[0],h=0,o=-1;for(s=1;s<c;++s)l=e[s],n(a,l,i)?(t.defined(r)||(r=e.slice(0,s),h=s-1,o=0),u&&f.push(s)):(t.defined(r)&&(r.push(l),h=s,u&&(o=f.length)),a=l);return d&&n(e[0],e[c-1],i)&&(u&&(t.defined(r)?f.splice(o,0,h):f.push(c-1)),t.defined(r)?r.length-=1:r=e.slice(0,-1)),t.defined(r)?r:e}}));