/*
All material copyright Esri, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
*/
class t{constructor(t,s){this._material=t,this._repository=s,this._map=new Map}dispose(){this._map.forEach((t,s)=>{null!=t&&this._repository.release(this._material,s)})}load(t,s,e){const r=this._material.produces.get(s);if(!r?.(e))return null;this._map.has(e)||this._map.set(e,this._repository.acquire(this._material,s,e));const i=this._map.get(e);if(i){if(2===i.ensureResources(t))return i;this._repository.requestRender()}return null}}export{t as GLMaterials};
