/* COPYRIGHT Esri - https://js.arcgis.com/5.1.0/LICENSE.txt */
import{__decorate as t}from"tslib";import{uniform as s,UniformGroup as o}from"../../GraphShaderModule.js";import{FixedArray as r,Vec4 as e,Float as i,cond as l,greaterThan as a,mix as p,greaterThanEqual as u,lessThanEqual as h,or as c}from"../../graph/glsl.js";import{isNan as d}from"./utils.js";class f extends o{getColor(t,s,o){return l([c(d(t),o),s],[h(t,this.values.first()),this.colors.first()],[u(t,this.values.last()),this.colors.last()],[!0,()=>{const s=this.values.findIndex(s=>a(s,t)),o=this.values.get(s),r=s.subtract(1),e=this.values.get(r),i=t.subtract(e).divide(o.subtract(e));return p(this.colors.get(r),this.colors.get(s),i)}])}}t([s(r.ofType(e,8))],f.prototype,"colors",void 0),t([s(r.ofType(i,8))],f.prototype,"values",void 0);export{f as VisualVariableColor};
