/* COPYRIGHT Esri - https://js.arcgis.com/5.1.2/LICENSE.txt */
import n from"../../../Color.js";import o from"./colors.js";function s(o){const s=[];for(const t in o){const r=Number(t);if(!isNaN(r)){const c=o[t];s.push({colors:c.map(o=>new n(o)),numClasses:r})}}return{name:o.name,tags:[...o.tags],colors:o.stops.map(o=>new n(o)),colorsForClassBreaks:s}}function t(n){return Array.isArray(n[2]&&n[2][0])}function r(){const n=[];for(const r in o){const c=o[r];t(c)||n.push(s(c))}return n}function c(){const n=[];for(const s in o){const r=o[s];t(r)||n.push(r.name)}return n}function e(n){let r=null;for(const c in o){const e=o[c];if(!t(e)&&e.name===n){r=s(e);break}}return r}function u(n){const{includedTags:r,excludedTags:c}=n;if(!r&&!c)return[];const e=!r?.length,u=!c?.length,i=[];for(const a in o){const n=o[a];if(!t(n)){const o=!!e||r.every(o=>n.tags.includes(o)),t=!u&&c.every(o=>n.tags.includes(o));o&&!t&&i.push(s(n))}}return i}export{r as all,e as byName,u as byTag,c as names};
