import { C, t as t5 } from "./chunk-LSDW2622.js"; import { e as e4, t as t3 } from "./chunk-IQNZZCQJ.js"; import { w as w2 } from "./chunk-TODU7HVH.js"; import { n as n3 } from "./chunk-PZKZIMMP.js"; import { A, B, C as C2, K, O, P, R, U as U2, X, Y, Z, a, ie, k, l as l3, m as m3, ne, o as o3, oe, u as u3, w, y as y2 } from "./chunk-YLVXZ2PS.js"; import { dt, f as f2, j } from "./chunk-WFSV2B2I.js"; import { n as n2, t as t4 } from "./chunk-MFFE4I2S.js"; import { a as a2, n } from "./chunk-XBH7TGC2.js"; import { e as e5, h, i, o as o4 } from "./chunk-K3NA3LQS.js"; import { M, f as f3 } from "./chunk-TRK7CKWP.js"; import { r as r2, z } from "./chunk-6P6NA7JB.js"; import { l as l2 } from "./chunk-7XXXCK2A.js"; import { m as m2, o as o2, u as u2 } from "./chunk-N2663GRX.js"; import { e as e3, u } from "./chunk-WEMIK25H.js"; import { c as c3, o2 as o } from "./chunk-XNLG7T2T.js"; import { c as c2, f, l, s as s3, y } from "./chunk-2Z6LERTI.js"; import { c, e as e2 } from "./chunk-OWVBLVP3.js"; import { U } from "./chunk-VNFRAYHO.js"; import { e } from "./chunk-WSRBH7BF.js"; import { g } from "./chunk-ULGDPLM2.js"; import { s, s3 as s2 } from "./chunk-EMJ4ZSM2.js"; import { m } from "./chunk-IKP3YN53.js"; import { r, t, t2 } from "./chunk-GZT4BVFP.js"; // node_modules/@arcgis/core/core/BidiText.js var i2 = new C(); function n4(r18) { if (!i2.hasBidiChar(r18)) return [r18, false]; let n17; return n17 = i2.checkContextual(r18) === "rtl" ? "IDNNN" : "ICNNN", [i2.bidiTransform(r18, n17, "VLYSN"), true]; } // node_modules/@arcgis/core/symbols/cim/CIMResourceManager.js var o5 = ";base64,"; var s4 = class { constructor() { this._resourceMap = new Map(), this._inFlightResourceMap = new Map(), this.geometryEngine = null; } destroy() { this._inFlightResourceMap.clear(), this._resourceMap.clear(); } getResource(e11) { return this._resourceMap.get(e11) ?? null; } async fetchResource(e11, r18) { const t8 = { width: 0, height: 0 }, o11 = this._resourceMap, s10 = o11.get(e11); if (s10) return t8.width = s10.width, t8.height = s10.height, t8; let c9 = this._inFlightResourceMap.get(e11); return c9 || (c9 = i3(e11, r18), this._inFlightResourceMap.set(e11, c9), c9 = c9.then((r19) => { if (this._inFlightResourceMap.delete(e11), r19.ok) { o11.set(e11, r19.value); const s11 = r19.value; return t8.width = s11.width, t8.height = s11.height, t8; } return t8; }), c9); } deleteResource(e11) { this._inFlightResourceMap.delete(e11), this._resourceMap.delete(e11); } }; function i3(s10, i8) { if (s10.includes(o5)) { const e11 = new Image(); return e11.src = s10, e11.decode().then(() => ({ ok: true, value: e11 })).catch((e12) => g(e12) ? { ok: false, error: e12 } : { ok: false, error: new s2("invalid-resource", `Could not fetch requested resource at ${s10}`) }); } return U(s10, { responseType: "image", ...i8 }).then((e11) => ({ ok: true, value: e11.data })).catch((e11) => g(e11) ? { ok: false, error: e11 } : { ok: false, error: new s2("invalid-resource", `Could not fetch requested resource at ${s10}`) }); } // node_modules/@arcgis/core/symbols/cim/TextRasterizer.js function e6(t8) { return `rgb(${t8.slice(0, 3).toString()})`; } function i4(t8) { return `rgba(${t8.slice(0, 3).toString()},${t8[3]})`; } var s5 = class { rasterizeText(t8, s10) { this._textRasterizationCanvas || (this._textRasterizationCanvas = document.createElement("canvas")); const r18 = this._textRasterizationCanvas, o11 = r18.getContext("2d"); this._setFontProperties(o11, s10), this.parameters = s10, this.textLines = t8.split(/\r?\n/), this.lineHeight = this._computeLineHeight(); const h6 = this._computeTextWidth(o11, s10), { decoration: a10, weight: l9 } = s10.font; this.lineThroughWidthOffset = a10 && a10 === "line-through" ? 0.1 * this.lineHeight : 0; const d2 = this.lineHeight * this.textLines.length; r18.width = h6 + 2 * this.lineThroughWidthOffset, r18.height = d2, this.renderedLineHeight = Math.round(this.lineHeight * s10.pixelRatio), this.renderedHaloSize = s10.halo.size * s10.pixelRatio, this.renderedWidth = h6 * s10.pixelRatio, this.renderedHeight = d2 * s10.pixelRatio, this.lineThroughWidthOffset *= s10.pixelRatio, this.fillStyle = i4(s10.color), this.haloStyle = e6(s10.halo.color); const c9 = this.renderedLineHeight, g5 = this.renderedHaloSize; this._setFontProperties(o11, s10); const f8 = n5(o11.textAlign, this.renderedWidth) + g5, u9 = g5, p3 = g5 > 0; let x3 = this.lineThroughWidthOffset, m7 = 0; p3 && this._renderHalo(o11, f8, u9, x3, m7, s10), m7 += u9, x3 += f8; for (const e11 of this.textLines) o11.globalCompositeOperation = "destination-out", o11.fillStyle = "rgb(0, 0, 0)", o11.fillText(e11, x3, m7), o11.globalCompositeOperation = "source-over", o11.fillStyle = this.fillStyle, o11.fillText(e11, x3, m7), a10 && a10 !== "none" && this._renderDecoration(o11, x3, m7, a10, l9), m7 += c9; const _4 = this.renderedWidth + 2 * this.lineThroughWidthOffset, H3 = this.renderedHeight, z3 = o11.getImageData(0, 0, _4, H3), w4 = new Uint8Array(z3.data); if (s10.premultiplyColors) { let t9; for (let e11 = 0; e11 < w4.length; e11 += 4) t9 = w4[e11 + 3] / 255, w4[e11] = w4[e11] * t9, w4[e11 + 1] = w4[e11 + 1] * t9, w4[e11 + 2] = w4[e11 + 2] * t9; } return { size: [_4, H3], image: new Uint32Array(w4.buffer), sdf: false, simplePattern: false, anchorX: 0, anchorY: 0 }; } _renderHalo(t8, e11, i8, s10, n17, r18) { const o11 = this.renderedWidth, h6 = this.renderedHeight; this._haloRasterizationCanvas || (this._haloRasterizationCanvas = document.createElement("canvas")), this._haloRasterizationCanvas.width = o11, this._haloRasterizationCanvas.height = h6; const a10 = this._haloRasterizationCanvas, l9 = a10.getContext("2d"); l9.clearRect(0, 0, o11, h6), this._setFontProperties(l9, r18); const { decoration: d2, weight: c9 } = r18.font; l9.fillStyle = this.haloStyle, l9.strokeStyle = this.haloStyle; const g5 = this.renderedHaloSize < 3; l9.lineJoin = g5 ? "miter" : "round", g5 ? this._renderHaloEmulated(l9, e11, i8, d2, c9) : this._renderHaloNative(l9, e11, i8, d2, c9), t8.globalAlpha = this.parameters.halo.color[3], t8.drawImage(a10, 0, 0, o11, h6, s10, n17, o11, h6), t8.globalAlpha = 1; } _renderHaloEmulated(t8, e11, i8, s10, n17) { const o11 = this.renderedLineHeight, h6 = this.renderedHaloSize; for (const a10 of this.textLines) { for (const [s11, n18] of r3) t8.fillText(a10, e11 + h6 * s11, i8 + h6 * n18); s10 && s10 !== "none" && this._renderDecoration(t8, e11, i8, s10, n17), i8 += o11; } } _renderHaloNative(t8, e11, i8, s10, n17) { const r18 = this.renderedLineHeight, o11 = this.renderedHaloSize; for (const h6 of this.textLines) { const a10 = 2 * o11, l9 = 5, d2 = 0.1; for (let r19 = 0; r19 < l9; r19++) { const o12 = 1 - (l9 - 1) * d2 + r19 * d2; t8.lineWidth = o12 * a10, t8.strokeText(h6, e11, i8), s10 && s10 !== "none" && this._renderDecoration(t8, e11, i8, s10, n17); } i8 += r18; } } _setFontProperties(e11, i8) { const s10 = i8.font, n17 = `${s10.style} ${s10.weight} ${u(i8.size * i8.pixelRatio)}px ${s10.family}, sans-serif`; let r18; switch (e11.font = n17, e11.textBaseline = "top", i8.horizontalAlignment) { case "left": default: r18 = "left"; break; case "right": r18 = "right"; break; case "center": r18 = "center"; } e11.textAlign = r18; } computeTextSize(t8, e11) { this._textRasterizationCanvas || (this._textRasterizationCanvas = document.createElement("canvas")); const i8 = this._textRasterizationCanvas, s10 = i8.getContext("2d"); this._setFontProperties(s10, e11), this.parameters = e11, this.textLines = t8.split(/\r?\n/), this.lineHeight = this._computeLineHeight(); const n17 = this._computeTextWidth(s10, e11), r18 = this.lineHeight * this.textLines.length; return i8.width = n17, i8.height = r18, [n17 * e11.pixelRatio, r18 * e11.pixelRatio]; } _computeTextWidth(t8, e11) { let i8 = 0; for (const n17 of this.textLines) i8 = Math.max(i8, t8.measureText(n17).width); const s10 = e11.font; return (s10.style === "italic" || s10.style === "oblique" || typeof s10.weight == "string" && (s10.weight === "bold" || s10.weight === "bolder") || typeof s10.weight == "number" && s10.weight > 600) && (i8 += 0.3 * t8.measureText("w").width), i8 += 2 * this.parameters.halo.size, Math.round(i8); } _computeLineHeight() { let t8 = 1.275 * this.parameters.size; const e11 = this.parameters.font.decoration; return e11 && e11 === "underline" && (t8 *= 1.3), Math.round(t8 + 2 * this.parameters.halo.size); } _renderDecoration(t8, e11, i8, s10, n17) { const r18 = 0.9 * this.lineHeight, o11 = n17 === "bold" ? 0.06 : n17 === "bolder" ? 0.09 : 0.04; switch (t8.textAlign) { case "center": e11 -= this.renderedWidth / 2; break; case "right": e11 -= this.renderedWidth; } const h6 = t8.textBaseline; if (s10 === "underline") switch (h6) { case "top": i8 += r18; break; case "middle": i8 += r18 / 2; } else if (s10 === "line-through") switch (h6) { case "top": i8 += r18 / 1.5; break; case "middle": i8 += r18 / 3; } t8.save(), t8.beginPath(), t8.strokeStyle = t8.fillStyle, t8.lineWidth = Math.ceil(r18 * o11), t8.moveTo(e11 - this.lineThroughWidthOffset, i8), t8.lineTo(e11 + this.renderedWidth + 2 * this.lineThroughWidthOffset, i8), t8.stroke(), t8.restore(); } }; function n5(t8, e11) { return t8 === "center" ? 0.5 * e11 : t8 === "right" ? e11 : 0; } var r3 = []; { const t8 = 16; for (let e11 = 0; e11 < 360; e11 += 360 / t8) r3.push([Math.cos(Math.PI * e11 / 180), Math.sin(Math.PI * e11 / 180)]); } // node_modules/@arcgis/core/core/floatRGBA.js function o6(o11, r18, e11 = 0) { const i8 = o(o11, 0, f4); for (let t8 = 0; t8 < 4; t8++) r18[e11 + t8] = Math.floor(256 * l4(i8 * n6[t8])); } function r4(t8, o11 = 0) { let r18 = 0; for (let n17 = 0; n17 < 4; n17++) r18 += t8[o11 + n17] * e7[n17]; return r18; } var n6 = [1, 256, 65536, 16777216]; var e7 = [1 / 256, 1 / 65536, 1 / 16777216, 1 / 4294967296]; var f4 = r4(new Uint8ClampedArray([255, 255, 255, 255])); function l4(t8) { return t8 - Math.floor(t8); } // node_modules/@arcgis/core/symbols/cim/CIMPlacements.js var t6 = class { constructor() { this.setIdentity(); } getAngle() { return (this.rz == null || this.rz === 0 && this.rz_c !== 1 && this.rz_s !== 0) && (this.rz = Math.atan2(this.rz_s, this.rz_c)), this.rz; } setIdentity() { this.tx = 0, this.ty = 0, this.tz = 0, this.s = 1, this.rx = 0, this.ry = 0, this.rz = 0, this.rz_c = 1, this.rz_s = 0; } setTranslate(t8, s10) { this.tx = t8, this.ty = s10; } setTranslateZ(t8) { this.tz = t8; } setRotateCS(t8, s10) { this.rz = void 0, this.rz_c = t8, this.rz_s = s10; } setRotate(t8) { this.rz = t8, this.rz_c = void 0, this.rz_s = void 0; } setRotateY(t8) { this.ry = t8; } setScale(t8) { this.s = t8; } setMeasure(t8) { this.m = t8; } }; // node_modules/@arcgis/core/symbols/cim/CIMEffects.js var r5 = class { constructor(t8) { this._geometry = t8; } next() { const t8 = this._geometry; return this._geometry = null, t8; } }; // node_modules/@arcgis/core/symbols/cim/CIMCursor.js function a3(i8) { const n17 = m(i8); return P2(n17), n17; } function r6(t8) { if (!t8) return null; l(t8) ? t8.y = -t8.y : c2(t8) ? l5(t8.rings) : y(t8) ? l5(t8.paths) : f(t8) && u4(t8.points); } function u4(t8) { if (t8) { const i8 = t8.length; for (let n17 = 0; n17 < i8; n17++) t8[n17][1] = -t8[n17][1]; } } function l5(t8) { if (t8) for (const i8 of t8) u4(i8); } function c4(t8) { if (t8) { for (let i8 = t8.length - 1; i8 > 0; --i8) t8[i8][0] -= t8[i8 - 1][0], t8[i8][1] -= t8[i8 - 1][1]; } } function f5(t8) { if (t8) for (const i8 of t8) c4(i8); } function p(t8) { if (t8) { const i8 = t8.length; for (let n17 = 1; n17 < i8; ++n17) t8[n17][0] += t8[n17 - 1][0], t8[n17][1] += t8[n17 - 1][1]; } } function m4(t8) { if (t8) for (const i8 of t8) p(i8); } function P2(t8) { t8 && (c2(t8) ? m4(t8.rings) : y(t8) ? m4(t8.paths) : f(t8) && p(t8.points), r6(t8)); } function x(t8) { t8 && (r6(t8), c2(t8) ? f5(t8.rings) : y(t8) ? f5(t8.paths) : f(t8) && c4(t8.points)); } function g2(t8) { if (t8) for (const i8 of t8) d(i8); } function d(t8) { t8 && t8.reverse(); } function y3(t8, i8, n17) { return [t8[0] + (i8[0] - t8[0]) * n17, t8[1] + (i8[1] - t8[1]) * n17]; } function C3(t8) { return !(!t8 || t8.length === 0) && (t8[0][0] === t8[t8.length - 1][0] && t8[0][1] === t8[t8.length - 1][1]); } function I(t8) { return t8[4]; } function j2(t8, i8) { t8[4] = i8; } var G = class { constructor(t8, s10, e11, a10) { this.acceptPolygon = s10, this.acceptPolyline = e11, this.geomUnitsPerPoint = a10, this.pathCount = -1, this.pathIndex = -1, this.iteratePath = false, t8 && (c2(t8) ? s10 && (this.multiPath = t8.rings, this.isClosed = true) : y(t8) ? e11 && (this.multiPath = t8.paths, this.isClosed = false) : s3(t8) && s10 && (this.multiPath = b(t8).rings, this.isClosed = true), this.multiPath && (this.pathCount = this.multiPath.length)), this.internalPlacement = new t6(); } next() { if (!this.multiPath) return null; for (; this.iteratePath || this.pathIndex < this.pathCount - 1; ) { this.iteratePath || this.pathIndex++; const t8 = this.processPath(this.multiPath[this.pathIndex]); if (t8) return t8; } return this.pathCount = -1, this.pathIndex = -1, this.multiPath = null, null; } }; var U3 = class { constructor(t8, i8, n17, s10) { this.inputGeometries = t8, this.acceptPolygon = i8, this.acceptPolyline = n17, this.geomUnitsPerPoint = s10, this.pathCount = -1, this.pathIndex = -1, this.iteratePath = false; } next() { for (; ; ) { if (!this.multiPath) { let t8 = this.inputGeometries.next(); for (; t8; ) { if (c2(t8) ? this.acceptPolygon && (this.multiPath = t8.rings, this.isClosed = true) : y(t8) ? this.acceptPolyline && (this.multiPath = t8.paths, this.isClosed = false) : s3(t8) && this.acceptPolygon && (this.multiPath = b(t8).rings, this.isClosed = true), this.multiPath) { this.pathCount = this.multiPath.length, this.pathIndex = -1; break; } t8 = this.inputGeometries.next(); } if (!this.multiPath) return null; } for (; this.iteratePath || this.pathIndex < this.pathCount - 1; ) { this.iteratePath || this.pathIndex++; const t8 = this.processPath(this.multiPath[this.pathIndex]); if (t8) return t8; } this.pathCount = -1, this.pathIndex = -1, this.multiPath = null; } } }; function b(t8) { return { rings: [[[t8.xmin, t8.ymin], [t8.xmin, t8.ymax], [t8.xmax, t8.ymax], [t8.xmax, t8.ymin], [t8.xmin, t8.ymin]]] }; } // node_modules/@arcgis/core/symbols/cim/effects/EffectAddControlPoints.js var o7 = class { static local() { return o7.instance === null && (o7.instance = new o7()), o7.instance; } execute(s10, t8, e11, i8) { return new r7(s10, t8, e11); } }; o7.instance = null; var r7 = class { constructor(s10, t8, e11) { this._inputGeometries = s10, this._angleTolerance = t8.angleTolerance !== void 0 ? t8.angleTolerance : 120, this._maxCosAngle = Math.cos((1 - Math.abs(this._angleTolerance) / 180) * Math.PI); } next() { let n17 = this._inputGeometries.next(); for (; n17; ) { if (c2(n17)) { this._isClosed = true; const t8 = m(n17); return this._processMultipath(t8.rings), t8; } if (y(n17)) { this._isClosed = false; const t8 = m(n17); return this._processMultipath(t8.paths), t8; } if (s3(n17)) { if (this._maxCosAngle) return n17; this._isClosed = true; const s10 = [[n17.xmin, n17.ymin], [n17.xmin, n17.ymax], [n17.xmax, n17.ymax], [n17.xmax, n17.ymin], [n17.xmin, n17.ymin]]; return this._processPath(s10), { rings: [s10] }; } n17 = this._inputGeometries.next(); } return null; } _processMultipath(s10) { if (s10) for (const t8 of s10) this._processPath(t8); } _processPath(s10) { if (s10) { let t8, e11, i8, o11, r18, l9, a10 = s10.length, h6 = s10[0]; this._isClosed && ++a10; for (let c9 = 1; c9 < a10; ++c9) { let m7; m7 = this._isClosed && c9 === a10 - 1 ? s10[0] : s10[c9]; const _4 = m7[0] - h6[0], u9 = m7[1] - h6[1], p3 = Math.sqrt(_4 * _4 + u9 * u9); if (c9 > 1 && p3 > 0 && i8 > 0) { (t8 * _4 + e11 * u9) / p3 / i8 <= this._maxCosAngle && j2(h6, 1); } c9 === 1 && (o11 = _4, r18 = u9, l9 = p3), p3 > 0 && (h6 = m7, t8 = _4, e11 = u9, i8 = p3); } if (this._isClosed && i8 > 0 && l9 > 0) { (t8 * o11 + e11 * r18) / l9 / i8 <= this._maxCosAngle && j2(s10[0], 1); } } } }; // node_modules/@arcgis/core/symbols/cim/CurveHelper.js var e8 = 0.03; var s6 = class { constructor() { this._path = []; } path() { return this._path; } addPath(t8, e11) { e11 || t8.reverse(), Array.prototype.push.apply(this._path, t8), e11 || t8.reverse(); } static mergePath(t8, e11) { e11 && Array.prototype.push.apply(t8, e11); } startPath(t8) { this._path.push(t8); } lineTo(t8) { this._path.push(t8); } close() { const t8 = this._path; t8.length > 1 && (t8[0][0] === t8[t8.length - 1][0] && t8[0][1] === t8[t8.length - 1][1] || t8.push([t8[0][0], t8[0][1]])); } }; var n7 = class { constructor(t8 = 0, e11 = false) { } normalize(t8) { const e11 = Math.sqrt(t8[0] * t8[0] + t8[1] * t8[1]); e11 !== 0 && (t8[0] /= e11, t8[1] /= e11); } calculateLength(t8, e11) { const s10 = e11[0] - t8[0], n17 = e11[1] - t8[1]; return Math.sqrt(s10 * s10 + n17 * n17); } calculateSegLength(t8, e11) { return this.calculateLength(t8[e11], t8[e11 + 1]); } calculatePathLength(t8) { let e11 = 0; const s10 = t8 ? t8.length : 0; for (let n17 = 0; n17 < s10 - 1; ++n17) e11 += this.calculateSegLength(t8, n17); return e11; } calculatePathArea(t8) { let e11 = 0; const s10 = t8 ? t8.length : 0; for (let n17 = 0; n17 < s10 - 1; ++n17) e11 += (t8[n17 + 1][0] - t8[n17][0]) * (t8[n17 + 1][1] + t8[n17][1]); return e11 / 2; } getCoord2D(t8, e11, s10) { return [t8[0] + (e11[0] - t8[0]) * s10, t8[1] + (e11[1] - t8[1]) * s10]; } getSegCoord2D(t8, e11, s10) { return this.getCoord2D(t8[e11], t8[e11 + 1], s10); } getAngle(t8, e11, s10) { const n17 = e11[0] - t8[0], r18 = e11[1] - t8[1]; return Math.atan2(r18, n17); } getSegAngle(t8, e11, s10) { return this.getAngle(t8[e11], t8[e11 + 1], s10); } getAngleCS(t8, e11, s10) { const n17 = e11[0] - t8[0], r18 = e11[1] - t8[1], h6 = Math.sqrt(n17 * n17 + r18 * r18); return h6 > 0 ? [n17 / h6, r18 / h6] : [1, 0]; } getSegAngleCS(t8, e11, s10) { return this.getAngleCS(t8[e11], t8[e11 + 1], s10); } cut(t8, e11, s10, n17) { return [s10 <= 0 ? t8[e11] : this.getSegCoord2D(t8, e11, s10), n17 >= 1 ? t8[e11 + 1] : this.getSegCoord2D(t8, e11, n17)]; } addSegment(t8, e11, s10) { s10 && t8.push(e11[0]), t8.push(e11[1]); } getSubCurve(t8, e11, s10) { const n17 = []; return this.appendSubCurve(n17, t8, e11, s10) ? n17 : null; } appendSubCurve(t8, e11, s10, n17) { const r18 = e11 ? e11.length - 1 : 0; let h6 = 0, l9 = true, o11 = 0; for (; o11 < r18; ) { const r19 = this.calculateSegLength(e11, o11); if (r19 !== 0) { if (l9) { if (h6 + r19 > s10) { const a10 = (s10 - h6) / r19; let u9 = 1, c9 = false; h6 + r19 >= n17 && (u9 = (n17 - h6) / r19, c9 = true); const i8 = this.cut(e11, o11, a10, u9); if (i8 && this.addSegment(t8, i8, l9), c9) break; l9 = false; } } else { if (h6 + r19 > n17) { const s11 = this.cut(e11, o11, 0, (n17 - h6) / r19); s11 && this.addSegment(t8, s11, l9); break; } this.addSegment(t8, [e11[o11], e11[o11 + 1]], l9); } h6 += r19, ++o11; } else ++o11; } return true; } getCIMPointAlong(t8, e11) { const s10 = t8 ? t8.length - 1 : 0; let n17 = 0, r18 = -1; for (; r18 < s10; ) { ++r18; const s11 = this.calculateSegLength(t8, r18); if (s11 !== 0) { if (n17 + s11 > e11) { const h6 = (e11 - n17) / s11; return this.getCoord2D(t8[r18], t8[r18 + 1], h6); } n17 += s11; } } return null; } isEmpty(t8, e11) { if (!t8 || t8.length <= 1) return true; const s10 = t8 ? t8.length - 1 : 0; let n17 = -1; for (; n17 < s10; ) { if (++n17, t8[n17 + 1][0] !== t8[n17][0] || t8[n17 + 1][1] !== t8[n17][1]) return false; if (e11 && t8[n17 + 1][2] !== t8[n17][2]) return false; } return true; } offset(e11, s10, n17, r18, h6) { if (!e11 || e11.length < 2) return null; let l9 = 0, o11 = e11[l9++], a10 = l9; for (; l9 < e11.length; ) { const t8 = e11[l9]; t8[0] === o11[0] && t8[1] === o11[1] || (l9 !== a10 && (e11[a10] = e11[l9]), o11 = e11[a10++]), l9++; } const u9 = e11[0][0] === e11[a10 - 1][0] && e11[0][1] === e11[a10 - 1][1]; if (u9 && --a10, a10 < (u9 ? 3 : 2)) return null; const c9 = []; o11 = u9 ? e11[a10 - 1] : null; let i8 = e11[0]; for (let g5 = 0; g5 < a10; g5++) { const h7 = g5 === a10 - 1 ? u9 ? e11[0] : null : e11[g5 + 1]; if (o11) if (h7) { const e12 = [h7[0] - i8[0], h7[1] - i8[1]]; this.normalize(e12); const l10 = [i8[0] - o11[0], i8[1] - o11[1]]; this.normalize(l10); const a11 = l10[0] * e12[1] - l10[1] * e12[0], u10 = l10[0] * e12[0] + l10[1] * e12[1]; if (a11 === 0 && u10 === 1) { i8 = h7; continue; } if (a11 >= 0 == s10 <= 0) { if (u10 < 1) { const t8 = [e12[0] - l10[0], e12[1] - l10[1]]; this.normalize(t8); const n18 = Math.sqrt((1 + u10) / 2); if (n18 > 1 / r18) { const e13 = -Math.abs(s10) / n18; c9.push([i8[0] - t8[0] * e13, i8[1] - t8[1] * e13]); } } } else switch (n17) { case O.Mitered: { const t8 = Math.sqrt((1 + u10) / 2); if (t8 > 0 && 1 / t8 < r18) { const n18 = [e12[0] - l10[0], e12[1] - l10[1]]; this.normalize(n18); const r19 = Math.abs(s10) / t8; c9.push([i8[0] - n18[0] * r19, i8[1] - n18[1] * r19]); break; } } case O.Bevelled: c9.push([i8[0] + l10[1] * s10, i8[1] - l10[0] * s10]), c9.push([i8[0] + e12[1] * s10, i8[1] - e12[0] * s10]); break; case O.Rounded: if (u10 < 1) { c9.push([i8[0] + l10[1] * s10, i8[1] - l10[0] * s10]); const t8 = Math.floor(2.5 * (1 - u10)); if (t8 > 0) { const n18 = 1 / t8; let r19 = n18; for (let h8 = 1; h8 < t8; h8++, r19 += n18) { const t9 = [l10[1] * (1 - r19) + e12[1] * r19, -l10[0] * (1 - r19) - e12[0] * r19]; this.normalize(t9), c9.push([i8[0] + t9[0] * s10, i8[1] + t9[1] * s10]); } } c9.push([i8[0] + e12[1] * s10, i8[1] - e12[0] * s10]); } break; case O.Square: default: if (a11 < 0) c9.push([i8[0] + (l10[1] + l10[0]) * s10, i8[1] + (l10[1] - l10[0]) * s10]), c9.push([i8[0] + (e12[1] - e12[0]) * s10, i8[1] - (e12[0] + e12[1]) * s10]); else { const t8 = Math.sqrt((1 + Math.abs(u10)) / 2), n18 = [e12[0] - l10[0], e12[1] - l10[1]]; this.normalize(n18); const r19 = s10 / t8; c9.push([i8[0] - n18[0] * r19, i8[1] - n18[1] * r19]); } } } else { const t8 = [i8[0] - o11[0], i8[1] - o11[1]]; this.normalize(t8), c9.push([i8[0] + t8[1] * s10, i8[1] - t8[0] * s10]); } else { const t8 = [h7[0] - i8[0], h7[1] - i8[1]]; this.normalize(t8), c9.push([i8[0] + t8[1] * s10, i8[1] - t8[0] * s10]); } o11 = i8, i8 = h7; } return c9.length < (u9 ? 3 : 2) ? null : (u9 && c9.push([c9[0][0], c9[0][1]]), c9); } }; // node_modules/@arcgis/core/symbols/cim/effects/EffectArrow.js var l6 = 1.7320508075688772; var c5 = 5; var u5 = P.OpenEnded; var h2 = class { static local() { return h2.instance === null && (h2.instance = new h2()), h2.instance; } execute(t8, e11, r18, n17) { return new a4(t8, e11, r18); } }; h2.instance = null; var a4 = class extends U3 { constructor(t8, e11, o11) { super(t8, false, true), this._curveHelper = new n7(), this._width = (e11.width !== void 0 ? e11.width : c5) * o11, this._arrowType = e11.geometricEffectArrowType !== void 0 ? e11.geometricEffectArrowType : e11.arrowType !== void 0 ? e11.arrowType : u5, this._offsetFlattenError = e8 * o11; } processPath(t8) { switch (this._arrowType) { case P.OpenEnded: default: return this._constructSimpleArrow(t8, true); case P.Block: return this._constructSimpleArrow(t8, false); case P.Crossed: return this._constructCrossedArrow(t8); } } _constructSimpleArrow(t8, e11) { const r18 = this._curveHelper.calculatePathLength(t8); let n17 = this._width; r18 < 2 * n17 && (n17 = r18 / 2); const s10 = this._curveHelper.getSubCurve(t8, 0, r18 - n17); if (!s10) return null; const i8 = n17 / 2; if (this._curveHelper.isEmpty(s10, false)) return null; const l9 = this._constructOffset(s10, -i8); if (!l9) return null; const c9 = this._constructOffset(s10, i8); if (!c9) return null; const u9 = this._constructArrowBasePoint(l9, -i8 / 2); if (!u9) return null; const h6 = this._constructArrowBasePoint(c9, i8 / 2); if (!h6) return null; const a10 = t8[t8.length - 1]; e11 || (this._makeControlPoint(c9, true), this._makeControlPoint(l9, true)); const _4 = new s6(); return _4.addPath(c9, true), _4.lineTo(h6), this._makeControlPoint(_4.path()), _4.lineTo(a10), this._makeControlPoint(_4.path()), _4.lineTo(u9), this._makeControlPoint(_4.path()), _4.addPath(l9, false), e11 ? { paths: [_4.path()] } : (_4.close(), { rings: [_4.path()] }); } _constructCrossedArrow(t8) { const e11 = this._curveHelper.calculatePathLength(t8); let r18 = this._width; e11 < r18 * (1 + l6 + 1) && (r18 = e11 / (1 + l6 + 1)); const n17 = this._curveHelper.getSubCurve(t8, 0, e11 - r18 * (1 + l6)); if (!n17) return null; const s10 = r18 / 2; if (this._curveHelper.isEmpty(n17, false)) return null; const i8 = this._constructOffset(n17, s10); if (!i8) return null; const c9 = this._constructOffset(n17, -s10); if (!c9) return null; const u9 = this._curveHelper.getSubCurve(t8, 0, e11 - r18); if (!u9) return null; if (this._curveHelper.isEmpty(u9, false)) return null; const h6 = this._constructOffset(u9, s10); if (!h6) return null; const a10 = this._constructOffset(u9, -s10); if (!a10) return null; const _4 = h6[h6.length - 1], f8 = this._constructArrowBasePoint(h6, s10 / 2); if (!f8) return null; const p3 = a10[a10.length - 1], m7 = this._constructArrowBasePoint(a10, -s10 / 2); if (!m7) return null; const d2 = t8[t8.length - 1]; this._makeControlPoint(i8, false), this._makeControlPoint(c9, false); const w4 = new s6(); return w4.addPath(i8, true), this._makeControlPoint(w4.path()), w4.lineTo(p3), w4.lineTo(m7), this._makeControlPoint(w4.path()), w4.lineTo(d2), this._makeControlPoint(w4.path()), w4.lineTo(f8), this._makeControlPoint(w4.path()), w4.lineTo(_4), this._makeControlPoint(w4.path()), w4.addPath(c9, false), { paths: [w4.path()] }; } _constructOffset(t8, e11) { return this._curveHelper.offset(t8, e11, O.Rounded, 4, this._offsetFlattenError); } _constructArrowBasePoint(t8, e11) { if (!t8 || t8.length < 2) return null; const r18 = t8[t8.length - 2], n17 = t8[t8.length - 1], o11 = [n17[0] - r18[0], n17[1] - r18[1]]; return this._curveHelper.normalize(o11), [n17[0] + o11[1] * e11, n17[1] - o11[0] * e11]; } _makeControlPoint(t8, r18 = false) { j2(r18 ? t8[0] : t8[t8.length - 1], 1); } }; // node_modules/@arcgis/core/symbols/cim/effects/EffectBuffer.js var f6 = class { static local() { return f6.instance === null && (f6.instance = new f6()), f6.instance; } execute(e11, t8, s10, i8) { return new h3(e11, t8, s10, i8); } }; f6.instance = null; var h3 = class { constructor(e11, t8, s10, i8) { this._inputGeometries = e11, this._curveHelper = new n7(), this._size = (t8.size !== void 0 ? t8.size : 1) * s10, this._offsetFlattenError = e8 * s10; } next() { let n17 = this._inputGeometries.next(); for (; n17; ) { if (s3(n17)) if (this._size > 0) { const e11 = [[n17.xmin, n17.ymin], [n17.xmin, n17.ymax], [n17.xmax, n17.ymax], [n17.xmax, n17.ymin], [n17.xmin, n17.ymin]], t8 = this._curveHelper.offset(e11, this._size, O.Rounded, 4, this._offsetFlattenError); if (t8) return { rings: [t8] }; } else { if (!(this._size < 0)) return n17; if (Math.min(n17.xmax - n17.xmin, n17.ymax - n17.ymin) + 2 * this._size > 0) return { xmin: n17.xmin - this._size, xmax: n17.xmax + this._size, ymin: n17.ymin - this._size, ymax: n17.ymax + this._size }; } if (c2(n17)) { if (this._size === 0) return n17; const e11 = []; for (const t8 of n17.rings) { const s10 = this._curveHelper.offset(t8, this._size, O.Rounded, 4, this._offsetFlattenError); s10 && e11.push(s10); } if (e11.length) return { rings: e11 }; } if (y(n17) && this._size > 0) { const e11 = []; for (const t8 of n17.paths) if (t8 && t8.length > 1) { const s10 = this._curveHelper.offset(t8, this._size, O.Rounded, 4, this._offsetFlattenError), i8 = this._curveHelper.offset(t8, -this._size, O.Rounded, 4, this._offsetFlattenError); if (s10 && i8) { for (let e12 = i8.length - 1; e12 >= 0; e12--) s10.push(i8[e12]); s10.push([s10[0][0], s10[0][1]]), e11.push(s10); } } if (e11.length) return { rings: e11 }; } l(n17) && this._size, n17 = this._inputGeometries.next(); } return null; } }; // node_modules/@arcgis/core/symbols/cim/effects/EffectControlMeasureLine.js var _ = class { static local() { return _.instance === null && (_.instance = new _()), _.instance; } execute(s10, t8, i8, h6) { return new c6(s10, t8, i8); } }; _.instance = null; var c6 = class { constructor(s10, t8, i8) { this._default_point_size = 20, this._inputGeometries = s10, this._geomUnitsPerPoint = i8, this._rule = t8.rule ?? R.FullGeometry, this._default_size = this._default_point_size * i8; } next() { let e11; for (; e11 = this._inputGeometries.next(); ) { let r18; if (l(e11) ? r18 = this._processGeom([[[e11.x, e11.y]]]) : f(e11) ? r18 = this._processGeom([e11.points]) : y(e11) ? r18 = this._processGeom(e11.paths) : c2(e11) && (r18 = this._processGeom(e11.rings)), r18 && r18.length) return { paths: r18 }; } return null; } _clone(s10) { return [s10[0], s10[1]]; } _mid(s10, t8) { return [(s10[0] + t8[0]) / 2, (s10[1] + t8[1]) / 2]; } _mix(s10, t8, i8, h6) { return [s10[0] * t8 + i8[0] * h6, s10[1] * t8 + i8[1] * h6]; } _add(s10, t8) { return [s10[0] + t8[0], s10[1] + t8[1]]; } _add2(s10, t8, i8) { return [s10[0] + t8, s10[1] + i8]; } _sub(s10, t8) { return [s10[0] - t8[0], s10[1] - t8[1]]; } _dist(s10, t8) { return Math.sqrt((s10[0] - t8[0]) * (s10[0] - t8[0]) + (s10[1] - t8[1]) * (s10[1] - t8[1])); } _norm(s10) { return Math.sqrt(s10[0] * s10[0] + s10[1] * s10[1]); } _normalize(s10, t8 = 1) { const i8 = t8 / this._norm(s10); s10[0] *= i8, s10[1] *= i8; } _leftPerpendicular(s10) { const t8 = -s10[1], i8 = s10[0]; s10[0] = t8, s10[1] = i8; } _leftPerp(s10) { return [-s10[1], s10[0]]; } _rightPerpendicular(s10) { const t8 = s10[1], i8 = -s10[0]; s10[0] = t8, s10[1] = i8; } _rightPerp(s10) { return [s10[1], -s10[0]]; } _dotProduct(s10, t8) { return s10[0] * t8[0] + s10[1] * t8[1]; } _crossProduct(s10, t8) { return s10[0] * t8[1] - s10[1] * t8[0]; } _rotateDirect(s10, t8, i8) { const h6 = s10[0] * t8 - s10[1] * i8, e11 = s10[0] * i8 + s10[1] * t8; s10[0] = h6, s10[1] = e11; } _makeCtrlPt(s10) { const t8 = [s10[0], s10[1]]; return j2(t8, 1), t8; } _addAngledTicks(s10, t8, i8, h6) { const e11 = this._sub(i8, t8); this._normalize(e11); const r18 = this._crossProduct(e11, this._sub(h6, t8)); let _4; _4 = r18 > 0 ? this._rightPerp(e11) : this._leftPerp(e11); const c9 = Math.abs(r18) / 2, u9 = []; u9.push([t8[0] + (_4[0] - e11[0]) * c9, t8[1] + (_4[1] - e11[1]) * c9]), u9.push(t8), u9.push(i8), u9.push([i8[0] + (_4[0] + e11[0]) * c9, i8[1] + (_4[1] + e11[1]) * c9]), s10.push(u9); } _addBezier2(s10, t8, i8, h6, e11) { if (e11-- == 0) return void s10.push(h6); const r18 = this._mid(t8, i8), _4 = this._mid(i8, h6), c9 = this._mid(r18, _4); this._addBezier2(s10, t8, r18, c9, e11), this._addBezier2(s10, c9, _4, h6, e11); } _addBezier3(s10, t8, i8, h6, e11, r18) { if (r18-- == 0) return void s10.push(e11); const _4 = this._mid(t8, i8), c9 = this._mid(i8, h6), u9 = this._mid(h6, e11), o11 = this._mid(_4, c9), n17 = this._mid(c9, u9), a10 = this._mid(o11, n17); this._addBezier3(s10, t8, _4, o11, a10, r18), this._addBezier3(s10, a10, n17, u9, e11, r18); } _add90DegArc(s10, t8, i8, h6, e11) { const r18 = e11 ?? this._crossProduct(this._sub(i8, t8), this._sub(h6, t8)) > 0, _4 = this._mid(t8, i8), c9 = this._sub(_4, t8); r18 ? this._leftPerpendicular(c9) : this._rightPerpendicular(c9), _4[0] += c9[0], _4[1] += c9[1], this._addBezier3(s10, t8, this._mix(t8, 0.33333, _4, 0.66667), this._mix(i8, 0.33333, _4, 0.66667), i8, 4); } _addArrow(s10, t8, i8) { const h6 = t8[0], e11 = t8[1], r18 = t8[t8.length - 1], _4 = this._sub(h6, e11); this._normalize(_4); const c9 = this._crossProduct(_4, this._sub(r18, e11)), u9 = 0.5 * c9, o11 = this._leftPerp(_4), n17 = [r18[0] - o11[0] * c9, r18[1] - o11[1] * c9], a10 = t8.length - 1, p3 = []; p3.push(i8 ? [-o11[0], -o11[1]] : o11); let l9 = [-_4[0], -_4[1]]; for (let d2 = 1; d2 < a10 - 1; d2++) { const s11 = this._sub(t8[d2 + 1], t8[d2]); this._normalize(s11); const i9 = this._dotProduct(s11, l9), h7 = this._crossProduct(s11, l9), e12 = Math.sqrt((1 + i9) / 2), r19 = this._sub(s11, l9); this._normalize(r19), r19[0] /= e12, r19[1] /= e12, p3.push(h7 < 0 ? [-r19[0], -r19[1]] : r19), l9 = s11; } p3.push(this._rightPerp(l9)); for (let d2 = p3.length - 1; d2 > 0; d2--) s10.push([t8[d2][0] + p3[d2][0] * u9, t8[d2][1] + p3[d2][1] * u9]); s10.push([n17[0] + p3[0][0] * u9, n17[1] + p3[0][1] * u9]), s10.push([n17[0] + p3[0][0] * c9, n17[1] + p3[0][1] * c9]), s10.push(h6), s10.push([n17[0] - p3[0][0] * c9, n17[1] - p3[0][1] * c9]), s10.push([n17[0] - p3[0][0] * u9, n17[1] - p3[0][1] * u9]); for (let d2 = 1; d2 < p3.length; d2++) s10.push([t8[d2][0] - p3[d2][0] * u9, t8[d2][1] - p3[d2][1] * u9]); } _cp2(s10, t8, i8) { return s10.length >= 2 ? s10[1] : this._add2(s10[0], t8 * this._default_size, i8 * this._default_size); } _cp3(s10, t8, i8, h6) { if (s10.length >= 3) return s10[2]; const e11 = this._mix(s10[0], 1 - i8, t8, i8), r18 = this._sub(t8, s10[0]); return this._normalize(r18), this._rightPerpendicular(r18), [e11[0] + r18[0] * h6 * this._default_size, e11[1] + r18[1] * h6 * this._default_size]; } _arrowPath(s10) { if (s10.length > 2) return s10; const t8 = s10[0], i8 = this._cp2(s10, -4, 0), h6 = this._sub(t8, i8); this._normalize(h6); const e11 = this._rightPerp(h6); return [t8, i8, [t8[0] + (e11[0] - h6[0]) * this._default_size, t8[1] + (e11[1] - h6[1]) * this._default_size]]; } _arrowLastSeg(s10) { const t8 = s10[0], i8 = this._cp2(s10, -4, 0); let h6; if (s10.length >= 3) h6 = s10[s10.length - 1]; else { const s11 = this._sub(t8, i8); this._normalize(s11); const e11 = this._rightPerp(s11); h6 = [t8[0] + (e11[0] - s11[0]) * this._default_size, t8[1] + (e11[1] - s11[1]) * this._default_size]; } return [i8, h6]; } _processGeom(s10) { if (!s10) return null; const t8 = []; for (const i8 of s10) { if (!i8 || i8.length === 0) continue; const s11 = i8.length; let h6 = i8[0]; switch (this._rule) { case R.PerpendicularFromFirstSegment: { const s12 = this._cp2(i8, 0, -1), e11 = this._cp3(i8, s12, 0.5, 4), r18 = []; r18.push(e11), r18.push(this._mid(h6, s12)), t8.push(r18); break; } case R.ReversedFirstSegment: { const s12 = this._cp2(i8, 0, -1); t8.push([s12, h6]); break; } case R.PerpendicularToSecondSegment: { const s12 = this._cp2(i8, -4, 1), e11 = this._cp3(i8, s12, 0.882353, -1.94), r18 = []; r18.push(this._mid(s12, e11)), r18.push(h6), t8.push(r18); break; } case R.SecondSegmentWithTicks: { const s12 = this._cp2(i8, -4, 1), e11 = this._cp3(i8, s12, 0.882353, -1.94), r18 = this._sub(e11, s12); let _4; _4 = this._crossProduct(r18, this._sub(h6, s12)) > 0 ? this._rightPerp(_4) : this._leftPerp(r18); const c9 = []; c9.push([s12[0] + (_4[0] - r18[0]) / 3, s12[1] + (_4[1] - r18[1]) / 3]), c9.push(s12), c9.push(e11), c9.push([e11[0] + (_4[0] + r18[0]) / 3, e11[1] + (_4[1] + r18[1]) / 3]), t8.push(c9); break; } case R.DoublePerpendicular: { const s12 = this._cp2(i8, 0, -1), e11 = this._cp3(i8, s12, 0.5, 3), r18 = this._mid(h6, s12), _4 = this._sub(r18, e11); this._normalize(_4); const c9 = this._crossProduct(_4, this._sub(h6, e11)); this._leftPerpendicular(_4); const u9 = []; u9.push(h6), u9.push([e11[0] + _4[0] * c9, e11[1] + _4[1] * c9]), t8.push(u9); const o11 = []; o11.push([e11[0] - _4[0] * c9, e11[1] - _4[1] * c9]), o11.push(s12), t8.push(o11); break; } case R.OppositeToFirstSegment: { const s12 = this._cp2(i8, 0, -1), e11 = this._cp3(i8, s12, 0.5, 3), r18 = this._mid(h6, s12), _4 = this._sub(r18, e11); this._normalize(_4); const c9 = this._crossProduct(_4, this._sub(h6, e11)); this._leftPerpendicular(_4); const u9 = []; u9.push([e11[0] + _4[0] * c9, e11[1] + _4[1] * c9]), u9.push([e11[0] - _4[0] * c9, e11[1] - _4[1] * c9]), t8.push(u9); break; } case R.TriplePerpendicular: { const s12 = this._cp2(i8, 0, -1), e11 = this._cp3(i8, s12, 0.5, 4), r18 = this._mid(h6, s12), _4 = this._sub(r18, e11); this._normalize(_4); const c9 = this._crossProduct(_4, this._sub(h6, e11)); this._leftPerpendicular(_4); const u9 = []; u9.push([e11[0] + _4[0] * c9 * 0.8, e11[1] + _4[1] * c9 * 0.8]), u9.push([r18[0] + 0.8 * (h6[0] - r18[0]), r18[1] + 0.8 * (h6[1] - r18[1])]), t8.push(u9), t8.push([e11, r18]); const o11 = []; o11.push([e11[0] - _4[0] * c9 * 0.8, e11[1] - _4[1] * c9 * 0.8]), o11.push([r18[0] + 0.8 * (s12[0] - r18[0]), r18[1] + 0.8 * (s12[1] - r18[1])]), t8.push(o11); break; } case R.HalfCircleFirstSegment: { const s12 = this._cp2(i8, 0, -1), e11 = this._cp3(i8, s12, 0.5, 4), r18 = this._mid(h6, s12); let _4 = this._sub(s12, h6); const c9 = Math.cos(Math.PI / 18), u9 = Math.sin(Math.PI / 18), o11 = Math.sqrt((1 + c9) / 2), n17 = Math.sqrt((1 - c9) / 2), a10 = []; let p3; this._crossProduct(_4, this._sub(e11, h6)) > 0 ? (a10.push(h6), _4 = this._sub(h6, r18), p3 = s12) : (a10.push(s12), _4 = this._sub(s12, r18), p3 = h6), this._rotateDirect(_4, o11, n17), _4[0] /= o11, _4[1] /= o11; for (let t9 = 1; t9 <= 18; t9++) a10.push(this._add(r18, _4)), this._rotateDirect(_4, c9, u9); a10.push(p3), t8.push(a10); break; } case R.HalfCircleSecondSegment: { const s12 = this._cp2(i8, 0, -1), e11 = this._cp3(i8, s12, 1, -1); let r18 = this._sub(h6, s12); this._normalize(r18); const _4 = this._crossProduct(r18, this._sub(e11, s12)) / 2; this._leftPerpendicular(r18); const c9 = [s12[0] + r18[0] * _4, s12[1] + r18[1] * _4]; r18 = this._sub(s12, c9); const u9 = Math.cos(Math.PI / 18); let o11 = Math.sin(Math.PI / 18); _4 > 0 && (o11 = -o11); const n17 = [s12]; for (let t9 = 1; t9 <= 18; t9++) this._rotateDirect(r18, u9, o11), n17.push(this._add(c9, r18)); t8.push(n17); break; } case R.HalfCircleExtended: { const e11 = this._cp2(i8, 0, -2), r18 = this._cp3(i8, e11, 1, -1); let _4; if (s11 >= 4) _4 = i8[3]; else { const s12 = this._sub(h6, e11); _4 = this._add(r18, s12); } const c9 = this._dist(e11, r18) / 2 / 0.75, u9 = this._sub(e11, h6); this._normalize(u9, c9); const o11 = this._sub(r18, _4); this._normalize(o11, c9); const n17 = [_4, r18]; t8.push(n17); const a10 = [this._clone(r18)]; this._addBezier3(a10, r18, this._add(r18, o11), this._add(e11, u9), e11, 4), a10.push(h6), t8.push(a10); break; } case R.OpenCircle: { const s12 = this._cp2(i8, -2, 0), e11 = this._sub(s12, h6), r18 = Math.cos(Math.PI / 18), _4 = -Math.sin(Math.PI / 18), c9 = [s12]; for (let t9 = 1; t9 <= 33; t9++) this._rotateDirect(e11, r18, _4), c9.push(this._add(h6, e11)); t8.push(c9); break; } case R.CoverageEdgesWithTicks: { const e11 = this._cp2(i8, 0, -1); let r18, _4; if (s11 >= 3) r18 = i8[2]; else { const s12 = this._sub(e11, h6), t9 = this._leftPerp(s12); r18 = [h6[0] + t9[0] - 0.25 * s12[0], h6[1] + t9[1] - 0.25 * s12[1]]; } if (s11 >= 4) _4 = i8[3]; else { const s12 = this._mid(h6, e11), t9 = this._sub(h6, e11); this._normalize(t9), this._leftPerpendicular(t9); const i9 = this._crossProduct(t9, this._sub(r18, s12)); this._rightPerpendicular(t9), _4 = [r18[0] + t9[0] * i9 * 2, r18[1] + t9[1] * i9 * 2]; } const c9 = this._sub(e11, h6); let u9, o11; u9 = this._crossProduct(c9, this._sub(r18, h6)) > 0 ? this._rightPerp(c9) : this._leftPerp(c9), o11 = [], o11.push(r18), o11.push(h6), o11.push([h6[0] + (u9[0] - c9[0]) / 3, h6[1] + (u9[1] - c9[1]) / 3]), t8.push(o11), u9 = this._crossProduct(c9, this._sub(_4, e11)) > 0 ? this._rightPerp(u9) : this._leftPerp(c9), o11 = [], o11.push([e11[0] + (u9[0] + c9[0]) / 3, e11[1] + (u9[1] + c9[1]) / 3]), o11.push(e11), o11.push(_4), t8.push(o11); break; } case R.GapExtentWithDoubleTicks: { const e11 = this._cp2(i8, 0, 2), r18 = this._cp3(i8, e11, 0, 1); let _4; if (s11 >= 4) _4 = i8[3]; else { const s12 = this._sub(e11, h6); _4 = this._add(r18, s12); } this._addAngledTicks(t8, h6, e11, this._mid(r18, _4)), this._addAngledTicks(t8, r18, _4, this._mid(h6, e11)); break; } case R.GapExtentMidline: { const e11 = this._cp2(i8, 2, 0), r18 = this._cp3(i8, e11, 0, 1); let _4; if (s11 >= 4) _4 = i8[3]; else { const s12 = this._sub(e11, h6); _4 = this._add(r18, s12); } const c9 = []; c9.push(this._mid(h6, r18)), c9.push(this._mid(e11, _4)), t8.push(c9); break; } case R.Chevron: { const e11 = this._cp2(i8, -1, -1); let r18; if (s11 >= 3) r18 = i8[2]; else { const s12 = this._sub(e11, h6); this._leftPerpendicular(s12), r18 = this._add(h6, s12); } t8.push([e11, this._makeCtrlPt(h6), r18]); break; } case R.PerpendicularWithArc: { const s12 = this._cp2(i8, 0, -2), e11 = this._cp3(i8, s12, 0.5, -1); let r18 = this._sub(s12, h6); const _4 = this._norm(r18); r18[0] /= _4, r18[1] /= _4; const c9 = this._crossProduct(r18, this._sub(e11, h6)); let u9 = this._dotProduct(r18, this._sub(e11, h6)); u9 < 0.05 * _4 ? u9 = 0.05 * _4 : u9 > 0.95 * _4 && (u9 = 0.95 * _4); const o11 = [h6[0] + r18[0] * u9, h6[1] + r18[1] * u9]; this._leftPerpendicular(r18); let n17 = []; n17.push([o11[0] - r18[0] * c9, o11[1] - r18[1] * c9]), n17.push([o11[0] + r18[0] * c9, o11[1] + r18[1] * c9]), t8.push(n17); const a10 = [s12[0] + r18[0] * c9, s12[1] + r18[1] * c9]; r18 = this._sub(s12, a10); const p3 = Math.cos(Math.PI / 18); let l9 = Math.sin(Math.PI / 18); c9 < 0 && (l9 = -l9), n17 = [h6, s12]; for (let t9 = 1; t9 <= 9; t9++) this._rotateDirect(r18, p3, l9), n17.push(this._add(a10, r18)); t8.push(n17); break; } case R.ClosedHalfCircle: { const s12 = this._cp2(i8, 2, 0), e11 = this._mid(h6, s12), r18 = this._sub(s12, e11), _4 = Math.cos(Math.PI / 18), c9 = Math.sin(Math.PI / 18), u9 = [h6, s12]; for (let t9 = 1; t9 <= 18; t9++) this._rotateDirect(r18, _4, c9), u9.push(this._add(e11, r18)); t8.push(u9); break; } case R.TripleParallelExtended: { const s12 = this._cp2(i8, 0, -2), r18 = this._cp3(i8, s12, 1, -2), _4 = this._mid(h6, s12), c9 = this._sub(r18, s12); this._normalize(c9); const u9 = Math.abs(this._crossProduct(c9, this._sub(_4, s12))) / 2, o11 = this._dist(s12, r18), n17 = [s12, h6]; n17.push([h6[0] + c9[0] * o11 * 0.5, h6[1] + c9[1] * o11 * 0.5]), t8.push(n17); const a10 = []; a10.push([_4[0] - c9[0] * u9, _4[1] - c9[1] * u9]), a10.push([_4[0] + c9[0] * o11 * 0.375, _4[1] + c9[1] * o11 * 0.375]), j2(a10[a10.length - 1], 1), a10.push([_4[0] + c9[0] * o11 * 0.75, _4[1] + c9[1] * o11 * 0.75]), t8.push(a10); const p3 = [s12, r18]; t8.push(p3); break; } case R.ParallelWithTicks: { const s12 = this._cp2(i8, 3, 0), e11 = this._cp3(i8, s12, 0.5, -1), r18 = this._sub(e11, s12); this._normalize(r18); const _4 = this._crossProduct(r18, this._sub(e11, h6)); this._leftPerpendicular(r18), this._addAngledTicks(t8, h6, s12, e11), this._addAngledTicks(t8, this._mix(h6, 1, r18, _4), this._mix(s12, 1, r18, _4), this._mid(h6, s12)); break; } case R.Parallel: { const s12 = this._cp2(i8, 3, 0), e11 = this._cp3(i8, s12, 0.5, -1), r18 = this._sub(s12, h6); this._normalize(r18); const _4 = this._leftPerp(r18), c9 = this._crossProduct(r18, this._sub(e11, h6)); let u9 = [h6, s12]; t8.push(u9), u9 = [], u9.push([h6[0] + _4[0] * c9, h6[1] + _4[1] * c9]), u9.push([s12[0] + _4[0] * c9, s12[1] + _4[1] * c9]), t8.push(u9); break; } case R.PerpendicularToFirstSegment: { const s12 = this._cp2(i8, 3, 0), e11 = this._cp3(i8, s12, 0.5, -1), r18 = this._mid(h6, s12), _4 = this._sub(s12, h6); this._normalize(_4); const c9 = this._crossProduct(_4, this._sub(e11, h6)); this._leftPerpendicular(_4); const u9 = []; u9.push([r18[0] - _4[0] * c9 * 0.25, r18[1] - _4[1] * c9 * 0.25]), u9.push([r18[0] + _4[0] * c9 * 1.25, r18[1] + _4[1] * c9 * 1.25]), t8.push(u9); break; } case R.ParallelOffset: { const s12 = this._cp2(i8, 3, 0), e11 = this._cp3(i8, s12, 0.5, -1), r18 = this._sub(s12, h6); this._normalize(r18); const _4 = this._crossProduct(r18, this._sub(e11, h6)); this._leftPerpendicular(r18); const c9 = []; c9.push([h6[0] - r18[0] * _4, h6[1] - r18[1] * _4]), c9.push([s12[0] - r18[0] * _4, s12[1] - r18[1] * _4]), t8.push(c9); const u9 = []; u9.push([h6[0] + r18[0] * _4, h6[1] + r18[1] * _4]), u9.push([s12[0] + r18[0] * _4, s12[1] + r18[1] * _4]), t8.push(u9); break; } case R.OffsetOpposite: { const s12 = this._cp2(i8, 3, 0), e11 = this._cp3(i8, s12, 0.5, -1), r18 = this._sub(s12, h6); this._normalize(r18); const _4 = this._crossProduct(r18, this._sub(e11, h6)); this._leftPerpendicular(r18); const c9 = []; c9.push([h6[0] - r18[0] * _4, h6[1] - r18[1] * _4]), c9.push([s12[0] - r18[0] * _4, s12[1] - r18[1] * _4]), t8.push(c9); break; } case R.OffsetSame: { const s12 = this._cp2(i8, 3, 0), e11 = this._cp3(i8, s12, 0.5, -1), r18 = this._sub(s12, h6); this._normalize(r18); const _4 = this._crossProduct(r18, this._sub(e11, h6)); this._leftPerpendicular(r18); const c9 = []; c9.push([h6[0] + r18[0] * _4, h6[1] + r18[1] * _4]), c9.push([s12[0] + r18[0] * _4, s12[1] + r18[1] * _4]), t8.push(c9); break; } case R.CircleWithArc: { let r18 = this._cp2(i8, 3, 0); const _4 = this._cp3(i8, r18, 0.5, -1); let c9, u9; if (s11 >= 4) c9 = i8[3], u9 = this._crossProduct(this._sub(c9, r18), this._sub(_4, r18)) > 0; else { c9 = r18, u9 = this._crossProduct(this._sub(c9, h6), this._sub(_4, h6)) > 0; const s12 = 24 * this._geomUnitsPerPoint, t9 = this._sub(c9, h6); this._normalize(t9, s12); const i9 = Math.sqrt(2) / 2; this._rotateDirect(t9, i9, u9 ? i9 : -i9), r18 = this._add(h6, t9); } const o11 = this._sub(r18, h6), n17 = Math.cos(Math.PI / 18), a10 = Math.sin(Math.PI / 18), p3 = [r18]; for (let s12 = 1; s12 <= 36; s12++) this._rotateDirect(o11, n17, a10), p3.push(this._add(h6, o11)); this._add90DegArc(p3, r18, c9, _4, u9), j2(p3[p3.length - 8], 1), t8.push(p3); break; } case R.DoubleJog: { let e11, r18, _4 = this._cp2(i8, -3, 1); if (e11 = s11 >= 3 ? i8[2] : this._add(h6, this._sub(h6, _4)), s11 >= 4) r18 = i8[3]; else { const s12 = h6; h6 = _4, r18 = e11; const t9 = this._dist(h6, s12), i9 = this._dist(r18, s12); let c10 = 30 * this._geomUnitsPerPoint; 0.5 * t9 < c10 && (c10 = 0.5 * t9), 0.5 * i9 < c10 && (c10 = 0.5 * i9), _4 = this._mix(h6, c10 / t9, s12, (t9 - c10) / t9), e11 = this._mix(r18, c10 / i9, s12, (i9 - c10) / i9); } const c9 = this._mid(h6, _4), u9 = this._mid(r18, e11), o11 = this._dist(h6, _4), n17 = this._dist(e11, r18); let a10 = Math.min(o11, n17) / 8; a10 = Math.min(a10, 24 * this._geomUnitsPerPoint); const p3 = Math.cos(Math.PI / 4); let l9 = this._sub(h6, _4); this._normalize(l9, a10), this._crossProduct(l9, this._sub(r18, _4)) > 0 ? this._rotateDirect(l9, p3, -p3) : this._rotateDirect(l9, p3, p3); let d2 = []; d2.push(_4), d2.push(this._add(c9, l9)), d2.push(this._sub(c9, l9)), d2.push(h6), t8.push(d2), l9 = this._sub(r18, e11), this._normalize(l9, a10), this._crossProduct(l9, this._sub(h6, e11)) < 0 ? this._rotateDirect(l9, p3, p3) : this._rotateDirect(l9, p3, -p3), d2 = [], d2.push(e11), d2.push(this._add(u9, l9)), d2.push(this._sub(u9, l9)), d2.push(r18), t8.push(d2); break; } case R.PerpendicularOffset: { const s12 = this._cp2(i8, -4, 1), e11 = this._cp3(i8, s12, 0.882353, -1.94), r18 = this._sub(e11, s12); this._crossProduct(r18, this._sub(h6, s12)) > 0 ? this._rightPerpendicular(r18) : this._leftPerpendicular(r18); const _4 = [r18[0] / 8, r18[1] / 8], c9 = this._sub(this._mid(s12, e11), _4); t8.push([c9, h6]); break; } case R.LineExcludingLastSegment: { const s12 = this._arrowPath(i8), h7 = []; let e11 = s12.length - 2; for (; e11--; ) h7.push(s12[e11]); t8.push(h7); break; } case R.MultivertexArrow: { const s12 = this._arrowPath(i8), h7 = []; this._addArrow(h7, s12, false), t8.push(h7); break; } case R.CrossedArrow: { const s12 = this._arrowPath(i8), h7 = []; this._addArrow(h7, s12, true), t8.push(h7); break; } case R.ChevronArrow: { const [s12, e11] = this._arrowLastSeg(i8), r18 = 10 * this._geomUnitsPerPoint, _4 = this._sub(h6, s12); this._normalize(_4); const c9 = this._crossProduct(_4, this._sub(e11, s12)), u9 = this._leftPerp(_4), o11 = [e11[0] - u9[0] * c9 * 2, e11[1] - u9[1] * c9 * 2], n17 = []; n17.push([e11[0] + _4[0] * r18, e11[1] + _4[1] * r18]), n17.push(h6), n17.push([o11[0] + _4[0] * r18, o11[1] + _4[1] * r18]), t8.push(n17); break; } case R.ChevronArrowOffset: { const [s12, e11] = this._arrowLastSeg(i8), r18 = this._sub(h6, s12); this._normalize(r18); const _4 = this._crossProduct(r18, this._sub(e11, s12)); this._leftPerpendicular(r18); const c9 = [e11[0] - r18[0] * _4, e11[1] - r18[1] * _4], u9 = []; u9.push([c9[0] + r18[0] * _4 * 0.5, c9[1] + r18[1] * _4 * 0.5]), u9.push(this._mid(c9, h6)), u9.push([c9[0] - r18[0] * _4 * 0.5, c9[1] - r18[1] * _4 * 0.5]), t8.push(u9); break; } case R.PartialFirstSegment: { const [s12, e11] = this._arrowLastSeg(i8), r18 = this._sub(h6, s12); this._normalize(r18); const _4 = this._crossProduct(r18, this._sub(e11, s12)); this._leftPerpendicular(r18); const c9 = [e11[0] - r18[0] * _4, e11[1] - r18[1] * _4]; t8.push([s12, c9]); break; } case R.Arch: { const s12 = this._cp2(i8, 0, -1), e11 = this._cp3(i8, s12, 0.5, 1), r18 = this._sub(h6, s12), _4 = this._mix(e11, 1, r18, 0.55), c9 = this._mix(e11, 1, r18, -0.55), u9 = [h6]; this._addBezier2(u9, h6, _4, e11, 4), this._addBezier2(u9, e11, c9, s12, 4), t8.push(u9); break; } case R.CurvedParallelTicks: { const s12 = this._cp2(i8, -4, 1), e11 = this._cp3(i8, s12, 0.882353, -1.94), r18 = this._sub(e11, s12); this._crossProduct(r18, this._sub(h6, s12)) > 0 ? this._rightPerpendicular(r18) : this._leftPerpendicular(r18); const _4 = [r18[0] / 8, r18[1] / 8], c9 = this._sub(this._mid(s12, e11), _4), u9 = this._sub(this._mix(s12, 0.75, e11, 0.25), _4), o11 = this._sub(this._mix(s12, 0.25, e11, 0.75), _4), n17 = [s12]; this._addBezier2(n17, s12, u9, c9, 3), this._addBezier2(n17, c9, o11, e11, 3), t8.push(n17); for (let i9 = 0; i9 < 8; i9++) { const s13 = n17[2 * i9 + 1], h7 = [this._clone(s13)]; h7.push(this._add(s13, [r18[0] / 4, r18[1] / 4])), t8.push(h7); } break; } case R.Arc90Degrees: { const s12 = this._cp2(i8, 0, -1), e11 = this._cp3(i8, s12, 0.5, 1), r18 = [s12]; this._add90DegArc(r18, s12, h6, e11), t8.push(r18); break; } case R.FullGeometry: default: t8.push(i8); } } return t8; } }; // node_modules/@arcgis/core/symbols/cim/effects/EffectCut.js var u6 = class { static local() { return u6.instance === null && (u6.instance = new u6()), u6.instance; } execute(e11, t8, u9, i8) { return new s7(e11, t8, u9); } }; u6.instance = null; var s7 = class extends U3 { constructor(e11, u9, s10) { super(e11, true, true), this._curveHelper = new n7(), this._beginCut = (u9.beginCut !== void 0 ? u9.beginCut : 1) * s10, this._endCut = (u9.endCut !== void 0 ? u9.endCut : 1) * s10, this._middleCut = (u9.middleCut !== void 0 ? u9.middleCut : 0) * s10, this._invert = u9.invert !== void 0 && u9.invert, this._beginCut < 0 && (this._beginCut = 0), this._endCut < 0 && (this._endCut = 0), this._middleCut < 0 && (this._middleCut = 0); } processPath(e11) { const t8 = this._beginCut, u9 = this._endCut, s10 = this._middleCut, i8 = this._curveHelper.calculatePathLength(e11), r18 = []; if (this._invert) if (t8 === 0 && u9 === 0 && s10 === 0) ; else if (t8 + u9 + s10 >= i8) r18.push(e11); else { let n17 = this._curveHelper.getSubCurve(e11, 0, t8); n17 && r18.push(n17), n17 = this._curveHelper.getSubCurve(e11, 0.5 * (i8 - s10), 0.5 * (i8 + s10)), n17 && r18.push(n17), n17 = this._curveHelper.getSubCurve(e11, i8 - u9, u9), n17 && r18.push(n17); } else if (t8 === 0 && u9 === 0 && s10 === 0) r18.push(e11); else if (t8 + u9 + s10 >= i8) ; else if (s10 === 0) { const s11 = this._curveHelper.getSubCurve(e11, t8, i8 - u9); s11 && r18.push(s11); } else { let n17 = this._curveHelper.getSubCurve(e11, t8, 0.5 * (i8 - s10)); n17 && r18.push(n17), n17 = this._curveHelper.getSubCurve(e11, 0.5 * (i8 + s10), i8 - u9), n17 && r18.push(n17); } return r18.length === 0 ? null : { paths: r18 }; } }; // node_modules/@arcgis/core/symbols/cim/GeometryWalker.js var i5 = 1e-7; var n8 = class { constructor() { this._values = [], this.extPtGap = 0, this.ctrlPtGap = 0, this._length = 0, this._currentValue = 0; } isEmpty() { return this._values.length === 0; } size() { return this._values.length; } init(t8, s10, e11 = true) { if (this._setEmpty(), !t8 || t8.length === 0) return false; for (let n17 = 0; n17 < t8.length; n17++) { let s11 = Math.abs(t8[n17]); e11 && s11 < i5 && (s11 = i5), this._values.push(s11), this._length += s11; } return s10 && 1 & t8.length && (this._length *= 2), this._length !== 0 && (this.ctrlPtGap = this.extPtGap = 0, this._currentValue = -1, true); } scale(t8) { const s10 = this._values ? this._values.length : 0; for (let e11 = 0; e11 < s10; ++e11) this._values[e11] *= t8; this._length *= t8, this.extPtGap *= t8, this.ctrlPtGap *= t8; } addValue(t8) { this._length += t8, this._values.push(t8); } firstValue() { return this._values[0]; } lastValue() { return this._values[this._values.length - 1]; } nextValue() { return this._currentValue++, this._currentValue === this._values.length && (this._currentValue = 0), this._values[this._currentValue]; } reset() { this._currentValue = -1; } length() { return this._length; } _setEmpty() { this.extPtGap = this.ctrlPtGap = this._length = 0, this._currentValue = -1, this._values.length = 0; } }; var h4; !function(t8) { t8[t8.FAIL = 0] = "FAIL", t8[t8.END = 1] = "END", t8[t8.CONTINUE = 2] = "CONTINUE"; }(h4 || (h4 = {})); var r8 = class { constructor() { this.reset(); } reset() { this.segment = -1, this.segmentLength = 0, this.abscissa = 0, this.isPathEnd = false, this.isPartEnd = false; } isValid() { return this.segment !== -1; } copyTo(t8) { t8.segment = this.segment, t8.segmentLength = this.segmentLength, t8.abscissa = this.abscissa, t8.isPathEnd = this.isPathEnd, t8.isPartEnd = this.isPartEnd; } }; var a5 = class extends n7 { constructor(t8 = 0, s10 = false) { super(t8, s10), this._tolerance = e8, this._currentPosition = new r8(); } updateTolerance(t8) { this._tolerance = e8 * t8; } init(t8, s10, e11 = true) { return e11 ? (this._patternLength = s10.length(), this._partExtPtGap = s10.extPtGap, this._partCtrlPtGap = s10.ctrlPtGap) : (this._patternLength = 0, this._partExtPtGap = 0, this._partCtrlPtGap = 0), this._currentPosition.reset(), this._partSegCount = 0, this._path = t8, this._seg = -1, this._setPosAtNextPart(); } curPositionIsValid() { return this._currentPosition.isValid(); } nextPosition(t8, s10 = h4.FAIL) { const e11 = new r8(); return !!this._nextPosition(t8, e11, null, s10) && (e11.copyTo(this._currentPosition), true); } curPointAndAngle(t8) { t8.pt = this._getPoint(this._currentPosition); const [s10, e11] = this._getAngle(this._currentPosition); t8.ca = s10, t8.sa = e11; } nextPointAndAngle(t8, s10, e11 = h4.FAIL) { const i8 = new r8(); if (!this._nextPosition(t8, i8, null, e11)) return false; i8.copyTo(this._currentPosition), s10.pt = this._getPoint(i8); const [n17, a10] = this._getAngle(i8); return s10.ca = n17, s10.sa = a10, true; } nextCurve(t8) { if (t8 === 0) return null; const s10 = [], e11 = new r8(); return this._nextPosition(t8, e11, s10, h4.END) ? (e11.copyTo(this._currentPosition), s10) : null; } isPathEnd() { return this._currentPosition.isPathEnd; } getPathEnd() { if (this._currentPosition.segment === -1) throw new Error("missing segment"); return this._path[this._currentPosition.segment + 1]; } _nextPosition(t8, s10, e11, i8) { if (this._currentPosition.isPathEnd) return false; let n17 = this._currentPosition.abscissa; for (this._currentPosition.segmentLength > 0 && (n17 /= this._currentPosition.segmentLength), this._currentPosition.copyTo(s10); s10.abscissa + t8 * this._partLengthRatio > s10.segmentLength + this._tolerance; ) { if (e11) { if (e11.length === 0) if (n17 === 0) { const t10 = this._path[s10.segment]; e11.push([t10[0], t10[1]]); } else e11.push(this.getSegCoord2D(this._path, s10.segment, n17)); const t9 = this._path[s10.segment + 1]; e11.push([t9[0], t9[1]]); } if (n17 = 0, t8 -= (s10.segmentLength - s10.abscissa) / this._partLengthRatio, this._partSegCount) s10.segment = this._nextSegment(), s10.segmentLength = this.calculateSegLength(this._path, s10.segment), s10.abscissa = 0, this._partSegCount--; else { if (!this._setPosAtNextPart()) return i8 !== h4.FAIL && (s10.segmentLength = this.calculateSegLength(this._path, s10.segment), s10.isPartEnd = true, i8 === h4.END ? (s10.abscissa = s10.segmentLength, s10.isPathEnd = true) : s10.abscissa = s10.segmentLength + t8, true); this._currentPosition.copyTo(s10); } } if (s10.abscissa += t8 * this._partLengthRatio, e11) { if (e11.length === 0) if (n17 === 0) { const t10 = this._path[s10.segment]; e11.push([t10[0], t10[1]]); } else e11.push(this.getSegCoord2D(this._path, s10.segment, n17)); const t9 = s10.abscissa / s10.segmentLength; if (t9 === 1) { const t10 = this._path[s10.segment + 1]; e11.push([t10[0], t10[1]]); } else e11.push(this.getSegCoord2D(this._path, s10.segment, t9)); } return this._partSegCount || Math.abs(s10.abscissa - s10.segmentLength) < this._tolerance && (s10.isPathEnd = this._partIsLast, s10.isPartEnd = true), true; } _getPoint(t8) { if (t8.segment === -1) throw new Error("missing segment"); const s10 = t8.segmentLength <= 0 ? 0 : t8.abscissa / t8.segmentLength; return this.getSegCoord2D(this._path, t8.segment, s10); } _getAngle(t8) { if (t8.segment === -1) throw new Error("missing segment"); const s10 = t8.segmentLength <= 0 ? 0 : t8.abscissa / t8.segmentLength; return this.getSegAngleCS(this._path, t8.segment, s10); } _setPosAtNextPart() { for (; this._partSegCount; ) this._hasNextSegment() && this._nextSegment(), this._partSegCount--; if (!this._hasNextSegment()) return false; for (this._partLength = 0, this._partIsLast = true, this._partSegCount = 0; this._hasNextSegment(); ) if (this._partLength += this.calculateSegLength(this._path, this._nextSegment()), this._partSegCount++, I(this._path[this._getEndPointIndex()]) === 1) { this._partIsLast = !this._hasNextSegment(); break; } let s10 = this._partSegCount; for (; s10; ) this._previousSegment(), --s10; this._currentPosition.segment = this._nextSegment(), this._currentPosition.segmentLength = this.calculateSegLength(this._path, this._currentPosition.segment), this._currentPosition.abscissa = 0, this._currentPosition.isPathEnd = this._currentPosition.isPartEnd = false, --this._partSegCount; const e11 = this._getStartPointIndex(); this._ctrlPtBegin = I(this._path[e11]) === 1; let i8 = e11 + this._partSegCount + 1; if (i8 >= this._path.length && (i8 = 0), this._ctrlPtEnd = I(this._path[i8]) === 1, this._patternLength > 0) { const t8 = this._ctrlPtBegin ? this._partCtrlPtGap : this._partExtPtGap, s11 = this._ctrlPtEnd ? this._partCtrlPtGap : this._partExtPtGap; let e12 = Math.round((this._partLength - (t8 + s11)) / this._patternLength); e12 <= 0 && (e12 = t8 + s11 > 0 ? 0 : 1), this._partLengthRatio = this._partLength / (t8 + s11 + e12 * this._patternLength), this._partLengthRatio < 0.01 && (this._partLengthRatio = 1); } else this._partLengthRatio = 1; return true; } _hasNextSegment() { return this._seg < this._path.length - 2; } _previousSegment() { return --this._seg; } _nextSegment() { return ++this._seg; } _getStartPointIndex() { return this._seg; } _getEndPointIndex() { return this._seg + 1; } }; // node_modules/@arcgis/core/symbols/cim/effects/EffectDashes.js var r9 = class { static local() { return r9.instance === null && (r9.instance = new r9()), r9.instance; } execute(t8, e11, s10, a10) { return new n9(t8, e11, s10); } }; r9.instance = null; var n9 = class extends U3 { constructor(t8, e11, s10) { super(t8, true, true), this._walker = new a5(), this._walker.updateTolerance(s10), this._endings = e11.lineDashEnding, this._customDashPos = -(e11.offsetAlongLine ?? 0) * s10, this._offsetAtEnd = (e11.customEndingOffset ?? 0) * s10, this._pattern = new n8(), this._pattern.init(e11.dashTemplate, true), this._pattern.scale(s10); } processPath(t8) { if (this._pattern.length() === 0) return this.iteratePath = false, { paths: [t8] }; if (!this.iteratePath) { let e11 = true; switch (this._endings) { case k.HalfPattern: case k.HalfGap: default: this._pattern.extPtGap = 0; break; case k.FullPattern: this.isClosed || (this._pattern.extPtGap = 0.5 * this._pattern.firstValue()); break; case k.FullGap: this.isClosed || (this._pattern.extPtGap = 0.5 * this._pattern.lastValue()); break; case k.NoConstraint: this.isClosed || (e11 = false); break; case k.Custom: this.isClosed || (this._pattern.extPtGap = 0.5 * this._offsetAtEnd); } const a11 = this._walker.calculatePathLength(t8); if (this._pattern.isEmpty() || a11 < 0.1 * this._pattern.length()) return { paths: [t8] }; if (!this._walker.init(t8, this._pattern, e11)) return { paths: [t8] }; } let a10; if (this.iteratePath) a10 = this._pattern.nextValue(); else { let t9; switch (this._endings) { case k.HalfPattern: default: t9 = 0.5 * this._pattern.firstValue(); break; case k.HalfGap: t9 = 0.5 * -this._pattern.lastValue(); break; case k.FullGap: t9 = -this._pattern.lastValue(); break; case k.FullPattern: t9 = 0; break; case k.NoConstraint: case k.Custom: t9 = -this._customDashPos; } let e11 = t9 / this._pattern.length(); e11 -= Math.floor(e11), t9 = e11 * this._pattern.length(), this._pattern.reset(), a10 = this._pattern.nextValue(); let i9 = false; for (; t9 >= a10; ) t9 -= a10, a10 = this._pattern.nextValue(), i9 = !i9; a10 -= t9, i9 ? (this._walker.nextPosition(a10), a10 = this._pattern.nextValue()) : this.isClosed && (this._firstCurve = this._walker.nextCurve(a10), a10 = this._pattern.nextValue(), this._walker.nextPosition(a10), a10 = this._pattern.nextValue()); } let i8 = this._walker.nextCurve(a10); return i8 ? this._walker.isPathEnd() ? (this.iteratePath = false, this._firstCurve && (this._firstCurve.splice(0, 1), s6.mergePath(i8, this._firstCurve), this._firstCurve = null)) : (a10 = this._pattern.nextValue(), !this._walker.nextPosition(a10) || this._walker.isPathEnd() ? (this.iteratePath = false, this._firstCurve && (i8 = this._firstCurve, this._firstCurve = null)) : this.iteratePath = true) : (this.iteratePath = false, i8 = this._firstCurve, this._firstCurve = null), { paths: [i8] }; } }; // node_modules/@arcgis/core/symbols/cim/effects/EffectDonut.js var r10 = class { static local() { return r10.instance === null && (r10.instance = new r10()), r10.instance; } execute(t8, i8, e11, s10) { return new m5(t8, i8, e11); } }; r10.instance = null; var m5 = class { constructor(t8, i8, r18) { switch (this._inputGeometries = t8, this._curveHelper = new n7(), this._width = (i8.width !== void 0 ? i8.width : 2) * r18, i8.method) { case B.Mitered: default: this._method = O.Mitered; break; case B.Bevelled: this._method = O.Bevelled; break; case B.Rounded: case B.TrueBuffer: this._method = O.Rounded; break; case B.Square: this._method = O.Square; } this._option = i8.option, this._offsetFlattenError = e8 * r18; } next() { let e11 = this._inputGeometries.next(); for (; e11; ) { if (s3(e11) && this._width > 0) { if (Math.min(e11.xmax - e11.xmin, e11.ymax - e11.ymin) - 2 * this._width < 0) return e11; const t8 = []; return t8.push([[e11.xmin, e11.ymin], [e11.xmin, e11.ymax], [e11.xmax, e11.ymax], [e11.xmax, e11.ymin], [e11.xmin, e11.ymin]]), t8.push([[e11.xmin + this._width, e11.ymin + this._width], [e11.xmax - this._width, e11.ymin + this._width], [e11.xmax - this._width, e11.ymax - this._width], [e11.xmin + this._width, e11.ymax - this._width], [e11.xmin + this._width, e11.ymin + this._width]]), { rings: t8 }; } if (c2(e11) && this._width > 0) { const t8 = []; for (const i8 of e11.rings) { const e12 = this._curveHelper.calculatePathLength(i8), s10 = this._curveHelper.offset(i8, this._width, this._method, 4, this._offsetFlattenError); s10 && (e12 < 0 && s10.reverse(), t8.push(s10)); } if (t8.length) return { rings: t8 }; } e11 = this._inputGeometries.next(); } return null; } }; // node_modules/@arcgis/core/symbols/cim/effects/EffectJog.js var s8 = class { static local() { return s8.instance === null && (s8.instance = new s8()), s8.instance; } execute(t8, i8, s10, n17) { return new e9(t8, i8, s10); } }; s8.instance = null; var e9 = class extends U3 { constructor(t8, s10, e11) { super(t8, false, true), this._curveHelper = new n7(), this._length = (s10.length !== void 0 ? s10.length : 20) * e11, this._angle = s10.angle !== void 0 ? s10.angle : 225, this._position = s10.position !== void 0 ? s10.position : 50, this._length < 0 && (this._length = -this._length), this._position < 20 && (this._position = 20), this._position > 80 && (this._position = 80), this._mirror = false; } processPath(t8) { if (this._curveHelper.isEmpty(t8, false)) return null; const i8 = t8[0], s10 = t8[t8.length - 1], e11 = [s10[0] - i8[0], s10[1] - i8[1]]; this._curveHelper.normalize(e11); const n17 = [i8[0] + (s10[0] - i8[0]) * this._position / 100, i8[1] + (s10[1] - i8[1]) * this._position / 100], h6 = Math.cos((90 - this._angle) / 180 * Math.PI); let r18 = Math.sin((90 - this._angle) / 180 * Math.PI); this._mirror && (r18 = -r18), this._mirror = !this._mirror; return { paths: [[i8, [n17[0] - this._length / 2 * h6, n17[1] - this._length / 2 * r18], [n17[0] + this._length / 2 * h6, n17[1] + this._length / 2 * r18], s10]] }; } }; // node_modules/@arcgis/core/symbols/cim/effects/EffectMove.js var n10 = class { static local() { return n10.instance === null && (n10.instance = new n10()), n10.instance; } execute(t8, s10, e11, i8) { return new r11(t8, s10, e11); } }; n10.instance = null; var r11 = class { constructor(t8, s10, e11) { this._inputGeometries = t8, this._offsetX = s10.offsetX !== void 0 ? s10.offsetX * e11 : 0, this._offsetY = s10.offsetY !== void 0 ? -s10.offsetY * e11 : 0; } next() { let n17 = this._inputGeometries.next(); for (; n17; ) { if (s3(n17)) return { xmin: n17.xmin + this._offsetX, xmax: n17.xmax + this._offsetX, ymin: n17.ymin + this._offsetY, ymax: n17.ymax + this._offsetY }; if (c2(n17)) { const s10 = m(n17); return this._moveMultipath(s10.rings, this._offsetX, this._offsetY), s10; } if (y(n17)) { const s10 = m(n17); return this._moveMultipath(s10.paths, this._offsetX, this._offsetY), s10; } if (f(n17)) { const s10 = m(n17); return this._movePath(s10.points, this._offsetX, this._offsetY), s10; } if (l(n17)) return { x: n17.x + this._offsetX, y: n17.y + this._offsetY }; n17 = this._inputGeometries.next(); } return null; } _moveMultipath(t8, s10, e11) { if (t8) for (const i8 of t8) this._movePath(i8, s10, e11); } _movePath(t8, s10, e11) { if (t8) for (const i8 of t8) i8[0] += s10, i8[1] += e11; } }; // node_modules/@arcgis/core/symbols/cim/effects/EffectOffset.js var r12 = class { static local() { return r12.instance === null && (r12.instance = new r12()), r12.instance; } execute(t8, e11, s10, i8) { return new f7(t8, e11, s10); } }; r12.instance = null; var f7 = class { constructor(t8, e11, s10) { this._inputGeometries = t8, this._curveHelper = new n7(), this._offset = (e11.offset ?? 1) * s10, this._method = e11.method, this._option = e11.option, this._offsetFlattenError = e8 * s10; } next() { let i8 = this._inputGeometries.next(); for (; i8; ) { if (this._offset === 0) return i8; if (s3(i8)) { if (this._method === O.Rounded && this._offset > 0) { const t8 = [[i8.xmin, i8.ymin], [i8.xmin, i8.ymax], [i8.xmax, i8.ymax], [i8.xmax, i8.ymin], [i8.xmin, i8.ymin]], e11 = this._curveHelper.offset(t8, -this._offset, this._method, 4, this._offsetFlattenError); return e11 ? { rings: [e11] } : null; } if (Math.min(i8.xmax - i8.xmin, i8.ymax - i8.ymin) + 2 * this._offset > 0) return { xmin: i8.xmin - this._offset, xmax: i8.xmax + this._offset, ymin: i8.ymin - this._offset, ymax: i8.ymax + this._offset }; } if (c2(i8)) { const t8 = []; for (const e11 of i8.rings) { const s10 = this._curveHelper.offset(e11, -this._offset, this._method, 4, this._offsetFlattenError); s10 && t8.push(s10); } if (t8.length) return { rings: t8 }; } if (y(i8)) { const t8 = []; for (const e11 of i8.paths) { const s10 = this._curveHelper.offset(e11, -this._offset, this._method, 4, this._offsetFlattenError); s10 && t8.push(s10); } if (t8.length) return { paths: t8 }; } i8 = this._inputGeometries.next(); } return null; } }; // node_modules/@arcgis/core/symbols/cim/effects/EffectReverse.js var s9 = class { static local() { return s9.instance === null && (s9.instance = new s9()), s9.instance; } execute(e11, t8, r18, s10) { return new n11(e11, t8, r18); } }; s9.instance = null; var n11 = class { constructor(e11, t8, r18) { this._inputGeometries = e11, this._reverse = t8.reverse === void 0 || t8.reverse; } next() { let s10 = this._inputGeometries.next(); for (; s10; ) { if (!this._reverse) return s10; if (y(s10)) { const t8 = m(s10); return g2(t8.paths), t8; } s10 = this._inputGeometries.next(); } return null; } }; // node_modules/@arcgis/core/symbols/cim/effects/EffectRotate.js var u7 = class { static local() { return u7.instance === null && (u7.instance = new u7()), u7.instance; } execute(t8, n17, e11, r18) { return new c7(t8, n17, e11); } }; u7.instance = null; var c7 = class { constructor(t8, n17, e11) { this._inputGeometries = t8, this._rotateAngle = n17.angle !== void 0 ? n17.angle * Math.PI / 180 : 0; } next() { let u9 = this._inputGeometries.next(); for (; u9; ) { if (this._rotateAngle === 0) return u9; const c9 = u2(); c(c9, u9); const l9 = (c9[2] + c9[0]) / 2, m7 = (c9[3] + c9[1]) / 2; if (s3(u9)) { const t8 = { rings: [[[u9.xmin, u9.ymin], [u9.xmin, u9.ymax], [u9.xmax, u9.ymax], [u9.xmax, u9.ymin], [u9.xmin, u9.ymin]]] }; return this._rotateMultipath(t8.rings, l9, m7), t8; } if (c2(u9)) { const n17 = m(u9); return this._rotateMultipath(n17.rings, l9, m7), n17; } if (y(u9)) { const n17 = m(u9); return this._rotateMultipath(n17.paths, l9, m7), n17; } if (f(u9)) { const n17 = m(u9); return this._rotatePath(n17.points, l9, m7), n17; } if (l(u9)) return u9; u9 = this._inputGeometries.next(); } return null; } _rotateMultipath(t8, n17, e11) { if (t8) for (const r18 of t8) this._rotatePath(r18, n17, e11); } _rotatePath(t8, n17, e11) { if (t8) { const r18 = Math.cos(this._rotateAngle), i8 = Math.sin(this._rotateAngle); for (const o11 of t8) { const t9 = o11[0] - n17, s10 = o11[1] - e11; o11[0] = n17 + t9 * r18 - s10 * i8, o11[1] = e11 + t9 * i8 + s10 * r18; } } } }; // node_modules/@arcgis/core/symbols/cim/effects/EffectScale.js var c8 = class { static local() { return c8.instance === null && (c8.instance = new c8()), c8.instance; } execute(t8, s10, i8, r18) { return new l7(t8, s10, i8); } }; c8.instance = null; var l7 = class { constructor(t8, s10, i8) { this._inputGeometries = t8, this._xFactor = s10.xScaleFactor !== void 0 ? s10.xScaleFactor : 1.15, this._yFactor = s10.yScaleFactor !== void 0 ? s10.yScaleFactor : 1.15; } next() { let c9 = this._inputGeometries.next(); for (; c9; ) { if (this._xFactor === 1 && this._yFactor === 1) return c9; const l9 = u2(); c(l9, c9); const u9 = (l9[2] + l9[0]) / 2, m7 = (l9[3] + l9[1]) / 2; if (s3(c9)) { const t8 = { rings: [[[c9.xmin, c9.ymin], [c9.xmin, c9.ymax], [c9.xmax, c9.ymax], [c9.xmax, c9.ymin], [c9.xmin, c9.ymin]]] }; return this._scaleMultipath(t8.rings, u9, m7), t8; } if (c2(c9)) { const s10 = m(c9); return this._scaleMultipath(s10.rings, u9, m7), s10; } if (y(c9)) { const s10 = m(c9); return this._scaleMultipath(s10.paths, u9, m7), s10; } if (f(c9)) { const s10 = m(c9); return this._scalePath(s10.points, u9, m7), s10; } if (l(c9)) return c9; c9 = this._inputGeometries.next(); } return null; } _scaleMultipath(t8, s10, i8) { if (t8) for (const r18 of t8) this._scalePath(r18, s10, i8); } _scalePath(t8, s10, i8) { if (t8) for (const r18 of t8) { const t9 = (r18[0] - s10) * this._xFactor, n17 = (r18[1] - i8) * this._yFactor; r18[0] = s10 + t9, r18[1] = i8 + n17; } } }; // node_modules/@arcgis/core/symbols/cim/effects/EffectWave.js var r13 = class { static local() { return r13.instance === null && (r13.instance = new r13()), r13.instance; } execute(t8, e11, i8, s10) { return new a6(t8, e11, i8); } }; r13.instance = null; var a6 = class { constructor(t8, e11, i8) { this._inputGeometries = t8, this._height = (e11.amplitude !== void 0 ? e11.amplitude : 2) * i8, this._period = (e11.period !== void 0 ? e11.period : 3) * i8, this._style = e11.waveform, this._height <= 0 && (this._height = Math.abs(this._height)), this._period <= 0 && (this._period = Math.abs(this._period)), this._pattern = new n8(), this._pattern.addValue(this._period), this._pattern.addValue(this._period), this._walker = new a5(), this._walker.updateTolerance(i8); } next() { let i8 = this._inputGeometries.next(); for (; i8; ) { if (this._height === 0 || this._period === 0) return i8; if (y(i8)) { const t8 = this._processGeom(i8.paths); if (t8.length) return { paths: t8 }; } if (c2(i8)) { const t8 = this._processGeom(i8.rings); if (t8.length) return { rings: t8 }; } i8 = this._inputGeometries.next(); } return null; } _processGeom(t8) { const e11 = []; for (const i8 of t8) if (this._walker.init(i8, this._pattern)) switch (this._style) { case A.Sinus: default: e11.push(this._constructCurve(i8, false)); break; case A.Square: e11.push(this._constructSquare(i8)); break; case A.Triangle: e11.push(this._constructTriangle(i8)); break; case A.Random: e11.push(this._constructCurve(i8, true)); } else e11.push(i8); return e11; } _constructCurve(t8, e11) { const s10 = new s6(), h6 = this._walker.calculatePathLength(t8); let n17 = Math.round(h6 / this._period); n17 === 0 && (n17 = 1); const r18 = n17 * 16 + 1, a10 = h6 / n17, o11 = this._period / 16, l9 = 1 / r18, _4 = 2 * Math.PI * h6 / a10, c9 = 2 * Math.PI * Math.random(), p3 = 2 * Math.PI * Math.random(), u9 = 2 * Math.PI * Math.random(), d2 = 0.75 - Math.random() / 2, g5 = 0.75 - Math.random() / 2, w4 = {}; this._walker.curPointAndAngle(w4), s10.startPath(w4.pt); let f8 = 0; for (; ; ) { if (!this._walker.nextPointAndAngle(o11, w4)) { s10.lineTo(t8[t8.length - 1]); break; } { const t9 = f8; let i8; if (f8 += l9, e11) { const e12 = this._height / 2 * (1 + 0.3 * Math.sin(d2 * _4 * t9 + c9)); i8 = e12 * Math.sin(_4 * t9 + p3), i8 += e12 * Math.sin(g5 * _4 * t9 + u9), i8 /= 2; } else i8 = 0.5 * this._height * Math.sin(0.5 * _4 * t9); s10.lineTo([w4.pt[0] - i8 * w4.sa, w4.pt[1] + i8 * w4.ca]); } } return s10.path(); } _constructSquare(t8) { const e11 = new s6(), s10 = this._walker.calculatePathLength(t8); Math.round(s10 / this._period); let h6 = true; for (; ; ) { let t9 = false; if (this._walker.curPositionIsValid()) { const i8 = {}; this._walker.curPointAndAngle(i8); const s11 = {}; if (this._walker.nextPointAndAngle(this._period, s11)) { const n17 = {}; this._walker.nextPointAndAngle(this._period, n17) && (h6 ? (e11.startPath(i8.pt), h6 = false) : e11.lineTo(i8.pt), e11.lineTo([i8.pt[0] - this._height / 2 * i8.sa, i8.pt[1] + this._height / 2 * i8.ca]), e11.lineTo([s11.pt[0] - this._height / 2 * s11.sa, s11.pt[1] + this._height / 2 * s11.ca]), e11.lineTo([s11.pt[0] + this._height / 2 * s11.sa, s11.pt[1] - this._height / 2 * s11.ca]), e11.lineTo([n17.pt[0] + this._height / 2 * n17.sa, n17.pt[1] - this._height / 2 * n17.ca]), t9 = true); } } if (!t9) { e11.lineTo(this._walker.getPathEnd()); break; } } return e11.path(); } _constructTriangle(t8) { const e11 = new s6(), s10 = this._walker.calculatePathLength(t8); Math.round(s10 / this._period); let h6 = true; for (; ; ) { let t9 = false; if (this._walker.curPositionIsValid()) { const i8 = {}; this._walker.curPointAndAngle(i8); const s11 = {}; if (this._walker.nextPointAndAngle(this._period / 2, s11)) { const n17 = {}; this._walker.nextPointAndAngle(this._period, n17) && (this._walker.nextPosition(this._period / 2) && (h6 ? (e11.startPath(i8.pt), h6 = false) : e11.lineTo(i8.pt), e11.lineTo([s11.pt[0] - this._height / 2 * s11.sa, s11.pt[1] + this._height / 2 * s11.ca]), e11.lineTo([n17.pt[0] + this._height / 2 * n17.sa, n17.pt[1] - this._height / 2 * n17.ca])), t9 = true); } } if (!t9) { e11.lineTo(this._walker.getPathEnd()); break; } } return e11.path(); } }; // node_modules/@arcgis/core/symbols/cim/placements/PlacementAlongLineSameSize.js var n12 = class { static local() { return n12.instance === null && (n12.instance = new n12()), n12.instance; } execute(t8, e11, s10, i8) { return new a7(t8, e11, s10); } }; n12.instance = null; var a7 = class extends G { constructor(t8, e11, n17) { super(t8, true, true), this._geometryWalker = new a5(), this._geometryWalker.updateTolerance(n17), this._angleToLine = e11.angleToLine ?? true, this._offset = (e11.offset ? e11.offset : 0) * n17, this._originalEndings = e11.endings, this._offsetAtEnd = (e11.customEndingOffset ? e11.customEndingOffset : 0) * n17, this._position = -(e11.offsetAlongLine ? e11.offsetAlongLine : 0) * n17, this._pattern = new n8(), this._pattern.init(e11.placementTemplate, false), this._pattern.scale(n17), this._endings = this._originalEndings; } processPath(t8) { if (this._pattern.isEmpty()) return null; let s10; if (this.iteratePath) s10 = this._pattern.nextValue(); else { this._originalEndings === X.WithFullGap && this.isClosed ? this._endings = X.WithMarkers : this._endings = this._originalEndings, this._pattern.extPtGap = 0; let i9, n17 = true; switch (this._endings) { case X.NoConstraint: i9 = -this._position, i9 = this._adjustPosition(i9), n17 = false; break; case X.WithHalfGap: default: i9 = -this._pattern.lastValue() / 2; break; case X.WithFullGap: i9 = -this._pattern.lastValue(), this._pattern.extPtGap = this._pattern.lastValue(); break; case X.WithMarkers: i9 = 0; break; case X.Custom: i9 = -this._position, i9 = this._adjustPosition(i9), this._pattern.extPtGap = 0.5 * this._offsetAtEnd; } if (!this._geometryWalker.init(t8, this._pattern, n17)) return null; this._pattern.reset(); let a10 = 0; for (; i9 > a10; ) i9 -= a10, a10 = this._pattern.nextValue(); a10 -= i9, s10 = a10, this.iteratePath = true; } const i8 = {}; return this._geometryWalker.nextPointAndAngle(s10, i8) ? this._endings === X.WithFullGap && this._geometryWalker.isPathEnd() ? (this.iteratePath = false, null) : this._endings === X.WithMarkers && this._geometryWalker.isPathEnd() && (this.iteratePath = false, this.isClosed) ? null : (this.internalPlacement.setTranslate(i8.pt[0] - this._offset * i8.sa, i8.pt[1] + this._offset * i8.ca), this._angleToLine && this.internalPlacement.setRotateCS(i8.ca, i8.sa), this.internalPlacement) : (this.iteratePath = false, null); } _adjustPosition(t8) { let e11 = t8 / this._pattern.length(); return e11 -= Math.floor(e11), e11 * this._pattern.length(); } }; // node_modules/@arcgis/core/symbols/cim/placements/PlacementAtExtremities.js var n13 = class { static local() { return n13.instance === null && (n13.instance = new n13()), n13.instance; } execute(t8, e11, s10, i8) { return new r14(t8, e11, s10); } }; n13.instance = null; var r14 = class extends G { constructor(t8, e11, i8) { super(t8, false, true), this._curveHelper = new n7(), this._angleToLine = e11.angleToLine === void 0 || e11.angleToLine, this._offset = e11.offset !== void 0 ? e11.offset * i8 : 0, this._type = e11.extremityPlacement, this._position = e11.offsetAlongLine !== void 0 ? e11.offsetAlongLine * i8 : 0, this._beginProcessed = false; } processPath(t8) { let e11; switch (this._type) { case o3.Both: default: this._beginProcessed ? (e11 = this._atExtremities(t8, this._position, false), this._beginProcessed = false, this.iteratePath = false) : (e11 = this._atExtremities(t8, this._position, true), this._beginProcessed = true, this.iteratePath = true); break; case o3.JustBegin: e11 = this._atExtremities(t8, this._position, true); break; case o3.JustEnd: e11 = this._atExtremities(t8, this._position, false); case o3.None: } return e11; } _atExtremities(t8, s10, i8) { const n17 = t8.length; if (n17 < 2) return null; const r18 = i8 ? 1 : n17 - 2, o11 = i8 ? n17 : -1, a10 = i8 ? 1 : -1; let l9, h6 = 0, c9 = i8 ? t8[0] : t8[n17 - 1]; for (let _4 = r18; _4 !== o11; _4 += a10) { l9 = c9, c9 = t8[_4]; const i9 = this._curveHelper.calculateLength(l9, c9); if (h6 + i9 > s10) { const t9 = (s10 - h6) / i9, [n18, r19] = this._curveHelper.getAngleCS(l9, c9, t9), o12 = y3(l9, c9, t9); return this.internalPlacement.setTranslate(o12[0] - this._offset * r19, o12[1] + this._offset * n18), this._angleToLine && this.internalPlacement.setRotateCS(-n18, -r19), this.internalPlacement; } h6 += i9; } return null; } }; // node_modules/@arcgis/core/symbols/cim/placements/PlacementAtRatioPositions.js var n14 = class { static local() { return n14.instance === null && (n14.instance = new n14()), n14.instance; } execute(t8, i8, s10, e11) { return new a8(t8, i8, s10); } }; n14.instance = null; var a8 = class extends G { constructor(t8, e11, n17) { super(t8, true, true), this._walker = new a5(), this._walker.updateTolerance(n17), this._angleToLine = e11.angleToLine === void 0 || e11.angleToLine, this._offset = e11.offset !== void 0 ? e11.offset * n17 : 0, this._beginGap = e11.beginPosition !== void 0 ? e11.beginPosition * n17 : 0, this._endGap = e11.endPosition !== void 0 ? e11.endPosition * n17 : 0, this._flipFirst = e11.flipFirst === void 0 || e11.flipFirst, this._pattern = new n8(), this._pattern.init(e11.positionArray, false, false), this._subPathLen = 0, this._posCount = this._pattern.size(), this._isFirst = true, this._prevPos = 0; } processPath(t8) { if (this._pattern.isEmpty()) return null; let i8; if (this.iteratePath) { const t9 = this._pattern.nextValue() * this._subPathLen, s11 = this._beginGap + t9; i8 = s11 - this._prevPos, this._prevPos = s11; } else { if (this._posCount = this._pattern.size(), this._isFirst = true, this._prevPos = 0, this._subPathLen = this._walker.calculatePathLength(t8) - this._beginGap - this._endGap, this._subPathLen < 0) return this.iteratePath = false, null; if (!this._walker.init(t8, this._pattern, false)) return null; this._pattern.reset(); const s11 = this._pattern.nextValue() * this._subPathLen, e11 = this._beginGap + s11; i8 = e11 - this._prevPos, this._prevPos = e11, this.iteratePath = true; } const s10 = {}; if (!this._walker.nextPointAndAngle(i8, s10, h4.END)) return this.iteratePath = false, null; this.internalPlacement.setTranslate(s10.pt[0] - this._offset * s10.sa, s10.pt[1] + this._offset * s10.ca); const n17 = this._isFirst && this._flipFirst; let a10, r18; return this._angleToLine ? (a10 = s10.ca, r18 = s10.sa) : (a10 = 1, r18 = 0), n17 && (a10 = -a10, r18 = -r18), this.internalPlacement.setRotateCS(a10, r18), this._isFirst = false, this._posCount--, this._posCount === 0 && (this.iteratePath = false), this.internalPlacement; } }; // node_modules/@arcgis/core/symbols/cim/placements/PlacementInsidePolygon.js function h5(t8) { return t8.rings !== void 0; } var e10 = class { static local() { return e10.instance === null && (e10.instance = new e10()), e10.instance; } execute(t8, s10, i8, h6) { return new n15(t8, s10, i8, h6); } }; e10.instance = null; var n15 = class { constructor(e11, n17, _4, r18) { if (this._xMin = 0, this._xMax = 0, this._yMin = 0, this._yMax = 0, this._currentX = 0, this._currentY = 0, this._stepX = Math.abs(n17.stepX ?? 16) * _4, this._stepY = Math.abs(n17.stepY ?? 16) * _4, this._stepX !== 0 && this._stepY !== 0 && e11 && h5(e11) && e11.rings) { if (this._gridType = n17.gridType ?? Y.Fixed, this._gridType === Y.Random) { const s10 = n17.seed ?? 13, i8 = 1; this._randomLCG = new t2(s10 * i8), this._randomness = (n17.randomness ?? 100) / 100, this._gridAngle = 0, this._shiftOddRows = false, this._cosAngle = 1, this._sinAngle = 0, this._offsetX = 0, this._offsetY = 0; } else { if (this._randomness = 0, this._gridAngle = n17.gridAngle ?? 0, this._shiftOddRows = n17.shiftOddRows ?? false, this._offsetX = (n17.offsetX ?? 0) * _4, this._offsetY = (n17.offsetY ?? 0) * _4, this._cosAngle = Math.cos(this._gridAngle / 180 * Math.PI), this._sinAngle = -Math.sin(this._gridAngle / 180 * Math.PI), this._stepX) if (this._offsetX < 0) for (; this._offsetX < -0.5 * this._stepX; ) this._offsetX += this._stepX; else for (; this._offsetX >= 0.5 * this._stepX; ) this._offsetX -= this._stepX; if (this._stepY) if (this._offsetY < 0) for (; this._offsetY < -0.5 * this._stepY; ) this._offsetY += this._stepY; else for (; this._offsetY >= 0.5 * this._stepY; ) this._offsetY -= this._stepY; } this._graphicOriginX = 0, this._graphicOriginY = 0, this._internalPlacement = new t6(), this._calculateMinMax(e11), this._geometry = e11; } } next() { return this._geometry ? this._nextInside() : null; } _calculateMinMax(t8) { let s10, i8, h6, e11, n17, _4, r18, o11; this._xMin = 0, this._xMax = 0, this._yMin = 0, this._yMax = 0, n17 = _4 = Number.MAX_VALUE, r18 = o11 = -Number.MAX_VALUE; for (const a10 of t8.rings) { const t9 = a10 ? a10.length : 0; for (let f8 = 0; f8 < t9; ++f8) s10 = a10[f8][0] - this._graphicOriginX - this._offsetX, i8 = a10[f8][1] - this._graphicOriginY - this._offsetY, h6 = this._cosAngle * s10 - this._sinAngle * i8, e11 = this._sinAngle * s10 + this._cosAngle * i8, n17 = Math.min(n17, h6), r18 = Math.max(r18, h6), _4 = Math.min(_4, e11), o11 = Math.max(o11, e11); } n17 += this._graphicOriginX, r18 += this._graphicOriginX, _4 += this._graphicOriginY, o11 += this._graphicOriginY, this._xMin = Math.round(n17 / this._stepX), this._xMax = Math.round(r18 / this._stepX), this._yMin = Math.round(_4 / this._stepY), this._yMax = Math.round(o11 / this._stepY), this._currentX = this._xMax + 1, this._currentY = this._yMin - 1; } _nextInside() { for (; ; ) { if (this._currentX > this._xMax) { if (this._currentY++, this._currentY > this._yMax) return null; this._currentX = this._xMin, this._shiftOddRows && this._currentY % 2 && this._currentX--; } let t8 = this._currentX * this._stepX + this._offsetX; this._shiftOddRows && this._currentY % 2 && (t8 += 0.5 * this._stepX); const s10 = this._currentY * this._stepY + this._offsetY; let h6, e11; return this._currentX++, this._gridType === Y.Random ? (h6 = this._graphicOriginX + t8 + this._stepX * this._randomness * (0.5 - this._randomLCG.getFloat()) * 2 / 3, e11 = this._graphicOriginY + s10 + this._stepY * this._randomness * (0.5 - this._randomLCG.getFloat()) * 2 / 3) : (h6 = this._graphicOriginX + this._cosAngle * t8 + this._sinAngle * s10, e11 = this._graphicOriginY - this._sinAngle * t8 + this._cosAngle * s10), this._internalPlacement.setTranslate(h6, e11), this._internalPlacement; } } }; // node_modules/@arcgis/core/symbols/cim/placements/PlacementOnLine.js var r15 = 1e-3; var l8 = class { static local() { return l8.instance === null && (l8.instance = new l8()), l8.instance; } execute(e11, t8, n17, i8) { return new o8(e11, t8, n17); } }; l8.instance = null; var o8 = class extends G { constructor(e11, t8, n17) { super(e11, true, true), this._curveHelper = new n7(), this._angleToLine = t8.angleToLine === void 0 || t8.angleToLine, this._offset = t8.offset !== void 0 ? t8.offset * n17 : 0, this._relativeTo = t8.relativeTo, this._position = t8.startPointOffset !== void 0 ? t8.startPointOffset * n17 : 0, this._epsilon = r15 * n17; } processPath(e11) { const i8 = this._position; if (this._relativeTo === Z.SegmentMidpoint) { for (this.iteratePath || (this._segmentCount = e11.length, this._curSegment = 1, this.iteratePath = true); this._curSegment < this._segmentCount; ) { const n17 = this._curSegment; this._curSegment++; const i9 = e11[n17 - 1], s10 = e11[n17], r19 = this._curveHelper.calculateLength(i9, s10); if (r19 < this._epsilon) continue; const l9 = 0.5 + this._position / r19, [o11, a10] = this._curveHelper.getAngleCS(i9, s10, l9), h6 = y3(i9, s10, l9); return this.internalPlacement.setTranslate(h6[0] - this._offset * a10, h6[1] + this._offset * o11), this._angleToLine && this.internalPlacement.setRotateCS(o11, a10), this.internalPlacement; } return this.iteratePath = false, null; } this._relativeTo === Z.LineEnd && d(e11); const r18 = this.onLine(e11, i8); return this._relativeTo === Z.LineEnd && d(e11), r18; } onLine(e11, n17) { let i8, r18 = false; switch (this._relativeTo) { case Z.LineMiddle: default: i8 = this._curveHelper.calculatePathLength(e11) / 2 + n17; break; case Z.LineBeginning: i8 = n17; break; case Z.LineEnd: i8 = n17, r18 = true; } const l9 = e11.length; let o11, a10 = 0, h6 = e11[0]; for (let s10 = 1; s10 < l9; ++s10) { o11 = h6, h6 = e11[s10]; const n18 = this._curveHelper.calculateLength(o11, h6); if (a10 + n18 > i8) { const e12 = (i8 - a10) / n18, [s11, l10] = this._curveHelper.getAngleCS(o11, h6, e12), c9 = y3(o11, h6, e12), u9 = r18 ? -this._offset : this._offset; return this.internalPlacement.setTranslate(c9[0] - u9 * l10, c9[1] + u9 * s11), this._angleToLine && (r18 ? this.internalPlacement.setRotateCS(-s11, -l10) : this.internalPlacement.setRotateCS(s11, l10)), this.internalPlacement; } a10 += n18; } return null; } }; // node_modules/@arcgis/core/symbols/cim/placements/PlacementOnVertices.js var n16 = class { static local() { return n16.instance === null && (n16.instance = new n16()), n16.instance; } execute(t8, s10, e11, i8) { return new a9(t8, s10, e11); } }; n16.instance = null; var r16 = 1e-15; var a9 = class extends G { constructor(t8, s10, e11) { super(t8, true, true), this._curveHelper = new n7(), this._angleToLine = s10.angleToLine === void 0 || s10.angleToLine, this._offset = s10.offset !== void 0 ? s10.offset * e11 : 0, this._endPoints = s10.placeOnEndPoints === void 0 || s10.placeOnEndPoints, this._controlPoints = s10.placeOnControlPoints === void 0 || s10.placeOnControlPoints, this._regularVertices = s10.placeOnRegularVertices === void 0 || s10.placeOnRegularVertices, this._tags = [], this._tagIterator = 0; } processPath(t8) { if (this.iteratePath || (this._preparePath(t8), this.iteratePath = true), this._tagIterator >= this._tags.length) return this._tags.length = 0, this._tagIterator = 0, this.iteratePath = false, null; const s10 = this._tags[this._tagIterator]; this._angleToLine && this.internalPlacement.setRotate(s10[2]); let e11 = s10[0], i8 = s10[1]; if (this._offset !== 0) { const t9 = Math.cos(s10[2]), n17 = Math.sin(s10[2]); e11 -= this._offset * n17, i8 += this._offset * t9; } return this.internalPlacement.setTranslate(e11, i8), this._tagIterator++, this.internalPlacement; } _preparePath(t8) { this._tags.length = 0, this._tagIterator = 0; const i8 = C3(t8), n17 = t8.length - 1; let r18, a10, h6 = 0, l9 = 0, _4 = 0, c9 = 0, g5 = 0; for (; h6 < n17; ) { h6++, r18 = t8[h6 - 1], a10 = t8[h6]; const s10 = I(r18), u9 = I(a10); (this._angleToLine || this._offset !== 0) && (c9 = this._curveHelper.getAngle(r18, a10, 0)), h6 === 1 ? i8 ? (l9 = c9, _4 = s10) : (this._endPoints || this._controlPoints && s10 === 1) && this._tags.push([r18[0], r18[1], c9]) : s10 === 1 ? this._controlPoints && this._tags.push([r18[0], r18[1], o9(g5, c9)]) : this._regularVertices && this._tags.push([r18[0], r18[1], o9(g5, c9)]), (this._angleToLine || this._offset !== 0) && (g5 = this._curveHelper.getAngle(r18, a10, 1)), h6 === n17 && (i8 ? u9 === 1 || _4 === 1 ? this._controlPoints && this._tags.push([a10[0], a10[1], o9(g5, l9)]) : this._regularVertices && this._tags.push([a10[0], a10[1], o9(g5, l9)]) : (this._endPoints || this._controlPoints && u9 === 1) && this._tags.push([a10[0], a10[1], g5])); } this._tagIterator = 0; } }; function o9(t8, s10) { const e11 = Math.PI; for (; Math.abs(s10 - t8) > e11 + 2 * r16; ) s10 - t8 > e11 ? s10 -= 2 * e11 : s10 += 2 * e11; return (t8 + s10) / 2; } // node_modules/@arcgis/core/symbols/cim/placements/PlacementPolygonCenter.js function o10(t8) { return t8.rings !== void 0; } var r17 = class { static local() { return r17.instance === null && (r17.instance = new r17()), r17.instance; } execute(t8, e11, n17, s10) { return new i6(t8, e11, n17); } }; r17.instance = null; var i6 = class { constructor(t8, e11, o11) { this._geometry = t8, this._offsetX = e11.offsetX !== void 0 ? e11.offsetX * o11 : 0, this._offsetY = e11.offsetY !== void 0 ? e11.offsetY * o11 : 0, this._method = e11.method !== void 0 ? e11.method : K.OnPolygon, this._internalPlacement = new t6(); } next() { const t8 = this._geometry; return this._geometry = null, t8 && o10(t8) ? this._polygonCenter(t8) : null; } _polygonCenter(n17) { let o11 = false; switch (this._method) { case K.OnPolygon: default: case K.CenterOfMass: case K.BoundingBoxCenter: { const s10 = u2(); c(s10, n17), this._internalPlacement.setTranslate((s10[2] + s10[0]) / 2 + this._offsetX, (s10[3] + s10[1]) / 2 + this._offsetY), o11 = true; break; } } return o11 ? this._internalPlacement : null; } }; // node_modules/@arcgis/core/symbols/cim/CIMOperators.js function A2(p3) { if (!p3) return null; switch (p3.type) { case "CIMGeometricEffectAddControlPoints": return o7.local(); case "CIMGeometricEffectArrow": return h2.local(); case "CIMGeometricEffectBuffer": return f6.local(); case "CIMGeometricEffectControlMeasureLine": return _.local(); case "CIMGeometricEffectCut": return u6.local(); case "CIMGeometricEffectDashes": return r9.local(); case "CIMGeometricEffectDonut": return r10.local(); case "CIMGeometricEffectJog": return s8.local(); case "CIMGeometricEffectMove": return n10.local(); case "CIMGeometricEffectOffset": return r12.local(); case "CIMGeometricEffectReverse": return s9.local(); case "CIMGeometricEffectRotate": return u7.local(); case "CIMGeometricEffectScale": return c8.local(); case "CIMGeometricEffectWave": return r13.local(); } return null; } function g3(e11) { if (!e11) return null; switch (e11.type) { case "CIMMarkerPlacementAlongLineSameSize": return n12.local(); case "CIMMarkerPlacementAtExtremities": return n13.local(); case "CIMMarkerPlacementAtRatioPositions": return n14.local(); case "CIMMarkerPlacementInsidePolygon": return e10.local(); case "CIMMarkerPlacementOnLine": return l8.local(); case "CIMMarkerPlacementOnVertices": return n16.local(); case "CIMMarkerPlacementPolygonCenter": return r17.local(); } return null; } // node_modules/@arcgis/core/symbols/cim/Rect.js var t7 = class { constructor(t8 = 0, h6 = 0, i8 = 0, s10 = 0) { this.x = t8, this.y = h6, this.width = i8, this.height = s10; } get isEmpty() { return this.width <= 0 || this.height <= 0; } union(t8) { this.x = Math.min(this.x, t8.x), this.y = Math.min(this.y, t8.y), this.width = Math.max(this.width, t8.width), this.height = Math.max(this.height, t8.height); } }; // node_modules/@arcgis/core/views/2d/engine/webgl/collisions/BoundingBox.js var i7 = class { constructor(i8, e11, s10, r18) { this.center = t4(i8, e11), this.centerT = n2(), this.halfWidth = s10 / 2, this.halfHeight = r18 / 2, this.width = s10, this.height = r18; } get x() { return this.center[0]; } get y() { return this.center[1]; } get blX() { return this.center[0] + this.halfWidth; } get blY() { return this.center[1] + this.halfHeight; } get trX() { return this.center[0] - this.halfWidth; } get trY() { return this.center[1] - this.halfHeight; } get xmin() { return this.x - this.halfWidth; } get xmax() { return this.x + this.halfWidth; } get ymin() { return this.y - this.halfHeight; } get ymax() { return this.y + this.halfHeight; } set x(t8) { this.center[0] = t8; } set y(t8) { this.center[1] = t8; } clone() { return new i7(this.x, this.y, this.width, this.height); } serialize(t8) { return t8.writeF32(this.center[0]), t8.writeF32(this.center[1]), t8.push(this.width), t8.push(this.height), t8; } findCollisionDelta(t8, h6 = 4) { const i8 = Math.abs(t8.centerT[0] - this.centerT[0]), e11 = Math.abs(t8.centerT[1] - this.centerT[1]), s10 = (t8.halfWidth + this.halfWidth + h6) / i8, r18 = (t8.halfHeight + this.halfHeight + h6) / e11, n17 = Math.min(s10, r18); return Math.log2(n17); } extend(t8) { const h6 = Math.min(this.xmin, t8.xmin), i8 = Math.min(this.ymin, t8.ymin), e11 = Math.max(this.xmax, t8.xmax) - h6, s10 = Math.max(this.ymax, t8.ymax) - i8, r18 = h6 + e11 / 2, n17 = i8 + s10 / 2; this.width = e11, this.height = s10, this.halfWidth = e11 / 2, this.halfHeight = s10 / 2, this.x = r18, this.y = n17; } static deserialize(t8) { const h6 = t8.readF32(), e11 = t8.readF32(), s10 = t8.readInt32(), r18 = t8.readInt32(); return new i7(h6, e11, s10, r18); } }; // node_modules/@arcgis/core/views/2d/engine/webgl/mesh/templates/shapingUtils.js var m6 = 26; var u8 = 4; var g4 = m6 + u8; var _2 = m6 - 6; var p2 = 3; var x2 = 8; var w3 = Math.PI / 180; var y4 = class { constructor(t8, s10, e11, i8) { this._rotationT = n(), this._xBounds = 0, this._yBounds = 0, this.minZoom = 0, this.maxZoom = 255, this._bounds = null; const n17 = e11.rect, o11 = new Float32Array(8); t8 *= i8, s10 *= i8; const r18 = e11.code ? n17.width * i8 : e11.metrics.width, a10 = e11.code ? n17.height * i8 : e11.metrics.height; o11[0] = t8, o11[1] = s10, o11[2] = t8 + r18, o11[3] = s10, o11[4] = t8, o11[5] = s10 + a10, o11[6] = t8 + r18, o11[7] = s10 + a10, this._data = o11, this._setTextureCoords(n17), this._scale = i8, this._mosaic = e11, this.x = t8, this.y = s10, this.maxOffset = Math.max(t8 + r18, s10 + a10); } get width() { return this._mosaic.metrics.width * this._scale; } get mosaic() { return this._mosaic; } set angle(s10) { this._angle = s10, h(this._rotationT, -s10), this._setOffsets(this._data); } get angle() { return this._angle; } get xTopLeft() { return this._data[0]; } get yTopLeft() { return this._data[1]; } get xBottomRight() { return this._data[6]; } get yBottomRight() { return this._data[7]; } get texcoords() { return this._texcoords; } get textureBinding() { return this._mosaic.textureBinding; } get offsets() { return this._offsets || this._setOffsets(this._data), this._offsets; } get char() { return String.fromCharCode(this._mosaic.code); } get code() { return this._mosaic.code; } get bounds() { if (!this._bounds) { const { height: t8, width: e11 } = this._mosaic.metrics, i8 = e11 * this._scale, o11 = Math.abs(t8) * this._scale, r18 = new Float32Array(8); r18[0] = this.x, r18[1] = this.y, r18[2] = this.x + i8, r18[3] = this.y, r18[4] = this.x, r18[5] = this.y + o11, r18[6] = this.x + i8, r18[7] = this.y + o11; const a10 = o4(n(), this._rotationT, this._T); a2(r18, r18, a10); let c9 = 1 / 0, d2 = 1 / 0, f8 = 0, m7 = 0; for (let s10 = 0; s10 < 4; s10++) { const t9 = r18[2 * s10], e12 = r18[2 * s10 + 1]; c9 = Math.min(c9, t9), d2 = Math.min(d2, e12), f8 = Math.max(f8, t9), m7 = Math.max(m7, e12); } const u9 = f8 - c9, g5 = m7 - d2, _4 = c9 + u9 / 2, p3 = d2 + g5 / 2; this._bounds = new i7(_4, p3, u9, g5); } return this._bounds; } setTransform(t8) { this._T = t8, this._offsets = null; } _setOffsets(t8) { this._offsets || (this._offsets = { upperLeft: 0, upperRight: 0, lowerLeft: 0, lowerRight: 0 }); const e11 = this._offsets, i8 = new Float32Array(8), o11 = o4(n(), this._rotationT, this._T); a2(i8, t8, o11), e11.upperLeft = w2(i8[0] * x2, i8[1] * x2), e11.upperRight = w2(i8[2] * x2, i8[3] * x2), e11.lowerLeft = w2(i8[4] * x2, i8[5] * x2), e11.lowerRight = w2(i8[6] * x2, i8[7] * x2); } _setTextureCoords({ x: t8, y: s10, width: e11, height: i8 }) { this._texcoords = { upperLeft: w2(t8, s10), upperRight: w2(t8 + e11, s10), lowerLeft: w2(t8, s10 + i8), lowerRight: w2(t8 + e11, s10 + i8) }; } }; var M2 = (t8, s10) => ({ code: 0, page: 0, sdf: true, rect: new t5(0, 0, 11, 8), textureBinding: s10, metrics: { advance: 0, height: 4, width: t8, left: 0, top: 0 } }); var T = class { constructor(t8, s10, e11) { this._rotation = 0, this._decorate(t8, s10, e11), this.glyphs = t8, this.bounds = this._createBounds(t8), this.isMultiline = s10.length > 1, this._hasRotation = e11.angle !== 0, this._T = this._createGlyphTransform(this.bounds, e11); for (const i8 of t8) i8.setTransform(this._T); } setRotation(e11) { if (e11 === 0 && this._rotation === 0) return; this._rotation = e11; const i8 = this._T, n17 = h(n(), e11); o4(i8, n17, i8); for (const t8 of this.glyphs) t8.setTransform(this._T); } _decorate(t8, s10, e11) { if (!e11.decoration || e11.decoration === "none" || !t8.length) return; const i8 = e11.scale, h6 = e11.decoration === "underline" ? g4 : _2, n17 = t8[0].textureBinding; for (const o11 of s10) { const s11 = o11.startX * i8, e12 = o11.startY * i8, r18 = (o11.width + o11.glyphWidthEnd) * i8; t8.push(new y4(s11, e12 + h6 * i8, M2(r18, n17), 1)); } } get boundsT() { const t8 = this.bounds, s10 = r2(n2(), t8.x, t8.y); if (z(s10, s10, this._T), this._hasRotation) { const e11 = Math.max(t8.width, t8.height); return new i7(s10[0], s10[1], e11, e11); } return new i7(s10[0], s10[1], t8.width, t8.height); } _createBounds(t8) { let s10 = 1 / 0, e11 = 1 / 0, i8 = 0, h6 = 0; for (const r18 of t8) s10 = Math.min(s10, r18.xTopLeft), e11 = Math.min(e11, r18.yTopLeft), i8 = Math.max(i8, r18.xTopLeft + r18.width), h6 = Math.max(h6, r18.yBottomRight); const n17 = i8 - s10, o11 = h6 - e11; return new i7(s10 + n17 / 2, e11 + o11 / 2, n17, o11); } _createGlyphTransform(t8, s10) { const n17 = w3 * s10.angle, r18 = n(), c9 = n2(); return i(r18, r18, r2(c9, s10.xOffset, -s10.yOffset)), s10.isCIM ? e5(r18, r18, n17) : (i(r18, r18, r2(c9, t8.x, t8.y)), e5(r18, r18, n17), i(r18, r18, r2(c9, -t8.x, -t8.y))), r18; } }; var B2 = class { constructor(t8, s10, e11, i8, h6, n17) { this.glyphWidthEnd = 0, this.startX = 0, this.startY = 0, this.start = Math.max(0, Math.min(s10, e11)), this.end = Math.max(0, Math.max(s10, e11)), this.end < t8.length && (this.glyphWidthEnd = t8[this.end].metrics.width), this.width = i8, this.yMin = h6, this.yMax = n17; } }; var R2 = (t8) => t8 === 10; var b2 = (t8) => t8 === 32; function L(t8, s10, e11) { const i8 = new Array(), h6 = 1 / e11.scale, n17 = e11.maxLineWidth * h6, o11 = s10 ? t8.length - 1 : 0, r18 = s10 ? -1 : t8.length, a10 = s10 ? -1 : 1; let c9 = o11, d2 = 0, f8 = 0, l9 = c9, m7 = l9, u9 = 0, g5 = 1 / 0, _4 = 0; for (; c9 !== r18; ) { const { code: s11, metrics: e12 } = t8[c9], h7 = Math.abs(e12.top); if (R2(s11) || b2(s11) || (g5 = Math.min(g5, h7), _4 = Math.max(_4, h7 + e12.height)), R2(s11)) c9 !== o11 && (i8.push(new B2(t8, l9, c9 - a10, d2, g5, _4)), g5 = 1 / 0, _4 = 0), d2 = 0, l9 = c9 + a10, m7 = c9 + a10, f8 = 0; else if (b2(s11)) m7 = c9 + a10, f8 = 0, u9 = e12.advance, d2 += e12.advance; else if (d2 > n17) { if (m7 !== l9) { const s12 = m7 - 2 * a10; d2 -= u9, i8.push(new B2(t8, l9, s12, d2 - f8, g5, _4)), g5 = 1 / 0, _4 = 0, l9 = m7, d2 = f8; } else i8.push(new B2(t8, l9, c9 - a10, d2, g5, _4)), g5 = 1 / 0, _4 = 0, l9 = c9, m7 = c9, d2 = 0; d2 += e12.advance, f8 += e12.advance; } else d2 += e12.advance, f8 += e12.advance; c9 += a10; } const p3 = new B2(t8, l9, c9 - a10, d2, g5, _4); return p3.start >= 0 && p3.end < t8.length && i8.push(p3), i8; } function v(t8, s10) { let e11 = 0; for (let n17 = 0; n17 < t8.length; n17++) { const { width: s11 } = t8[n17]; e11 = Math.max(s11, e11); } const i8 = s10.decoration === "underline" ? u8 : 0, h6 = t8[0].yMin; return { x: 0, y: h6, height: t8[t8.length - 1].yMax + s10.lineHeight * (t8.length - 1) + i8 - h6, width: e11 }; } function j3(t8, s10, e11) { const i8 = e11.scale, h6 = new Array(), n17 = L(t8, s10, e11), o11 = v(n17, e11), { vAlign: r18, hAlign: a10 } = e11, d2 = r18 === t3.Baseline ? 1 : 0, f8 = d2 ? 0 : r18 - 1, l9 = (1 - d2) * -o11.y + f8 * (o11.height / 2) + (d2 ? 1 : 0) * -m6; for (let c9 = 0; c9 < n17.length; c9++) { const { start: s11, end: o12, width: r19 } = n17[c9]; let d3 = -1 * (a10 + 1) * (r19 / 2) - p2; const f9 = c9 * e11.lineHeight + l9 - p2; n17[c9].startX = d3, n17[c9].startY = f9; for (let e12 = s11; e12 <= o12; e12++) { const s12 = t8[e12]; if (R2(s12.code)) continue; const n18 = new y4(d3 + s12.metrics.left, f9 - s12.metrics.top, s12, i8); d3 += s12.metrics.advance, h6.push(n18); } } return new T(h6, n17, e11); } // node_modules/@arcgis/core/symbols/cim/CIMSymbolDrawHelper.js var I2 = Math.PI / 180; var v2 = 10; var L2 = s.getLogger("esri.symbols.cim.CIMSymbolDrawHelper"); var z2 = class { constructor(t8) { this._t = t8; } static createIdentity() { return new z2([1, 0, 0, 0, 1, 0]); } clone() { const t8 = this._t; return new z2(t8.slice()); } transform(t8) { const e11 = this._t; return [e11[0] * t8[0] + e11[1] * t8[1] + e11[2], e11[3] * t8[0] + e11[4] * t8[1] + e11[5]]; } static createScale(t8, e11) { return new z2([t8, 0, 0, 0, e11, 0]); } scale(t8, e11) { const s10 = this._t; return s10[0] *= t8, s10[1] *= t8, s10[2] *= t8, s10[3] *= e11, s10[4] *= e11, s10[5] *= e11, this; } scaleRatio() { return Math.sqrt(this._t[0] * this._t[0] + this._t[1] * this._t[1]); } static createTranslate(t8, e11) { return new z2([0, 0, t8, 0, 0, e11]); } translate(t8, e11) { const s10 = this._t; return s10[2] += t8, s10[5] += e11, this; } static createRotate(t8) { const e11 = Math.cos(t8), s10 = Math.sin(t8); return new z2([e11, -s10, 0, s10, e11, 0]); } rotate(t8) { return z2.multiply(this, z2.createRotate(t8), this); } static multiply(t8, e11, s10) { const i8 = t8._t, r18 = e11._t, n17 = i8[0] * r18[0] + i8[3] * r18[1], o11 = i8[1] * r18[0] + i8[4] * r18[1], a10 = i8[2] * r18[0] + i8[5] * r18[1] + r18[2], h6 = i8[0] * r18[3] + i8[3] * r18[4], l9 = i8[1] * r18[3] + i8[4] * r18[4], c9 = i8[2] * r18[3] + i8[5] * r18[4] + r18[5], m7 = s10._t; return m7[0] = n17, m7[1] = o11, m7[2] = a10, m7[3] = h6, m7[4] = l9, m7[5] = c9, s10; } invert() { const t8 = this._t; let e11 = t8[0] * t8[4] - t8[1] * t8[3]; if (e11 === 0) return new z2([0, 0, 0, 0, 0, 0]); e11 = 1 / e11; const s10 = (t8[1] * t8[5] - t8[2] * t8[4]) * e11, i8 = (t8[2] * t8[3] - t8[0] * t8[5]) * e11, r18 = t8[4] * e11, n17 = -t8[1] * e11, o11 = -t8[3] * e11, a10 = t8[0] * e11; return new z2([r18, n17, s10, o11, a10, i8]); } }; var F = class { constructor(t8, e11) { this._transfos = [], this._sizeTransfos = [], this._geomUnitsPerPoint = 1, this._placementPool = new e(t6, null, null, 100), this._earlyReturn = false, this._mapRotation = 0, this._resourceManager = t8 || new s4(), this._transfos.push(e11 || z2.createIdentity()), this._sizeTransfos.push(e11 ? e11.scaleRatio() : 1); } setTransform(t8, e11) { this._transfos = [t8 || z2.createIdentity()], this._sizeTransfos = [e11 || (t8 ? t8.scaleRatio() : 1)]; } setGeomUnitsPerPoint(t8) { this._geomUnitsPerPoint = t8; } transformPt(t8) { return this._transfos[this._transfos.length - 1].transform(t8); } transformSize(t8) { return t8 * this._sizeTransfos[this._sizeTransfos.length - 1]; } reverseTransformPt(t8) { return this._transfos[this._transfos.length - 1].invert().transform(t8); } reverseTransformSize(t8) { return t8 / this._sizeTransfos[this._sizeTransfos.length - 1]; } geomUnitsPerPoint() { return this.isEmbedded() ? 1 : this._geomUnitsPerPoint; } isEmbedded() { return this._transfos.length > 1; } back() { return this._transfos[this._transfos.length - 1]; } push(t8, e11) { const s10 = e11 ? t8.scaleRatio() : 1; z2.multiply(t8, this.back(), t8), this._transfos.push(t8), this._sizeTransfos.push(this._sizeTransfos[this._sizeTransfos.length - 1] * s10); } pop() { this._transfos.splice(-1, 1), this._sizeTransfos.splice(-1, 1); } drawSymbol(t8, e11) { if (t8) switch (t8.type) { case "CIMPointSymbol": case "CIMLineSymbol": case "CIMPolygonSymbol": this.drawMultiLayerSymbol(t8, e11); break; case "CIMTextSymbol": this.drawTextSymbol(t8, e11); } } drawMultiLayerSymbol(t8, e11) { if (!t8) return; const s10 = t8.symbolLayers; if (!s10) return; const i8 = t8.effects; if (i8 && i8.length > 0) { const t9 = this.executeEffects(i8, e11); if (t9) { let e12 = t9.next(); for (; e12; ) this.drawSymbolLayers(s10, e12), e12 = t9.next(); } } else this.drawSymbolLayers(s10, e11); } executeEffects(t8, e11) { const s10 = this._resourceManager.geometryEngine; let i8 = new r5(e11); for (const r18 of t8) { const t9 = A2(r18); t9 && (i8 = t9.execute(i8, r18, this.geomUnitsPerPoint(), s10)); } return i8; } drawSymbolLayers(t8, e11) { let s10 = t8.length; for (; s10--; ) { const i8 = t8[s10]; if (!i8 || i8.enable === false) continue; const r18 = i8.effects; if (r18 && r18.length > 0) { const t9 = this.executeEffects(r18, e11); if (t9) { let e12 = null; for (; (e12 = t9.next()) && (this.drawSymbolLayer(i8, e12), !this._earlyReturn); ) ; } } else this.drawSymbolLayer(i8, e11); if (this._earlyReturn) return; } } drawSymbolLayer(t8, e11) { switch (t8.type) { case "CIMSolidFill": this.drawSolidFill(e11, t8.color); break; case "CIMHatchFill": this.drawHatchFill(e11, t8); break; case "CIMPictureFill": this.drawPictureFill(e11, t8); break; case "CIMGradientFill": this.drawGradientFill(e11, t8); break; case "CIMSolidStroke": this.drawSolidStroke(e11, t8.color, t8.width, t8.capStyle, t8.joinStyle, t8.miterLimit); break; case "CIMPictureStroke": this.drawPictureStroke(e11, t8); break; case "CIMGradientStroke": this.drawGradientStroke(e11, t8); break; case "CIMCharacterMarker": case "CIMPictureMarker": case "CIMVectorMarker": this.drawMarkerLayer(t8, e11); } } drawHatchFill(t8, e11) { const s10 = this._buildHatchPolyline(e11, t8, this.geomUnitsPerPoint()); s10 && (this.pushClipPath(t8), this.drawMultiLayerSymbol(e11.lineSymbol, s10), this.popClipPath()); } drawPictureFill(t8, e11) { } drawGradientFill(t8, e11) { } drawPictureStroke(t8, e11) { } drawGradientStroke(t8, e11) { } drawMarkerLayer(t8, e11) { const s10 = t8.markerPlacement; if (s10) { const i8 = g3(s10); if (i8) { const r18 = s10.type === "CIMMarkerPlacementInsidePolygon"; r18 && this.pushClipPath(e11); const n17 = i8.execute(e11, s10, this.geomUnitsPerPoint(), this._resourceManager.geometryEngine); if (n17) { let e12 = null; for (; (e12 = n17.next()) && (this.drawMarker(t8, e12), !this._earlyReturn); ) ; } r18 && this.popClipPath(); } } else { const s11 = this._placementPool.acquire(); if (l(e11)) s11.tx = e11.x, s11.ty = e11.y, this.drawMarker(t8, s11); else if (c2(e11)) [s11.tx, s11.ty] = e2(e11), this.drawMarker(t8, s11); else for (const i8 of e11.points) if (s11.tx = i8[0], s11.ty = i8[1], this.drawMarker(t8, s11), this._earlyReturn) break; this._placementPool.release(s11); } } drawMarker(t8, e11) { switch (t8.type) { case "CIMCharacterMarker": case "CIMPictureMarker": this.drawPictureMarker(t8, e11); break; case "CIMVectorMarker": this.drawVectorMarker(t8, e11); } } drawPictureMarker(t8, e11) { if (!t8) return; const i8 = this._resourceManager.getResource(t8.url), r18 = t8.size ?? 10; if (t(i8) || r18 <= 0) return; const n17 = i8.width, o11 = i8.height; if (!n17 || !o11) return; const a10 = n17 / o11, h6 = t8.scaleX ?? 1, l9 = z2.createIdentity(), c9 = t8.anchorPoint; if (c9) { let e12 = c9.x, s10 = c9.y; t8.anchorPointUnits !== "Absolute" && (e12 *= r18 * a10 * h6, s10 *= r18), l9.translate(-e12, -s10); } let m7 = t8.rotation ?? 0; t8.rotateClockwise && (m7 = -m7), this._mapRotation && (m7 += this._mapRotation), m7 && l9.rotate(m7 * I2); let f8 = t8.offsetX ?? 0, u9 = t8.offsetY ?? 0; if (f8 || u9) { if (this._mapRotation) { const t9 = I2 * this._mapRotation, e12 = Math.cos(t9), s10 = Math.sin(t9), i9 = f8 * s10 + u9 * e12; f8 = f8 * e12 - u9 * s10, u9 = i9; } l9.translate(f8, u9); } const _4 = this.geomUnitsPerPoint(); _4 !== 1 && l9.scale(_4, _4); const d2 = e11.getAngle(); d2 && l9.rotate(d2), l9.translate(e11.tx, e11.ty), this.push(l9, false), this.drawImage(t8.url, r18, t8.scaleX), this.pop(); } drawVectorMarker(t8, e11) { if (!t8) return; const s10 = t8.markerGraphics; if (!s10) return; const i8 = t8.size ?? 10, r18 = t8.frame, n17 = r18 ? r18.ymax - r18.ymin : 0, o11 = i8 && n17 ? i8 / n17 : 1, a10 = z2.createIdentity(); r18 && a10.translate(0.5 * -(r18.xmax + r18.xmin), 0.5 * -(r18.ymax + r18.ymin)); const h6 = t8.anchorPoint; if (h6) { let e12 = h6.x, s11 = h6.y; t8.anchorPointUnits !== "Absolute" ? r18 && (e12 *= r18.xmax - r18.xmin, s11 *= r18.ymax - r18.ymin) : (e12 /= o11, s11 /= o11), a10.translate(-e12, -s11); } o11 !== 1 && a10.scale(o11, o11); let l9 = t8.rotation ?? 0; t8.rotateClockwise && (l9 = -l9), this._mapRotation && (l9 += this._mapRotation), l9 && a10.rotate(l9 * I2); let c9 = t8.offsetX ?? 0, m7 = t8.offsetY ?? 0; if (c9 || m7) { if (this._mapRotation) { const t9 = I2 * this._mapRotation, e12 = Math.cos(t9), s11 = Math.sin(t9), i9 = c9 * s11 + m7 * e12; c9 = c9 * e12 - m7 * s11, m7 = i9; } a10.translate(c9, m7); } const f8 = this.geomUnitsPerPoint(); f8 !== 1 && a10.scale(f8, f8); const u9 = e11.getAngle(); u9 && a10.rotate(u9), a10.translate(e11.tx, e11.ty), this.push(a10, t8.scaleSymbolsProportionally); for (const _4 of s10) if (_4 && _4.symbol && _4.geometry || L2.error("Invalid marker graphic", _4), this.drawSymbol(_4.symbol, _4.geometry), this._earlyReturn) break; this.pop(); } drawTextSymbol(t8, e11) { if (!t8) return; if (!l(e11)) return; if ((t8.height ?? 10) <= 0) return; const s10 = z2.createIdentity(); let i8 = t8.angle ?? 0; i8 = -i8, i8 && s10.rotate(i8 * I2); const r18 = t8.offsetX ?? 0, n17 = t8.offsetY ?? 0; (r18 || n17) && s10.translate(r18, n17); const o11 = this.geomUnitsPerPoint(); o11 !== 1 && s10.scale(o11, o11), s10.translate(e11.x, e11.y), this.push(s10, false), this.drawText(t8), this.pop(); } _buildHatchPolyline(t8, e11, s10) { let i8 = (t8.separation !== void 0 ? t8.separation : 4) * s10, r18 = t8.rotation !== void 0 ? t8.rotation : 0; if (i8 === 0) return null; i8 < 0 && (i8 = -i8); let n17 = 0; const a10 = 0.5 * i8; for (; n17 > a10; ) n17 -= i8; for (; n17 < -a10; ) n17 += i8; const l9 = u2(); c(l9, e11), l9[0] -= a10, l9[1] -= a10, l9[2] += a10, l9[3] += a10; const c9 = [[l9[0], l9[1]], [l9[0], l9[3]], [l9[2], l9[3]], [l9[2], l9[1]]]; for (; r18 > 180; ) r18 -= 180; for (; r18 < 0; ) r18 += 180; const m7 = Math.cos(r18 * I2), f8 = Math.sin(r18 * I2), u9 = -i8 * f8, _4 = i8 * m7; let d2, p3, y5, g5; n17 = (t8.offsetX !== void 0 ? t8.offsetX * s10 : 0) * f8 - (t8.offsetY !== void 0 ? t8.offsetY * s10 : 0) * m7, d2 = y5 = Number.MAX_VALUE, p3 = g5 = -Number.MAX_VALUE; for (const o11 of c9) { const t9 = o11[0], e12 = o11[1], s11 = m7 * t9 + f8 * e12, i9 = -f8 * t9 + m7 * e12; d2 = Math.min(d2, s11), y5 = Math.min(y5, i9), p3 = Math.max(p3, s11), g5 = Math.max(g5, i9); } y5 = Math.floor(y5 / i8) * i8; let P3 = m7 * d2 - f8 * y5 - u9 * n17 / i8, x3 = f8 * d2 + m7 * y5 - _4 * n17 / i8, w4 = m7 * p3 - f8 * y5 - u9 * n17 / i8, M3 = f8 * p3 + m7 * y5 - _4 * n17 / i8; const b3 = 1 + Math.round((g5 - y5) / i8), S = []; for (let o11 = 0; o11 < b3; o11++) P3 += u9, x3 += _4, w4 += u9, M3 += _4, S.push([[P3, x3], [w4, M3]]); return { paths: S }; } }; var U4 = class extends F { constructor(t8, e11) { super(t8, e11), this.reset(); } reset() { this._xmin = this._ymin = 1 / 0, this._xmax = this._ymax = -1 / 0, this._clipCount = 0; } envelope() { return new t7(this._xmin, this._ymin, this._xmax - this._xmin, this._ymax - this._ymin); } bounds() { return o2(this._xmin, this._ymin, this._xmax, this._ymax); } drawSolidFill(t8) { if (t8 && !(this._clipCount > 0)) if (c2(t8)) this._processPath(t8.rings, 0); else if (y(t8)) this._processPath(t8.paths, 0); else if (s3(t8)) { const e11 = G2(t8); e11 && this._processPath(e11.rings, 0); } else console.error("drawSolidFill Unexpected geometry type!"); } drawSolidStroke(t8, e11, s10) { if (!t8 || this._clipCount > 0) return; const i8 = 0.5 * this.transformSize(s10); if (c2(t8)) this._processPath(t8.rings, i8); else if (y(t8)) this._processPath(t8.paths, i8); else if (s3(t8)) { const e12 = G2(t8); e12 && this._processPath(e12.rings, i8); } else console.error("drawSolidStroke unexpected geometry type!"); } pushClipPath(t8) { this.drawSolidFill(t8), ++this._clipCount; } popClipPath() { --this._clipCount; } drawImage(t8, e11, s10) { let r18 = s10 * e11, n17 = e11; const o11 = this._resourceManager.getResource(t8); !e11 && r(o11) && (r18 = s10 * o11.width, n17 = o11.height), this._merge(this.transformPt([-r18 / 2, -n17 / 2]), 0), this._merge(this.transformPt([-r18 / 2, n17 / 2]), 0), this._merge(this.transformPt([r18 / 2, -n17 / 2]), 0), this._merge(this.transformPt([r18 / 2, n17 / 2]), 0); } drawText(t8) { this._textRasterizer || (this._textRasterizer = new s5()); } _processPath(t8, e11) { if (t8) for (const s10 of t8) { const t9 = s10 ? s10.length : 0; if (t9 > 1) { this._merge(this.transformPt(s10[0]), e11); for (let i8 = 1; i8 < t9; ++i8) this._merge(this.transformPt(s10[i8]), e11); } } } _merge(t8, e11) { t8[0] - e11 < this._xmin && (this._xmin = t8[0] - e11), t8[0] + e11 > this._xmax && (this._xmax = t8[0] + e11), t8[1] - e11 < this._ymin && (this._ymin = t8[1] - e11), t8[1] + e11 > this._ymax && (this._ymax = t8[1] + e11); } }; var j4 = class extends F { constructor() { super(...arguments), this._searchPoint = [0, 0], this._searchDistPoint = 0; } hitTest(t8, e11, s10, i8, r18, o11) { const a10 = o11 * u(1); this.setTransform(), this.setGeomUnitsPerPoint(a10), this._searchPoint = [(t8[0] + t8[2]) / 2, (t8[1] + t8[3]) / 2], this._searchDistPoint = (t8[2] - t8[0]) / 2 / a10, this._textInfo = i8; const h6 = e11 && (e11.type === "CIMPointSymbol" && e11.angleAlignment !== "Map" || e11.type === "CIMTextSymbol"); return this._mapRotation = h6 ? r18 : 0, this._earlyReturn = false, this.drawSymbol(e11, s10), this._earlyReturn; } drawSolidFill(t8, e11) { this._hitTestFill(t8); } drawHatchFill(t8, e11) { this._hitTestFill(t8); } drawPictureFill(t8, e11) { this._hitTestFill(t8); } drawGradientFill(t8, e11) { this._hitTestFill(t8); } drawSolidStroke(t8, e11, s10, i8, r18, n17) { this._hitTestStroke(t8, s10); } drawPictureStroke(t8, e11) { this._hitTestStroke(t8, e11.width); } drawGradientStroke(t8, e11) { this._hitTestStroke(t8, e11.width); } drawMarkerLayer(t8, e11) { t8.markerPlacement && t8.markerPlacement.type === "CIMMarkerPlacementInsidePolygon" ? this._hitTestFill(e11) : super.drawMarkerLayer(t8, e11); } pushClipPath(t8) { } popClipPath() { } drawImage(t8, e11, i8) { const r18 = this._resourceManager.getResource(t8); if (t(r18) || r18.height === 0 || e11 === 0) return; const n17 = e11 * this.geomUnitsPerPoint(), o11 = n17 * i8 * (r18.width / r18.height), a10 = this.reverseTransformPt(this._searchPoint), h6 = this._searchDistPoint; Math.abs(a10[0]) < o11 / 2 + h6 && Math.abs(a10[1]) < n17 / 2 + h6 && (this._earlyReturn = true); } drawText(e11) { const s10 = this._textInfo; if (!s10) return; const i8 = s10.get(e11); if (!i8) return; const { text: r18, mosaicItem: n17 } = i8; if (!n17 || n17.glyphMosaicItems.length === 0) return; const o11 = e11.height ?? v2, a10 = B3(e11.lineGapType, e11.lineGap ?? 0, o11), h6 = n4(r18)[1], l9 = n17.glyphMosaicItems, c9 = j3(l9, h6, { scale: o11 / j, angle: 0, xOffset: 0, yOffset: 0, hAlign: E(e11.horizontalAlignment), vAlign: H(e11.verticalAlignment), maxLineWidth: 512, lineHeight: f2 * Math.max(0.25, Math.min(a10 || 1, 4)), decoration: e11.font.decoration || "none", isCIM: true }), m7 = this.reverseTransformPt(this._searchPoint), f8 = m7[0], u9 = m7[1]; for (const t8 of c9.glyphs) if (f8 > t8.xTopLeft && f8 < t8.xBottomRight && u9 > -t8.yBottomRight && u9 < -t8.yTopLeft) { this._earlyReturn = true; break; } } _hitTestFill(t8) { let e11 = null; if (s3(t8)) { const s11 = t8; e11 = [[[s11.xmin, s11.ymin], [s11.xmin, s11.ymax], [s11.xmax, s11.ymax], [s11.xmax, s11.ymin], [s11.xmin, s11.ymin]]]; } else if (c2(t8)) e11 = t8.rings; else { if (!y(t8)) return; e11 = t8.paths; } const s10 = this.reverseTransformPt(this._searchPoint); if (this._pointInPolygon(s10, e11) && (this._earlyReturn = true), !this._earlyReturn) { const t9 = this.reverseTransformSize(this._searchDistPoint) * this.geomUnitsPerPoint(); this._nearLine(s10, e11, t9) && (this._earlyReturn = true); } } _hitTestStroke(t8, e11) { let s10 = null; if (s3(t8)) { const e12 = t8; s10 = [[[e12.xmin, e12.ymin], [e12.xmin, e12.ymax], [e12.xmax, e12.ymax], [e12.xmax, e12.ymin], [e12.xmin, e12.ymin]]]; } else if (c2(t8)) s10 = t8.rings; else { if (!y(t8)) return; s10 = t8.paths; } const i8 = this.reverseTransformPt(this._searchPoint), r18 = e11 * this.geomUnitsPerPoint(), n17 = this.reverseTransformSize(this._searchDistPoint) * this.geomUnitsPerPoint(); this._nearLine(i8, s10, r18 / 2 + n17) && (this._earlyReturn = true); } _pointInPolygon(t8, e11) { let s10 = 0; for (const i8 of e11) { const e12 = i8.length; for (let r18 = 1; r18 < e12; ++r18) { const e13 = i8[r18 - 1], n17 = i8[r18]; if (e13[1] > t8[1] == n17[1] > t8[1]) continue; (n17[0] - e13[0]) * (t8[1] - e13[1]) - (n17[1] - e13[1]) * (t8[0] - e13[0]) > 0 ? s10++ : s10--; } } return s10 !== 0; } _nearLine(t8, e11, s10) { for (const i8 of e11) { const e12 = i8.length; for (let r18 = 1; r18 < e12; ++r18) { const e13 = i8[r18 - 1], n17 = i8[r18]; let o11 = (n17[0] - e13[0]) * (n17[0] - e13[0]) + (n17[1] - e13[1]) * (n17[1] - e13[1]); if (o11 === 0) continue; o11 = Math.sqrt(o11); const a10 = ((n17[0] - e13[0]) * (t8[1] - e13[1]) - (n17[1] - e13[1]) * (t8[0] - e13[0])) / o11; if (Math.abs(a10) < s10) { const i9 = ((n17[0] - e13[0]) * (t8[0] - e13[0]) + (n17[1] - e13[1]) * (t8[1] - e13[1])) / o11; if (i9 > -s10 && i9 < o11 + s10) return true; } } } return false; } }; var A3 = class extends F { constructor(t8, e11, s10) { super(e11, s10), this._ctx = t8; } drawSolidFill(t8, e11) { if (!t8) return; if (c2(t8)) this._buildPath(t8.rings, true); else if (y(t8)) this._buildPath(t8.paths, true); else if (s3(t8)) this._buildPath(G2(t8).rings, true); else { if (!f(t8)) return; console.log("CanvasDrawHelper.drawSolidFill - No implementation!"); } const s10 = this._ctx; s10.fillStyle = typeof e11 == "string" ? e11 : "rgba(" + Math.round(e11[0]) + "," + Math.round(e11[1]) + "," + Math.round(e11[2]) + "," + e11[3] / 255 + ")", s10.fill("evenodd"); } drawSolidStroke(t8, e11, s10, i8, r18, n17) { if (!t8 || !e11 || s10 === 0) return; if (c2(t8)) this._buildPath(t8.rings, true); else if (y(t8)) this._buildPath(t8.paths, false); else { if (!s3(t8)) return void console.log("CanvasDrawHelper.drawSolidStroke isn't implemented!"); this._buildPath(G2(t8).rings, true); } const o11 = this._ctx; o11.strokeStyle = typeof e11 == "string" ? e11 : "rgba(" + Math.round(e11[0]) + "," + Math.round(e11[1]) + "," + Math.round(e11[2]) + "," + e11[3] / 255 + ")", o11.lineWidth = this.transformSize(s10) + 0.5, this._setCapStyle(i8), this._setJoinStyle(r18), o11.miterLimit = n17, o11.stroke(); } pushClipPath(t8) { if (this._ctx.save(), c2(t8)) this._buildPath(t8.rings, true); else if (y(t8)) this._buildPath(t8.paths, true); else { if (!s3(t8)) return; this._buildPath(G2(t8).rings, true); } this._ctx.clip("evenodd"); } popClipPath() { this._ctx.restore(); } drawImage(t8, e11, i8) { const r18 = this._resourceManager.getResource(t8); if (t(r18)) return; const n17 = this._ctx, o11 = n17.canvas.width, a10 = n17.canvas.height; let h6 = e11 * i8 * (r18.width / r18.height), l9 = i8 * e11; e11 || (h6 = i8 * r18.width, l9 = i8 * r18.height); const c9 = this.transformPt([0, 0]), m7 = this.transformSize(h6), f8 = this.transformSize(l9); this._ctx.drawImage(r18, 0, 0, r18.width, r18.height, c9[0] - m7 / 2, c9[1] - f8 / 2, Math.min(m7, o11), Math.min(f8, a10)); } drawText(t8) { this._textRasterizer || (this._textRasterizer = new s5()); } _buildPath(t8, e11) { const s10 = this._ctx; if (s10.beginPath(), t8) for (const i8 of t8) { const t9 = i8 ? i8.length : 0; if (t9 > 1) { let r18 = this.transformPt(i8[0]); s10.moveTo(r18[0], r18[1]); for (let e12 = 1; e12 < t9; ++e12) r18 = this.transformPt(i8[e12]), s10.lineTo(r18[0], r18[1]); e11 && s10.closePath(); } } } _setCapStyle(t8) { switch (t8) { case U2.Butt: this._ctx.lineCap = "butt"; break; case U2.Round: this._ctx.lineCap = "round"; break; case U2.Square: this._ctx.lineCap = "square"; } } _setJoinStyle(t8) { switch (t8) { case w.Bevel: this._ctx.lineJoin = "bevel"; break; case w.Round: this._ctx.lineJoin = "round"; break; case w.Miter: this._ctx.lineJoin = "miter"; } } }; var G2 = (t8) => t8 ? { spatialReference: t8.spatialReference, rings: [[[t8.xmin, t8.ymin], [t8.xmin, t8.ymax], [t8.xmax, t8.ymax], [t8.xmax, t8.ymin], [t8.xmin, t8.ymin]]] } : null; var E = (t8) => { switch (t8) { case "Left": return e4.Left; case "Right": return e4.Right; case "Center": return e4.Center; case "Justify": return L2.warnOnce("Horizontal alignment 'justify' is not implemented. Falling back to 'center'."), e4.Center; } }; var H = (t8) => { switch (t8) { case "Top": return t3.Top; case "Center": return t3.Center; case "Bottom": return t3.Bottom; case "Baseline": return t3.Baseline; } }; var B3 = (t8, e11, s10) => { switch (t8) { case "ExtraLeading": return 1 + e11 / s10; case "Multiple": return e11; case "Exact": return e11 / s10; } }; // node_modules/@arcgis/core/symbols/cim/CIMSymbolHelper.js var V = Math.PI; var B4 = V / 2; var X2 = 4; var U5 = 10; var _3 = 96 / 72; var H2 = Math.PI / 180; var Y2 = s.getLogger("esri.symbols.cim.CIMSymbolHelper"); function q(e11) { if (!e11 || !e11.type) return null; let t8; switch (e11.type) { case "cim": return e11.data; case "web-style": return e11; case "simple-marker": t8 = Z2.fromSimpleMarker(e11); break; case "picture-marker": t8 = Z2.fromPictureMarker(e11); break; case "simple-line": t8 = Z2.fromSimpleLineSymbol(e11); break; case "simple-fill": t8 = Z2.fromSimpleFillSymbol(e11); break; case "picture-fill": t8 = Z2.fromPictureFillSymbol(e11); break; case "text": t8 = Z2.fromTextSymbol(e11); } return { type: "CIMSymbolReference", symbol: t8 }; } function W(e11, t8) { switch (t8.type) { case "CIMSymbolReference": return W(e11, t8.symbol); case "CIMPointSymbol": { const r18 = { x: 0, y: 0 }; e11.drawSymbol(t8, r18); break; } case "CIMLineSymbol": { const r18 = { paths: [[[0, 0], [0, 1]]] }; e11.drawSymbol(t8, r18); break; } case "CIMPolygonSymbol": { const r18 = { rings: [[[0, 0], [0, 1], [0, 0]]] }; e11.drawSymbol(t8, r18); break; } case "CIMTextSymbol": { const r18 = { x: 0, y: 0 }; e11.drawSymbol(t8, r18); break; } case "CIMVectorMarker": { const r18 = new t6(); e11.drawMarker(t8, r18); break; } } return e11.envelope(); } function $(e11) { if (!e11) return 0; switch (e11.type) { case "CIMMarkerPlacementAlongLineSameSize": case "CIMMarkerPlacementAlongLineRandomSize": case "CIMMarkerPlacementAtExtremities": case "CIMMarkerPlacementAtMeasuredUnits": case "CIMMarkerPlacementAtRatioPositions": case "CIMMarkerPlacementOnLine": case "CIMMarkerPlacementOnVertices": return Math.abs(e11.offset); default: return 0; } } function J(e11) { if (!e11) return 0; switch (e11.type) { case "CIMGeometricEffectArrow": return Math.abs(0.5 * e11.width); case "CIMGeometricEffectBuffer": return Math.abs(e11.size); case "CIMGeometricEffectExtension": case "CIMGeometricEffectRadial": return Math.abs(e11.length); case "CIMGeometricEffectJog": return Math.abs(0.5 * e11.length); case "CIMGeometricEffectMove": return Math.max(Math.abs(M(e11.offsetX)), Math.abs(M(e11.offsetY))); case "CIMGeometricEffectOffset": case "CIMGeometricEffectOffsetTangent": return Math.abs(e11.offset); case "CIMGeometricEffectRegularPolygon": return Math.abs(e11.radius); case "CIMGeometricEffectRotate": case "CIMGeometricEffectScale": default: return 0; case "CIMGeometricEffectTaperedPolygon": return 0.5 * Math.max(Math.abs(e11.fromWidth), Math.abs(e11.toWidth)); case "CIMGeometricEffectWave": return Math.abs(e11.amplitude); } } function K2(e11) { if (!e11) return 0; let t8 = 0; for (const r18 of e11) t8 += J(r18); return t8; } var Q = class { getSymbolInflateSize(e11, t8, r18, o11, a10) { return e11 || (e11 = [0, 0, 0, 0]), t8 ? this._getInflateSize(e11, t8, r18, o11, a10) : e11; } static safeSize(e11) { const t8 = Math.max(Math.abs(e11[0]), Math.abs(e11[2])), r18 = Math.max(Math.abs(e11[1]), Math.abs(e11[3])); return Math.sqrt(t8 * t8 + r18 * r18); } _vectorMarkerBounds(e11, t8, r18, o11) { let a10 = true; const i8 = u2(); if (t8 && t8.markerGraphics) for (const s10 of t8.markerGraphics) { const t9 = [0, 0, 0, 0]; s10.geometry && (c(i8, s10.geometry), t9[0] = 0, t9[1] = 0, t9[2] = 0, t9[3] = 0, this.getSymbolInflateSize(t9, s10.symbol, r18, 0, o11), i8[0] += t9[0], i8[1] += t9[1], i8[2] += t9[2], i8[3] += t9[3], a10 ? (e11[0] = i8[0], e11[1] = i8[1], e11[2] = i8[2], e11[3] = i8[3], a10 = false) : (e11[0] = Math.min(e11[0], i8[0]), e11[1] = Math.min(e11[1], i8[1]), e11[2] = Math.max(e11[2], i8[2]), e11[3] = Math.max(e11[3], i8[3]))); } return e11; } _getInflateSize(e11, t8, r18, o11, a10) { if (fe(t8)) { const i8 = this._getLayersInflateSize(e11, t8.symbolLayers, r18, o11, a10), s10 = K2(t8.effects); return s10 > 0 && (i8[0] -= s10, i8[1] -= s10, i8[2] += s10, i8[3] += s10), i8; } return this._getTextInflatedSize(e11, t8, a10); } _getLayersInflateSize(e11, t8, r18, o11, a10) { let i8 = true; if (!t8) return e11; for (const n17 of t8) { if (!n17) continue; let t9 = [0, 0, 0, 0]; switch (n17.type) { case "CIMSolidFill": case "CIMPictureFill": case "CIMHatchFill": case "CIMGradientFill": break; case "CIMSolidStroke": case "CIMPictureStroke": case "CIMGradientStroke": { const e12 = n17; let r19 = e12.width; e12.capStyle === U2.Square || e12.joinStyle === w.Miter ? r19 /= 1.4142135623730951 : r19 /= 2, t9[0] = -r19, t9[1] = -r19, t9[2] = r19, t9[3] = r19; break; } case "CIMCharacterMarker": case "CIMVectorMarker": case "CIMPictureMarker": { const e12 = n17; if (n17.type === "CIMVectorMarker") { const e13 = n17; if (t9 = this._vectorMarkerBounds(t9, e13, r18, a10), e13.frame) { const r19 = (e13.frame.xmin + e13.frame.xmax) / 2, o12 = (e13.frame.ymin + e13.frame.ymax) / 2; t9[0] -= r19, t9[1] -= o12, t9[2] -= r19, t9[3] -= o12; const a11 = e13.size / (e13.frame.ymax - e13.frame.ymin); t9[0] *= a11, t9[1] *= a11, t9[2] *= a11, t9[3] *= a11; } } else if (n17.type === "CIMPictureMarker") { const o12 = n17, a11 = r18.getResource(o12.url); let i10 = 1; r(a11) && a11.height && (i10 = a11.width / a11.height); const l11 = e12.size / 2, c10 = e12.size * i10 * o12.scaleX / 2; t9 = [-c10, -l11, c10, l11]; } else { const r19 = e12.size / 2; t9 = [-r19, -r19, r19, r19]; } if (e12.anchorPoint) { let r19, o12; e12.anchorPointUnits === "Absolute" ? (r19 = e12.anchorPoint.x, o12 = e12.anchorPoint.y) : (r19 = e12.anchorPoint.x * (t9[2] - t9[0]), o12 = e12.anchorPoint.y * (t9[3] - t9[1])), t9[0] -= r19, t9[1] -= o12, t9[2] -= r19, t9[3] -= o12; } let i9 = M(e12.rotation); if (e12.rotateClockwise && (i9 = -i9), o11 && (i9 -= o11), i9) { const e13 = H2 * i9, r19 = Math.cos(e13), o12 = Math.sin(e13), a11 = u2([n3, n3, -n3, -n3]); m2(a11, [t9[0] * r19 - t9[1] * o12, t9[0] * o12 + t9[1] * r19]), m2(a11, [t9[0] * r19 - t9[3] * o12, t9[0] * o12 + t9[3] * r19]), m2(a11, [t9[2] * r19 - t9[1] * o12, t9[2] * o12 + t9[1] * r19]), m2(a11, [t9[2] * r19 - t9[3] * o12, t9[2] * o12 + t9[3] * r19]), t9 = a11; } let l10 = M(e12.offsetX), c9 = M(e12.offsetY); if (o11) { const e13 = H2 * o11, t10 = Math.cos(e13), r19 = Math.sin(e13), a11 = l10 * r19 + c9 * t10; l10 = l10 * t10 - c9 * r19, c9 = a11; } t9[0] += l10, t9[1] += c9, t9[2] += l10, t9[3] += c9; const m7 = $(e12.markerPlacement); m7 > 0 && (t9[0] -= m7, t9[1] -= m7, t9[2] += m7, t9[3] += m7); break; } } const l9 = K2(n17.effects); l9 > 0 && (t9[0] -= l9, t9[1] -= l9, t9[2] += l9, t9[3] += l9), i8 ? (e11[0] = t9[0], e11[1] = t9[1], e11[2] = t9[2], e11[3] = t9[3], i8 = false) : (e11[0] = Math.min(e11[0], t9[0]), e11[1] = Math.min(e11[1], t9[1]), e11[2] = Math.max(e11[2], t9[2]), e11[3] = Math.max(e11[3], t9[3])); } return e11; } _getTextInflatedSize(e11, r18, o11) { const a10 = r18.height ?? U5; if (e11[0] = -a10 / 2, e11[1] = -a10 / 2, e11[2] = a10 / 2, e11[3] = a10 / 2, !o11) return e11; const i8 = o11.get(r18); if (!i8) return e11; const { text: s10, mosaicItem: n17 } = i8; if (!n17 || n17.glyphMosaicItems.length === 0) return e11; const l9 = B3(r18.lineGapType, r18.lineGap ?? 0, a10), c9 = n4(s10)[1], m7 = n17.glyphMosaicItems, f8 = j3(m7, c9, { scale: a10 / j, angle: M(r18.angle), xOffset: M(r18.offsetX), yOffset: M(r18.offsetY), hAlign: E(r18.horizontalAlignment), vAlign: H(r18.verticalAlignment), maxLineWidth: 512, lineHeight: f2 * Math.max(0.25, Math.min(l9 || 1, 4)), decoration: r18.font.decoration || "none", isCIM: true }).boundsT; return e11[0] = f8.x - f8.halfWidth, e11[1] = -f8.y - f8.halfHeight, e11[2] = f8.x + f8.halfWidth, e11[3] = -f8.y + f8.halfHeight, e11; } }; var Z2 = class { static getEnvelope(e11, t8) { const r18 = new U4(t8); if (Array.isArray(e11)) { let t9; for (const o11 of e11) t9 ? t9.union(W(r18, o11)) : t9 = W(r18, o11); return t9; } return W(r18, e11); } static getTextureAnchor(e11, t8) { const r18 = this.getEnvelope(e11, t8); if (!r18) return [0, 0, 0]; const o11 = (r18.x + 0.5 * r18.width) * _3, a10 = -(r18.y + 0.5 * r18.height) * _3, i8 = r18.width * _3 + 2, s10 = r18.height * _3 + 2; return [o11 / i8, a10 / s10, s10]; } static rasterize(e11, t8, r18, o11, a10 = true) { const i8 = r18 || this.getEnvelope(t8, o11); if (!i8) return [null, 0, 0, 0, 0]; const s10 = (i8.x + 0.5 * i8.width) * _3, n17 = (i8.y + 0.5 * i8.height) * _3; e11.width = i8.width * _3, e11.height = i8.height * _3, r18 || (e11.width += 2, e11.height += 2); const l9 = e11.getContext("2d"), c9 = z2.createScale(_3, -_3); c9.translate(0.5 * e11.width - s10, 0.5 * e11.height + n17); const m7 = new A3(l9, o11, c9); switch (t8.type) { case "CIMPointSymbol": { const e12 = { type: "point", x: 0, y: 0 }; m7.drawSymbol(t8, e12); break; } case "CIMVectorMarker": { const e12 = new t6(); m7.drawMarker(t8, e12); break; } } const f8 = l9.getImageData(0, 0, e11.width, e11.height), y5 = new Uint8Array(f8.data); if (a10) { let e12; for (let t9 = 0; t9 < y5.length; t9 += 4) e12 = y5[t9 + 3] / 255, y5[t9] = y5[t9] * e12, y5[t9 + 1] = y5[t9 + 1] * e12, y5[t9 + 2] = y5[t9 + 2] * e12; } return [y5, e11.width, e11.height, -s10 / e11.width, -n17 / e11.height]; } static fromTextSymbol(e11) { const { angle: r18, color: o11, font: a10, haloColor: i8, haloSize: s10, horizontalAlignment: n17, kerning: l9, text: c9, verticalAlignment: m7, xoffset: f8, yoffset: y5 } = e11; let h6, M3, p3, u9, S; a10 && (h6 = a10.family, M3 = a10.style, p3 = a10.weight, u9 = a10.size, S = a10.decoration); let d2 = false; if (c9) { d2 = n4(c9)[1]; } return { type: "CIMPointSymbol", symbolLayers: [{ type: "CIMVectorMarker", enable: true, anchorPointUnits: "Relative", dominantSizeAxis3D: "Y", size: 10, billboardMode3D: "FaceNearPlane", frame: { xmin: -5, ymin: -5, xmax: 5, ymax: 5 }, markerGraphics: [{ type: "CIMMarkerGraphic", geometry: { x: 0, y: 0 }, symbol: { type: "CIMTextSymbol", angle: r18, blockProgression: C2.BTT, depth3D: 1, extrapolateBaselines: true, fontEffects: l3.Normal, fontEncoding: a.Unicode, fontFamilyName: h6 || "Arial", fontStyleName: ne2(M3, p3), fontType: u3.Unspecified, haloSize: s10, height: u9, hinting: y2.Default, horizontalAlignment: ae(n17 ?? "center"), kerning: l9, letterWidth: 100, ligatures: true, lineGapType: "Multiple", offsetX: M(f8), offsetY: M(y5), strikethrough: S === "line-through", underline: S === "underline", symbol: { type: "CIMPolygonSymbol", symbolLayers: [{ type: "CIMSolidFill", enable: true, color: se(o11) }] }, haloSymbol: { type: "CIMPolygonSymbol", symbolLayers: [{ type: "CIMSolidFill", enable: true, color: se(i8) }] }, shadowColor: [0, 0, 0, 255], shadowOffsetX: 1, shadowOffsetY: 1, textCase: "Normal", textDirection: d2 ? ne.RTL : ne.LTR, verticalAlignment: ie2(m7 ?? "baseline"), verticalGlyphOrientation: oe.Right, wordSpacing: 100, billboardMode3D: m3.FaceNearPlane }, textString: c9 }], scaleSymbolsProportionally: true, respectFrame: true }], scaleX: 1, angleAlignment: "Display" }; } static fromPictureFillSymbol(e11) { const { height: t8, outline: r18, width: o11, xoffset: a10, xscale: i8, yoffset: s10, yscale: n17 } = e11, l9 = [], c9 = { type: "CIMPolygonSymbol", symbolLayers: l9 }; if (r18) { const { cap: e12, join: t9, miterLimit: o12, width: a11 } = r18; l9.push({ type: "CIMSolidStroke", color: se(r18.color), capStyle: re(e12), joinStyle: oe2(t9), miterLimit: o12, width: a11 }); } let m7 = e11.url; e11.type === "esriPFS" && e11.imageData && (m7 = e11.imageData); const f8 = "angle" in e11 ? e11.angle : 0, y5 = o11 * (i8 || 1), h6 = t8 * (n17 || 1); return l9.push({ type: "CIMPictureFill", invertBackfaceTexture: false, scaleX: 1, textureFilter: ie.Picture, tintColor: null, url: m7, height: h6, width: y5, offsetX: M(a10), offsetY: M(s10), rotation: M(-f8), colorSubstitutions: null }), c9; } static fromSimpleFillSymbol(e11) { const { color: t8, style: r18, outline: a10 } = e11, s10 = [], n17 = { type: "CIMPolygonSymbol", symbolLayers: s10 }; let l9 = null; if (a10) { const { cap: e12, join: t9, style: r19 } = a10; r19 !== "solid" && r19 !== "none" && r19 !== "esriSLSSolid" && r19 !== "esriSLSNull" && (l9 = [{ type: "CIMGeometricEffectDashes", dashTemplate: me(r19, e12), lineDashEnding: "NoConstraint", scaleDash: true, offsetAlongLine: null }]), s10.push({ type: "CIMSolidStroke", color: se(a10.color), capStyle: re(e12), joinStyle: oe2(t9), miterLimit: a10.miterLimit, width: a10.width, effects: l9 }); } if (r18 && r18 !== "solid" && r18 !== "none" && r18 !== "esriSFSSolid" && r18 !== "esriSFSNull") { const e12 = { type: "CIMLineSymbol", symbolLayers: [{ type: "CIMSolidStroke", color: se(t8), capStyle: U2.Butt, joinStyle: w.Miter, width: 0.75 }] }; let a11 = 0; const n18 = c3(Math.ceil(window.devicePixelRatio)), l10 = he(r18) ? 8 * n18 : 10 * n18; switch (r18) { case "vertical": case "esriSFSVertical": a11 = 90; break; case "forward-diagonal": case "esriSFSForwardDiagonal": case "diagonal-cross": case "esriSFSDiagonalCross": a11 = -45; break; case "backward-diagonal": case "esriSFSBackwardDiagonal": a11 = 45; break; case "cross": case "esriSFSCross": a11 = 0; } s10.push({ type: "CIMHatchFill", lineSymbol: e12, offsetX: 0, offsetY: 0, rotation: a11, separation: l10 }), r18 === "cross" || r18 === "esriSFSCross" ? s10.push({ type: "CIMHatchFill", lineSymbol: m(e12), offsetX: 0, offsetY: 0, rotation: 90, separation: l10 }) : r18 !== "diagonal-cross" && r18 !== "esriSFSDiagonalCross" || s10.push({ type: "CIMHatchFill", lineSymbol: m(e12), offsetX: 0, offsetY: 0, rotation: 45, separation: l10 }); } else !r18 || r18 !== "solid" && r18 !== "esriSFSSolid" || s10.push({ type: "CIMSolidFill", enable: true, color: se(t8) }); return n17; } static fromSimpleLineSymbol(e11) { const { cap: t8, color: r18, join: o11, marker: a10, miterLimit: i8, style: s10, width: n17 } = e11; let l9 = null; s10 !== "solid" && s10 !== "none" && s10 !== "esriSLSSolid" && s10 !== "esriSLSNull" && (l9 = [{ type: "CIMGeometricEffectDashes", dashTemplate: me(s10, t8), lineDashEnding: "NoConstraint", scaleDash: true, offsetAlongLine: null }]); const c9 = []; if (a10) { let e12; switch (a10.placement) { case "begin-end": e12 = o3.Both; break; case "begin": e12 = o3.JustBegin; break; case "end": e12 = o3.JustEnd; break; default: e12 = o3.None; } const t9 = Z2.fromSimpleMarker(a10, n17, r18).symbolLayers[0]; t9.markerPlacement = { type: "CIMMarkerPlacementAtExtremities", angleToLine: true, offset: 0, extremityPlacement: e12, offsetAlongLine: 0 }, c9.push(t9); } return s10 !== "none" && s10 !== "esriSLSNull" && c9.push({ type: "CIMSolidStroke", color: se(r18), capStyle: re(t8), joinStyle: oe2(o11), miterLimit: i8, width: n17, effects: l9 }), { type: "CIMLineSymbol", symbolLayers: c9 }; } static fromPictureMarker(e11) { const { angle: t8, height: r18, width: o11, xoffset: a10, yoffset: i8 } = e11; let s10 = e11.url; return e11.type === "esriPMS" && e11.imageData && (s10 = e11.imageData), { type: "CIMPointSymbol", symbolLayers: [{ type: "CIMPictureMarker", invertBackfaceTexture: false, scaleX: 1, textureFilter: ie.Picture, tintColor: null, url: s10, size: r18, width: o11, offsetX: M(a10), offsetY: M(i8), rotation: M(-t8) }] }; } static fromSimpleMarker(e11, t8, r18) { const { style: o11 } = e11, a10 = e11.color ?? r18; if (o11 === "path") { const t9 = []; if ("outline" in e11 && e11.outline) { const r20 = e11.outline; t9.push({ type: "CIMSolidStroke", enable: true, width: u(Math.round(e3(r20.width))), color: se(r20.color) }); } t9.push({ type: "CIMSolidFill", enable: true, color: se(a10), path: e11.path }); const [r19, o12] = ye("square"); return { type: "CIMPointSymbol", symbolLayers: [{ type: "CIMVectorMarker", enable: true, rotation: M(-e11.angle), size: M(e11.size || 6), offsetX: M(e11.xoffset), offsetY: M(e11.yoffset), frame: r19, markerGraphics: [{ type: "CIMMarkerGraphic", geometry: o12, symbol: { type: "CIMPolygonSymbol", symbolLayers: t9 } }] }] }; } const [i8, s10] = ye(o11); let n17; if (s10 && i8) { const r19 = []; if ("outline" in e11 && e11.outline) { const t9 = e11.outline; r19.push({ type: "CIMSolidStroke", enable: true, width: t9.width > 0.667 ? u(Math.round(e3(t9.width))) : t9.width, color: se(t9.color) }); } else !t8 || e11.type !== "line-marker" || e11.style !== "cross" && e11.style !== "x" || r19.push({ type: "CIMSolidStroke", enable: true, width: t8, color: se(a10) }); r19.push({ type: "CIMSolidFill", enable: true, color: se(a10) }); const o12 = { type: "CIMPolygonSymbol", symbolLayers: r19 }; n17 = { type: "CIMPointSymbol", symbolLayers: [{ type: "CIMVectorMarker", enable: true, rotation: M(-e11.angle), size: M(e11.size || 6 * t8), offsetX: M(e11.xoffset), offsetY: M(e11.yoffset), frame: i8, markerGraphics: [{ type: "CIMMarkerGraphic", geometry: s10, symbol: o12 }] }] }; } return n17; } static fromCIMHatchFill(e11) { const t8 = e11.separation ?? X2, r18 = t8 / 2, o11 = 4, a10 = e11.lineSymbol; let i8 = this._getLineSymbolPeriod(e11.lineSymbol) || o11; for (; i8 < o11; ) i8 *= 2; const s10 = i8 / 2; return { type: "CIMVectorMarker", frame: { xmin: -s10, xmax: s10, ymin: -r18, ymax: r18 }, markerGraphics: [{ type: "CIMMarkerGraphic", geometry: { paths: [[[-s10, 0], [s10, 0]]] }, symbol: a10 }], size: t8 }; } static _getLineSymbolPeriod(e11) { if (e11) { const t8 = this._getEffectsRepeat(e11.effects); if (t8) return t8; if (e11.symbolLayers) { for (const r18 of e11.symbolLayers) if (r18) { const e12 = this._getEffectsRepeat(r18.effects); if (e12) return e12; switch (r18.type) { case "CIMCharacterMarker": case "CIMPictureMarker": case "CIMVectorMarker": case "CIMObjectMarker3D": case "CIMglTFMarker3D": { const e13 = this._getPlacementRepeat(r18.markerPlacement); if (e13) return e13; } } } } } return 0; } static _getEffectsRepeat(e11) { if (e11) { for (const t8 of e11) if (t8) switch (t8.type) { case "CIMGeometricEffectDashes": { const e12 = t8.dashTemplate; if (e12 && e12.length) { let t9 = 0; for (const r18 of e12) t9 += r18; return 1 & e12.length && (t9 *= 2), t9; } break; } case "CIMGeometricEffectWave": return t8.period; default: Y2.error(`unsupported geometric effect type ${t8.type}`); } } return 0; } static _getPlacementRepeat(e11) { if (e11) switch (e11.type) { case "CIMMarkerPlacementAlongLineSameSize": case "CIMMarkerPlacementAlongLineRandomSize": case "CIMMarkerPlacementAlongLineVariableSize": { const t8 = e11.placementTemplate; if (t8 && t8.length) { let e12 = 0; for (const r18 of t8) e12 += r18; return 1 & t8.length && (e12 *= 2), e12; } break; } } return 0; } static fromCIMInsidePolygon(e11) { const t8 = e11.markerPlacement, r18 = { type: e11.type, ...e11 }; r18.markerPlacement = null, r18.anchorPoint = null; const o11 = Math.abs(t8.stepX), a10 = Math.abs(t8.stepY), i8 = (t8.randomness ?? 100) / 100; let s10, n17, c9, f8; if (t8.gridType === "Random") { const e12 = e3(dt), r19 = Math.max(Math.floor(e12 / o11), 1), y5 = Math.max(Math.floor(e12 / a10), 1); s10 = r19 * o11 / 2, n17 = y5 * a10 / 2, c9 = 2 * n17; const h6 = new t2(t8.seed), M3 = i8 * o11 / 1.5, p3 = i8 * a10 / 1.5; f8 = []; for (let t9 = 0; t9 < r19; t9++) for (let e13 = 0; e13 < y5; e13++) { const r20 = t9 * o11 - s10 + M3 * (0.5 - h6.getFloat()), i9 = e13 * a10 - n17 + p3 * (0.5 - h6.getFloat()); f8.push({ x: r20, y: i9 }), t9 === 0 && f8.push({ x: r20 + 2 * s10, y: i9 }), e13 === 0 && f8.push({ x: r20, y: i9 + 2 * n17 }); } } else t8.shiftOddRows === true ? (s10 = o11 / 2, n17 = a10, c9 = 2 * a10, f8 = [{ x: -s10, y: 0 }, { x: s10, y: 0 }, { x: 0, y: n17 }, { x: 0, y: -n17 }]) : (s10 = o11 / 2, n17 = a10 / 2, c9 = a10, f8 = [{ x: 0, y: 0 }]); return { type: "CIMVectorMarker", frame: { xmin: -s10, xmax: s10, ymin: -n17, ymax: n17 }, markerGraphics: f8.map((e12) => ({ type: "CIMMarkerGraphic", geometry: e12, symbol: { type: "CIMPointSymbol", symbolLayers: [r18] } })), size: c9 }; } static getFillColor(e11) { if (!e11) return null; switch (e11.type) { case "CIMPolygonSymbol": if (e11.symbolLayers) for (const t8 of e11.symbolLayers) { const e12 = Z2.getFillColor(t8); if (e12 != null) return e12; } break; case "CIMTextSymbol": return Z2.getFillColor(e11.symbol); case "CIMSolidFill": return e11.color; } } static getStrokeColor(e11) { if (e11) switch (e11.type) { case "CIMPolygonSymbol": case "CIMLineSymbol": if (e11.symbolLayers) for (const t8 of e11.symbolLayers) { const e12 = Z2.getStrokeColor(t8); if (e12 !== void 0) return e12; } break; case "CIMTextSymbol": return Z2.getStrokeColor(e11.symbol); case "CIMSolidStroke": return e11.color; } } static getStrokeWidth(e11) { if (e11) switch (e11.type) { case "CIMPolygonSymbol": case "CIMLineSymbol": if (e11.symbolLayers) for (const t8 of e11.symbolLayers) { const e12 = Z2.getStrokeWidth(t8); if (e12 !== void 0) return e12; } break; case "CIMTextSymbol": return Z2.getStrokeWidth(e11.symbol); case "CIMSolidStroke": case "CIMGradientStroke": case "CIMPictureStroke": return e11.width; } } static getSize(e11) { if (e11) switch (e11.type) { case "CIMTextSymbol": return e11.height; case "CIMPointSymbol": { let t8 = 0; if (e11.symbolLayers) { for (const r18 of e11.symbolLayers) if (r18) switch (r18.type) { case "CIMCharacterMarker": case "CIMPictureMarker": case "CIMVectorMarker": case "CIMObjectMarker3D": case "CIMglTFMarker3D": { const e12 = r18.size; e12 > t8 && (t8 = e12); break; } } } return t8; } case "CIMLineSymbol": case "CIMPolygonSymbol": { let t8 = 0; if (e11.symbolLayers) { for (const r18 of e11.symbolLayers) if (r18) switch (r18.type) { case "CIMSolidStroke": case "CIMPictureStroke": case "CIMGradientStroke": { const e12 = r18.width; e12 > t8 && (t8 = e12); break; } case "CIMCharacterMarker": case "CIMPictureMarker": case "CIMVectorMarker": case "CIMObjectMarker3D": case "CIMglTFMarker3D": if (f3(r18.markerPlacement)) { const e12 = r18.size; e12 > t8 && (t8 = e12); } } } return t8; } } } static getMarkerScaleRatio(e11) { if (e11 && e11.type === "CIMVectorMarker") { if (e11.scaleSymbolsProportionally !== false && e11.frame) { const t8 = e11.frame.ymax - e11.frame.ymin; return e11.size / t8; } } return 1; } }; var ee = class { static rasterizeSimpleFill(e11, t8, r18) { t8 !== "solid" && t8 !== "none" && t8 !== "esriSFSSolid" && t8 !== "esriSFSNull" || console.error("Unexpected: style does not require rasterization"); const o11 = c3(Math.ceil(r18)), a10 = he(t8) ? 8 * o11 : 16 * o11, s10 = 2 * o11; e11.width = a10, e11.height = a10; const n17 = e11.getContext("2d"); n17.strokeStyle = "#FFFFFF", n17.lineWidth = o11, n17.beginPath(), t8 !== "vertical" && t8 !== "cross" && t8 !== "esriSFSCross" && t8 !== "esriSFSVertical" || (n17.moveTo(a10 / 2, -s10), n17.lineTo(a10 / 2, a10 + s10)), t8 !== "horizontal" && t8 !== "cross" && t8 !== "esriSFSCross" && t8 !== "esriSFSHorizontal" || (n17.moveTo(-s10, a10 / 2), n17.lineTo(a10 + s10, a10 / 2)), t8 !== "forward-diagonal" && t8 !== "diagonal-cross" && t8 !== "esriSFSDiagonalCross" && t8 !== "esriSFSForwardDiagonal" || (n17.moveTo(-s10, -s10), n17.lineTo(a10 + s10, a10 + s10), n17.moveTo(a10 - s10, -s10), n17.lineTo(a10 + s10, s10), n17.moveTo(-s10, a10 - s10), n17.lineTo(s10, a10 + s10)), t8 !== "backward-diagonal" && t8 !== "diagonal-cross" && t8 !== "esriSFSBackwardDiagonal" && t8 !== "esriSFSDiagonalCross" || (n17.moveTo(a10 + s10, -s10), n17.lineTo(-s10, a10 + s10), n17.moveTo(s10, -s10), n17.lineTo(-s10, s10), n17.moveTo(a10 + s10, a10 - s10), n17.lineTo(a10 - s10, a10 + s10)), n17.stroke(); const l9 = n17.getImageData(0, 0, e11.width, e11.height), c9 = new Uint8Array(l9.data); let m7; for (let i8 = 0; i8 < c9.length; i8 += 4) m7 = c9[i8 + 3] / 255, c9[i8] = c9[i8] * m7, c9[i8 + 1] = c9[i8 + 1] * m7, c9[i8 + 2] = c9[i8 + 2] * m7; return [c9, e11.width, e11.height]; } static rasterizeSimpleLine(e11, t8) { return this.rasterizeDash(e11, t8); } static rasterizeDash(e11, t8) { const o11 = t8 === "Butt", a10 = t8 === "Square", i8 = !o11 && !a10; e11.length % 2 == 1 && (e11 = [...e11, ...e11]); const s10 = 15.5, n17 = 2 * s10; let l9 = 0; for (const r18 of e11) l9 += r18; const c9 = Math.round(l9 * s10), m7 = new Float32Array(c9 * n17), f8 = 0.5 * s10; let y5 = 0, h6 = 0, M3 = 0.5, p3 = true; for (const r18 of e11) { for (y5 = h6, h6 += r18 * s10; M3 <= h6; ) { let e12 = 0.5; for (; e12 < n17; ) { const t9 = (e12 - 0.5) * c9 + M3 - 0.5, r19 = i8 ? (e12 - s10) * (e12 - s10) : Math.abs(e12 - s10); m7[t9] = p3 ? o11 ? Math.max(Math.max(y5 + f8 - M3, r19), Math.max(M3 - h6 + f8, r19)) : r19 : i8 ? Math.min((M3 - y5) * (M3 - y5) + r19, (M3 - h6) * (M3 - h6) + r19) : a10 ? Math.min(Math.max(M3 - y5, r19), Math.max(h6 - M3, r19)) : Math.min(Math.max(M3 - y5 + f8, r19), Math.max(h6 + f8 - M3, r19)), e12++; } M3++; } p3 = !p3; } const u9 = m7.length, S = new Uint8Array(4 * u9); for (let d2 = 0; d2 < u9; ++d2) { const e12 = (i8 ? Math.sqrt(m7[d2]) : m7[d2]) / s10; o6(e12, S, 4 * d2); } return [S, c9, n17]; } }; var te = class { static findApplicableOverrides(e11, t8, r18) { if (e11 && t8) { if (e11.primitiveName) { let o11 = false; for (const t9 of r18) if (t9.primitiveName === e11.primitiveName) { o11 = true; break; } if (!o11) for (const a10 of t8) a10.primitiveName === e11.primitiveName && r18.push(a10); } switch (e11.type) { case "CIMPointSymbol": case "CIMLineSymbol": case "CIMPolygonSymbol": if (e11.effects) for (const o11 of e11.effects) te.findApplicableOverrides(o11, t8, r18); if (e11.symbolLayers) for (const o11 of e11.symbolLayers) te.findApplicableOverrides(o11, t8, r18); break; case "CIMTextSymbol": break; case "CIMSolidStroke": case "CIMPictureStroke": case "CIMGradientStroke": case "CIMSolidFill": case "CIMPictureFill": case "CIMHatchFill": case "CIMGradientFill": case "CIMVectorMarker": case "CIMCharacterMarker": case "CIMPictureMarker": if (e11.effects) for (const o11 of e11.effects) te.findApplicableOverrides(o11, t8, r18); if (e11.markerPlacement && te.findApplicableOverrides(e11.markerPlacement, t8, r18), e11.type === "CIMVectorMarker") { if (e11.markerGraphics) for (const o11 of e11.markerGraphics) te.findApplicableOverrides(o11, t8, r18), te.findApplicableOverrides(o11.symbol, t8, r18); } else e11.type === "CIMCharacterMarker" ? te.findApplicableOverrides(e11.symbol, t8, r18) : e11.type === "CIMHatchFill" ? te.findApplicableOverrides(e11.lineSymbol, t8, r18) : e11.type === "CIMPictureMarker" && te.findApplicableOverrides(e11.animatedSymbolProperties, t8, r18); } } } static findEffectOverrides(e11, t8, r18) { if (!t8 || !e11) return; const o11 = e11.length; for (let a10 = 0; a10 < o11; a10++) { const o12 = e11[a10]?.primitiveName; if (o12) { let e12 = false; for (const t9 of r18) if (t9.primitiveName === o12) { e12 = true; break; } if (!e12) for (const a11 of t8) a11.primitiveName === o12 && r18.push(a11); } } } static applyOverrides(e11, t8, r18, o11) { if (!t8) return; const a10 = (e12) => e12 ? e12.charAt(0).toLowerCase() + e12.substr(1) : e12; if (e11.primitiveName) { for (const i8 of t8) if (i8.primitiveName === e11.primitiveName) { const t9 = a10(i8.propertyName); if (o11 && o11.push({ cim: e11, nocapPropertyName: t9, value: e11[t9] }), i8.expression && (i8.value = te.toValue(i8.propertyName, i8.expression)), r18) { let t10 = false; for (const o12 of r18) o12.primitiveName === e11.primitiveName && (t10 = true); t10 || r18.push(i8); } e11[t9] = i8.value; } } switch (e11.type) { case "CIMPointSymbol": case "CIMLineSymbol": case "CIMPolygonSymbol": if (e11.effects) for (const a11 of e11.effects) te.applyOverrides(a11, t8, r18, o11); if (e11.symbolLayers) for (const a11 of e11.symbolLayers) te.applyOverrides(a11, t8, r18, o11); break; case "CIMTextSymbol": break; case "CIMSolidStroke": case "CIMSolidFill": case "CIMVectorMarker": if (e11.effects) for (const a11 of e11.effects) te.applyOverrides(a11, t8, r18, o11); if (e11.type === "CIMVectorMarker" && e11.markerGraphics) for (const a11 of e11.markerGraphics) te.applyOverrides(a11, t8, r18, o11), te.applyOverrides(a11.symbol, t8, r18, o11); } } static restoreOverrides(e11) { for (const t8 of e11) t8.cim[t8.nocapPropertyName] = t8.value; } static buildOverrideKey(e11) { let t8 = ""; for (const r18 of e11) r18.value !== void 0 && (t8 += `${r18.primitiveName}${r18.propertyName}${JSON.stringify(r18.value)}`); return t8; } static toValue(t8, r18) { if (t8 === "DashTemplate") return r18.split(" ").map((e11) => Number(e11)); if (t8 === "Color") { const t9 = new l2(r18).toRgba(); return t9[3] *= 255, t9; } return r18; } }; var re = (e11) => { if (!e11) return U2.Butt; switch (e11) { case "butt": return U2.Butt; case "square": return U2.Square; case "round": return U2.Round; } }; var oe2 = (e11) => { if (!e11) return w.Miter; switch (e11) { case "miter": return w.Miter; case "round": return w.Round; case "bevel": return w.Bevel; } }; var ae = (e11) => { if (t(e11)) return "Center"; switch (e11) { case "left": return "Left"; case "right": return "Right"; case "center": return "Center"; } }; var ie2 = (e11) => { if (t(e11)) return "Center"; switch (e11) { case "baseline": return "Baseline"; case "top": return "Top"; case "middle": return "Center"; case "bottom": return "Bottom"; } }; var se = (e11) => { if (!e11) return [0, 0, 0, 0]; const { r: t8, g: r18, b: o11, a: a10 } = e11; return [t8, r18, o11, 255 * a10]; }; var ne2 = (e11, t8) => { const r18 = le(t8), o11 = ce(e11); return r18 && o11 ? `${r18}-${o11}` : `${r18}${o11}`; }; var le = (e11) => { if (!e11) return ""; switch (e11.toLowerCase()) { case "bold": case "bolder": return "bold"; } return ""; }; var ce = (e11) => { if (!e11) return ""; switch (e11.toLowerCase()) { case "italic": case "oblique": return "italic"; } return ""; }; var me = (e11, t8) => { const r18 = t8 === "butt"; switch (e11) { case "dash": case "esriSLSDash": return r18 ? [4, 3] : [3, 4]; case "dash-dot": case "esriSLSDashDot": return r18 ? [4, 3, 1, 3] : [3, 4, 0, 4]; case "dot": case "esriSLSDot": return r18 ? [1, 3] : [0, 4]; case "long-dash": case "esriSLSLongDash": return r18 ? [8, 3] : [7, 4]; case "long-dash-dot": case "esriSLSLongDashDot": return r18 ? [8, 3, 1, 3] : [7, 4, 0, 4]; case "long-dash-dot-dot": case "esriSLSDashDotDot": return r18 ? [8, 3, 1, 3, 1, 3] : [7, 4, 0, 4, 0, 4]; case "short-dash": case "esriSLSShortDash": return r18 ? [4, 1] : [3, 2]; case "short-dash-dot": case "esriSLSShortDashDot": return r18 ? [4, 1, 1, 1] : [3, 2, 0, 2]; case "short-dash-dot-dot": case "esriSLSShortDashDotDot": return r18 ? [4, 1, 1, 1, 1, 1] : [3, 2, 0, 2, 0, 2]; case "short-dot": case "esriSLSShortDot": return r18 ? [1, 1] : [0, 2]; case "solid": case "esriSLSSolid": case "none": return Y2.error("Unexpected: style does not require rasterization"), [0, 0]; default: return Y2.error(`Tried to rasterize SLS, but found an unexpected style: ${e11}!`), [0, 0]; } }; function fe(e11) { return e11.symbolLayers !== void 0; } var ye = (e11) => { const t8 = 100, r18 = 50; let o11, a10; const i8 = e11; if (i8 === "circle" || i8 === "esriSMSCircle") { const e12 = 0.25; let t9 = Math.acos(1 - e12 / r18), i9 = Math.ceil(V / t9 / 4); i9 === 0 && (i9 = 1), t9 = B4 / i9, i9 *= 4; const s10 = []; s10.push([r18, 0]); for (let o12 = 1; o12 < i9; o12++) s10.push([r18 * Math.cos(o12 * t9), -r18 * Math.sin(o12 * t9)]); s10.push([r18, 0]), o11 = { rings: [s10] }, a10 = { xmin: -r18, ymin: -r18, xmax: r18, ymax: r18 }; } else if (i8 === "cross" || i8 === "esriSMSCross") { const e12 = 0; o11 = { rings: [[[e12, r18], [e12, e12], [r18, e12], [r18, -e12], [e12, -e12], [e12, -r18], [-e12, -r18], [-e12, -e12], [-r18, -e12], [-r18, e12], [-e12, e12], [-e12, r18], [e12, r18]]] }, a10 = { xmin: -r18, ymin: -r18, xmax: r18, ymax: r18 }; } else if (i8 === "diamond" || i8 === "esriSMSDiamond") o11 = { rings: [[[-r18, 0], [0, r18], [r18, 0], [0, -r18], [-r18, 0]]] }, a10 = { xmin: -r18, ymin: -r18, xmax: r18, ymax: r18 }; else if (i8 === "square" || i8 === "esriSMSSquare") o11 = { rings: [[[-r18, -r18], [-r18, r18], [r18, r18], [r18, -r18], [-r18, -r18]]] }, a10 = { xmin: -r18, ymin: -r18, xmax: r18, ymax: r18 }; else if (i8 === "x" || i8 === "esriSMSX") { const e12 = 0; o11 = { rings: [[[0, e12], [r18 - e12, r18], [r18, r18 - e12], [e12, 0], [r18, e12 - r18], [r18 - e12, -r18], [0, -e12], [e12 - r18, -r18], [-r18, e12 - r18], [-e12, 0], [-r18, r18 - e12], [e12 - r18, r18], [0, e12]]] }, a10 = { xmin: -r18, ymin: -r18, xmax: r18, ymax: r18 }; } else if (i8 === "triangle" || i8 === "esriSMSTriangle") { const e12 = t8 * 0.5773502691896257, r19 = -e12, i9 = 2 / 3 * t8, s10 = i9 - t8; o11 = { rings: [[[r19, s10], [0, i9], [e12, s10], [r19, s10]]] }, a10 = { xmin: r19, ymin: s10, xmax: e12, ymax: i9 }; } else i8 === "arrow" && (o11 = { rings: [[[-50, 50], [50, 0], [-50, -50], [-33, -20], [-33, 20], [-50, 50]]] }, a10 = { xmin: -r18, ymin: -r18, xmax: r18, ymax: r18 }); return [a10, o11]; }; var he = (e11) => e11 === "vertical" || e11 === "horizontal" || e11 === "cross" || e11 === "esriSFSCross" || e11 === "esriSFSVertical" || e11 === "esriSFSHorizontal"; export { n4 as n, a3 as a, x, A2 as A, g3 as g, j3 as j, r5 as r, o6 as o, r4 as r2, s4 as s, t7 as t, s5 as s2, j4 as j2, q, Q, Z2 as Z, ee, te, me }; //# sourceMappingURL=chunk-MWIFVNKP.js.map