// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See https://js.arcgis.com/4.16/esri/copyright.txt for details.
//>>built
define(["require","exports","@dojo/framework/shim/array"],function(e,d,f){function l(a){if(0===a.size)throw Error("Map is empty");return a.keys().next().value}function g(a){if(0===a.size)throw Error("Map is empty");var c,b=!1;a.forEach(function(a,d){b||(c=d,b=!0)});return c}function m(a){if(0===a.size)throw Error("Map is empty");return a.values().next().value}function h(a){if(0===a.size)throw Error("Map is empty");var c,b=!1;a.forEach(function(a){b||(c=a,b=!0)});return c}Object.defineProperty(d,"__esModule",
{value:!0});d.someMap=Map.prototype.entries?function(a,c){a=a.entries();for(var b=a.next();!b.done;b=a.next())if(c(b.value[1],b.value[0]))return!0;return!1}:function(a,c){var b=!0;a.forEach(function(a,d){b&&(b=!c(a,d))});return!b};e=!!Map.prototype.values;var k=!!Map.prototype.keys;d.pairsOfMap=function(a){var c=[];a.forEach(function(a,d){return c.push([d,a])});return c};d.valuesOfMap=e?function(a){return f.from(a.values())}:function(a){var c=Array(a.size),b=0;a.forEach(function(a){return c[b++]=
a});return c};d.keysOfMap=k?function(a){return f.from(a.keys())}:function(a){var c=Array(a.size),b=0;a.forEach(function(a,d){return c[b++]=d});return c};d.MapFromValues=e?function(a){return new Map(a)}:function(a){for(var c=new Map,b=0;b<a.length;b++){var d=a[b];c.set(d[0],d[1])}return c};d.firstKeyOfMap=k?l:g;d.firstValueOfMap=e?m:h;d.test={firstKeyOfMapFallback:g,firstValueOfMapFallback:h}});