import { e2 as e5, o as o3, r as r4, t as t3 } from "./chunk-IRQMHCT3.js"; import { v, x, y as y2 } from "./chunk-W3XAGTM6.js"; import { e as e3, o } from "./chunk-44FMXGSC.js"; import { e as e4 } from "./chunk-XFDO4CMR.js"; import { e as e2 } from "./chunk-GHN7C53L.js"; import { T, i as i2 } from "./chunk-HIELTLML.js"; import { B as B2, a, g, o as o2 } from "./chunk-O3JQY77G.js"; import { Zn, xn } from "./chunk-P24XEEHY.js"; import { B, C, P as P2, h, i, u as u2 } from "./chunk-VGWC3IKZ.js"; import { $, E2 as E, L, O } from "./chunk-3RSFVUKZ.js"; import { b, m } from "./chunk-RYY6632W.js"; import { F, O as O2, S, r as r3, z } from "./chunk-DW42UVIT.js"; import { n as n2, r as r2, t as t2 } from "./chunk-TJNOJH33.js"; import { c, w } from "./chunk-6T6G6LCQ.js"; import { P, s as s2, u } from "./chunk-PQFTYGF5.js"; import { e, l3 as l, n5 as n, y3 as y } from "./chunk-2Z2TG5CU.js"; import { s2 as s } from "./chunk-E5O6P5I2.js"; import { r, t } from "./chunk-YXWMMD76.js"; // node_modules/@arcgis/core/geometry/support/axisAngleDegrees.js function a2(n3 = b2) { return [n3[0], n3[1], n3[2], n3[3]]; } function k2(n3, r6, t4 = a2()) { return r3(g2(t4), n3), t4[3] = r6, t4; } function v2(r6, c2, f = a2()) { return v(d, g2(r6), x2(r6)), v(w2, g2(c2), x2(c2)), y2(d, w2, d), U(f, b(x(g2(f), d))); } function g2(n3) { return n3; } function x2(n3) { return m(n3[3]); } function U(n3, r6) { return n3[3] = r6, n3; } var b2 = [0, 0, 1, 0]; var d = e4(); var w2 = e4(); var y3 = a2(); // node_modules/@arcgis/core/geometry/support/MeshTransform.js var T2; var q = T2 = class extends l { constructor(r6) { super(r6), this.origin = n2(), this.translation = n2(), this.rotation = a2(), this.scale = r2(1, 1, 1), this.geographic = true; } get localMatrix() { const r6 = e3(); return v(B3, g2(this.rotation), x2(this.rotation)), P2(r6, B3, this.translation, this.scale), r6; } get localMatrixInverse() { return h(e3(), this.localMatrix); } applyLocal(r6, o4) { return O2(o4, r6, this.localMatrix); } applyLocalInverse(r6, o4) { return O2(o4, r6, this.localMatrixInverse); } project(r6, o4) { const t4 = new Float64Array(r6.length), s3 = T.fromTypedArray(t4), e6 = T.fromTypedArray(r6); if (this.geographic) { const r7 = O(o4), i4 = e3(); return Zn(o4, this.origin, i4, r7), u2(i4, i4, this.localMatrix), t3(s3, e6, i4), xn(t4, r7, 0, t4, o4, 0, t4.length / 3), t4; } const { localMatrix: i3, origin: a3 } = this; C(i3, o) ? e5(s3, e6) : t3(s3, e6, i3); for (let n3 = 0; n3 < t4.length; n3 += 3) t4[n3 + 0] += a3[0], t4[n3 + 1] += a3[1], t4[n3 + 2] += a3[2]; return t4; } getOriginPoint(r6) { const [o4, t4, s3] = this.origin; return new w({ x: o4, y: t4, z: s3, spatialReference: r6 }); } equals(r6) { return r(r6) && this.geographic === r6.geographic && F(this.origin, r6.origin) && B(this.localMatrix, r6.localMatrix); } clone() { const r6 = { origin: t2(this.origin), translation: t2(this.translation), rotation: a2(this.rotation), scale: t2(this.scale), geographic: this.geographic }; return new T2(r6); } }; e([y({ type: [Number], nonNullable: true, json: { write: true } })], q.prototype, "origin", void 0), e([y({ type: [Number], nonNullable: true, json: { write: true } })], q.prototype, "translation", void 0), e([y({ type: [Number], nonNullable: true, json: { write: true } })], q.prototype, "rotation", void 0), e([y({ type: [Number], nonNullable: true, json: { write: true } })], q.prototype, "scale", void 0), e([y({ type: Boolean, nonNullable: true, json: { write: true } })], q.prototype, "geographic", void 0), e([y()], q.prototype, "localMatrix", null), e([y()], q.prototype, "localMatrixInverse", null), q = T2 = e([n("esri.geometry.support.MeshTransform")], q); var B3 = e4(); var L2 = q; // node_modules/@arcgis/core/geometry/support/meshUtils/geographicUtils.js function r5(r6, e6) { var _a; return r6.isGeographic || r6.isWebMercator && ((_a = e6 == null ? void 0 : e6.geographic) != null ? _a : true); } // node_modules/@arcgis/core/geometry/support/meshUtils/projection.js var g3 = s.getLogger("esri.geometry.support.meshUtils.normalProjection"); function j(r6, e6, o4, t4, n3) { return B4(t4) ? (b3(Y.TO_PCPF, i2.fromTypedArray(r6), T.fromTypedArray(e6), T.fromTypedArray(o4), t4, i2.fromTypedArray(n3)), n3) : (g3.error("Cannot convert spatial reference to PCPF"), n3); } function h2(r6, e6, o4, t4, n3) { return B4(t4) ? (b3(Y.FROM_PCPF, i2.fromTypedArray(r6), T.fromTypedArray(e6), T.fromTypedArray(o4), t4, i2.fromTypedArray(n3)), n3) : (g3.error("Cannot convert to spatial reference from PCPF"), n3); } function M(r6, e6, o4) { return xn(r6, e6, 0, o4, O(e6), 0, r6.length / 3), o4; } function O3(r6, e6, o4) { return xn(r6, O(o4), 0, e6, o4, 0, r6.length / 3), e6; } function R(r6, o4, t4) { if (t(r6)) return o4; const n3 = T.fromTypedArray(r6), f = T.fromTypedArray(o4); return t3(f, n3, t4), o4; } function v3(r6, n3, f) { if (t(r6)) return n3; g(x3, f); const a3 = i2.fromTypedArray(r6), c2 = i2.fromTypedArray(n3); return r4(c2, a3, x3), B2(x3) || o3(c2, c2), n3; } function V(r6, n3, f) { if (t(r6)) return n3; g(x3, f); const a3 = i2.fromTypedArray(r6, 4 * Float32Array.BYTES_PER_ELEMENT), c2 = i2.fromTypedArray(n3, 4 * Float32Array.BYTES_PER_ELEMENT); if (r4(c2, a3, x3), B2(x3) || o3(c2, c2), r6 !== n3) for (let e6 = 3; e6 < r6.length; e6 += 4) n3[e6] = r6[e6]; return n3; } function k3(r6, e6, o4, t4, n3) { if (!B4(t4)) return g3.error("Cannot convert spatial reference to PCPF"), n3; b3(Y.TO_PCPF, i2.fromTypedArray(r6, 4 * Float32Array.BYTES_PER_ELEMENT), T.fromTypedArray(e6), T.fromTypedArray(o4), t4, i2.fromTypedArray(n3, 4 * Float32Array.BYTES_PER_ELEMENT)); for (let f = 3; f < r6.length; f += 4) n3[f] = r6[f]; return n3; } function L3(r6, e6, o4, t4, n3) { if (!B4(t4)) return g3.error("Cannot convert to spatial reference from PCPF"), n3; b3(Y.FROM_PCPF, i2.fromTypedArray(r6, 16), T.fromTypedArray(e6), T.fromTypedArray(o4), t4, i2.fromTypedArray(n3, 16)); for (let f = 3; f < r6.length; f += 4) n3[f] = r6[f]; return n3; } function b3(r6, e6, o4, t4, a3, c2) { if (!e6) return; const i3 = o4.count, y4 = O(a3); if (S2(a3)) for (let s3 = 0; s3 < i3; s3++) t4.getVec(s3, U2), e6.getVec(s3, w3), Zn(y4, U2, W, y4), a(x3, W), r6 === Y.FROM_PCPF && o2(x3, x3), S(w3, w3, x3), c2.setVec(s3, w3); else for (let u3 = 0; u3 < i3; u3++) { t4.getVec(u3, U2), e6.getVec(u3, w3), Zn(y4, U2, W, y4), a(x3, W); const a4 = c(o4.get(u3, 1)); let i4 = Math.cos(a4); r6 === Y.TO_PCPF && (i4 = 1 / i4), x3[0] *= i4, x3[1] *= i4, x3[2] *= i4, x3[3] *= i4, x3[4] *= i4, x3[5] *= i4, r6 === Y.FROM_PCPF && o2(x3, x3), S(w3, w3, x3), z(w3, w3), c2.setVec(u3, w3); } return c2; } function B4(r6) { return S2(r6) || N(r6); } function S2(r6) { return r6.isWGS84 || u(r6) || P(r6) || s2(r6); } function N(r6) { return r6.isWebMercator; } var Y; !function(r6) { r6[r6.TO_PCPF = 0] = "TO_PCPF", r6[r6.FROM_PCPF = 1] = "FROM_PCPF"; }(Y || (Y = {})); var U2 = n2(); var w3 = n2(); var W = e3(); var x3 = e2(); // node_modules/@arcgis/core/geometry/support/meshUtils/georeference.js function x4(n3, r6, t4) { return r5(r6.spatialReference, t4) ? B5(n3, r6, t4) : P3(n3, r6, t4); } function k4(t4, o4, e6) { const { position: a3, normal: i3, tangent: l2 } = t4; if (t(o4)) return { position: a3, normal: i3, tangent: l2 }; const s3 = o4.localMatrix; return x4({ position: R(a3, new Float64Array(a3.length), s3), normal: r(i3) ? v3(i3, new Float32Array(i3.length), s3) : null, tangent: r(l2) ? V(l2, new Float32Array(l2.length), s3) : null }, o4.getOriginPoint(e6), { geographic: o4.geographic }); } function _2(n3, r6, t4) { var _a; if (t4 == null ? void 0 : t4.useTransform) { const { position: o4, normal: e6, tangent: a3 } = n3; return { vertexAttributes: { position: o4, normal: e6, tangent: a3 }, transform: new L2({ origin: [r6.x, r6.y, (_a = r6.z) != null ? _a : 0], geographic: r5(r6.spatialReference, t4) }) }; } return { vertexAttributes: x4(n3, r6, t4), transform: null }; } function b4(n3, r6, t4) { return r5(r6.spatialReference, t4) ? G(n3, r6, t4) : Y2(n3, r6, t4); } function M2(r6, t4, o4, e6) { if (t(t4)) return b4(r6, o4, e6); const a3 = k4(r6, t4, o4.spatialReference); return o4.equals(t4.getOriginPoint(o4.spatialReference)) ? Y2(a3, o4, e6) : r5(o4.spatialReference, e6) ? G(a3, o4, e6) : Y2(a3, o4, e6); } function P3(n3, r6, t4) { const o4 = new Float64Array(n3.position.length), e6 = n3.position, a3 = r6.x, i3 = r6.y, l2 = r6.z || 0, { horizontal: s3, vertical: f } = C2(t4 ? t4.unit : null, r6.spatialReference); for (let c2 = 0; c2 < e6.length; c2 += 3) o4[c2 + 0] = e6[c2 + 0] * s3 + a3, o4[c2 + 1] = e6[c2 + 1] * s3 + i3, o4[c2 + 2] = e6[c2 + 2] * f + l2; return { position: o4, normal: n3.normal, tangent: n3.tangent }; } function B5(n3, r6, t4) { const o4 = r6.spatialReference, e6 = O4(r6, t4, D), a3 = new Float64Array(n3.position.length), i3 = L4(n3.position, e6, o4, a3), l2 = g(I, e6); return { position: i3, normal: N2(i3, a3, n3.normal, l2, o4), tangent: S3(i3, a3, n3.tangent, l2, o4) }; } function L4(n3, r6, t4, o4) { t3(T.fromTypedArray(o4), T.fromTypedArray(n3), r6); const e6 = new Float64Array(n3.length); return O3(o4, e6, t4); } function N2(r6, t4, o4, e6, a3) { if (t(o4)) return null; const i3 = new Float32Array(o4.length); return r4(i2.fromTypedArray(i3), i2.fromTypedArray(o4), e6), h2(i3, r6, t4, a3, i3), i3; } function S3(r6, t4, o4, e6, a3) { if (t(o4)) return null; const i3 = new Float32Array(o4.length); r4(i2.fromTypedArray(i3, 4 * Float32Array.BYTES_PER_ELEMENT), i2.fromTypedArray(o4, 4 * Float32Array.BYTES_PER_ELEMENT), e6); for (let n3 = 3; n3 < i3.length; n3 += 4) i3[n3] = o4[n3]; return L3(i3, r6, t4, a3, i3), i3; } function Y2(n3, r6, t4) { const o4 = new Float64Array(n3.position.length), e6 = n3.position, a3 = r6.x, i3 = r6.y, l2 = r6.z || 0, { horizontal: s3, vertical: f } = C2(t4 ? t4.unit : null, r6.spatialReference); for (let c2 = 0; c2 < e6.length; c2 += 3) o4[c2 + 0] = (e6[c2 + 0] - a3) / s3, o4[c2 + 1] = (e6[c2 + 1] - i3) / s3, o4[c2 + 2] = (e6[c2 + 2] - l2) / f; return { position: o4, normal: n3.normal, tangent: n3.tangent }; } function G(n3, r6, t4) { const o4 = r6.spatialReference; O4(r6, t4, D); const e6 = h(H, D), a3 = new Float64Array(n3.position.length), l2 = U3(n3.position, o4, e6, a3), s3 = g(I, e6); return { position: l2, normal: q2(n3.normal, n3.position, a3, o4, s3), tangent: V2(n3.tangent, n3.position, a3, o4, s3) }; } function O4(n3, r6, t4) { Zn(n3.spatialReference, [n3.x, n3.y, n3.z || 0], t4, O(n3.spatialReference)); const { horizontal: o4, vertical: e6 } = C2(r6 ? r6.unit : null, n3.spatialReference); return i(t4, t4, [o4, o4, e6]), t4; } function U3(n3, r6, t4, o4) { const e6 = M(n3, r6, o4), a3 = T.fromTypedArray(e6), i3 = new Float64Array(e6.length), l2 = T.fromTypedArray(i3); return t3(l2, a3, t4), i3; } function q2(r6, t4, o4, e6, a3) { if (t(r6)) return null; const i3 = j(r6, t4, o4, e6, new Float32Array(r6.length)), l2 = i2.fromTypedArray(i3); return r4(l2, l2, a3), i3; } function V2(r6, t4, o4, e6, a3) { if (t(r6)) return null; const i3 = k3(r6, t4, o4, e6, new Float32Array(r6.length)), l2 = i2.fromTypedArray(i3, 4 * Float32Array.BYTES_PER_ELEMENT); return r4(l2, l2, a3), i3; } function C2(r6, a3) { if (t(r6)) return J; const i3 = a3.isGeographic ? 1 : $(a3), l2 = a3.isGeographic ? 1 : L(a3), s3 = E(1, r6, "meters"); return { horizontal: s3 * i3, vertical: s3 * l2 }; } var D = e3(); var H = e3(); var I = e2(); var J = { horizontal: 1, vertical: 1 }; export { a2 as a, k2 as k, v2 as v, g2 as g, x2 as x, L2 as L, r5 as r, j, h2 as h, M, O3 as O, k3 as k2, L3 as L2, x4 as x2, k4 as k3, _2 as _, b4 as b, M2 }; //# sourceMappingURL=chunk-BXBBOCLV.js.map