/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["exports","../../../core/screenUtils","../../support/utils"],(function(e,t,n){"use strict";const r=n.defaultBasemapGroups.light,o=n.defaultBasemapGroups.dark,i=[...r,...o];function s(e,t){return e.r===t.r&&e.g===t.g&&e.b===t.b}function c(e,t){let n=0;if(e.length===t.length){let r=e.every(((e,n)=>s(e,t[n])));if(r)n=1;else{r=e.slice(0).reverse().every(((e,n)=>s(e,t[n]))),r&&(n=-1)}}return n}function l(e){const n=e.width,r=e.height;let o=e.pixelSizeAt(e.toMap(t.createScreenPoint(.5*n,.5*r),{exclude:[]}));if(o<=0&&(o=e.pixelSizeAt(e.toMap(t.createScreenPoint(.5*n,.95*r),{exclude:[]})),o<=0)){const t=e.camera.position.clone();t.z=0,o=2*e.pixelSizeAt(t)}return o}function a(e,n){return Math.ceil(l(n)*t.pt2px(t.toPt(e)))}function u(e){return"multipoint"===e?"point":"mesh"===e?"polygon":e}function p(e){const t=n.getBasemapId(e,i,!1);return t?r.includes(t)?"light":o.includes(t)?"dark":void 0:null}function d(e){if(!e)return[];const t=new Set,n=[e.primaryScheme];e.secondarySchemes&&n.push(...e.secondarySchemes);for(const r of n)r&&"tags"in r&&r.tags&&r.tags.forEach((e=>t.add(e)));return[...t]}e.getBasemapTheme=p,e.getPixelSize=l,e.getStorageType=u,e.getTagsFromSchemes=d,e.hasIdenticalColors=c,e.toWorldScale=a,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
