/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["exports","../../Color","../renderers/support/utils","./size","./support/colors","./support/symbologyUtils"],(function(e,o,r,t,a,n){"use strict";const i="#aaaaaa",s="25px",m={light:{color:[153,153,153,.25],width:"1px"},dark:{color:[153,153,153,.25],width:"1px"},darker:{color:[26,26,26,.25],width:"1px"}},c=["vibrant-rainbow","cat-dark","predominant-v2","predominant-v5","predominance-race","desert-blooms","tropical-bliss","under-the-sea","ocean-bay","cat-light","predominant-v4","predominance-money","predominant-v3","predominance-race-ethnic","pastel-chalk","predominance-rainbow","predominance-sequence"],l={default:{name:"default",label:"Default",description:"Default theme for visualizing features using a pie chart of categories.",schemes:{point:{light:{primary:"predominant-v1",secondary:c,common:{outline:m.light,colorForOthersCategory:i,size:s}},dark:{primary:"predominant-v2",secondary:c.map((e=>"predominant-v2"===e?"predominant-v1":e)),common:{outline:m.darker,colorForOthersCategory:i,size:s}}},polygon:{light:{primary:"predominant-v1",secondary:c,common:{colorForOthersCategory:i,outline:m.light,size:s}},dark:{primary:"predominant-v2",secondary:c.map((e=>"predominant-v2"===e?"predominant-v1":e)),common:{colorForOthersCategory:i,outline:m.dark,size:s}}}}}},p=n.createThemes({themeDictionary:l});function h(e){return n.getThemesforBasemap(p,e)}function d(e){const o="default",r=n.getRawSchemes({basemap:e.basemap,basemapTheme:e.basemapTheme,geometryType:e.geometryType,theme:p.get(o)});if(!r)return;const{schemesInfo:a,basemapId:i,basemapTheme:s}=r,m=a.common,c=e.numColors,l=t.getSchemes({basemap:e.basemap,geometryType:e.geometryType}),h=null==l?void 0:l.primaryScheme;return{primaryScheme:f(a.primary,m,c,h),secondarySchemes:a.secondary.map((e=>f(e,m,c,h))).filter(Boolean),basemapId:i,basemapTheme:s}}function u(e){return n.filterSchemesByName(e.name,d(e))}function g(e){return n.filterSchemesByTag(e.includedTags,e.excludedTags,d(e))}function y(e){if(!e)return;const r={...e};return r.tags=[...r.tags],r.colors&&(r.colors=r.colors.map((e=>new o(e)))),r.colorForOthersCategory&&(r.colorForOthersCategory=new o(r.colorForOthersCategory)),r.outline&&(r.outline={color:r.outline.color&&new o(r.outline.color),width:r.outline.width}),"sizeScheme"in r&&r.sizeScheme&&(r.sizeScheme=t.cloneScheme(r.sizeScheme)),r}function f(e,o,t,n){const i=a[e];if(!i)return;return S({name:i.name,tags:i.tags,colors:i[t]||r.createColors(i.stops,t),colorForOthersCategory:o.colorForOthersCategory,outline:o.outline,size:o.size,sizeScheme:n})}function S(e){return{name:e.name,tags:[...e.tags],colors:e.colors.map((e=>new o(e))),colorForOthersCategory:new o(e.colorForOthersCategory),outline:{color:new o(e.outline.color),width:e.outline.width},size:e.size,sizeScheme:e.sizeScheme}}e.cloneScheme=y,e.getSchemeByName=u,e.getSchemes=d,e.getSchemesByTag=g,e.getThemes=h,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
