12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- import {
- z
- } from "./chunk-O4FY3ITT.js";
- import {
- M2 as M
- } from "./chunk-ECW2QABR.js";
- import {
- r
- } from "./chunk-GZT4BVFP.js";
- // node_modules/@arcgis/core/renderers/support/clickToleranceUtils.js
- function t(t3, e2) {
- return e2 ? "xoffset" in e2 && e2.xoffset ? Math.max(t3, Math.abs(e2.xoffset)) : "yoffset" in e2 && e2.yoffset ? Math.max(t3, Math.abs(e2.yoffset || 0)) : t3 : t3;
- }
- function e(t3) {
- let e2 = 0, n2 = 0;
- for (let r3 = 0; r3 < t3.length; r3++) {
- const s3 = t3[r3].size;
- typeof s3 == "number" && (e2 += s3, n2++);
- }
- return e2 / n2;
- }
- function n(t3, n2) {
- return typeof t3 == "number" ? t3 : t3 && t3.stops && t3.stops.length ? e(t3.stops) : n2;
- }
- function r2(t3, e2) {
- if (!e2)
- return t3;
- const r3 = e2.filter((t4) => t4.type === "size").map((e3) => {
- const { maxSize: r4, minSize: s4 } = e3;
- return (n(r4, t3) + n(s4, t3)) / 2;
- });
- let s3 = 0;
- const o = r3.length;
- if (o === 0)
- return t3;
- for (let n2 = 0; n2 < o; n2++)
- s3 += r3[n2];
- const f = Math.floor(s3 / o);
- return Math.max(f, t3);
- }
- function s(e2) {
- const n2 = e2 && e2.renderer, s3 = (e2 && e2.event && e2.event.pointerType) === "touch" ? 9 : 6;
- if (!n2)
- return s3;
- const o = "visualVariables" in n2 ? r2(s3, n2.visualVariables) : s3;
- if (n2.type === "simple")
- return t(o, n2.symbol);
- if (n2.type === "unique-value") {
- let e3 = o;
- return n2.uniqueValueInfos.forEach((n3) => {
- e3 = t(e3, n3.symbol);
- }), e3;
- }
- if (n2.type === "class-breaks") {
- let e3 = o;
- return n2.classBreakInfos.forEach((n3) => {
- e3 = t(e3, n3.symbol);
- }), e3;
- }
- return n2.type === "dot-density" || n2.type, o;
- }
- // node_modules/@arcgis/core/views/support/drapedUtils.js
- function a(t3, n2, a2, o = new M()) {
- let s3;
- if (a2.type === "2d")
- s3 = n2 * a2.resolution;
- else if (a2.type === "3d") {
- const i = a2.overlayPixelSizeInMapUnits(t3), o2 = a2.basemapSpatialReference;
- s3 = r(o2) && !o2.equals(a2.spatialReference) ? z(o2) / z(a2.spatialReference) : n2 * i;
- }
- const m = t3.x - s3, p = t3.y - s3, c = t3.x + s3, l = t3.y + s3, { spatialReference: f } = a2;
- return o.xmin = Math.min(m, c), o.ymin = Math.min(p, l), o.xmax = Math.max(m, c), o.ymax = Math.max(p, l), o.spatialReference = f, o;
- }
- var s2 = new M();
- export {
- s,
- a
- };
- //# sourceMappingURL=chunk-RZPC4VQ3.js.map
|