{"version":3,"sources":["node_modules/@arcgis/core/renderers/support/heatmapUtils.js"],"sourcesContent":["/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.31/esri/copyright.txt for details.\n*/\nimport { clamp as t } from \"../../core/mathUtils.js\";\nimport { px2pt as r, pt2px as o } from \"../../core/screenUtils.js\";\nimport { l as n } from \"../../chunks/vec42.js\";\nimport { create as i } from \"../../core/libs/gl-matrix-2/factories/vec4f64.js\";\nconst c = 2.4;\nfunction e(t) {\n return r(t * c);\n}\nfunction a(t) {\n return o(t) / c;\n}\nfunction s(r, o, i, c) {\n let {\n color: e,\n ratio: a\n } = o,\n {\n color: s,\n ratio: f\n } = i;\n if (f === a) {\n const t = 1e-6;\n 1 === f ? a -= t : f += t;\n }\n const l = t((c - a) / (f - a), 0, 1);\n n(r, e.toArray(), s.toArray(), l);\n}\nfunction f(t) {\n const r = 512,\n o = new Uint8ClampedArray(4 * r);\n if (t = t.filter(({\n ratio: t\n }) => t >= 0 && t <= 1).sort((t, r) => t.ratio - r.ratio).map(({\n color: t,\n ratio: r\n }) => ({\n color: t,\n ratio: Math.max(r, .001)\n })), t.length < 1) return o;\n let n = t[0],\n c = t[0],\n e = 1;\n const a = i();\n for (let i = 0; i < r; i++) {\n const f = (i + .5) / r;\n for (; f > c.ratio && e < t.length;) n = c, c = t[e++];\n s(a, n, c, f), o.set(a, 4 * i);\n }\n return o;\n}\nfunction l(t, r, o) {\n const n = Math.sqrt(t ** 2 + r ** 2) / o;\n return n > 1 ? 0 : 3 / (Math.PI * o ** 2) * (1 - n ** 2) ** 2;\n}\nfunction u(t) {\n return \"function\" == typeof t ? t : t ? r => +r[t] : () => 1;\n}\nexport { u as createValueFunction, l as evaluateDensityKernel, e as gaussianBlurRadiusPxToKernelDensityRadiusPt, f as generateGradient, a as kernelDensityRadiusPtToGaussianBlurRadiusPx, c as magicKernelDensityRadiusInflationFactor };"],"mappings":"uKAQA,IAAMA,EAAI,IACV,SAASC,EA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