/* COPYRIGHT Esri - https://js.arcgis.com/5.1.0/LICENSE.txt */
import{__decorate as t}from"tslib";import has from"../../../../../../../core/has.js";import{texture as a,uniform as e,TextureGroup as i,UniformGroup as r}from"../../GraphShaderModule.js";import{Sampler2D as s,Float as o,texture2D as l,ceil as g,float as u,int as n,mod as D,Vec2 as p}from"../../graph/glsl.js";import{unpackDisplayIdTexel as m}from"./utils.js";class v extends i{getVisualVariableData(t){return this._vvData||(this._vvData=l(this.visualVariableData,t).setDebugName("storage2")),this._vvData}getFilterData(t){return l(this.filterFlags,t).setDebugName("storage0")}getAnimationData(t){return l(this.animation,t).setDebugName("storage1")}getVVData(t){return this.getVisualVariableData(t)}getDataDrivenData0(t){return l(this.dataDriven0,t).setDebugName("storage30")}getDataDrivenData1(t){return l(this.dataDriven1,t).setDebugName("storage31")}getDataDrivenData2(t){return l(this.dataDriven2,t).setDebugName("storage32")}getGPGPUData(t){return l(this.gpgpu,t).setDebugName("storage4")}getLocalTimeOrigin(t){return l(this.localTimeOrigin,t).x.setDebugName("storage5")}getFilterFlags(t){return has("webgl-ignores-sampler-precision")?g(this.getFilterData(t).x.multiply(u(255))):this.getFilterData(t).x.multiply(u(255))}getLabelVisibility(t){const a=this.getFilterData(t).y.multiply(255);return new o(1).subtract(a)}getAnimationValue(t){return this.getAnimationData(t).x}getSizeValue(t){return this.getVisualVariableData(t).x}getColorValue(t){return this.getVisualVariableData(t).y}getOpacityValue(t){return this.getVisualVariableData(t).z}getRotationValue(t){return this.getVisualVariableData(t).w}}t([a(s)],v.prototype,"filterFlags",void 0),t([a(s)],v.prototype,"animation",void 0),t([a(s)],v.prototype,"gpgpu",void 0),t([a(s)],v.prototype,"localTimeOrigin",void 0),t([a(s)],v.prototype,"visualVariableData",void 0),t([a(s)],v.prototype,"dataDriven0",void 0),t([a(s)],v.prototype,"dataDriven1",void 0),t([a(s)],v.prototype,"dataDriven2",void 0);class d extends r{getAttributeDataCoords(t){if(!this._uv){const a=m(t),e=this.size,i=n(a.x),r=n(a.y).multiply(n(256)),s=n(a.z).multiply(n(256)).multiply(n(256)),o=u(i.add(r).add(s)),l=D(o,e),g=o.subtract(l).divide(e);this._uv=new p(l,g).add(.5).divide(e)}return this._uv}}t([e(o)],d.prototype,"size",void 0);export{d as EntityStorage,v as EntityStorageTextures};
