123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392 |
- import {
- q
- } from "./chunk-I26BWYY3.js";
- import {
- p,
- y
- } from "./chunk-NDUYF7XW.js";
- import {
- n as n3
- } from "./chunk-JEA4MMTV.js";
- import {
- c as c2,
- e,
- i as i2,
- n as n2,
- o
- } from "./chunk-RG3AHHRL.js";
- import {
- i,
- n2 as n
- } from "./chunk-GZBNC76D.js";
- import {
- l
- } from "./chunk-X4SA4ELJ.js";
- import {
- U
- } from "./chunk-DVUG3KID.js";
- import {
- s as s2
- } from "./chunk-FWSQEIAR.js";
- import {
- s3 as s
- } from "./chunk-E5O6P5I2.js";
- import {
- has
- } from "./chunk-SPWQ3AWG.js";
- import {
- c,
- f
- } from "./chunk-YXWMMD76.js";
- // node_modules/@arcgis/core/symbols/support/svgUtils.js
- var f2 = "http://www.w3.org/2000/svg";
- var c3 = 0;
- var d = 0;
- var u = has("android");
- var y2 = has("chrome") || u && u >= 4 ? "auto" : "optimizeLegibility";
- var p2 = { m: 2, l: 2, h: 1, v: 1, c: 6, s: 4, q: 4, t: 2, a: 7, z: 0 };
- var g = /([A-DF-Za-df-z])|([-+]?\d*[.]?\d+(?:[eE][-+]?\d+)?)/g;
- var m = {};
- var x = {};
- var w = { solid: "none", shortdash: [4, 1], shortdot: [1, 1], shortdashdot: [4, 1, 1, 1], shortdashdotdot: [4, 1, 1, 1, 1, 1], dot: [1, 3], dash: [4, 3], longdash: [8, 3], dashdot: [4, 3, 1, 3], longdashdot: [8, 3, 1, 3], longdashdotdot: [8, 3, 1, 3, 1, 3] };
- var k = Math.PI;
- var b = 1;
- function j(t, e2) {
- const i3 = t * (k / 180);
- return Math.abs(e2 * Math.sin(i3)) + Math.abs(e2 * Math.cos(i3));
- }
- function v(t) {
- return t.map((t2) => `${t2.command} ${t2.values.join(" ")}`).join(" ").trim();
- }
- function M(t, i3, n4, r) {
- if (t) {
- if ("circle" === t.type)
- return n("circle", { fill: i3, "fill-rule": "evenodd", stroke: n4.color, "stroke-width": n4.width, "stroke-linecap": n4.cap, "stroke-linejoin": n4.join, "stroke-dasharray": n4.dashArray, "stroke-dashoffset": n4.dashOffset, "stroke-miterlimit": "4", cx: t.cx, cy: t.cy, r: t.r });
- if ("ellipse" === t.type)
- return n("ellipse", { fill: i3, "fill-rule": "evenodd", stroke: n4.color, "stroke-width": n4.width, "stroke-linecap": n4.cap, "stroke-linejoin": n4.join, "stroke-dasharray": n4.dashArray, "stroke-miterlimit": "4", cx: t.cx, cy: t.cy, rx: t.rx, ry: t.ry });
- if ("rect" === t.type)
- return n("rect", { fill: i3, "fill-rule": "evenodd", stroke: n4.color, "stroke-width": n4.width, "stroke-linecap": n4.cap, "stroke-linejoin": n4.join, "stroke-dasharray": n4.dashArray, "stroke-miterlimit": "4", x: t.x, y: t.y, width: t.width, height: t.height });
- if ("image" === t.type)
- return n("image", { href: t.src, x: t.x, y: t.y, width: t.width, height: t.height, preserveAspectRatio: "none" });
- if ("path" === t.type) {
- const e2 = "string" != typeof t.path ? v(t.path) : t.path;
- return n("path", { fill: i3, "fill-rule": "evenodd", stroke: n4.color, "stroke-width": n4.width, "stroke-linecap": n4.cap, "stroke-linejoin": n4.join, "stroke-dasharray": n4.dashArray, "stroke-miterlimit": "4", d: e2 });
- }
- if ("text" === t.type)
- return c(r), n("text", { "dominant-baseline": r.dominantBaseline, fill: i3, "fill-rule": "evenodd", stroke: n4.color, "stroke-width": n4.width, "stroke-linecap": n4.cap, "stroke-linejoin": n4.join, "stroke-dasharray": n4.dashArray, "stroke-miterlimit": "4", "text-anchor": r.align, "text-decoration": r.decoration, kerning: r.kerning, rotate: r.rotate, "text-rendering": y2, "font-style": r.font.style, "font-variant": r.font.variant, "font-weight": r.font.weight, "font-size": r.font.size, "font-family": r.font.family, x: t.x, y: t.y }, t.text);
- }
- return null;
- }
- function A(e2) {
- const i3 = { fill: "none", pattern: null, linearGradient: null };
- if (e2) {
- if ("type" in e2 && "pattern" === e2.type) {
- const t = "patternId-" + ++c3;
- i3.fill = `url(#${t})`, i3.pattern = { id: t, x: e2.x, y: e2.y, width: e2.width, height: e2.height, image: { x: 0, y: 0, width: e2.width, height: e2.height, href: e2.src } };
- } else if ("type" in e2 && "linear" === e2.type) {
- const n4 = "linearGradientId-" + ++d;
- i3.fill = `url(#${n4})`, i3.linearGradient = { id: n4, x1: e2.x1, y1: e2.y1, x2: e2.x2, y2: e2.y2, stops: e2.colors.map((e3) => ({ offset: e3.offset, color: e3.color && new l(e3.color).toString() })) };
- } else if (e2) {
- const n4 = new l(e2);
- i3.fill = n4.toString();
- }
- }
- return i3;
- }
- function S(e2) {
- var _a;
- const i3 = { color: "none", width: 1, cap: "butt", join: "4", dashArray: "none", dashOffset: "0" };
- if (e2 && (null != e2.width && (i3.width = e2.width), e2.cap && (i3.cap = e2.cap), e2.join && (i3.join = e2.join.toString()), e2.color && (i3.color = new l(e2.color).toString()), e2.dashArray && (i3.dashArray = e2.dashArray), e2.dashArray && (i3.dashOffset = e2.dashoffset), e2.style)) {
- let t = null;
- if (e2.style in w && (t = w[e2.style]), Array.isArray(t)) {
- t = t.slice(0);
- const i4 = (_a = e2.width) != null ? _a : 0;
- for (let e3 = 0; e3 < t.length; ++e3)
- t[e3] *= i4;
- if ("butt" !== e2.cap) {
- for (let e3 = 0; e3 < t.length; e3 += 2)
- t[e3] -= i4, t[e3] < 1 && (t[e3] = 1);
- for (let e3 = 1; e3 < t.length; e3 += 2)
- t[e3] += i4;
- }
- t = t.join(",");
- }
- i3.dashArray = t;
- }
- return i3;
- }
- function $(t, i3) {
- const n4 = { align: null, decoration: null, kerning: null, rotate: null, font: { style: null, variant: null, weight: null, size: null, family: null } };
- if (t) {
- const r = t.alignBaseline, o2 = "baseline" === r ? "auto" : "top" === r ? "text-top" : "bottom" === r ? "hanging" : r;
- n4.align = t.align, n4.dominantBaseline = o2, n4.decoration = t.decoration, n4.kerning = t.kerning ? "auto" : "0", n4.rotate = t.rotated ? "90" : "0", c(i3), n4.font.style = i3.style || "normal", n4.font.variant = i3.variant || "normal", n4.font.weight = i3.weight || "normal", n4.font.size = i3.size && i3.size.toString() || "10pt", n4.font.family = i3.family || "serif";
- }
- return n4;
- }
- function N(t) {
- const { pattern: e2, linearGradient: i3 } = t;
- if (e2)
- return n("pattern", { id: e2.id, patternUnits: "userSpaceOnUse", x: e2.x, y: e2.y, width: e2.width, height: e2.height }, n("image", { x: e2.image.x, y: e2.image.y, width: e2.image.width, height: e2.image.height, href: e2.image.href }));
- if (i3) {
- const t2 = i3.stops.map((t3, e3) => n("stop", { key: `${e3}-stop`, offset: t3.offset, "stop-color": t3.color }));
- return n("linearGradient", { id: i3.id, gradientUnits: "userSpaceOnUse", x1: i3.x1, y1: i3.y1, x2: i3.x2, y2: i3.y2 }, t2);
- }
- return null;
- }
- function G(t, e2) {
- if (!t)
- return null;
- const i3 = [];
- for (const n4 of t) {
- const { shape: t2, fill: e3, stroke: r, font: o2 } = n4, s4 = A(e3), a = S(r), l3 = "text" === t2.type ? $(t2, o2) : null, h2 = M(t2, s4.fill, a, l3);
- h2 && i3.push(h2);
- }
- return n("mask", { id: e2, maskUnits: "userSpaceOnUse" }, n("g", null, i3));
- }
- function I(t, e2, i3) {
- return i2(t, n2(t), [e2, i3]);
- }
- function z(t, e2, i3, n4, r) {
- return c2(t, n2(t), [e2, i3]), t[4] = t[4] * e2 - n4 * e2 + n4, t[5] = t[5] * i3 - r * i3 + r, t;
- }
- function B(t, e2, i3, n4) {
- const r = e2 % 360 * Math.PI / 180;
- e(t, n2(t), r);
- const o2 = Math.cos(r), a = Math.sin(r), h2 = t[4], f3 = t[5];
- return t[4] = h2 * o2 - f3 * a + n4 * a - i3 * o2 + i3, t[5] = f3 * o2 + h2 * a - i3 * a - n4 * o2 + n4, t;
- }
- function U2(t, e2) {
- m && "left" in m ? (null != m.left && m.left > t && (m.left = t), (null == m.right || m.right < t) && (m.right = t), (null == m.top || m.top > e2) && (m.top = e2), (null == m.bottom || m.bottom < e2) && (m.bottom = e2)) : m = { left: t, bottom: e2, right: t, top: e2 };
- }
- function F(t) {
- const e2 = t.args, i3 = e2.length;
- let n4;
- switch (t.action) {
- case "M":
- case "L":
- case "C":
- case "S":
- case "Q":
- case "T":
- for (n4 = 0; n4 < i3; n4 += 2)
- U2(e2[n4], e2[n4 + 1]);
- x.x = e2[i3 - 2], x.y = e2[i3 - 1];
- break;
- case "H":
- for (n4 = 0; n4 < i3; ++n4)
- U2(e2[n4], x.y);
- x.x = e2[i3 - 1];
- break;
- case "V":
- for (n4 = 0; n4 < i3; ++n4)
- U2(x.x, e2[n4]);
- x.y = e2[i3 - 1];
- break;
- case "m": {
- let t2 = 0;
- "x" in x || (U2(x.x = e2[0], x.y = e2[1]), t2 = 2);
- for (n4 = t2; n4 < i3; n4 += 2)
- U2(x.x += e2[n4], x.y += e2[n4 + 1]);
- break;
- }
- case "l":
- case "t":
- for (n4 = 0; n4 < i3; n4 += 2)
- U2(x.x += e2[n4], x.y += e2[n4 + 1]);
- break;
- case "h":
- for (n4 = 0; n4 < i3; ++n4)
- U2(x.x += e2[n4], x.y);
- break;
- case "v":
- for (n4 = 0; n4 < i3; ++n4)
- U2(x.x, x.y += e2[n4]);
- break;
- case "c":
- for (n4 = 0; n4 < i3; n4 += 6)
- U2(x.x + e2[n4], x.y + e2[n4 + 1]), U2(x.x + e2[n4 + 2], x.y + e2[n4 + 3]), U2(x.x += e2[n4 + 4], x.y += e2[n4 + 5]);
- break;
- case "s":
- case "q":
- for (n4 = 0; n4 < i3; n4 += 4)
- U2(x.x + e2[n4], x.y + e2[n4 + 1]), U2(x.x += e2[n4 + 2], x.y += e2[n4 + 3]);
- break;
- case "A":
- for (n4 = 0; n4 < i3; n4 += 7)
- U2(e2[n4 + 5], e2[n4 + 6]);
- x.x = e2[i3 - 2], x.y = e2[i3 - 1];
- break;
- case "a":
- for (n4 = 0; n4 < i3; n4 += 7)
- U2(x.x += e2[n4 + 5], x.y += e2[n4 + 6]);
- }
- }
- function O(t, e2, i3) {
- const n4 = p2[t.toLowerCase()];
- let r;
- "number" == typeof n4 && (n4 ? e2.length >= n4 && (r = { action: t, args: e2.slice(0, e2.length - e2.length % n4) }, i3.push(r), F(r)) : (r = { action: t, args: [] }, i3.push(r), F(r)));
- }
- function T(t) {
- const e2 = ("string" != typeof t.path ? v(t.path) : t.path).match(g), i3 = [];
- if (m = {}, x = {}, !e2)
- return null;
- let n4 = "", r = [];
- const o2 = e2.length;
- for (let a = 0; a < o2; ++a) {
- const t2 = e2[a], o3 = parseFloat(t2);
- isNaN(o3) ? (n4 && O(n4, r, i3), r = [], n4 = t2) : r.push(o3);
- }
- O(n4, r, i3);
- const s4 = { x: 0, y: 0, width: 0, height: 0 };
- return m && "left" in m && (s4.x = m.left, s4.y = m.top, s4.width = m.right - m.left, s4.height = m.bottom - m.top), s4;
- }
- function E(t) {
- const e2 = { x: 0, y: 0, width: 0, height: 0 };
- if ("circle" === t.type)
- e2.x = t.cx - t.r, e2.y = t.cy - t.r, e2.width = 2 * t.r, e2.height = 2 * t.r;
- else if ("ellipse" === t.type)
- e2.x = t.cx - t.rx, e2.y = t.cy - t.ry, e2.width = 2 * t.rx, e2.height = 2 * t.ry;
- else if ("image" === t.type || "rect" === t.type)
- e2.x = t.x, e2.y = t.y, e2.width = t.width, e2.height = t.height;
- else if ("path" === t.type) {
- const n4 = f(T(t));
- e2.x = n4.x, e2.y = n4.y, e2.width = n4.width, e2.height = n4.height;
- }
- return e2;
- }
- function V(t) {
- const e2 = { x: 0, y: 0, width: 0, height: 0 };
- let i3 = null, n4 = Number.NEGATIVE_INFINITY, r = Number.NEGATIVE_INFINITY;
- for (const o2 of t)
- i3 ? (i3.x = Math.min(i3.x, o2.x), i3.y = Math.min(i3.y, o2.y), n4 = Math.max(n4, o2.x + o2.width), r = Math.max(r, o2.y + o2.height)) : (i3 = e2, i3.x = o2.x, i3.y = o2.y, n4 = o2.x + o2.width, r = o2.y + o2.height);
- return i3 && (i3.width = n4 - i3.x, i3.height = r - i3.y), i3;
- }
- function C(t, e2, i3, o2, s4, a, l3, h2, f3) {
- let c4 = (l3 && a ? j(a, e2) : e2) / 2, d3 = (l3 && a ? j(a, i3) : i3) / 2;
- if (f3) {
- const t2 = f3[0], e3 = f3[1];
- c4 = (l3 && a ? j(a, t2) : t2) / 2, d3 = (l3 && a ? j(a, e3) : e3) / 2;
- }
- const u3 = t.width + o2, y3 = t.height + o2, p3 = n3(), g3 = n3();
- let m3 = false;
- if (s4 && 0 !== u3 && 0 !== y3) {
- const t2 = e2 !== i3 ? e2 / i3 : u3 / y3, n4 = e2 > i3 ? e2 : i3;
- let o3 = 1, s5 = 1;
- isNaN(n4) || (t2 > 1 ? (o3 = n4 / u3, s5 = n4 / t2 / y3) : (s5 = n4 / y3, o3 = n4 * t2 / u3)), o(g3, g3, z(p3, o3, s5, c4, d3)), m3 = true;
- }
- const x2 = t.x + (u3 - o2) / 2, w2 = t.y + (y3 - o2) / 2;
- if (o(g3, g3, I(p3, c4 - x2, d3 - w2)), !m3 && (u3 > e2 || y3 > i3)) {
- const t2 = u3 / e2 > y3 / i3, n4 = (t2 ? e2 : i3) / (t2 ? u3 : y3);
- o(g3, g3, z(p3, n4, n4, x2, w2));
- }
- return a && o(g3, g3, B(p3, a, x2, w2)), h2 && o(g3, g3, I(p3, h2[0], h2[1])), `matrix(${g3[0]},${g3[1]},${g3[2]},${g3[3]},${g3[4]},${g3[5]})`;
- }
- function D(t, e2, i3) {
- const n4 = t == null ? void 0 : t.effects.find((t2) => "bloom" === t2.type);
- if (!n4)
- return null;
- const { strength: r, radius: o2 } = n4, s4 = r > 0 ? o2 : 0, a = (r + s4) * e2, l3 = 4 * r + 1;
- return n("filter", { id: `bloom${i3}`, x: "-100%", y: "-100%", width: "300%", height: "300%", filterUnits: "userSpaceOnUse" }, n("feMorphology", { operator: "dilate", radius: (r + 0.5 * s4) * (5 ** (e2 / 100) * (0.4 + e2 / 100)), in: "SourceGraphic", result: "dilate" }), n("feGaussianBlur", { in: "dilate", stdDeviation: a / 25, result: "blur" }), n("feGaussianBlur", { in: "blur", stdDeviation: a / 50, result: "intensityBlur" }), n("feComponentTransfer", { in: "SourceGraphic", result: "intensityBrightness" }, n("feFuncR", { type: "linear", slope: l3 }), n("feFuncG", { type: "linear", slope: l3 }), n("feFuncB", { type: "linear", slope: l3 })), n("feMerge", null, n("feMergeNode", { in: "intensityBlur" }), n("feMergeNode", { in: "intensityBrightness" }), n("feGaussianBlur", { stdDeviation: r / 10 })));
- }
- function R(t, n4, r, o2 = {}) {
- var _a, _b, _c;
- const s4 = [], a = [], l3 = ++b, c4 = D(o2.effectView, n4, l3);
- let d3 = null;
- if (c4) {
- const t2 = (_a = o2.effectView) == null ? void 0 : _a.effects.find((t3) => "bloom" === t3.type), e2 = (t2.strength ? t2.strength + t2.radius / 2 : 0) / 3, i3 = n4 + n4 * e2, s5 = r + r * e2;
- d3 = [Math.max(i3, 10), Math.max(s5, 10)];
- }
- for (let e2 = 0; e2 < t.length; e2++) {
- const l4 = t[e2], f3 = [], c5 = [];
- let u3 = 0, y3 = 0, p3 = 0;
- for (const t2 of l4) {
- const { shape: e3, fill: i3, stroke: n5, font: r2, offset: a2 } = t2;
- o2.ignoreStrokeWidth || (u3 += n5 && n5.width || 0);
- const l5 = A(i3), h2 = S(n5), d4 = "text" === e3.type ? $(e3, r2) : null;
- s4.push(N(l5)), f3.push(M(e3, l5.fill, h2, d4)), c5.push(E(e3)), a2 && (y3 += a2[0], p3 += a2[1]);
- }
- const g3 = C(f(V(c5)), n4, r, u3, (_b = o2.scale) != null ? _b : false, o2.rotation, (_c = o2.useRotationSize) != null ? _c : false, [y3, p3], d3);
- let m3 = null;
- if (o2.masking) {
- const t2 = `mask-${e2}`, i3 = o2.masking[e2];
- s4.push(G(i3, t2)), m3 = `url(#${t2})`;
- }
- a.push(m3 ? n("g", { mask: m3 }, n("g", { transform: g3 }, f3)) : n("g", { transform: g3 }, f3));
- }
- o2.useRotationSize && o2.rotation && (n4 = j(o2.rotation, n4), r = j(o2.rotation, r)), c4 && (c(d3), n4 = d3[0], r = d3[1]);
- return n("svg", { xmlns: f2, width: n4, height: r, style: "display: block;" }, c4, n("defs", null, s4), c4 ? n("g", { filter: `url(#bloom${l3})` }, a) : a);
- }
- // node_modules/@arcgis/core/symbols/support/renderUtils.js
- var s3 = i();
- function h(t, e2, i3) {
- const r = Math.ceil(e2[0]), n4 = Math.ceil(e2[1]);
- if (!t.some((t2) => !!t2.length))
- return null;
- const o2 = i3 && i3.node || document.createElement("div");
- return null != i3.opacity && (o2.style.opacity = i3.opacity.toString()), null != i3.effectView && (o2.style.filter = q(i3.effectView)), s3.append(o2, R.bind(null, t, r, n4, i3)), o2;
- }
- function l2(t, e2) {
- t = Math.ceil(t), e2 = Math.ceil(e2);
- const i3 = document.createElement("canvas");
- i3.width = t, i3.height = e2, i3.style.width = t + "px", i3.style.height = e2 + "px";
- const r = i3.getContext("2d");
- return r.clearRect(0, 0, t, e2), r;
- }
- function m2(t, i3, r) {
- return t ? U(t, { responseType: "image" }).then((t2) => {
- const e2 = t2.data, n4 = e2.width, o2 = e2.height, a = n4 / o2;
- let c4 = i3;
- if (r) {
- const t3 = Math.max(n4, o2);
- c4 = Math.min(c4, t3);
- }
- return { image: e2, width: a <= 1 ? Math.ceil(c4 * a) : c4, height: a <= 1 ? c4 : Math.ceil(c4 / a) };
- }) : Promise.reject(new s("renderUtils: imageDataSize", "href not provided."));
- }
- function g2(t, e2) {
- return !(!t || "ignore" === e2) && ("multiply" !== e2 || 255 !== t.r || 255 !== t.g || 255 !== t.b || 1 !== t.a);
- }
- function u2(t, e2, n4, o2, a) {
- switch (a) {
- case "multiply":
- t[e2 + 0] *= n4[0], t[e2 + 1] *= n4[1], t[e2 + 2] *= n4[2], t[e2 + 3] *= n4[3];
- break;
- default: {
- const a2 = y({ r: t[e2 + 0], g: t[e2 + 1], b: t[e2 + 2] });
- a2.h = o2.h, a2.s = o2.s, a2.v = a2.v / 100 * o2.v;
- const c4 = p(a2);
- t[e2 + 0] = c4.r, t[e2 + 1] = c4.g, t[e2 + 2] = c4.b, t[e2 + 3] *= n4[3];
- break;
- }
- }
- }
- function d2(e2, r, n4, o2, a) {
- return m2(e2, r, a).then((a2) => {
- const c4 = a2.width ? a2.width : r, s4 = a2.height ? a2.height : r;
- if (a2.image && g2(n4, o2)) {
- let t = a2.image.width, r2 = a2.image.height;
- has("edge") && /\.svg$/i.test(e2) && (t -= 1, r2 -= 1);
- const h2 = l2(c4, s4);
- h2.drawImage(a2.image, 0, 0, t, r2, 0, 0, c4, s4);
- const m3 = h2.getImageData(0, 0, c4, s4), g3 = [n4.r / 255, n4.g / 255, n4.b / 255, n4.a], d3 = y(n4);
- for (let e3 = 0; e3 < m3.data.length; e3 += 4)
- u2(m3.data, e3, g3, d3, o2);
- h2.putImageData(m3, 0, 0), e2 = h2.canvas.toDataURL("image/png");
- } else {
- const i3 = s2 && s2.findCredential(e2);
- if (i3 && i3.token) {
- const t = e2.includes("?") ? "&" : "?";
- e2 = `${e2}${t}token=${i3.token}`;
- }
- }
- return { url: e2, width: c4, height: s4 };
- }).catch(() => ({ url: e2, width: r, height: r }));
- }
- export {
- h,
- d2 as d
- };
- //# sourceMappingURL=chunk-DX5KJRJR.js.map
|