import { s as s3 } from "./chunk-AJFR3FGC.js"; import { n as n2, r as r6 } from "./chunk-K7B6OWCU.js"; import { M, c, e as e2, f, h, i as i3, r as r5 } from "./chunk-RG3AHHRL.js"; import { C, a as a3, g, j as j2, l as l2, o as o2, q as q2, r as r4, s as s2, v as v2, y as y2, z } from "./chunk-E3G7BRZB.js"; import { An, en, rn, tn } from "./chunk-P24XEEHY.js"; import { i as i2 } from "./chunk-JOYXMSKE.js"; import { $ } from "./chunk-3RSFVUKZ.js"; import { a as a2 } from "./chunk-RYY6632W.js"; import { r as r3 } from "./chunk-OSHI574D.js"; import { i } from "./chunk-ETGAZ7LF.js"; import { v } from "./chunk-RMDDCMKS.js"; import { j } from "./chunk-LBW34VZ2.js"; import { o, p, w, w2 } from "./chunk-6T6G6LCQ.js"; import { s } from "./chunk-YEJL5NEF.js"; import { E, I, R, k2 as k, r as r2 } from "./chunk-PQFTYGF5.js"; import { e, l3 as l, n5 as n, y3 as y } from "./chunk-2Z2TG5CU.js"; import { a } from "./chunk-SQOPWYIT.js"; import { q, r, t } from "./chunk-YXWMMD76.js"; // node_modules/@arcgis/core/Camera.js var d = class extends i2(l) { constructor(...o4) { super(...o4), this.position = new w([0, 0, 0]), this.heading = 0, this.tilt = 0, this.fov = 55; } normalizeCtorArgs(o4, r8, t3, e4) { if (o4 && "object" == typeof o4 && ("x" in o4 || Array.isArray(o4))) { const s4 = { position: o4 }; return null != r8 && (s4.heading = r8), null != t3 && (s4.tilt = t3), null != e4 && (s4.fov = e4), s4; } return o4; } writePosition(o4, r8, t3, e4) { const s4 = o4.clone(); s4.x = a(o4.x || 0), s4.y = a(o4.y || 0), s4.z = o4.hasZ ? a(o4.z || 0) : o4.z, r8[t3] = s4.write({}, e4); } readPosition(o4, r8) { const t3 = new w(); return t3.read(o4, r8), t3.x = a(t3.x || 0), t3.y = a(t3.y || 0), t3.z = t3.hasZ ? a(t3.z || 0) : t3.z, t3; } equals(o4) { return !t(o4) && (this.tilt === o4.tilt && this.heading === o4.heading && this.fov === o4.fov && this.position.equals(o4.position)); } }; e([y({ type: w, json: { write: { isRequired: true } } })], d.prototype, "position", void 0), e([r2("position")], d.prototype, "writePosition", null), e([o("position")], d.prototype, "readPosition", null), e([y({ type: Number, nonNullable: true, json: { write: { isRequired: true } } }), s((o4) => s3.normalize(a(o4)))], d.prototype, "heading", void 0), e([y({ type: Number, nonNullable: true, json: { write: { isRequired: true } } }), s((o4) => a2(a(o4), -180, 180))], d.prototype, "tilt", void 0), e([y({ type: Number, nonNullable: true, json: { read: false, write: false } })], d.prototype, "fov", void 0), d = e([n("esri.Camera")], d); var y3 = d; // node_modules/@arcgis/core/Viewpoint.js var m; var n3 = m = class extends l { constructor(r8) { super(r8), this.rotation = 0, this.scale = 0, this.targetGeometry = null, this.camera = null; } castRotation(r8) { return (r8 %= 360) < 0 && (r8 += 360), r8; } clone() { return new m({ rotation: this.rotation, scale: this.scale, targetGeometry: r(this.targetGeometry) ? this.targetGeometry.clone() : null, camera: r(this.camera) ? this.camera.clone() : null }); } }; function l3() { return { enabled: !this.camera }; } e([y({ type: Number, json: { write: true, origins: { "web-map": { default: 0, write: true }, "web-scene": { write: { overridePolicy: l3 } } } } })], n3.prototype, "rotation", void 0), e([s("rotation")], n3.prototype, "castRotation", null), e([y({ type: Number, json: { write: true, origins: { "web-map": { default: 0, write: true }, "web-scene": { write: { overridePolicy: l3 } } } } })], n3.prototype, "scale", void 0), e([y({ types: i, json: { read: v, write: true, origins: { "web-scene": { read: v, write: { overridePolicy: l3 } } } } })], n3.prototype, "targetGeometry", void 0), e([y({ type: y3, json: { write: true } })], n3.prototype, "camera", void 0), n3 = m = e([n("esri.Viewpoint")], n3); var u = n3; // node_modules/@arcgis/core/chunks/mat2df64.js function e3() { return [1, 0, 0, 1, 0, 0]; } function r7(e4) { return [e4[0], e4[1], e4[2], e4[3], e4[4], e4[5]]; } function t2(e4, r8, t3, n5, o4, a4) { return [e4, r8, t3, n5, o4, a4]; } function n4(e4, r8) { return new Float64Array(e4, r8, 6); } var o3 = Object.freeze(Object.defineProperty({ __proto__: null, create: e3, clone: r7, fromValues: t2, createView: n4 }, Symbol.toStringTag, { value: "Module" })); // node_modules/@arcgis/core/views/2d/viewpointUtils.js var Q = 96; var U = 39.37; var B = 180 / Math.PI; function D(t3) { return t3.wkid ? t3 : t3.spatialReference || k.WGS84; } function T(t3, e4) { return e4.type ? r4(t3, e4.x, e4.y) : a3(t3, e4); } function W(t3) { return $(t3); } function H(t3, e4) { const n5 = Math.max(1, e4[0]), r8 = Math.max(1, e4[1]); return Math.max(t3.width / n5, t3.height / r8) * ct(t3.spatialReference); } async function J(t3, a4, i4, c2) { let s4, u2; if (!t3) return null; if (Array.isArray(t3) && !t3.length) return null; if (j.isCollection(t3) && (t3 = t3.toArray()), Array.isArray(t3) && t3.length && "object" == typeof t3[0]) { const e4 = t3.every((t4) => "attributes" in t4), r8 = t3.some((t4) => !t4.geometry); let o4 = t3; if (e4 && r8 && a4 && a4.allLayerViews) { const e5 = /* @__PURE__ */ new Map(); for (const n5 of t3) { const t4 = n5.layer, r10 = e5.get(t4) || [], o5 = n5.attributes[t4.objectIdField]; null != o5 && r10.push(o5), e5.set(t4, r10); } const r9 = []; e5.forEach((t4, e6) => { const n5 = a4.allLayerViews.find((t5) => t5.layer.id === e6.id); if ("queryFeatures" in n5) { const o5 = e6.createQuery(); o5.objectIds = t4, o5.returnGeometry = true, r9.push(n5.queryFeatures(o5)); } }); const i5 = await Promise.all(r9), c3 = []; for (const t4 of i5) if (t4 && t4.features && t4.features.length) for (const e6 of t4.features) r(e6.geometry) && c3.push(e6.geometry); o4 = c3; } for (const t4 of o4) c2 = await J(t4, a4, i4, c2); return c2; } if (Array.isArray(t3) && 2 === t3.length && "number" == typeof t3[0] && "number" == typeof t3[1]) s4 = new w(t3); else if (t3 instanceof p) s4 = t3; else if ("geometry" in t3) { if (t3.geometry) s4 = t3.geometry; else if (t3.layer) { const e4 = t3.layer, n5 = a4.allLayerViews.find((t4) => t4.layer.id === e4.id); if ("queryFeatures" in n5) { const o4 = e4.createQuery(); o4.objectIds = [t3.attributes[e4.objectIdField]], o4.returnGeometry = true; const a5 = await n5.queryFeatures(o4); s4 = q(a5, "features", 0, "geometry"); } } } if (t(s4)) return null; if (u2 = "point" === s4.type ? new w2({ xmin: s4.x, ymin: s4.y, xmax: s4.x, ymax: s4.y, spatialReference: s4.spatialReference }) : s4.extent, !u2) return null; en() || An(u2.spatialReference, i4) || await tn(); const f2 = rn(u2, i4); return f2 ? c2 = c2 ? c2.union(f2) : f2 : null; } function K(t3) { if (t3 && (!Array.isArray(t3) || "number" != typeof t3[0]) && ("object" == typeof t3 || Array.isArray(t3) && "object" == typeof t3[0])) { if ("layer" in t3 && t3.layer && t3.layer.minScale && t3.layer.maxScale) { const e4 = t3.layer; return { min: e4.minScale, max: e4.maxScale }; } if (Array.isArray(t3) && t3.length && t3.every((t4) => "layer" in t4)) { let e4 = 0, n5 = 0; for (const r8 of t3) { const t4 = r8.layer; t4 && t4.minScale && t4.maxScale && (e4 = t4.minScale < e4 ? t4.minScale : e4, n5 = t4.maxScale > n5 ? t4.maxScale : n5); } return e4 && n5 ? { min: e4, max: n5 } : null; } } } function X(t3, e4) { return E(D(t3), e4) ? t3 : rn(t3, e4); } async function Y(e4, r8) { if (!e4 || !r8) return new u({ targetGeometry: new w(), scale: 0, rotation: 0 }); let o4 = r8.spatialReference; const { constraints: a4, padding: i4, viewpoint: c2, size: s4 } = r8, u2 = [i4 ? s4[0] - i4.left - i4.right : s4[0], i4 ? s4[1] - i4.top - i4.bottom : s4[1]]; let f2 = null; e4 instanceof u ? f2 = e4 : e4.viewpoint ? f2 = e4.viewpoint : e4.target && "esri.Viewpoint" === e4.target.declaredClass && (f2 = e4.target); let l4 = null; f2 && f2.targetGeometry ? l4 = f2.targetGeometry : e4 instanceof w2 ? l4 = e4 : (e4 || e4 && ("center" in e4 || "extent" in e4 || "target" in e4)) && (l4 = await J(e4.center, r8, o4) || await J(e4.extent, r8, o4) || await J(e4.target, r8, o4) || await J(e4, r8, o4)), !l4 && c2 && c2.targetGeometry ? l4 = c2.targetGeometry : !l4 && r8.extent && (l4 = r8.extent), o4 || (o4 = D(r8.spatialReference || r8.extent || l4)), en() || E(l4.spatialReference, o4) || An(l4, o4) || await tn(); const m2 = X(l4.center ? l4.center : l4, o4); let y4 = null; if (f2 && r(f2.targetGeometry) && "point" === f2.targetGeometry.type) y4 = f2.scale; else if ("scale" in e4 && e4.scale) y4 = e4.scale; else if ("zoom" in e4 && -1 !== e4.zoom && a4 && a4.effectiveLODs) y4 = a4.zoomToScale(e4.zoom); else if (Array.isArray(l4) || "point" === l4.type || "extent" === l4.type && 0 === l4.width && 0 === l4.height) { const t3 = X(r8.extent, o4); y4 = r(t3) ? H(t3, u2) : r8.extent ? H(r8.extent, u2) : c2.scale; } else y4 = H(X(l4.extent, o4), u2); const p2 = K(e4); p2 && (p2.min && p2.min > y4 ? y4 = p2.min : p2.max && p2.max < y4 && (y4 = p2.max)); let g2 = 0; f2 ? g2 = f2.rotation : e4.hasOwnProperty("rotation") ? g2 = e4.rotation : c2 && (g2 = c2.rotation); let x = new u({ targetGeometry: m2, scale: y4, rotation: g2 }); return a4 && (x = a4.fit(x), a4.constrainByGeometry(x), a4.rotationEnabled || (x.rotation = g2)), x; } function Z(t3, e4) { const n5 = t3.targetGeometry, r8 = e4.targetGeometry; return n5.x = r8.x, n5.y = r8.y, n5.spatialReference = r8.spatialReference, t3.scale = e4.scale, t3.rotation = e4.rotation, t3; } function $2(t3, e4, n5) { return n5 ? r4(t3, 0.5 * (e4[0] - n5.right + n5.left), 0.5 * (e4[1] - n5.bottom + n5.top)) : l2(t3, e4, 0.5); } var _ = function() { const t3 = n2(); return function(e4, n5, r8) { const o4 = n5.targetGeometry; T(t3, o4); const a4 = 0.5 * ot(n5); return e4.xmin = t3[0] - a4 * r8[0], e4.ymin = t3[1] - a4 * r8[1], e4.xmax = t3[0] + a4 * r8[0], e4.ymax = t3[1] + a4 * r8[1], e4.spatialReference = o4.spatialReference, e4; }; }(); function tt(t3, e4, n5, r8, o4) { return xt(t3, e4, n5.center), t3.scale = H(n5, r8), o4 && o4.constraints && o4.constraints.constrain(t3), t3; } function et(t3, e4, n5, r8) { return ft(t3, e4, n5, r8), r5(t3, t3); } var nt = function() { const t3 = n2(); return function(e4, n5, r8) { return C(e4, st(e4, n5), $2(t3, n5, r8)); }; }(); var rt = function() { const t3 = e3(), e4 = n2(); return function(n5, r8, o4, a4) { const i4 = ot(r8), f2 = it(r8); return r4(e4, i4, i4), M(t3, e4), e2(t3, t3, f2), i3(t3, t3, nt(e4, o4, a4)), i3(t3, t3, [0, a4.top - a4.bottom]), r4(n5, t3[4], t3[5]); }; }(); function ot(t3) { return t3.scale * at(t3.targetGeometry); } function at(t3) { return r(t3) && I(t3.spatialReference) ? 1 / (W(t3.spatialReference) * U * Q) : 1; } function it(t3) { return r3(t3.rotation) || 0; } function ct(t3) { return I(t3) ? W(t3) * U * Q : 1; } function st(t3, e4) { return l2(t3, e4, 0.5); } var ut = function() { const t3 = n2(), e4 = n2(), n5 = n2(); return function(r8, o4, a4, i4, c2, m2) { return g(t3, o4), l2(e4, a4, 0.5 * m2), r4(n5, 1 / i4 * m2, -1 / i4 * m2), f(r8, e4), c2 && e2(r8, r8, c2), c(r8, r8, n5), i3(r8, r8, t3), r8; }; }(); var ft = function() { const t3 = n2(); return function(e4, n5, r8, o4) { const a4 = ot(n5), i4 = it(n5); return T(t3, n5.targetGeometry), ut(e4, t3, r8, a4, i4, o4); }; }(); var lt = function() { const t3 = n2(); return function(e4, n5, r8, o4) { const a4 = ot(n5); return T(t3, n5.targetGeometry), ut(e4, t3, r8, a4, 0, o4); }; }(); function mt(t3) { const e4 = R(t3); return e4 ? e4.valid[1] - e4.valid[0] : 0; } function yt(t3, e4) { return Math.round(mt(t3) / e4); } var pt = function() { const t3 = n2(), e4 = n2(), n5 = [0, 0, 0]; return function(r8, o4, a4) { o2(t3, r8, o4), v2(t3, t3), o2(e4, r8, a4), v2(e4, e4), y2(n5, t3, e4); let i4 = Math.acos(j2(t3, e4) / (q2(t3) * q2(e4))) * B; return n5[2] < 0 && (i4 = -i4), isNaN(i4) && (i4 = 0), i4; }; }(); var gt = function() { const t3 = n2(); return function(e4, n5, r8, o4) { const a4 = e4.targetGeometry; return Z(e4, n5), rt(t3, n5, r8, o4), a4.x += t3[0], a4.y += t3[1], e4; }; }(); var xt = function(t3, e4, n5) { Z(t3, e4); const r8 = t3.targetGeometry; return r8.x = n5.x, r8.y = n5.y, r8.spatialReference = n5.spatialReference, t3; }; var ht = function() { const t3 = n2(); return function(e4, n5, r8, o4, a4) { a4 || (a4 = "center"), C(t3, r8, o4), l2(t3, t3, 0.5); const i4 = t3[0], c2 = t3[1]; switch (a4) { case "center": r4(t3, 0, 0); break; case "left": r4(t3, -i4, 0); break; case "top": r4(t3, 0, c2); break; case "right": r4(t3, i4, 0); break; case "bottom": r4(t3, 0, -c2); break; case "top-left": r4(t3, -i4, c2); break; case "bottom-left": r4(t3, -i4, -c2); break; case "top-right": r4(t3, i4, c2); break; case "bottom-right": r4(t3, i4, -c2); } return St(e4, n5, t3), e4; }; }(); function bt(t3, e4, n5) { return Z(t3, e4), t3.rotation += n5, t3; } function wt(t3, e4, n5) { return Z(t3, e4), t3.rotation = n5, t3; } var dt = function() { const t3 = n2(); return function(e4, n5, r8, o4, a4) { return Z(e4, n5), isNaN(r8) || 0 === r8 || (At(t3, o4, n5, a4), e4.scale = n5.scale * r8, kt(t3, t3, e4, a4), St(e4, e4, r4(t3, t3[0] - o4[0], o4[1] - t3[1]))), e4; }; }(); function jt(t3, e4, n5) { return Z(t3, e4), t3.scale = n5, t3; } var Gt = function() { const t3 = n2(); return function(e4, n5, r8, o4, a4, i4) { return Z(e4, n5), isNaN(r8) || 0 === r8 || (At(t3, a4, n5, i4), e4.scale = n5.scale * r8, e4.rotation += o4, kt(t3, t3, e4, i4), St(e4, e4, r4(t3, t3[0] - a4[0], a4[1] - t3[1]))), e4; }; }(); var Rt = function() { const t3 = n2(), e4 = n2(); return function(n5, r8, o4, a4, i4, c2, s4) { return nt(e4, c2, s4), s2(t3, i4, e4), a4 ? Gt(n5, r8, o4, a4, t3, c2) : dt(n5, r8, o4, t3, c2); }; }(); var At = function() { const t3 = e3(); return function(e4, n5, r8, o4) { return z(e4, n5, et(t3, r8, o4, 1)); }; }(); var kt = function() { const t3 = e3(); return function(e4, n5, r8, o4) { return z(e4, n5, ft(t3, r8, o4, 1)); }; }(); var St = function() { const t3 = n2(), e4 = e3(); return function(n5, r8, o4) { Z(n5, r8); const a4 = ot(r8), i4 = n5.targetGeometry; return h(e4, it(r8)), c(e4, e4, r6(a4, a4)), z(t3, o4, e4), i4.x += t3[0], i4.y += t3[1], n5; }; }(); export { u, e3 as e, H, Y, Z, $2 as $, _, tt, nt, ot, ut, ft, lt, mt, yt, pt, gt, xt, ht, bt, wt, jt, Gt, Rt, St }; //# sourceMappingURL=chunk-PTEMIS7J.js.map