/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["exports","../../../../../core/arrayUtils","../../../../../core/maybe","./interfaces"],(function(e,n,r,t){"use strict";function c(e){let n=null;for(const t of e){const e=t.type;if(s(t))if(r.isNone(n))n=e;else if(n!==e)return"uber"}return r.isSome(n)?n:"uber"}function o(e){let n=t.Transparency.INVISIBLE;for(const{material:r}of e)if(i(r)){if(r.color[3]*r.opacity<1)return t.Transparency.TRANSPARENT;n=t.Transparency.OPAQUE}return n}function a(e){let n=t.Transparency.INVISIBLE;for(const{material:r}of e)if(i(r)){switch(r.objectTransparency){case t.Transparency.TRANSPARENT:case t.Transparency.INVISIBLE:return t.Transparency.TRANSPARENT;case t.Transparency.OPAQUE:if(r.opacity<1)return t.Transparency.TRANSPARENT}n=t.Transparency.OPAQUE}return n}function i(e){return e.size*e.color[3]*e.opacity>0}function s(e){return e.size*e.color[3]>0}function f(e,n,r,t){return r*(t/e)*2*Math.tan(.5*n)}function u(e,r){const t=n.binaryIndexOf(e,r,!0);return-1===t?r<e[0]?0:e.length:t}function l(e,n,r){return e.length-u(e,n*r.minimumEdgeLength)}function T(e,n,r,t){for(let c=0;c<e.length;c++){const o=e[c].index,a=n[c],i=n[c+1];if(t)for(let e=a;e<i;e++){const n=t[e];r.set(n,o)}else for(let e=a;e<i;e++)r.set(e,o)}}e.computeEdgeCount=l,e.determineEdgeTransparency=o,e.determineObjectTransparency=a,e.determineRendererType=c,e.estimateLengthAtDistance=f,e.fillComponenBufferIndices=T,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
