/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["exports"],(function(e){"use strict";function t(e,t){return t?"xoffset"in t&&t.xoffset?Math.max(e,Math.abs(t.xoffset)):"yoffset"in t&&t.yoffset?Math.max(e,Math.abs(t.yoffset||0)):e:e}function n(e){let t=0,n=0;for(let r=0;r<e.length;r++){const o=e[r].size;"number"==typeof o&&(t+=o,n++)}return t/n}function r(e,t){return"number"==typeof e?e:e&&e.stops&&e.stops.length?n(e.stops):t}function o(e,t){if(!t)return e;const n=t.filter((e=>"size"===e.type)).map((t=>{const{maxSize:n,minSize:o}=t;return(r(n,e)+r(o,e))/2}));let o=0;const s=n.length;if(0===s)return e;for(let r=0;r<s;r++)o+=n[r];const f=Math.floor(o/s);return Math.max(f,e)}function s(e){const n=e&&e.renderer,r="touch"===(e&&e.event&&e.event.pointerType)?9:6;if(!n)return r;const s="visualVariables"in n?o(r,n.visualVariables):r;if("simple"===n.type)return t(s,n.symbol);if("unique-value"===n.type){let e=s;return n.uniqueValueInfos.forEach((n=>{e=t(e,n.symbol)})),e}if("class-breaks"===n.type){let e=s;return n.classBreakInfos.forEach((n=>{e=t(e,n.symbol)})),e}return"dot-density"===n.type||n.type,s}e.calculateTolerance=s,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
