123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792 |
- import {
- x as x3
- } from "./chunk-773XI6MQ.js";
- import {
- f as f4,
- p as p4
- } from "./chunk-T47XOAZJ.js";
- import "./chunk-7NPG47AN.js";
- import {
- n as n3
- } from "./chunk-2DNADSBR.js";
- import {
- L as L2,
- L2 as L3,
- M as M2,
- M2 as M3,
- O as O3,
- a as a2,
- g,
- h,
- j as j2,
- k,
- k2,
- k3,
- l as l2,
- r as r3,
- x,
- x2
- } from "./chunk-2ADIR7NB.js";
- import "./chunk-4KFEVYXL.js";
- import "./chunk-5W6F4NR5.js";
- import "./chunk-YZUP3MAF.js";
- import {
- e as e4
- } from "./chunk-E3HOL2XO.js";
- import {
- e as e3
- } from "./chunk-SCXOTZ6Q.js";
- import "./chunk-H4JLO5B2.js";
- import {
- x as x4
- } from "./chunk-2VFJVI2I.js";
- import "./chunk-5JK4DCPE.js";
- import {
- a
- } from "./chunk-CRGVDJI6.js";
- import {
- Hn,
- qn
- } from "./chunk-DH2OBAUC.js";
- import "./chunk-TNLRDNTC.js";
- import "./chunk-6P6NA7JB.js";
- import {
- g as g2
- } from "./chunk-RZFGRBD7.js";
- import "./chunk-PUSPZYFZ.js";
- import "./chunk-EN7YGJWG.js";
- import "./chunk-VBNMTM7L.js";
- import "./chunk-3D3QEPRE.js";
- import "./chunk-JFNNSBWL.js";
- import "./chunk-WNCU6BFU.js";
- import "./chunk-PIGRDDRG.js";
- import "./chunk-BJHM4JNS.js";
- import "./chunk-F6A2QQ26.js";
- import "./chunk-C43UE3Z5.js";
- import {
- a as a3
- } from "./chunk-RMX2AZ4P.js";
- import "./chunk-NE3ESGA6.js";
- import {
- l
- } from "./chunk-YIS6BAC3.js";
- import "./chunk-7XXXCK2A.js";
- import "./chunk-7ZIDBK7B.js";
- import "./chunk-65BYCSII.js";
- import "./chunk-WZQZRKNH.js";
- import "./chunk-LRDX4TO7.js";
- import "./chunk-6A4U74YA.js";
- import {
- p as p3
- } from "./chunk-TERAW6FT.js";
- import "./chunk-N2663GRX.js";
- import {
- O
- } from "./chunk-O4FY3ITT.js";
- import "./chunk-WEMIK25H.js";
- import "./chunk-7N4X6GF3.js";
- import "./chunk-JXW4QTJA.js";
- import "./chunk-UXF37FQ4.js";
- import "./chunk-ZOEK6QHJ.js";
- import {
- L,
- O as O2,
- e as e2,
- o,
- q,
- u,
- z
- } from "./chunk-XNLG7T2T.js";
- import {
- f as f3,
- n as n2,
- r as r2
- } from "./chunk-IR4PV7VK.js";
- import "./chunk-2Z6LERTI.js";
- import {
- f as f2,
- v2 as v
- } from "./chunk-OWVBLVP3.js";
- import "./chunk-AFZ7XSEW.js";
- import "./chunk-4NKD334K.js";
- import "./chunk-65K7LC56.js";
- import "./chunk-ATPLLI5W.js";
- import "./chunk-MXB2XLKV.js";
- import "./chunk-XH7RUGVZ.js";
- import {
- m as m2
- } from "./chunk-TBBTRX4O.js";
- import {
- m
- } from "./chunk-YBSUITLL.js";
- import "./chunk-ALDCDSPV.js";
- import "./chunk-DT6EAZQ5.js";
- import "./chunk-HNOZUNJ4.js";
- import "./chunk-VNFRAYHO.js";
- import "./chunk-R5IG2D6H.js";
- import {
- Ot,
- _
- } from "./chunk-VBRY5KJM.js";
- import "./chunk-PDKDCAAD.js";
- import {
- M2 as M,
- j2 as j,
- p as p2
- } from "./chunk-ECW2QABR.js";
- import "./chunk-GCDJLKH4.js";
- import "./chunk-MRJEICT6.js";
- import {
- d,
- e,
- n2 as n
- } from "./chunk-Y3WMVFTW.js";
- import "./chunk-SAS7RONY.js";
- import "./chunk-WSRBH7BF.js";
- import "./chunk-IHXECKQQ.js";
- import {
- C,
- f,
- p,
- y
- } from "./chunk-ULGDPLM2.js";
- import {
- s,
- s3 as s2
- } from "./chunk-EMJ4ZSM2.js";
- import "./chunk-IKP3YN53.js";
- import {
- r,
- t
- } from "./chunk-GZT4BVFP.js";
- import "./chunk-A5ICIBVI.js";
- // node_modules/@arcgis/core/geometry/support/triangulationUtils.js
- function o2(t2) {
- const o3 = l3(t2.rings, t2.hasZ, c.CCW_IS_HOLE), s5 = [];
- let i2 = 0, h4 = 0;
- for (const e6 of o3.polygons) {
- const t3 = e6.count, r5 = e6.index, l7 = new Float64Array(o3.position.buffer, 3 * r5 * o3.position.BYTES_PER_ELEMENT, 3 * t3), c5 = e6.holeIndices.map((n4) => n4 - r5), f9 = new Uint32Array(x3(l7, c5, 3));
- s5.push({ position: l7, faces: f9 }), i2 += l7.length, h4 += f9.length;
- }
- const f8 = r4(s5, i2, h4), a5 = n3(f8.position.buffer, 6, { originalIndices: f8.faces });
- return f8.position = new Float64Array(a5.buffer), f8.faces = a5.indices, f8;
- }
- function r4(n4, t2, e6) {
- if (n4.length === 1)
- return n4[0];
- const o3 = new Float64Array(t2), r5 = new Uint32Array(e6);
- let l7 = 0, s5 = 0, i2 = 0;
- for (const c5 of n4) {
- for (let n5 = 0; n5 < c5.position.length; n5++)
- o3[l7++] = c5.position[n5];
- for (let n5 = 0; n5 < c5.faces.length; n5++)
- r5[s5++] = c5.faces[n5] + i2;
- i2 = l7 / 3;
- }
- return { position: o3, faces: r5 };
- }
- function l3(n4, t2, e6) {
- const o3 = n4.length, r5 = new Array(o3), l7 = new Array(o3), h4 = new Array(o3);
- let f8 = 0, a5 = 0, g6 = 0, u4 = 0;
- for (let s5 = 0; s5 < o3; ++s5)
- u4 += n4[s5].length;
- const p9 = new Float64Array(3 * u4);
- let d5 = 0;
- for (let y7 = o3 - 1; y7 >= 0; y7--) {
- const u5 = n4[y7], w5 = e6 === c.CCW_IS_HOLE && i(u5);
- if (w5 && o3 !== 1)
- r5[f8++] = u5;
- else {
- let n5 = u5.length;
- for (let t3 = 0; t3 < f8; ++t3)
- n5 += r5[t3].length;
- const e7 = { index: d5, pathLengths: new Array(f8 + 1), count: n5, holeIndices: new Array(f8) };
- e7.pathLengths[0] = u5.length, u5.length > 0 && (h4[g6++] = { index: d5, count: u5.length }), d5 = w5 ? s3(u5, u5.length - 1, -1, p9, d5, u5.length, t2) : s3(u5, 0, 1, p9, d5, u5.length, t2);
- for (let o4 = 0; o4 < f8; ++o4) {
- const n6 = r5[o4];
- e7.holeIndices[o4] = d5, e7.pathLengths[o4 + 1] = n6.length, n6.length > 0 && (h4[g6++] = { index: d5, count: n6.length }), d5 = s3(n6, 0, 1, p9, d5, n6.length, t2);
- }
- f8 = 0, e7.count > 0 && (l7[a5++] = e7);
- }
- }
- for (let i2 = 0; i2 < f8; ++i2) {
- const n5 = r5[i2];
- n5.length > 0 && (h4[g6++] = { index: d5, count: n5.length }), d5 = s3(n5, 0, 1, p9, d5, n5.length, t2);
- }
- return a5 < o3 && (l7.length = a5), g6 < o3 && (h4.length = g6), { position: p9, polygons: l7, outlines: h4 };
- }
- function s3(n4, t2, e6, o3, r5, l7, s5) {
- r5 *= 3;
- for (let i2 = 0; i2 < l7; ++i2) {
- const l8 = n4[t2];
- o3[r5++] = l8[0], o3[r5++] = l8[1], o3[r5++] = s5 ? l8[2] : 0, t2 += e6;
- }
- return r5 / 3;
- }
- function i(n4) {
- return !f2(n4, false, false);
- }
- var c;
- !function(n4) {
- n4[n4.NONE = 0] = "NONE", n4[n4.CCW_IS_HOLE = 1] = "CCW_IS_HOLE";
- }(c || (c = {}));
- // node_modules/@arcgis/core/geometry/support/meshUtils/centerAt.js
- var a4 = s.getLogger("esri.geometry.support.meshUtils.centerAt");
- function c2(e6, r5, i2) {
- if (!e6.vertexAttributes || !e6.vertexAttributes.position)
- return;
- const n4 = i2?.origin ?? e6.origin;
- if (r(e6.transform))
- i2?.geographic != null && i2.geographic !== e6.transform.geographic && a4.warn(`Specifying the 'geographic' parameter (${i2.geographic}) different from the Mesh transform setting (${e6.transform.geographic}) is not supported`), f5(e6.transform, r5, n4);
- else {
- r3(e6.spatialReference, i2) ? p5(e6, r5, n4) : g3(e6, r5, n4);
- }
- }
- function f5(e6, t2, r5) {
- const i2 = t2.x - r5.x, o3 = t2.y - r5.y, n4 = t2.hasZ && r5.hasZ ? t2.z - r5.z : 0, s5 = e6.origin;
- e6.origin = [s5[0] + i2, s5[1] + o3, s5[2] + n4];
- }
- function p5(e6, t2, r5) {
- const i2 = M3(e6.vertexAttributes, r5, { geographic: true }), { position: o3, normal: a5, tangent: c5 } = x2(i2, t2, { geographic: true });
- e6.vertexAttributes.position = o3, e6.vertexAttributes.normal = a5, e6.vertexAttributes.tangent = c5, e6.vertexAttributesChanged();
- }
- function g3(e6, t2, r5) {
- const o3 = h2, n4 = l4;
- if (Hn(t2, n4, e6.spatialReference)) {
- if (!Hn(r5, o3, e6.spatialReference)) {
- const t3 = e6.origin;
- o3[0] = t3.x, o3[1] = t3.y, o3[2] = t3.z, a4.error(`Failed to project specified origin (wkid:${r5.spatialReference.wkid}) to mesh spatial reference (wkid:${e6.spatialReference.wkid}).`);
- }
- m3(e6.vertexAttributes.position, n4, o3), e6.vertexAttributesChanged();
- } else
- a4.error(`Failed to project centerAt location (wkid:${t2.spatialReference.wkid}) to mesh spatial reference (wkid:${e6.spatialReference.wkid})`);
- }
- function m3(e6, t2, r5) {
- if (e6)
- for (let i2 = 0; i2 < e6.length; i2 += 3)
- for (let o3 = 0; o3 < 3; o3++)
- e6[i2 + o3] += t2[o3] - r5[o3];
- }
- var l4 = n2();
- var h2 = n2();
- // node_modules/@arcgis/core/geometry/support/meshUtils/loadExternal.js
- async function f6(e6, s5, o3) {
- const { loadGLTFMesh: n4 } = await y(import("./loadGLTFMesh-VTQIH4TD.js"), o3), a5 = await m4(s5, o3), i2 = n4(new j({ x: 0, y: 0, z: 0, spatialReference: e6.spatialReference }), a5.url, { resolveFile: u2(a5), useTransform: true, signal: r(o3) ? o3.signal : null });
- i2.then(() => a5.dispose(), () => a5.dispose());
- const { vertexAttributes: l7, components: f8 } = await i2;
- e6.vertexAttributes = l7, e6.components = f8;
- }
- function u2(e6) {
- const t2 = Ot(e6.url);
- return (s5) => {
- const r5 = _(s5, t2, t2), o3 = r5 ? r5.replace(/^ *\.\//, "") : null;
- return e6.files.get(o3) ?? s5;
- };
- }
- async function m4(e6, t2) {
- return e6 instanceof Blob ? y2.fromBlob(e6) : typeof e6 == "string" ? new y2(e6) : Array.isArray(e6) ? p6(e6, t2) : w(e6, t2);
- }
- async function p6(t2, r5) {
- const i2 = new Map();
- let l7 = null;
- const c5 = await C(t2.map(async (e6) => ({ name: e6.name, source: await m4(e6 instanceof Blob ? e6 : e6.source, r5) }))), f8 = [];
- for (const e6 of c5)
- e6 && (p(r5) ? e6.source.dispose() : f8.push(e6));
- f(r5);
- for (const { name: e6, source: o3 } of f8)
- (t(l7) || /\.(gltf|glb)/i.test(e6)) && (l7 = o3.url), i2.set(e6, o3.url), o3.files && o3.files.forEach((e7, t3) => i2.set(t3, e7));
- if (t(l7))
- throw new s2("mesh-load-external:missing-files", "Missing files to load external mesh source");
- return new y2(l7, () => f8.forEach(({ source: e6 }) => e6.dispose()), i2);
- }
- async function w(e6, t2) {
- const { default: s5 } = await y(import("./request-EYE34PBM.js"), t2), o3 = typeof e6.multipart[0] == "string" ? await Promise.all(e6.multipart.map(async (e7) => (await s5(e7, { responseType: "array-buffer" })).data)) : e6.multipart;
- return y2.fromBlob(new Blob(o3));
- }
- var y2 = class {
- constructor(e6, t2 = () => {
- }, s5 = new Map()) {
- this.url = e6, this.dispose = t2, this.files = s5;
- }
- static fromBlob(e6) {
- const t2 = URL.createObjectURL(e6);
- return new y2(t2, () => URL.revokeObjectURL(t2));
- }
- };
- // node_modules/@arcgis/core/geometry/support/meshUtils/offset.js
- var x5 = s.getLogger("esri.geometry.support.meshUtils.offset");
- function A(t2, e6, o3) {
- if (t2.vertexAttributes && t2.vertexAttributes.position)
- if (r(t2.transform))
- o3?.geographic != null && o3.geographic !== t2.transform.geographic && x5.warn(`Specifying the 'geographic' parameter (${o3.geographic}) different from the Mesh transform setting (${t2.transform.geographic}) is not supported`), v2(t2.transform, e6);
- else {
- r3(t2.spatialReference, o3) ? b(t2, e6) : y3(t2, e6);
- }
- }
- function v2(t2, r5) {
- const e6 = t2.origin;
- t2.origin = u(n2(), e6, r5);
- }
- function b(t2, o3) {
- const i2 = t2.spatialReference, n4 = t2.vertexAttributes.position, a5 = t2.vertexAttributes.normal, c5 = t2.vertexAttributes.tangent, x8 = new Float64Array(n4.length), A4 = r(a5) ? new Float32Array(a5.length) : null, v5 = r(c5) ? new Float32Array(c5.length) : null, b3 = t2.extent.center, y7 = k4;
- qn(i2, [b3.x, b3.y, b3.z], w2, O(i2)), a(F, w2), O2(y7, o3, F), M2(n4, i2, x8), r(a5) && j2(a5, n4, x8, i2, A4), r(c5) && k2(c5, n4, x8, i2, v5), d2(x8, y7), O3(x8, n4, i2), r(a5) && h(A4, n4, x8, i2, a5), r(c5) && L3(v5, n4, x8, i2, c5), t2.vertexAttributesChanged();
- }
- function y3(t2, r5) {
- d2(t2.vertexAttributes.position, r5), t2.vertexAttributesChanged();
- }
- function d2(t2, r5) {
- if (t2)
- for (let e6 = 0; e6 < t2.length; e6 += 3)
- for (let o3 = 0; o3 < 3; o3++)
- t2[e6 + o3] += r5[o3];
- }
- var k4 = n2();
- var w2 = e4();
- var F = e3();
- // node_modules/@arcgis/core/geometry/support/meshUtils/primitives.js
- function c3() {
- const { faceDescriptions: t2, faceVertexOffsets: e6, uvScales: n4 } = d3, r5 = 4 * t2.length, o3 = new Float64Array(3 * r5), s5 = new Float32Array(3 * r5), a5 = new Float32Array(2 * r5), i2 = new Uint32Array(2 * t2.length * 3);
- let c5 = 0, l7 = 0, f8 = 0, u4 = 0;
- for (let h4 = 0; h4 < t2.length; h4++) {
- const r6 = t2[h4], p9 = c5 / 3;
- for (const t3 of e6)
- i2[u4++] = p9 + t3;
- const m6 = r6.corners;
- for (let t3 = 0; t3 < 4; t3++) {
- const e7 = m6[t3];
- let i3 = 0;
- a5[f8++] = 0.25 * n4[t3][0] + r6.uvOrigin[0], a5[f8++] = r6.uvOrigin[1] - 0.25 * n4[t3][1];
- for (let t4 = 0; t4 < 3; t4++)
- r6.axis[t4] !== 0 ? (o3[c5++] = 0.5 * r6.axis[t4], s5[l7++] = r6.axis[t4]) : (o3[c5++] = 0.5 * e7[i3++], s5[l7++] = 0);
- }
- }
- return { position: o3, normal: s5, uv: a5, faces: i2 };
- }
- function l5(e6, n4) {
- const r5 = e6.components[0], o3 = r5.faces, a5 = M4[n4], i2 = 6 * a5, c5 = new Uint32Array(6), l7 = new Uint32Array(o3.length - 6);
- let f8 = 0, u4 = 0;
- for (let t2 = 0; t2 < o3.length; t2++)
- t2 >= i2 && t2 < i2 + 6 ? c5[f8++] = o3[t2] : l7[u4++] = o3[t2];
- if (r(e6.vertexAttributes.uv)) {
- const t2 = new Float32Array(e6.vertexAttributes.uv), n5 = 4 * a5 * 2, r6 = [0, 1, 1, 1, 1, 0, 0, 0];
- for (let e7 = 0; e7 < r6.length; e7++)
- t2[n5 + e7] = r6[e7];
- e6.vertexAttributes.uv = t2;
- }
- return e6.components = [new f4({ faces: c5, material: r5.material }), new f4({ faces: l7 })], e6;
- }
- function f7(t2 = 0) {
- const e6 = Math.round(8 * 2 ** t2), n4 = 2 * e6, r5 = (e6 - 1) * (n4 + 1) + 2 * n4, o3 = new Float64Array(3 * r5), s5 = new Float32Array(3 * r5), a5 = new Float32Array(2 * r5), i2 = new Uint32Array(3 * ((e6 - 1) * n4 * 2));
- let c5 = 0, l7 = 0, f8 = 0, u4 = 0;
- for (let h4 = 0; h4 <= e6; h4++) {
- const t3 = h4 / e6 * Math.PI + 0.5 * Math.PI, r6 = Math.cos(t3), p9 = Math.sin(t3);
- F2[2] = p9;
- const m6 = h4 === 0 || h4 === e6, w5 = m6 ? n4 - 1 : n4;
- for (let v5 = 0; v5 <= w5; v5++) {
- const t4 = v5 / w5 * 2 * Math.PI;
- F2[0] = -Math.sin(t4) * r6, F2[1] = Math.cos(t4) * r6;
- for (let e7 = 0; e7 < 3; e7++)
- o3[c5] = 0.5 * F2[e7], s5[c5] = F2[e7], ++c5;
- a5[l7++] = (v5 + (m6 ? 0.5 : 0)) / n4, a5[l7++] = h4 / e6, h4 !== 0 && v5 !== n4 && (h4 !== e6 && (i2[f8++] = u4, i2[f8++] = u4 + 1, i2[f8++] = u4 - n4), h4 !== 1 && (i2[f8++] = u4, i2[f8++] = u4 - n4, i2[f8++] = u4 - n4 - 1)), u4++;
- }
- }
- return { position: o3, normal: s5, uv: a5, faces: i2 };
- }
- function u3(t2 = 0) {
- const e6 = 5, n4 = Math.round(16 * 2 ** t2), r5 = (e6 - 1) * (n4 + 1) + 2 * n4, o3 = new Float64Array(3 * r5), s5 = new Float32Array(3 * r5), a5 = new Float32Array(2 * r5), i2 = new Uint32Array(3 * (4 * n4));
- let c5 = 0, l7 = 0, f8 = 0, u4 = 0, h4 = 0;
- for (let p9 = 0; p9 <= e6; p9++) {
- const t3 = p9 === 0 || p9 === e6, r6 = p9 <= 1 || p9 >= e6 - 1, m6 = p9 === 2 || p9 === 4, w5 = t3 ? n4 - 1 : n4;
- for (let v5 = 0; v5 <= w5; v5++) {
- const g6 = v5 / w5 * 2 * Math.PI, A4 = t3 ? 0 : 0.5;
- F2[0] = A4 * Math.sin(g6), F2[1] = A4 * -Math.cos(g6), F2[2] = p9 <= 2 ? 0.5 : -0.5;
- for (let t4 = 0; t4 < 3; t4++)
- o3[c5++] = F2[t4], s5[l7++] = r6 ? t4 === 2 ? p9 <= 1 ? 1 : -1 : 0 : t4 === 2 ? 0 : F2[t4] / A4;
- a5[f8++] = (v5 + (t3 ? 0.5 : 0)) / n4, a5[f8++] = p9 <= 1 ? 1 * p9 / 3 : p9 <= 3 ? 1 * (p9 - 2) / 3 + 1 / 3 : 1 * (p9 - 4) / 3 + 2 / 3, m6 || p9 === 0 || v5 === n4 || (p9 !== e6 && (i2[u4++] = h4, i2[u4++] = h4 + 1, i2[u4++] = h4 - n4), p9 !== 1 && (i2[u4++] = h4, i2[u4++] = h4 - n4, i2[u4++] = h4 - n4 - 1)), h4++;
- }
- }
- return { position: o3, normal: s5, uv: a5, faces: i2 };
- }
- function h3(t2, e6) {
- const n4 = typeof e6 == "number" ? e6 : e6 != null ? e6.width : 1, r5 = typeof e6 == "number" ? e6 : e6 != null ? e6.height : 1;
- switch (t2) {
- case "up":
- case "down":
- return { width: n4, depth: r5 };
- case "north":
- case "south":
- return { width: n4, height: r5 };
- case "east":
- case "west":
- return { depth: n4, height: r5 };
- }
- }
- function p7(t2) {
- const e6 = g4.facingAxisOrderSwap[t2], n4 = g4.position, r5 = g4.normal, o3 = new Float64Array(n4.length), s5 = new Float32Array(r5.length);
- let a5 = 0;
- for (let i2 = 0; i2 < 4; i2++) {
- const t3 = a5;
- for (let i3 = 0; i3 < 3; i3++) {
- const c5 = e6[i3], l7 = Math.abs(c5) - 1, f8 = c5 >= 0 ? 1 : -1;
- o3[a5] = n4[t3 + l7] * f8, s5[a5] = r5[t3 + l7] * f8, a5++;
- }
- }
- return { position: o3, normal: s5, uv: new Float32Array(g4.uv), faces: new Uint32Array(g4.faces), isPlane: true };
- }
- var m5 = 1;
- var w3 = 2;
- var v3 = 3;
- var g4 = { position: [-0.5, -0.5, 0, 0.5, -0.5, 0, 0.5, 0.5, 0, -0.5, 0.5, 0], normal: [0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1], uv: [0, 1, 1, 1, 1, 0, 0, 0], faces: [0, 1, 2, 0, 2, 3], facingAxisOrderSwap: { east: [v3, m5, w3], west: [-v3, -m5, w3], north: [-m5, v3, w3], south: [m5, -v3, w3], up: [m5, w3, v3], down: [m5, -w3, -v3] } };
- function A2(t2, e6, n4) {
- t2.isPlane || y4(t2), x6(t2, n4 && n4.size);
- const { vertexAttributes: r5, transform: o3 } = k3(t2, e6, n4);
- return { vertexAttributes: new p4({ ...r5, uv: t2.uv }), transform: o3, components: [new f4({ faces: t2.faces, material: n4 && n4.material || null })], spatialReference: e6.spatialReference };
- }
- function y4(t2) {
- for (let e6 = 0; e6 < t2.position.length; e6 += 3)
- t2.position[e6 + 2] += 0.5;
- }
- function x6(t2, e6) {
- if (e6 == null)
- return;
- const o3 = typeof e6 == "number" ? [e6, e6, e6] : [e6.width != null ? e6.width : 1, e6.depth != null ? e6.depth : 1, e6.height != null ? e6.height : 1];
- O4[0] = o3[0], O4[4] = o3[1], O4[8] = o3[2];
- for (let r5 = 0; r5 < t2.position.length; r5 += 3) {
- for (let e7 = 0; e7 < 3; e7++)
- F2[e7] = t2.position[r5 + e7];
- O2(F2, F2, O4);
- for (let e7 = 0; e7 < 3; e7++)
- t2.position[r5 + e7] = F2[e7];
- }
- if (o3[0] !== o3[1] || o3[1] !== o3[2]) {
- O4[0] = 1 / o3[0], O4[4] = 1 / o3[1], O4[8] = 1 / o3[2];
- for (let e7 = 0; e7 < t2.normal.length; e7 += 3) {
- for (let n4 = 0; n4 < 3; n4++)
- F2[n4] = t2.normal[e7 + n4];
- O2(F2, F2, O4), z(F2, F2);
- for (let n4 = 0; n4 < 3; n4++)
- t2.normal[e7 + n4] = F2[n4];
- }
- }
- }
- var d3 = { faceDescriptions: [{ axis: [0, -1, 0], uvOrigin: [0, 0.625], corners: [[-1, -1], [1, -1], [1, 1], [-1, 1]] }, { axis: [1, 0, 0], uvOrigin: [0.25, 0.625], corners: [[-1, -1], [1, -1], [1, 1], [-1, 1]] }, { axis: [0, 1, 0], uvOrigin: [0.5, 0.625], corners: [[1, -1], [-1, -1], [-1, 1], [1, 1]] }, { axis: [-1, 0, 0], uvOrigin: [0.75, 0.625], corners: [[1, -1], [-1, -1], [-1, 1], [1, 1]] }, { axis: [0, 0, 1], uvOrigin: [0, 0.375], corners: [[-1, -1], [1, -1], [1, 1], [-1, 1]] }, { axis: [0, 0, -1], uvOrigin: [0, 0.875], corners: [[-1, 1], [1, 1], [1, -1], [-1, -1]] }], uvScales: [[0, 0], [1, 0], [1, 1], [0, 1]], faceVertexOffsets: [0, 1, 2, 0, 2, 3] };
- var M4 = { south: 0, east: 1, north: 2, west: 3, up: 4, down: 5 };
- var F2 = n2();
- var O4 = e3();
- // node_modules/@arcgis/core/geometry/support/meshUtils/rotate.js
- var $ = s.getLogger("esri.geometry.support.meshUtils.rotate");
- function z2(t2, r5, o3) {
- if (!t2.vertexAttributes || !t2.vertexAttributes.position || r5[3] === 0)
- return;
- const i2 = t2.spatialReference;
- if (r(t2.transform)) {
- o3?.geographic != null && o3.geographic !== t2.transform.geographic && $.warn(`Specifying the 'geographic' parameter (${o3.geographic}) different from the Mesh transform setting (${t2.transform.geographic}) is not supported`);
- const e6 = o3?.origin ?? t2.transform.getOriginPoint(i2);
- C2(t2.transform, r5, e6);
- } else {
- const e6 = o3?.origin ?? t2.origin;
- r3(t2.spatialReference, o3) ? I(t2, r5, e6) : U(t2, r5, e6);
- }
- }
- function C2(t2, e6, r5) {
- const o3 = o(E, r5.x, r5.y, r5.z), i2 = e2(E, o3, t2.origin);
- t2.applyLocalInverse(i2, M5), t2.rotation = g(t2.rotation, e6, a2()), t2.applyLocalInverse(i2, i2), e2(i2, i2, M5), t2.translation = u(n2(), t2.translation, i2);
- }
- function I(t2, r5, i2) {
- const n4 = t2.spatialReference, s5 = O(n4), a5 = Z;
- Hn(i2, a5, s5) || Hn(t2.origin, a5, s5);
- const c5 = t2.vertexAttributes.position, f8 = t2.vertexAttributes.normal, m6 = t2.vertexAttributes.tangent, g6 = new Float64Array(c5.length), l7 = r(f8) ? new Float32Array(f8.length) : null, v5 = r(m6) ? new Float32Array(m6.length) : null;
- qn(s5, a5, P, s5), a(S, P);
- const x8 = O5;
- O2(l2(O5), l2(r5), S), x8[3] = r5[3], M2(c5, n4, g6), r(f8) && j2(f8, c5, g6, n4, l7), r(m6) && k2(m6, c5, g6, n4, v5), D(g6, x8, 3, a5), O3(g6, c5, n4), r(f8) && (D(l7, x8, 3), h(l7, c5, g6, n4, f8)), r(m6) && (D(v5, x8, 4), L3(v5, c5, g6, n4, m6)), t2.vertexAttributesChanged();
- }
- function U(t2, e6, r5) {
- const o3 = Z;
- if (!Hn(r5, o3, t2.spatialReference)) {
- const e7 = t2.origin;
- o3[0] = e7.x, o3[1] = e7.y, o3[2] = e7.z, $.error(`Failed to project specified origin (wkid:${r5.spatialReference.wkid}) to mesh spatial reference (wkid:${t2.spatialReference.wkid}).`);
- }
- D(t2.vertexAttributes.position, e6, 3, o3), D(t2.vertexAttributes.normal, e6, 3), D(t2.vertexAttributes.tangent, e6, 4), t2.vertexAttributesChanged();
- }
- function D(t2, e6, o3, i2 = f3) {
- if (!t(t2)) {
- p3(P, x(e6), l2(e6));
- for (let e7 = 0; e7 < t2.length; e7 += o3) {
- for (let r5 = 0; r5 < 3; r5++)
- E[r5] = t2[e7 + r5] - i2[r5];
- L(E, E, P);
- for (let r5 = 0; r5 < 3; r5++)
- t2[e7 + r5] = E[r5] + i2[r5];
- }
- }
- }
- var E = n2();
- var M5 = n2();
- var O5 = a2();
- var P = e4();
- var S = e3();
- var Z = n2();
- // node_modules/@arcgis/core/geometry/support/meshUtils/scale.js
- var v4 = s.getLogger("esri.geometry.support.meshUtils.scale");
- function d4(e6, r5, o3) {
- if (!e6.vertexAttributes || !e6.vertexAttributes.position)
- return;
- const i2 = e6.spatialReference;
- if (r(e6.transform)) {
- o3?.geographic != null && o3.geographic !== e6.transform.geographic && v4.warn(`Specifying the 'geographic' parameter (${o3.geographic}) different from the Mesh transform setting (${e6.transform.geographic}) is not supported`);
- const t2 = o3?.origin ?? e6.transform.getOriginPoint(i2);
- x7(e6.transform, r5, t2);
- } else {
- const t2 = r3(e6.spatialReference, o3), i3 = o3 && o3.origin || e6.origin;
- t2 ? A3(e6, r5, i3) : b2(e6, r5, i3);
- }
- }
- function x7(e6, t2, a5) {
- const c5 = o(w4, a5.x, a5.y, a5.z), p9 = e2(w4, c5, e6.origin);
- e6.applyLocalInverse(p9, k5);
- const f8 = q(n2(), e6.scale, t2);
- e6.scale = f8, e6.applyLocalInverse(p9, p9), e2(p9, p9, k5), e6.translation = u(n2(), e6.translation, p9);
- }
- function A3(e6, r5, o3) {
- const i2 = e6.spatialReference, n4 = O(i2), s5 = R;
- Hn(o3, s5, n4) || Hn(e6.origin, s5, n4);
- const a5 = e6.vertexAttributes.position, f8 = e6.vertexAttributes.normal, v5 = e6.vertexAttributes.tangent, d5 = new Float64Array(a5.length), x8 = r(f8) ? new Float32Array(f8.length) : null, A4 = r(v5) ? new Float32Array(v5.length) : null;
- M2(a5, i2, d5), r(f8) && j2(f8, a5, d5, i2, x8), r(v5) && k2(v5, a5, d5, i2, A4), y5(d5, r5, s5), O3(d5, a5, i2), r(f8) && h(x8, a5, d5, i2, f8), r(v5) && L3(A4, a5, d5, i2, v5), e6.vertexAttributesChanged();
- }
- function b2(e6, t2, r5) {
- const o3 = R;
- if (!Hn(r5, o3, e6.spatialReference)) {
- const t3 = e6.origin;
- o3[0] = t3.x, o3[1] = t3.y, o3[2] = t3.z, v4.error(`Failed to project specified origin (wkid:${r5.spatialReference.wkid}) to mesh spatial reference (wkid:${e6.spatialReference.wkid}).`);
- }
- y5(e6.vertexAttributes.position, t2, o3), e6.vertexAttributesChanged();
- }
- function y5(e6, t2, r5 = f3) {
- if (e6)
- for (let o3 = 0; o3 < e6.length; o3 += 3) {
- for (let t3 = 0; t3 < 3; t3++)
- w4[t3] = e6[o3 + t3] - r5[t3];
- q(w4, w4, t2);
- for (let t3 = 0; t3 < 3; t3++)
- e6[o3 + t3] = w4[t3] + r5[t3];
- }
- }
- var w4 = n2();
- var k5 = n2();
- var R = n2();
- // node_modules/@arcgis/core/geometry/Mesh.js
- var I2;
- var B = s.getLogger("esri.geometry.Mesh");
- var k6 = I2 = class extends a3(m2.LoadableMixin(m(p2))) {
- constructor(e6) {
- super(e6), this.components = null, this.transform = null, this.external = null, this.hasZ = true, this.hasM = false, this.vertexAttributes = new p4(), this.type = "mesh";
- }
- initialize() {
- (t(this.external) || this.vertexAttributes.position.length) && (this.loadStatus = "loaded"), this.when(() => {
- this.handles.add(l(() => ({ vertexAttributes: this.vertexAttributes, components: this.components?.map((e6) => e6.clone()), transform: r(this.transform) ? this.transform.clone() : null }), () => this._set("external", null), { once: true, sync: true }));
- });
- }
- get hasExtent() {
- return !this.loaded && r(this.external) && r(this.external.extent) || this.loaded && this.vertexAttributes.position.length > 0 && (!this.components || this.components.length > 0);
- }
- get boundingInfo() {
- const e6 = this.vertexAttributes.position, t2 = this.spatialReference;
- if (e6.length === 0 || this.components && this.components.length === 0)
- return { extent: new M({ xmin: 0, ymin: 0, zmin: 0, xmax: 0, ymax: 0, zmax: 0, spatialReference: t2 }), center: new j({ x: 0, y: 0, z: 0, spatialReference: t2 }) };
- const o3 = r(this.transform) ? this.transform.project(e6, t2) : e6;
- let r5 = 1 / 0, n4 = 1 / 0, s5 = 1 / 0, a5 = -1 / 0, l7 = -1 / 0, p9 = -1 / 0, c5 = 0, m6 = 0, h4 = 0;
- const f8 = o3.length, d5 = 1 / (f8 / 3);
- let y7 = 0;
- for (; y7 < f8; ) {
- const e7 = o3[y7++], t3 = o3[y7++], i2 = o3[y7++];
- r5 = Math.min(r5, e7), n4 = Math.min(n4, t3), s5 = Math.min(s5, i2), a5 = Math.max(a5, e7), l7 = Math.max(l7, t3), p9 = Math.max(p9, i2), c5 += d5 * e7, m6 += d5 * t3, h4 += d5 * i2;
- }
- return { extent: new M({ xmin: r5, ymin: n4, zmin: s5, xmax: a5, ymax: l7, zmax: p9, spatialReference: t2 }), center: new j({ x: c5, y: m6, z: h4, spatialReference: t2 }) };
- }
- get anchor() {
- if (r(this.transform))
- return this.transform.getOriginPoint(this.spatialReference);
- const e6 = this.boundingInfo;
- return new j({ x: e6.center.x, y: e6.center.y, z: e6.extent.zmin, spatialReference: this.spatialReference });
- }
- get origin() {
- return r(this.transform) ? this.transform.getOriginPoint(this.spatialReference) : this.boundingInfo.center;
- }
- get extent() {
- return !this.loaded && r(this.external) && r(this.external.extent) ? this.external.extent.clone() : this.boundingInfo.extent;
- }
- addComponent(e6) {
- this.loaded ? (this.components || (this.components = []), this.components.push(f4.from(e6)), this.notifyChange("components")) : B.error("addComponent()", "Mesh must be loaded before applying operations");
- }
- removeComponent(e6) {
- if (this.loaded) {
- if (this.components) {
- const t2 = this.components.indexOf(e6);
- if (t2 !== -1)
- return this.components.splice(t2, 1), void this.notifyChange("components");
- }
- B.error("removeComponent()", "Provided component is not part of the list of components");
- } else
- B.error("removeComponent()", "Mesh must be loaded before applying operations");
- }
- rotate(e6, t2, o3, r5) {
- return k(D2.x, e6, W), k(D2.y, t2, Z2), k(D2.z, o3, _2), g(W, Z2, W), g(W, _2, W), z2(this, W, r5), this;
- }
- offset(e6, t2, o3, r5) {
- return this.loaded ? (H[0] = e6, H[1] = t2, H[2] = o3, A(this, H, r5), this) : (B.error("offset()", "Mesh must be loaded before applying operations"), this);
- }
- scale(e6, t2) {
- return this.loaded ? (d4(this, e6, t2), this) : (B.error("scale()", "Mesh must be loaded before applying operations"), this);
- }
- centerAt(e6, t2) {
- return this.loaded ? (c2(this, e6, t2), this) : (B.error("centerAt()", "Mesh must be loaded before applying operations"), this);
- }
- load(e6) {
- return r(this.external) && this.addResolvingPromise(f6(this, this.external.source, e6)), Promise.resolve(this);
- }
- clone() {
- const e6 = this.components ? new Map() : null, t2 = this.components ? new Map() : null, o3 = { components: this.components ? this.components.map((o4) => o4.cloneWithDeduplication(e6, t2)) : null, spatialReference: this.spatialReference, vertexAttributes: this.vertexAttributes.clone(), transform: r(this.transform) ? this.transform.clone() : null, external: r(this.external) ? { source: this.external.source, extent: r(this.external.extent) ? this.external.extent.clone() : null } : null };
- return new I2(o3);
- }
- vertexAttributesChanged() {
- this.notifyChange("vertexAttributes");
- }
- async toBinaryGLTF(e6) {
- const { toBinaryGLTF: t2 } = await import("./gltfexport-6ZX4IV4P.js");
- return t2(this, e6);
- }
- static createBox(e6, t2) {
- if (!(e6 instanceof j))
- return B.error(".createBox()", "expected location to be a Point instance"), null;
- const o3 = new I2(A2(c3(), e6, t2));
- return t2 && t2.imageFace && t2.imageFace !== "all" ? l5(o3, t2.imageFace) : o3;
- }
- static createSphere(e6, t2) {
- return e6 instanceof j ? new I2(A2(f7(t2 && t2.densificationFactor || 0), e6, t2)) : (B.error(".createSphere()", "expected location to be a Point instance"), null);
- }
- static createCylinder(e6, t2) {
- return e6 instanceof j ? new I2(A2(u3(t2 && t2.densificationFactor || 0), e6, t2)) : (B.error(".createCylinder()", "expected location to be a Point instance"), null);
- }
- static createPlane(e6, t2) {
- if (!(e6 instanceof j))
- return B.error(".createPlane()", "expected location to be a Point instance"), null;
- const o3 = t2?.facing ?? "up", r5 = h3(o3, t2?.size);
- return new I2(A2(p7(o3), e6, { ...t2, size: r5 }));
- }
- static createFromPolygon(e6, t2) {
- if (!(e6 instanceof v))
- return B.error(".createFromPolygon()", "expected polygon to be a Polygon instance"), null;
- const o3 = o2(e6);
- return new I2({ vertexAttributes: new p4({ position: o3.position }), components: [new f4({ faces: o3.faces, shading: "flat", material: t2 && t2.material || null })], spatialReference: e6.spatialReference });
- }
- static async createFromGLTF(e6, o3, r5) {
- if (!(e6 instanceof j))
- throw B.error(".createfromGLTF()", "expected location to be a Point instance"), new s2("invalid-input", "Expected location to be a Point instance");
- const { loadGLTFMesh: n4 } = await y(import("./loadGLTFMesh-VTQIH4TD.js"), r5);
- return new I2(await n4(e6, o3, r5));
- }
- static createWithExternalSource(e6, t2, o3) {
- const r5 = o3?.extent ?? null, n4 = o3?.transform.clone() ?? new L2();
- n4.origin = [e6.x, e6.y, e6.z ?? 0];
- const s5 = e6.spatialReference;
- return new I2({ external: { source: t2, extent: r5 }, transform: n4, spatialReference: s5 });
- }
- static createIncomplete(e6, o3) {
- const r5 = o3?.transform.clone() ?? new L2();
- r5.origin = [e6.x, e6.y, e6.z ?? 0];
- const n4 = e6.spatialReference, s5 = new I2({ transform: r5, spatialReference: n4 });
- return s5.addResolvingPromise(Promise.reject(new s2("mesh-incomplete", "Mesh resources are not complete"))), s5;
- }
- };
- e([d({ type: [f4], json: { write: true } })], k6.prototype, "components", void 0), e([d({ type: L2, json: { write: true } })], k6.prototype, "transform", void 0), e([d({ constructOnly: true })], k6.prototype, "external", void 0), e([d({ readOnly: true })], k6.prototype, "hasExtent", null), e([d({ readOnly: true })], k6.prototype, "boundingInfo", null), e([d({ readOnly: true })], k6.prototype, "anchor", null), e([d({ readOnly: true })], k6.prototype, "origin", null), e([d({ readOnly: true, json: { read: false } })], k6.prototype, "extent", null), e([d({ readOnly: true, json: { read: false, write: true, default: true } })], k6.prototype, "hasZ", void 0), e([d({ readOnly: true, json: { read: false, write: true, default: false } })], k6.prototype, "hasM", void 0), e([d({ type: p4, nonNullable: true, json: { write: true } })], k6.prototype, "vertexAttributes", void 0), k6 = I2 = e([n("esri.geometry.Mesh")], k6);
- var D2 = { x: r2(1, 0, 0), y: r2(0, 1, 0), z: r2(0, 0, 1) };
- var W = a2();
- var Z2 = a2();
- var _2 = a2();
- var H = n2();
- var N = k6;
- // node_modules/@arcgis/core/layers/support/infoFor3D.js
- var s4;
- var e5;
- !function(s5) {
- s5.featureGUID = "featureGUID", s5.assetName = "assetName", s5.hash = "hash", s5.type = "type", s5.conversionStatus = "conversionStatus", s5.flags = "flags", s5.complexity = "complexity", s5.size = "size", s5.seqNo = "seqNo", s5.sourceHash = "sourceHash", s5.assetURL = "assetURL";
- }(s4 || (s4 = {})), function(s5) {
- s5.SUBMITTED = "SUBMITTED", s5.INPROGRESS = "INPROGRESS", s5.FAILED = "FAILED", s5.COMPLETED = "COMPLETED";
- }(e5 || (e5 = {}));
- // node_modules/@arcgis/core/rest/support/meshFeatureSet.js
- function c4(o3, s5, n4) {
- const a5 = n4.features;
- n4.features = [], delete n4.geometryType;
- const i2 = x4.fromJSON(n4);
- i2.geometryType = "mesh";
- const u4 = i2.spatialReference, f8 = t(o3.outFields) || !o3.outFields.length ? () => ({}) : l6(o3.outFields.includes("*") ? null : new Set(o3.outFields));
- for (const e6 of a5) {
- const o4 = p8(e6, u4, s5);
- r(o4) && i2.features.push(new g2({ geometry: o4, attributes: f8(e6) }));
- }
- return i2;
- }
- function l6(t2) {
- return ({ attributes: e6 }) => {
- if (!e6)
- return {};
- if (!t2)
- return e6;
- for (const r5 in e6)
- t2.has(r5) || delete e6[r5];
- return e6;
- };
- }
- function p8(t2, e6, r5) {
- const { status: n4, source: a5 } = D3(t2);
- if (n4 === y6.FAILED)
- return null;
- const i2 = g5(t2, e6, r5), u4 = M.fromJSON(t2.geometry);
- u4.spatialReference = e6;
- const f8 = E2(t2, r5);
- return n4 === y6.PENDING ? N.createIncomplete(i2, { extent: u4, transform: f8 }) : N.createWithExternalSource(i2, a5, { extent: u4, transform: f8 });
- }
- function g5({ attributes: t2 }, e6, { transformFieldRoles: r5 }) {
- return new j({ x: t2[r5.originX], y: t2[r5.originY], z: t2[r5.originZ], spatialReference: e6 });
- }
- function E2({ attributes: t2, assetMappings: e6 }, { transformFieldRoles: r5 }) {
- return new L2({ translation: [t2[r5.translationX], t2[r5.translationY], t2[r5.translationZ]], rotation: k([t2[r5.rotationX], t2[r5.rotationY], t2[r5.rotationZ]], t2[r5.rotationDeg]), scale: [t2[r5.scaleX], t2[r5.scaleY], t2[r5.scaleZ]], geographic: !e6[s4.flags]?.includes("PROJECT_VERTICES") });
- }
- function D3(t2) {
- if (!t2.assetMappings)
- return { status: y6.FAILED };
- const e6 = [], r5 = new Map();
- for (const o3 of t2.assetMappings) {
- const t3 = o3[s4.seqNo], s5 = o3[s4.assetName], n4 = o3[s4.assetURL], a5 = o3[s4.conversionStatus];
- if (a5 === e5.FAILED)
- return { status: y6.FAILED };
- if (a5 !== e5.COMPLETED)
- return { status: y6.PENDING };
- if (t3 == null)
- e6.push({ name: s5, source: n4 });
- else {
- const o4 = r5.get(s5);
- let a6;
- o4 ? a6 = o4.multipart : (a6 = [], e6.push({ name: s5, source: { multipart: a6 } }), r5.set(s5, { multipart: a6 })), a6[t3] = n4;
- }
- }
- return { status: y6.COMPLETED, source: e6 };
- }
- var y6;
- !function(t2) {
- t2[t2.FAILED = 0] = "FAILED", t2[t2.PENDING = 1] = "PENDING", t2[t2.COMPLETED = 2] = "COMPLETED";
- }(y6 || (y6 = {}));
- export {
- c4 as meshFeatureSetFromJSON
- };
- //# sourceMappingURL=meshFeatureSet-77HDYLJC.js.map
|