import { s as s2 } from "./chunk-GAOW3WRZ.js"; import { E, G, R, k, k2, r as r2 } from "./chunk-QCKFNSN2.js"; import { d, e, l3 as l, n5 as n2, y3 as y2 } from "./chunk-6SOHRC7T.js"; import { a } from "./chunk-SQOPWYIT.js"; import { s2 as s } from "./chunk-E5O6P5I2.js"; import { n2 as n, y } from "./chunk-SPWQ3AWG.js"; import { r, t } from "./chunk-YXWMMD76.js"; // node_modules/@arcgis/core/core/accessorSupport/decorators/reader.js function o(o5, e4, t5) { let a4, c5; return void 0 === e4 || Array.isArray(e4) ? (c5 = o5, t5 = e4, a4 = [void 0]) : (c5 = e4, a4 = Array.isArray(o5) ? o5 : [o5]), (o6, e5) => { const d4 = o6.constructor.prototype; a4.forEach((a5) => { const s6 = d(o6, a5, c5); s6.read && "object" == typeof s6.read || (s6.read = {}), s6.read.reader = d4[e5], t5 && (s6.read.source = (s6.read.source || []).concat(t5)); }); }; } // node_modules/@arcgis/core/geometry/Geometry.js var c = class extends l { constructor(...e4) { super(...e4), this.type = null, this.hasM = false, this.hasZ = false, this.spatialReference = k2.WGS84; } get cache() { return this.commitProperty("spatialReference"), {}; } get extent() { return null; } readSpatialReference(e4, r4) { if (e4 instanceof k2) return e4; if (null != e4) { const t5 = new k2(); return t5.read(e4, r4), t5; } return e4; } clone() { return console.warn(".clone() is not implemented for " + this.declaredClass), null; } clearCache() { this.notifyChange("cache"); } getCacheValue(e4) { return this.cache[e4]; } setCacheValue(e4, r4) { this.cache[e4] = r4; } }; e([y2()], c.prototype, "type", void 0), e([y2({ readOnly: true })], c.prototype, "cache", null), e([y2({ readOnly: true })], c.prototype, "extent", null), e([y2({ type: Boolean, json: { write: { overridePolicy: (e4) => ({ enabled: e4 }) } } })], c.prototype, "hasM", void 0), e([y2({ type: Boolean, json: { write: { overridePolicy: (e4) => ({ enabled: e4 }) } } })], c.prototype, "hasZ", void 0), e([y2({ type: k2, json: { write: true } })], c.prototype, "spatialReference", void 0), e([o("spatialReference")], c.prototype, "readSpatialReference", null), c = e([n2("esri.geometry.Geometry")], c); var p = c; // node_modules/@arcgis/core/geometry/support/Ellipsoid.js var i = class { constructor(i4, s6, t5, e4) { this.semiMajorAxis = i4, this.flattening = s6, this.outerAtmosphereRimWidth = t5; const h3 = 1 - this.flattening; this.semiMinorAxis = this.semiMajorAxis * h3, this.halfSemiMajorAxis = this.semiMajorAxis / 2, this.halfCircumference = Math.PI * this.semiMajorAxis, this.metersPerDegree = this.halfCircumference / 180, this.inverseFlattening = 1 / (1 - this.flattening) - 1, this.eccentricitySquared = e4 || 2 * this.flattening - this.flattening * this.flattening, this.meanRadiusSemiAxes = (2 * this.semiMajorAxis + this.semiMinorAxis) / 3; } get radius() { return this.semiMajorAxis; } }; var s3 = new i(6378137, 1 / 298.257223563, 3e5, 0.006694379990137799); var t2 = new i(3396190, 1 / 169.8944472236118, 23e4); var e2 = new i(1737400, 0, 0); // node_modules/@arcgis/core/geometry/support/webMercatorUtils.js var o2 = 57.29577951308232; var u = 0.017453292519943; function l2(n3) { return n3 * o2; } function p2(n3) { return n3 * u; } function c2(n3) { return Math.PI / 2 - 2 * Math.atan(Math.exp(-n3 / s3.radius)); } function h(n3) { return null != n3.wkid || null != n3.wkt; } var m = [0, 0]; function x(n3, t5, e4, i4, r4) { const s6 = n3, a4 = r4; if (a4.spatialReference = e4, "x" in s6 && "x" in a4) [a4.x, a4.y] = t5(s6.x, s6.y, m, i4); else if ("xmin" in s6 && "xmin" in a4) [a4.xmin, a4.ymin] = t5(s6.xmin, s6.ymin, m, i4), [a4.xmax, a4.ymax] = t5(s6.xmax, s6.ymax, m, i4); else if ("paths" in s6 && "paths" in a4 || "rings" in s6 && "rings" in a4) { const n4 = "paths" in s6 ? s6.paths : s6.rings, e5 = []; let r5; for (let s7 = 0; s7 < n4.length; s7++) { const a5 = n4[s7]; r5 = [], e5.push(r5); for (let n5 = 0; n5 < a5.length; n5++) r5.push(t5(a5[n5][0], a5[n5][1], [0, 0], i4)), a5[n5].length > 2 && r5[n5].push(a5[n5][2]), a5[n5].length > 3 && r5[n5].push(a5[n5][3]); } "paths" in a4 ? a4.paths = e5 : a4.rings = e5; } else if ("points" in s6 && "points" in a4) { const n4 = s6.points, e5 = []; for (let r5 = 0; r5 < n4.length; r5++) e5[r5] = t5(n4[r5][0], n4[r5][1], [0, 0], i4), n4[r5].length > 2 && e5[r5].push(n4[r5][2]), n4[r5].length > 3 && e5[r5].push(n4[r5][3]); a4.points = e5; } return r4; } function g(n3, t5) { const e4 = n3 && (h(n3) ? n3 : n3.spatialReference), i4 = t5 && (h(t5) ? t5 : t5.spatialReference); return !(n3 && "type" in n3 && "mesh" === n3.type || t5 && "type" in t5 && "mesh" === t5.type || !e4 || !i4) && (!!E(i4, e4) || (k(i4) && G(e4) || k(e4) && G(i4))); } function M(i4, o5) { if (t(i4)) return null; const u4 = i4.spatialReference, l4 = o5 && (h(o5) ? o5 : o5.spatialReference); return g(u4, l4) ? E(u4, l4) ? y(i4) : k(l4) ? x(i4, y3, k2.WebMercator, false, y(i4)) : G(l4) ? x(i4, d2, k2.WGS84, false, y(i4)) : null : null; } function y3(n3, t5, e4 = [0, 0]) { t5 > 89.99999 ? t5 = 89.99999 : t5 < -89.99999 && (t5 = -89.99999); const r4 = p2(t5); return e4[0] = p2(n3) * s3.radius, e4[1] = s3.halfSemiMajorAxis * Math.log((1 + Math.sin(r4)) / (1 - Math.sin(r4))), e4; } function d2(n3, t5, e4 = [0, 0], r4 = false) { const s6 = l2(n3 / s3.radius); return e4[0] = r4 ? s6 : s6 - 360 * Math.floor((s6 + 180) / 360), e4[1] = l2(Math.PI / 2 - 2 * Math.atan(Math.exp(-t5 / s3.radius))), e4; } function R2(t5, i4 = false, r4 = y(t5)) { return x(t5, y3, k2.WebMercator, i4, r4); } function j(t5, i4 = false, r4 = y(t5)) { return x(t5, d2, k2.WGS84, i4, r4); } // node_modules/@arcgis/core/geometry/support/pointUtils.js function t3(t5, n3) { const s6 = t5.x - n3.x, r4 = t5.y - n3.y, a4 = t5.hasZ && n3.hasZ ? t5.z - n3.z : 0; return Math.sqrt(s6 * s6 + r4 * r4 + a4 * a4); } // node_modules/@arcgis/core/geometry/Point.js var m2; var f = [0, 0]; function g2(e4) { return e4 && ("esri.geometry.SpatialReference" === e4.declaredClass || null != e4.wkid); } var x2 = m2 = class extends p { constructor(...e4) { super(...e4), this.x = 0, this.y = 0, this.z = void 0, this.m = void 0, this.type = "point"; } static copy(e4, t5) { t5._set("x", e4._get("x")), t5._set("y", e4._get("y")), t5._set("z", e4._get("z")), t5._set("m", e4._get("m")); const r4 = e4._get("spatialReference"); t5._set("spatialReference", Object.isFrozen(r4) ? r4 : r4.clone()); } normalizeCtorArgs(e4, r4, s6, i4, o5) { let a4; if (Array.isArray(e4)) a4 = e4, o5 = r4, e4 = a4[0], r4 = a4[1], s6 = a4[2], i4 = a4[3]; else if (e4 && "object" == typeof e4) { if (a4 = e4, e4 = null != a4.x ? a4.x : a4.longitude, r4 = null != a4.y ? a4.y : a4.latitude, s6 = a4.z, i4 = a4.m, (o5 = a4.spatialReference) && "esri.geometry.SpatialReference" !== o5.declaredClass && (o5 = new k2(o5)), null != a4.longitude || null != a4.latitude) { if (null == a4.longitude) s.getLogger(this.declaredClass).warn(".longitude=", "Latitude was defined without longitude"); else if (null == a4.latitude) s.getLogger(this.declaredClass).warn(".latitude=", "Longitude was defined without latitude"); else if (!a4.declaredClass && o5 && o5.isWebMercator) { const t5 = y3(a4.longitude, a4.latitude, f); e4 = t5[0], r4 = t5[1]; } } } else g2(s6) ? (o5 = s6, s6 = null) : g2(i4) && (o5 = i4, i4 = null); const l4 = { x: e4, y: r4 }; return null == l4.x && null != l4.y ? s.getLogger(this.declaredClass).warn(".y=", "Y coordinate was defined without an X coordinate") : null == l4.y && null != l4.x && s.getLogger(this.declaredClass).warn(".x=", "X coordinate was defined without a Y coordinate"), null != o5 && (l4.spatialReference = o5), null != s6 && (l4.z = s6), null != i4 && (l4.m = i4), l4; } get cache() { return this.commitProperty("x"), this.commitProperty("y"), this.commitProperty("z"), this.commitProperty("m"), this.commitProperty("spatialReference"), {}; } get hasM() { return void 0 !== this.m; } set hasM(e4) { e4 !== (void 0 !== this._get("m")) && (this._set("m", e4 ? 0 : void 0), this._set("hasM", e4)); } get hasZ() { return void 0 !== this.z; } set hasZ(e4) { e4 !== (void 0 !== this._get("z")) && (this._set("z", e4 ? 0 : void 0), this._set("hasZ", e4)); } get latitude() { const { spatialReference: e4, x: t5, y: r4 } = this; if (e4) { if (e4.isWebMercator) return d2(t5, r4, f)[1]; if (e4.isGeographic) return r4; } return null; } set latitude(e4) { const { spatialReference: t5, x: r4 } = this; null != e4 && t5 && (t5.isWebMercator ? this._set("y", y3(r4, e4, f)[1]) : t5.isGeographic && this._set("y", e4), this._set("latitude", e4)); } get longitude() { const { x: e4, y: t5, spatialReference: r4 } = this; if (r4) { if (r4.isWebMercator) return d2(e4, t5, f)[0]; if (r4.isGeographic) return e4; } return null; } set longitude(e4) { const { y: t5, spatialReference: r4 } = this; null != e4 && r4 && (r4.isWebMercator ? this._set("x", y3(e4, t5, f)[0]) : r4.isGeographic && this._set("x", e4), this._set("longitude", e4)); } writeX(e4, t5, r4) { t5[r4] = isNaN(e4) ? "NaN" : e4; } readX(e4) { return "string" == typeof e4 ? NaN : e4; } clone() { const e4 = new m2(); return e4.x = this.x, e4.y = this.y, e4.z = this.z, e4.m = this.m, e4.spatialReference = this.spatialReference, e4; } copy(e4) { return m2.copy(e4, this), this; } equals(e4) { if (t(e4)) return false; const { x: t5, y: s6, z: i4, m: o5, spatialReference: a4 } = this, { z: l4, m: n3 } = e4; let { x: c5, y: u4, spatialReference: p4 } = e4; if (!a4.equals(p4)) if (a4.isWebMercator && p4.isWGS84) [c5, u4] = y3(c5, u4), p4 = a4; else { if (!a4.isWGS84 || !p4.isWebMercator) return false; [c5, u4] = d2(c5, u4), p4 = a4; } return t5 === c5 && s6 === u4 && i4 === l4 && o5 === n3 && a4.wkid === p4.wkid; } offset(e4, t5, r4) { var _a; return this.x += e4, this.y += t5, null != r4 && (this.z = ((_a = this.z) != null ? _a : 0) + r4), this; } normalize() { if (!this.spatialReference) return this; const e4 = R(this.spatialReference); if (!e4) return this; let t5 = this.x; const [r4, s6] = e4.valid, i4 = 2 * s6; let o5; return t5 > s6 ? (o5 = Math.ceil(Math.abs(t5 - s6) / i4), t5 -= o5 * i4) : t5 < r4 && (o5 = Math.ceil(Math.abs(t5 - r4) / i4), t5 += o5 * i4), this._set("x", t5), this; } distance(e4) { return t3(this, e4); } toArray() { const e4 = this.hasZ, t5 = this.hasM; return e4 && t5 ? [this.x, this.y, this.z, this.m] : e4 ? [this.x, this.y, this.z] : t5 ? [this.x, this.y, this.m] : [this.x, this.y]; } toJSON(e4) { return this.write({}, e4); } }; e([y2({ readOnly: true })], x2.prototype, "cache", null), e([y2({ type: Boolean, json: { read: false, write: { enabled: false, overridePolicy: null } } })], x2.prototype, "hasM", null), e([y2({ type: Boolean, json: { read: false, write: { enabled: false, overridePolicy: null } } })], x2.prototype, "hasZ", null), e([y2({ type: Number })], x2.prototype, "latitude", null), e([y2({ type: Number })], x2.prototype, "longitude", null), e([y2({ type: Number, json: { type: [Number, String], write: { isRequired: true, allowNull: true } } }), s2((e4) => isNaN(e4) ? e4 : a(e4))], x2.prototype, "x", void 0), e([r2("x")], x2.prototype, "writeX", null), e([o("x")], x2.prototype, "readX", null), e([y2({ type: Number, json: { write: true } })], x2.prototype, "y", void 0), e([y2({ type: Number, json: { write: { overridePolicy() { return { enabled: this.hasZ }; } } } })], x2.prototype, "z", void 0), e([y2({ type: Number, json: { write: { overridePolicy() { return { enabled: this.hasM }; } } } })], x2.prototype, "m", void 0), x2 = m2 = e([n2("esri.geometry.Point")], x2), x2.prototype.toJSON.isDefaultToJSON = true; var w = x2; // node_modules/@arcgis/core/geometry/support/contains.js var t4 = [0, 0]; function r3(t5, r4) { return !!r(r4) && f2(t5, r4.x, r4.y, r4.z); } function i2(n3, t5) { if (!t5.points || t5.points.length) return false; for (const r4 of t5.points) if (!u2(n3, r4)) return false; return true; } function o3(n3, t5) { const { xmin: r4, ymin: i4, zmin: o5, xmax: u4, ymax: e4, zmax: c5 } = t5; return n3.hasZ && t5.hasZ ? f2(n3, r4, i4, o5) && f2(n3, r4, e4, o5) && f2(n3, u4, e4, o5) && f2(n3, u4, i4, o5) && f2(n3, r4, i4, c5) && f2(n3, r4, e4, c5) && f2(n3, u4, e4, c5) && f2(n3, u4, i4, c5) : f2(n3, r4, i4) && f2(n3, r4, e4) && f2(n3, u4, e4) && f2(n3, u4, i4); } function u2(n3, t5) { return f2(n3, t5[0], t5[1]); } function e3(n3, t5) { return f2(n3, t5[0], t5[1], t5[2]); } function f2(n3, t5, r4, i4) { return t5 >= n3.xmin && t5 <= n3.xmax && r4 >= n3.ymin && r4 <= n3.ymax && (null == i4 || !n3.hasZ || i4 >= n3.zmin && i4 <= n3.zmax); } function c3(n3, r4) { return t4[1] = r4.y, t4[0] = r4.x, m3(n3, t4); } function m3(n3, t5) { return s4(n3.rings, t5); } function s4(n3, t5) { if (!n3) return false; if (x3(n3)) return a2(false, n3, t5); let r4 = false; for (let i4 = 0, o5 = n3.length; i4 < o5; i4++) r4 = a2(r4, n3[i4], t5); return r4; } function x3(n3) { return !Array.isArray(n3[0][0]); } function a2(n3, t5, r4) { const [i4, o5] = r4; let u4 = n3, e4 = 0; for (let f5 = 0, c5 = t5.length; f5 < c5; f5++) { e4++, e4 === c5 && (e4 = 0); const [n4, r5] = t5[f5], [m5, s6] = t5[e4]; (r5 < o5 && s6 >= o5 || s6 < o5 && r5 >= o5) && n4 + (o5 - r5) / (s6 - r5) * (m5 - n4) < i4 && (u4 = !u4); } return u4; } // node_modules/@arcgis/core/geometry/support/intersectsBase.js function i3(t5, e4) { return r3(t5, e4); } function o4(n3, t5) { const e4 = n3.hasZ && t5.hasZ; let r4, i4, o5; if (n3.xmin <= t5.xmin) { if (r4 = t5.xmin, n3.xmax < r4) return false; } else if (r4 = n3.xmin, t5.xmax < r4) return false; if (n3.ymin <= t5.ymin) { if (i4 = t5.ymin, n3.ymax < i4) return false; } else if (i4 = n3.ymin, t5.ymax < i4) return false; if (e4 && t5.hasZ) { if (n3.zmin <= t5.zmin) { if (o5 = t5.zmin, n3.zmax < o5) return false; } else if (o5 = n3.zmin, t5.zmax < o5) return false; } return true; } function f3(n3, t5) { const { points: i4, hasZ: o5 } = t5, f5 = o5 ? e3 : u2; for (const e4 of i4) if (f5(n3, e4)) return true; return false; } var s5 = [0, 0]; var u3 = [0, 0]; var c4 = [0, 0]; var m4 = [0, 0]; var l3 = [s5, u3, c4, m4]; var a3 = [[c4, s5], [s5, u3], [u3, m4], [m4, c4]]; function x4(n3, t5) { return y4(n3, t5.rings); } function y4(n3, r4) { s5[0] = n3.xmin, s5[1] = n3.ymax, u3[0] = n3.xmax, u3[1] = n3.ymax, c4[0] = n3.xmin, c4[1] = n3.ymin, m4[0] = n3.xmax, m4[1] = n3.ymin; for (const e4 of l3) if (s4(r4, e4)) return true; for (const t5 of r4) { if (!t5.length) continue; let r5 = t5[0]; if (u2(n3, r5)) return true; for (let i4 = 1; i4 < t5.length; i4++) { const o5 = t5[i4]; if (u2(n3, o5) || z(r5, o5, a3)) return true; r5 = o5; } } return false; } function h2(n3, t5) { s5[0] = n3.xmin, s5[1] = n3.ymax, u3[0] = n3.xmax, u3[1] = n3.ymax, c4[0] = n3.xmin, c4[1] = n3.ymin, m4[0] = n3.xmax, m4[1] = n3.ymin; const r4 = t5.paths; for (const i4 of r4) { if (!r4.length) continue; let t6 = i4[0]; if (u2(n3, t6)) return true; for (let r5 = 1; r5 < i4.length; r5++) { const o5 = i4[r5]; if (u2(n3, o5) || z(t6, o5, a3)) return true; t6 = o5; } } return false; } var g3 = [0, 0]; function p3(n3) { for (let t5 = 0; t5 < n3.length; t5++) { const e4 = n3[t5]; for (let i4 = 0; i4 < e4.length - 1; i4++) { const r5 = e4[i4], o5 = e4[i4 + 1]; for (let e5 = t5 + 1; e5 < n3.length; e5++) for (let t6 = 0; t6 < n3[e5].length - 1; t6++) { const i5 = n3[e5][t6], f5 = n3[e5][t6 + 1]; if (G2(r5, o5, i5, f5, g3) && !(g3[0] === r5[0] && g3[1] === r5[1] || g3[0] === i5[0] && g3[1] === i5[1] || g3[0] === o5[0] && g3[1] === o5[1] || g3[0] === f5[0] && g3[1] === f5[1])) return true; } } const r4 = e4.length; if (!(r4 <= 4)) for (let n4 = 0; n4 < r4 - 3; n4++) { let t6 = r4 - 1; 0 === n4 && (t6 = r4 - 2); const i4 = e4[n4], o5 = e4[n4 + 1]; for (let r5 = n4 + 2; r5 < t6; r5++) { const n5 = e4[r5], t7 = e4[r5 + 1]; if (G2(i4, o5, n5, t7, g3) && !(g3[0] === i4[0] && g3[1] === i4[1] || g3[0] === n5[0] && g3[1] === n5[1] || g3[0] === o5[0] && g3[1] === o5[1] || g3[0] === t7[0] && g3[1] === t7[1])) return true; } } } return false; } function z(n3, t5, e4) { for (let r4 = 0; r4 < e4.length; r4++) if (G2(n3, t5, e4[r4][0], e4[r4][1])) return true; return false; } function G2(n3, t5, e4, r4, i4) { const [o5, f5] = n3, [s6, u4] = t5, [c5, m5] = e4, [l4, a4] = r4, x5 = l4 - c5, y5 = o5 - c5, h3 = s6 - o5, g4 = a4 - m5, p4 = f5 - m5, z3 = u4 - f5, G3 = g4 * h3 - x5 * z3; if (0 === G3) return false; const Z2 = (x5 * p4 - g4 * y5) / G3, P = (h3 * p4 - z3 * y5) / G3; return Z2 >= 0 && Z2 <= 1 && P >= 0 && P <= 1 && (i4 && (i4[0] = o5 + Z2 * (s6 - o5), i4[1] = f5 + Z2 * (u4 - f5)), true); } function Z(n3) { switch (n3) { case "esriGeometryEnvelope": case "extent": return o4; case "esriGeometryMultipoint": case "multipoint": return f3; case "esriGeometryPoint": case "point": return i3; case "esriGeometryPolygon": case "polygon": return x4; case "esriGeometryPolyline": case "polyline": return h2; } } // node_modules/@arcgis/core/geometry/Extent.js var f4; function d3(t5) { return t5 && ("esri.geometry.SpatialReference" === t5.declaredClass || null != t5.wkid); } function z2(t5, i4, e4) { return null == i4 ? e4 : null == e4 ? i4 : t5(i4, e4); } var M2 = f4 = class extends p { constructor(...t5) { super(...t5), this.type = "extent", this.xmin = 0, this.ymin = 0, this.mmin = void 0, this.zmin = void 0, this.xmax = 0, this.ymax = 0, this.mmax = void 0, this.zmax = void 0; } normalizeCtorArgs(t5, i4, e4, s6, n3) { return d3(t5) ? { spatialReference: t5, xmin: 0, ymin: 0, xmax: 0, ymax: 0 } : "object" == typeof t5 ? (t5.spatialReference = null == t5.spatialReference ? k2.WGS84 : t5.spatialReference, t5) : { xmin: t5, ymin: i4, xmax: e4, ymax: s6, spatialReference: n3 != null ? n3 : k2.WGS84 }; } static fromBounds(t5, i4) { return new f4({ xmin: t5[0], ymin: t5[1], xmax: t5[2], ymax: t5[3], spatialReference: i4 }); } static fromPoint(t5) { return new f4({ xmin: t5.x, ymin: t5.y, zmin: t5.z, xmax: t5.x, ymax: t5.y, zmax: t5.z, spatialReference: t5.spatialReference }); } get cache() { return this.commitProperty("xmin"), this.commitProperty("ymin"), this.commitProperty("zmin"), this.commitProperty("mmin"), this.commitProperty("xmax"), this.commitProperty("ymax"), this.commitProperty("zmax"), this.commitProperty("mmax"), this.commitProperty("spatialReference"), {}; } get center() { const t5 = new w({ x: 0.5 * (this.xmin + this.xmax), y: 0.5 * (this.ymin + this.ymax), spatialReference: this.spatialReference }); return this.hasZ && (t5.z = 0.5 * (this.zmin + this.zmax)), this.hasM && (t5.m = 0.5 * (this.mmin + this.mmax)), t5; } get extent() { return this.clone(); } get hasM() { return null != this.mmin && null != this.mmax; } get hasZ() { return null != this.zmin && null != this.zmax; } get height() { return Math.abs(this.ymax - this.ymin); } get width() { return Math.abs(this.xmax - this.xmin); } centerAt(t5) { const i4 = this.center; return null != t5.z && this.hasZ ? this.offset(t5.x - i4.x, t5.y - i4.y, t5.z - i4.z) : this.offset(t5.x - i4.x, t5.y - i4.y); } clone() { const t5 = new f4(); return t5.xmin = this.xmin, t5.ymin = this.ymin, t5.xmax = this.xmax, t5.ymax = this.ymax, t5.spatialReference = this.spatialReference, null != this.zmin && (t5.zmin = this.zmin, t5.zmax = this.zmax), null != this.mmin && (t5.mmin = this.mmin, t5.mmax = this.mmax), t5; } contains(t5) { if (!t5) return false; const i4 = this.spatialReference, e4 = t5.spatialReference; return i4 && e4 && !i4.equals(e4) && g(i4, e4) && (t5 = i4.isWebMercator ? R2(t5) : j(t5, true)), "point" === t5.type ? r3(this, t5) : "extent" === t5.type && o3(this, t5); } equals(t5) { if (this === t5) return true; if (t(t5)) return false; const e4 = this.spatialReference, s6 = t5.spatialReference; return e4 && s6 && !e4.equals(s6) && g(e4, s6) && (t5 = e4.isWebMercator ? R2(t5) : j(t5, true)), this.xmin === t5.xmin && this.ymin === t5.ymin && this.zmin === t5.zmin && this.mmin === t5.mmin && this.xmax === t5.xmax && this.ymax === t5.ymax && this.zmax === t5.zmax && this.mmax === t5.mmax; } expand(t5) { const i4 = 0.5 * (1 - t5), e4 = this.width * i4, s6 = this.height * i4; if (this.xmin += e4, this.ymin += s6, this.xmax -= e4, this.ymax -= s6, this.hasZ) { const t6 = (this.zmax - this.zmin) * i4; this.zmin += t6, this.zmax -= t6; } if (this.hasM) { const t6 = (this.mmax - this.mmin) * i4; this.mmin += t6, this.mmax -= t6; } return this; } intersects(t5) { if (t(t5)) return false; "mesh" === t5.type && (t5 = t5.extent); const e4 = this.spatialReference, s6 = t5.spatialReference; e4 && s6 && !E(e4, s6) && g(e4, s6) && (t5 = e4.isWebMercator ? R2(t5) : j(t5, true)); return Z(t5.type)(this, t5); } normalize() { const t5 = this._normalize(false, true); return Array.isArray(t5) ? t5 : [t5]; } offset(t5, i4, e4) { return this.xmin += t5, this.ymin += i4, this.xmax += t5, this.ymax += i4, null != e4 && (this.zmin += e4, this.zmax += e4), this; } shiftCentralMeridian() { return this._normalize(true); } union(t5) { return this === t5 || (this.xmin = Math.min(this.xmin, t5.xmin), this.ymin = Math.min(this.ymin, t5.ymin), this.xmax = Math.max(this.xmax, t5.xmax), this.ymax = Math.max(this.ymax, t5.ymax), (this.hasZ || t5.hasZ) && (this.zmin = z2(Math.min, this.zmin, t5.zmin), this.zmax = z2(Math.max, this.zmax, t5.zmax)), (this.hasM || t5.hasM) && (this.mmin = z2(Math.min, this.mmin, t5.mmin), this.mmax = z2(Math.max, this.mmax, t5.mmax))), this; } intersection(t5) { return this === t5 ? this : t(t5) || !this.intersects(t5) ? null : (this.xmin = Math.max(this.xmin, t5.xmin), this.ymin = Math.max(this.ymin, t5.ymin), this.xmax = Math.min(this.xmax, t5.xmax), this.ymax = Math.min(this.ymax, t5.ymax), (this.hasZ || t5.hasZ) && (this.zmin = z2(Math.max, this.zmin, t5.zmin), this.zmax = z2(Math.min, this.zmax, t5.zmax)), (this.hasM || t5.hasM) && (this.mmin = z2(Math.max, this.mmin, t5.mmin), this.mmax = z2(Math.min, this.mmax, t5.mmax)), this); } toJSON(t5) { return this.write({}, t5); } _shiftCM(t5 = R(this.spatialReference)) { var _a; if (!t5 || !this.spatialReference) return this; const i4 = this.spatialReference, s6 = this._getCM(t5); if (s6) { const n3 = i4.isWebMercator ? j(s6) : s6; this.xmin -= s6.x, this.xmax -= s6.x, i4.isWebMercator || (n3.x = this._normalizeX(n3.x, t5).x), this.spatialReference = new k2(n((_a = i4.isWGS84 ? t5.altTemplate : null) != null ? _a : t5.wkTemplate, { Central_Meridian: n3.x })); } return this; } _getCM(t5) { let i4 = null; const [e4, s6] = t5.valid, n3 = this.xmin, m5 = this.xmax; return n3 >= e4 && n3 <= s6 && (m5 >= e4 && m5 <= s6) || (i4 = this.center), i4; } _normalize(t5, i4, e4) { const s6 = this.spatialReference; if (!s6) return this; const n3 = e4 != null ? e4 : R(s6); if (null == n3) return this; const m5 = this._getParts(n3).map((t6) => t6.extent); if (m5.length < 2) return m5[0] || this; if (m5.length > 2) return t5 ? this._shiftCM(n3) : this.set({ xmin: n3.valid[0], xmax: n3.valid[1] }); if (t5) return this._shiftCM(n3); if (i4) return m5; let r4 = true, a4 = true; return m5.forEach((t6) => { t6.hasZ || (r4 = false), t6.hasM || (a4 = false); }), { rings: m5.map((t6) => { const i5 = [[t6.xmin, t6.ymin], [t6.xmin, t6.ymax], [t6.xmax, t6.ymax], [t6.xmax, t6.ymin], [t6.xmin, t6.ymin]]; if (r4) { const e5 = (t6.zmax - t6.zmin) / 2; for (let t7 = 0; t7 < i5.length; t7++) i5[t7].push(e5); } if (a4) { const e5 = (t6.mmax - t6.mmin) / 2; for (let t7 = 0; t7 < i5.length; t7++) i5[t7].push(e5); } return i5; }), hasZ: r4, hasM: a4, spatialReference: s6 }; } _getParts(t5) { let i4 = this.cache._parts; if (!i4) { i4 = []; const { ymin: e5, ymax: s7, spatialReference: n3 } = this, m5 = this.width, r4 = this.xmin, a4 = this.xmax; let h3; t5 = t5 || R(n3); const [o5, x5] = t5.valid; h3 = this._normalizeX(this.xmin, t5); const l4 = h3.x, c5 = h3.frameId; h3 = this._normalizeX(this.xmax, t5); const y5 = h3.x, u4 = h3.frameId, d4 = l4 === y5 && m5 > 0; if (m5 > 2 * x5) { const t6 = new f4(r4 < a4 ? l4 : y5, e5, x5, s7, n3), m6 = new f4(o5, e5, r4 < a4 ? y5 : l4, s7, n3), h4 = new f4(0, e5, x5, s7, n3), p4 = new f4(o5, e5, 0, s7, n3), d5 = [], z3 = []; t6.contains(h4) && d5.push(c5), t6.contains(p4) && z3.push(c5), m6.contains(h4) && d5.push(u4), m6.contains(p4) && z3.push(u4); for (let i5 = c5 + 1; i5 < u4; i5++) d5.push(i5), z3.push(i5); i4.push({ extent: t6, frameIds: [c5] }, { extent: m6, frameIds: [u4] }, { extent: h4, frameIds: d5 }, { extent: p4, frameIds: z3 }); } else l4 > y5 || d4 ? i4.push({ extent: new f4(l4, e5, x5, s7, n3), frameIds: [c5] }, { extent: new f4(o5, e5, y5, s7, n3), frameIds: [u4] }) : i4.push({ extent: new f4(l4, e5, y5, s7, n3), frameIds: [c5] }); this.cache._parts = i4; } const e4 = this.hasZ, s6 = this.hasM; if (e4 || s6) { const t6 = {}; e4 && (t6.zmin = this.zmin, t6.zmax = this.zmax), s6 && (t6.mmin = this.mmin, t6.mmax = this.mmax); for (let e5 = 0; e5 < i4.length; e5++) i4[e5].extent.set(t6); } return i4; } _normalizeX(t5, i4) { const [e4, s6] = i4.valid, n3 = 2 * s6; let m5, r4 = 0; return t5 > s6 ? (m5 = Math.ceil(Math.abs(t5 - s6) / n3), t5 -= m5 * n3, r4 = m5) : t5 < e4 && (m5 = Math.ceil(Math.abs(t5 - e4) / n3), t5 += m5 * n3, r4 = -m5), { x: t5, frameId: r4 }; } }; e([y2({ readOnly: true })], M2.prototype, "cache", null), e([y2({ readOnly: true })], M2.prototype, "center", null), e([y2({ readOnly: true })], M2.prototype, "extent", null), e([y2({ readOnly: true, json: { write: { enabled: false, overridePolicy: null } } })], M2.prototype, "hasM", null), e([y2({ readOnly: true, json: { write: { enabled: false, overridePolicy: null } } })], M2.prototype, "hasZ", null), e([y2({ readOnly: true })], M2.prototype, "height", null), e([y2({ readOnly: true })], M2.prototype, "width", null), e([y2({ type: Number, json: { type: [Number, String], write: { enabled: true, allowNull: true } } })], M2.prototype, "xmin", void 0), e([y2({ type: Number, json: { write: true } })], M2.prototype, "ymin", void 0), e([y2({ type: Number, json: { origins: { "web-scene": { write: false } }, write: { overridePolicy() { return { enabled: this.hasM }; } } } })], M2.prototype, "mmin", void 0), e([y2({ type: Number, json: { origins: { "web-scene": { write: false } }, write: { overridePolicy() { return { enabled: this.hasZ }; } } } })], M2.prototype, "zmin", void 0), e([y2({ type: Number, json: { write: true } })], M2.prototype, "xmax", void 0), e([y2({ type: Number, json: { write: true } })], M2.prototype, "ymax", void 0), e([y2({ type: Number, json: { origins: { "web-scene": { write: false } }, write: { overridePolicy() { return { enabled: this.hasM }; } } } })], M2.prototype, "mmax", void 0), e([y2({ type: Number, json: { origins: { "web-scene": { write: false } }, write: { overridePolicy() { return { enabled: this.hasZ }; } } } })], M2.prototype, "zmax", void 0), M2 = f4 = e([n2("esri.geometry.Extent")], M2), M2.prototype.toJSON.isDefaultToJSON = true; var w2 = M2; export { o, p, s3 as s, t2 as t, e2 as e, c2 as c, g, M, y3 as y, d2 as d, R2 as R, j, w, r3 as r, i2 as i, c3 as c2, s4 as s2, o4 as o2, p3 as p2, G2 as G, Z, w2 }; //# sourceMappingURL=chunk-CXCDYJ5R.js.map