123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372 |
- import {
- e2 as e5,
- o as o3,
- r as r4,
- t as t3
- } from "./chunk-4KFEVYXL.js";
- import {
- v,
- x,
- y
- } from "./chunk-5W6F4NR5.js";
- import {
- e as e4
- } from "./chunk-YZUP3MAF.js";
- import {
- e as e3,
- o
- } from "./chunk-E3HOL2XO.js";
- import {
- e as e2
- } from "./chunk-SCXOTZ6Q.js";
- import {
- T,
- i as i2
- } from "./chunk-H4JLO5B2.js";
- import {
- a,
- j as j2,
- o as o2,
- z as z3
- } from "./chunk-CRGVDJI6.js";
- import {
- Un,
- qn
- } from "./chunk-DH2OBAUC.js";
- import {
- B,
- C,
- c as c2,
- f,
- h,
- i,
- q,
- u as u2
- } from "./chunk-TERAW6FT.js";
- import {
- N,
- O,
- W,
- z
- } from "./chunk-O4FY3ITT.js";
- import {
- F,
- L,
- M,
- O as O2,
- m,
- r as r3,
- z as z2
- } from "./chunk-XNLG7T2T.js";
- import {
- n as n2,
- r as r2,
- t as t2
- } from "./chunk-IR4PV7VK.js";
- import {
- c,
- j2 as j
- } from "./chunk-ECW2QABR.js";
- import {
- P,
- s as s2,
- u
- } from "./chunk-MRJEICT6.js";
- import {
- d,
- e,
- l3 as l,
- n2 as n
- } from "./chunk-Y3WMVFTW.js";
- import {
- s
- } from "./chunk-EMJ4ZSM2.js";
- import {
- r,
- t
- } from "./chunk-GZT4BVFP.js";
- // node_modules/@arcgis/core/geometry/support/axisAngleDegrees.js
- function a2(n3 = U) {
- return [n3[0], n3[1], n3[2], n3[3]];
- }
- function k2(n3, r6, t4 = a2()) {
- return r3(l2(t4), n3), t4[3] = r6, t4;
- }
- function g(r6, c3, f2 = a2()) {
- return v(b, l2(r6), x2(r6)), v(d2, l2(c3), x2(c3)), y(b, d2, b), y2(f2, m(x(l2(f2), b)));
- }
- function l2(n3) {
- return n3;
- }
- function x2(n3) {
- return M(n3[3]);
- }
- function y2(n3, r6) {
- return n3[3] = r6, n3;
- }
- var U = [0, 0, 1, 0];
- var b = e4();
- var d2 = e4();
- var w = a2();
- // node_modules/@arcgis/core/geometry/support/MeshTransform.js
- var T2;
- var B2 = 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 q(r6, this.scale), f(r6, r6, x2(this.rotation), l2(this.rotation)), c2(r6, r6, this.translation), r6;
- }
- get localMatrixInverse() {
- return h(e3(), this.localMatrix);
- }
- applyLocal(r6, o4) {
- return L(o4, r6, this.localMatrix);
- }
- applyLocalInverse(r6, o4) {
- return L(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 qn(o4, this.origin, i4, r7), u2(i4, i4, this.localMatrix), t3(s3, e6, i4), Un(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 j({ 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([d({ type: [Number], nonNullable: true, json: { write: true } })], B2.prototype, "origin", void 0), e([d({ type: [Number], nonNullable: true, json: { write: true } })], B2.prototype, "translation", void 0), e([d({ type: [Number], nonNullable: true, json: { write: true } })], B2.prototype, "rotation", void 0), e([d({ type: [Number], nonNullable: true, json: { write: true } })], B2.prototype, "scale", void 0), e([d({ type: Boolean, nonNullable: true, json: { write: true } })], B2.prototype, "geographic", void 0), e([d()], B2.prototype, "localMatrix", null), e([d()], B2.prototype, "localMatrixInverse", null), B2 = T2 = e([n("esri.geometry.support.MeshTransform")], B2);
- var L2 = B2;
- // node_modules/@arcgis/core/geometry/support/meshUtils/geographicUtils.js
- function r5(r6, e6) {
- return r6.isGeographic || r6.isWebMercator && (e6?.geographic ?? true);
- }
- // node_modules/@arcgis/core/geometry/support/meshUtils/projection.js
- var g2 = s.getLogger("esri.geometry.support.meshUtils.normalProjection");
- function j3(r6, e6, o4, t4, n3) {
- return S(t4) ? (B3(Y.TO_PCPF, i2.fromTypedArray(r6), T.fromTypedArray(e6), T.fromTypedArray(o4), t4, i2.fromTypedArray(n3)), n3) : (g2.error("Cannot convert spatial reference to PCPF"), n3);
- }
- function h2(r6, e6, o4, t4, n3) {
- return S(t4) ? (B3(Y.FROM_PCPF, i2.fromTypedArray(r6), T.fromTypedArray(e6), T.fromTypedArray(o4), t4, i2.fromTypedArray(n3)), n3) : (g2.error("Cannot convert to spatial reference from PCPF"), n3);
- }
- function M2(r6, e6, o4) {
- return Un(r6, e6, 0, o4, O(e6), 0, r6.length / 3), o4;
- }
- function O3(r6, e6, o4) {
- return Un(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), f2 = T.fromTypedArray(o4);
- return t3(f2, n3, t4), o4;
- }
- function v2(r6, n3, f2) {
- if (t(r6))
- return n3;
- j2(x3, f2);
- const a3 = i2.fromTypedArray(r6), c3 = i2.fromTypedArray(n3);
- return r4(c3, a3, x3), z3(x3) || o3(c3, c3), n3;
- }
- function V(r6, n3, f2) {
- if (t(r6))
- return n3;
- j2(x3, f2);
- const a3 = i2.fromTypedArray(r6, 4 * Float32Array.BYTES_PER_ELEMENT), c3 = i2.fromTypedArray(n3, 4 * Float32Array.BYTES_PER_ELEMENT);
- if (r4(c3, a3, x3), z3(x3) || o3(c3, c3), 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 (!S(t4))
- return g2.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 f2 = 3; f2 < r6.length; f2 += 4)
- n3[f2] = r6[f2];
- return n3;
- }
- function L3(r6, e6, o4, t4, n3) {
- if (!S(t4))
- return g2.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 f2 = 3; f2 < r6.length; f2 += 4)
- n3[f2] = r6[f2];
- return n3;
- }
- function B3(r6, e6, o4, t4, a3, c3) {
- if (!e6)
- return;
- const i3 = o4.count, y3 = O(a3);
- if (b2(a3))
- for (let s3 = 0; s3 < i3; s3++)
- t4.getVec(s3, U2), e6.getVec(s3, w2), qn(y3, U2, W2, y3), a(x3, W2), r6 === Y.FROM_PCPF && o2(x3, x3), O2(w2, w2, x3), c3.setVec(s3, w2);
- else
- for (let u3 = 0; u3 < i3; u3++) {
- t4.getVec(u3, U2), e6.getVec(u3, w2), qn(y3, U2, W2, y3), a(x3, W2);
- 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), O2(w2, w2, x3), z2(w2, w2), c3.setVec(u3, w2);
- }
- return c3;
- }
- function S(r6) {
- return b2(r6) || N2(r6);
- }
- function b2(r6) {
- return r6.isWGS84 || u(r6) || P(r6) || s2(r6);
- }
- function N2(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 w2 = n2();
- var W2 = e3();
- var x3 = e2();
- // node_modules/@arcgis/core/geometry/support/meshUtils/georeference.js
- function x4(n3, r6, t4) {
- return r5(r6.spatialReference, t4) ? B4(n3, r6, t4) : b3(n3, r6, t4);
- }
- function _2(t4, o4, e6) {
- const { position: a3, normal: i3, tangent: l3 } = t4;
- if (t(o4))
- return { position: a3, normal: i3, tangent: l3 };
- const s3 = o4.localMatrix;
- return x4({ position: R(a3, new Float64Array(a3.length), s3), normal: r(i3) ? v2(i3, new Float32Array(i3.length), s3) : null, tangent: r(l3) ? V(l3, new Float32Array(l3.length), s3) : null }, o4.getOriginPoint(e6), { geographic: o4.geographic });
- }
- function k4(n3, r6, t4) {
- if (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, r6.z ?? 0], geographic: r5(r6.spatialReference, t4) }) };
- }
- return { vertexAttributes: x4(n3, r6, t4), transform: null };
- }
- function M3(n3, r6, t4) {
- return r5(r6.spatialReference, t4) ? G(n3, r6, t4) : Y2(n3, r6, t4);
- }
- function P2(r6, t4, o4, e6) {
- if (t(t4))
- return M3(r6, o4, e6);
- const a3 = _2(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 b3(n3, r6, t4) {
- const o4 = new Float64Array(n3.position.length), e6 = n3.position, a3 = r6.x, i3 = r6.y, l3 = r6.z || 0, { horizontal: s3, vertical: f2 } = C2(t4 ? t4.unit : null, r6.spatialReference);
- for (let c3 = 0; c3 < e6.length; c3 += 3)
- o4[c3 + 0] = e6[c3 + 0] * s3 + a3, o4[c3 + 1] = e6[c3 + 1] * s3 + i3, o4[c3 + 2] = e6[c3 + 2] * f2 + l3;
- return { position: o4, normal: n3.normal, tangent: n3.tangent };
- }
- function B4(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), l3 = j2(I, e6);
- return { position: i3, normal: N3(i3, a3, n3.normal, l3, o4), tangent: S2(i3, a3, n3.tangent, l3, 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 N3(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 S2(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, l3 = r6.z || 0, { horizontal: s3, vertical: f2 } = C2(t4 ? t4.unit : null, r6.spatialReference);
- for (let c3 = 0; c3 < e6.length; c3 += 3)
- o4[c3 + 0] = (e6[c3 + 0] - a3) / s3, o4[c3 + 1] = (e6[c3 + 1] - i3) / s3, o4[c3 + 2] = (e6[c3 + 2] - l3) / f2;
- 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), l3 = U3(n3.position, o4, e6, a3), s3 = j2(I, e6);
- return { position: l3, normal: q2(n3.normal, n3.position, a3, o4, s3), tangent: V2(n3.tangent, n3.position, a3, o4, s3) };
- }
- function O4(n3, r6, t4) {
- qn(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 = M2(n3, r6, o4), a3 = T.fromTypedArray(e6), i3 = new Float64Array(e6.length), l3 = T.fromTypedArray(i3);
- return t3(l3, a3, t4), i3;
- }
- function q2(r6, t4, o4, e6, a3) {
- if (t(r6))
- return null;
- const i3 = j3(r6, t4, o4, e6, new Float32Array(r6.length)), l3 = i2.fromTypedArray(i3);
- return r4(l3, l3, 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)), l3 = i2.fromTypedArray(i3, 4 * Float32Array.BYTES_PER_ELEMENT);
- return r4(l3, l3, a3), i3;
- }
- function C2(r6, a3) {
- if (t(r6))
- return J;
- const i3 = a3.isGeographic ? 1 : z(a3), l3 = a3.isGeographic ? 1 : W(a3), s3 = N(1, r6, "meters");
- return { horizontal: s3 * i3, vertical: s3 * l3 };
- }
- var D = e3();
- var H = e3();
- var I = e2();
- var J = { horizontal: 1, vertical: 1 };
- export {
- a2 as a,
- k2 as k,
- g,
- l2 as l,
- x2 as x,
- L2 as L,
- r5 as r,
- j3 as j,
- h2 as h,
- M2 as M,
- O3 as O,
- k3 as k2,
- L3 as L2,
- x4 as x2,
- _2 as _,
- k4 as k3,
- M3 as M2,
- P2 as P
- };
- //# sourceMappingURL=chunk-2ADIR7NB.js.map
|