import { w as w3 } from "./chunk-BVMSF6QA.js"; import "./chunk-BQ7UE3XL.js"; import { un } from "./chunk-DH2OBAUC.js"; import "./chunk-TNLRDNTC.js"; import "./chunk-QY775BFA.js"; import { a, l as l2 } from "./chunk-3D3QEPRE.js"; import { h, m, u as u2 } from "./chunk-WNCU6BFU.js"; import { l, w as w2 } from "./chunk-YIS6BAC3.js"; import { c } from "./chunk-FGKNEJKJ.js"; import { x } from "./chunk-PSV473TI.js"; import { O } from "./chunk-I3OBGWNS.js"; import "./chunk-FONIFA5N.js"; import "./chunk-EG5OI4V4.js"; import "./chunk-65BYCSII.js"; import "./chunk-WZQZRKNH.js"; import "./chunk-LRDX4TO7.js"; import "./chunk-6A4U74YA.js"; import "./chunk-TERAW6FT.js"; import "./chunk-N2663GRX.js"; import "./chunk-O4FY3ITT.js"; import { b } from "./chunk-4DDBH2K5.js"; import { s } from "./chunk-7N4X6GF3.js"; import "./chunk-UXF37FQ4.js"; import "./chunk-ZOEK6QHJ.js"; import "./chunk-XNLG7T2T.js"; import "./chunk-IR4PV7VK.js"; import "./chunk-2Z6LERTI.js"; import "./chunk-OWVBLVP3.js"; import { n as n2, t as t2 } from "./chunk-AFZ7XSEW.js"; import "./chunk-MXB2XLKV.js"; import "./chunk-TBBTRX4O.js"; import "./chunk-YBSUITLL.js"; import { j as j2 } from "./chunk-ALDCDSPV.js"; import "./chunk-DT6EAZQ5.js"; import "./chunk-HNOZUNJ4.js"; import "./chunk-VNFRAYHO.js"; import "./chunk-R5IG2D6H.js"; import "./chunk-VBRY5KJM.js"; import "./chunk-PDKDCAAD.js"; import { j2 as j } from "./chunk-ECW2QABR.js"; import "./chunk-GCDJLKH4.js"; import "./chunk-MRJEICT6.js"; import { d, e, n2 as n, u2 as u, y3 as y } from "./chunk-Y3WMVFTW.js"; import "./chunk-SAS7RONY.js"; import "./chunk-WSRBH7BF.js"; import "./chunk-IHXECKQQ.js"; import "./chunk-ULGDPLM2.js"; import "./chunk-EMJ4ZSM2.js"; import "./chunk-IKP3YN53.js"; import { e as e2, o, r, t, w } from "./chunk-GZT4BVFP.js"; import "./chunk-A5ICIBVI.js"; // node_modules/@arcgis/core/analysis/Analysis.js var n3 = 0; var l3 = class extends u(l2(s(y))) { constructor(e3) { super(e3), this.id = `${Date.now().toString(16)}-analysis-${n3++}`, this.title = null; } get parent() { return this._get("parent"); } set parent(e3) { const t4 = this.parent; if (r(t4)) switch (t4.type) { case "line-of-sight": t4.removeAnalysis(this); break; case "2d": case "3d": t4.analyses.includes(this) && t4.analyses.remove(this); } this._set("parent", e3); } get isEditable() { return this.requiredPropertiesForEditing.every(r); } }; e([d({ type: String, constructOnly: true, clonable: false })], l3.prototype, "id", void 0), e([d({ type: String })], l3.prototype, "title", void 0), e([d({ constructOnly: true })], l3.prototype, "type", void 0), e([d({ clonable: false, value: null })], l3.prototype, "parent", null), e([d({ readOnly: true })], l3.prototype, "extent", void 0), e([d({ readOnly: true })], l3.prototype, "isEditable", null), e([d({ readOnly: true })], l3.prototype, "requiredPropertiesForEditing", void 0), e([d({ readOnly: true })], l3.prototype, "nonEditableMessage", void 0), l3 = e([n("esri.analysis.Analysis")], l3); var c2 = l3; // node_modules/@arcgis/core/analysis/featureReferenceUtils.js function t3(e3, t4) { return l4(e3) === l4(t4); } function l4(t4) { if (t(t4)) return null; const l6 = t4.layer != null ? t4.layer.id : ""; let r5 = null; return r5 = t4.objectId != null ? t4.objectId : t4.layer != null && "objectIdField" in t4.layer && t4.layer.objectIdField != null && t4.attributes != null ? t4.attributes[t4.layer.objectIdField] : t4.uid, r5 == null ? null : `o-${l6}-${r5}`; } var r2 = { json: { write: { writer: n4, target: { "feature.layerId": { type: [Number, String] }, "feature.objectId": { type: [Number, String] } } }, origins: { "web-scene": { read: u3 } } } }; function n4(t4, l6) { t(t4) || t4.layer?.objectIdField == null || t4.attributes == null || (l6.feature = { layerId: t4.layer.id, objectId: t4.attributes[t4.layer.objectIdField] }); } function u3(e3) { if (e3.layerId != null && e3.objectId != null) return { uid: null, layer: { id: e3.layerId, objectIdField: "ObjectId" }, attributes: { ObjectId: e3.objectId } }; } // node_modules/@arcgis/core/analysis/LineOfSightAnalysisObserver.js var f = class extends u(l2(y)) { constructor(o2) { super(o2), this.position = null, this.elevationInfo = null, this.feature = null; } equals(o2) { return w(this.position, o2.position) && w(this.elevationInfo, o2.elevationInfo) && t3(this.feature, o2.feature); } }; e([d({ type: j }), w3()], f.prototype, "position", void 0), e([d({ type: x }), w3()], f.prototype, "elevationInfo", void 0), e([d(r2)], f.prototype, "feature", void 0), f = e([n("esri.analysis.LineOfSightAnalysisObserver")], f); var u4 = f; // node_modules/@arcgis/core/analysis/LineOfSightAnalysisTarget.js var l5 = class extends u(a) { constructor(o2) { super(o2), this.position = null, this.elevationInfo = null, this.feature = null; } equals(o2) { return w(this.position, o2.position) && w(this.elevationInfo, o2.elevationInfo) && t3(this.feature, o2.feature); } }; e([d({ type: j }), w3()], l5.prototype, "position", void 0), e([d({ type: x }), w3()], l5.prototype, "elevationInfo", void 0), e([d(r2)], l5.prototype, "feature", void 0), l5 = e([n("esri.analysis.LineOfSightAnalysisTarget")], l5); var f2 = l5; // node_modules/@arcgis/core/support/elevationInfoUtils.js function r4(t4, n5) { return t(n5) || !n5.mode ? t4 ? "absolute-height" : "on-the-ground" : n5.mode; } function s2(e3, n5) { return r4(!!r(e3) && e3.hasZ, n5); } // node_modules/@arcgis/core/analysis/LineOfSightAnalysis.js var j3 = j2.ofType(f2); var x2 = class extends c2 { constructor(e3) { super(e3), this.type = "line-of-sight", this.observer = null, this.extent = null, this.nonEditableMessage = "Assign an observer location to the analysis to allow editing."; } initialize() { this.own(l(() => this._computeExtent(), (e3) => { (t(e3) || t(e3.pending)) && this._set("extent", r(e3) ? e3.extent : null); }, w2)); } get targets() { return this._get("targets") || new j3(); } set targets(e3) { this._set("targets", n2(e3, this.targets, j3)); } get spatialReference() { return r(this.observer) && r(this.observer.position) ? this.observer.position.spatialReference : null; } get requiredPropertiesForEditing() { return [o(this.observer, (e3) => e3.position)]; } async waitComputeExtent() { const e3 = this._computeExtent(); return r(e3) ? e2(e3.pending) : null; } _computeExtent() { const e3 = this.spatialReference; if (t(this.observer) || t(this.observer.position) || t(e3)) return null; const t4 = (e4) => s2(e4.position, e4.elevationInfo) === "absolute-height", o2 = this.observer.position, r5 = u2(o2.x, o2.y, o2.z, o2.x, o2.y, o2.z); for (const i of this.targets) if (r(i.position)) { const t5 = un(i.position, e3); if (r(t5.pending)) return { pending: t5.pending, extent: null }; if (r(t5.geometry)) { const { x: e4, y: o3, z: s4 } = t5.geometry; h(r5, [e4, o3, s4]); } } const s3 = m(r5, e3); return t4(this.observer) && this.targets.every(t4) || (s3.zmin = null, s3.zmax = null), { pending: null, extent: s3 }; } clear() { this.observer = null, this.targets.removeAll(); } }; e([d({ type: ["line-of-sight"] })], x2.prototype, "type", void 0), e([d({ type: u4, json: { read: true, write: true } })], x2.prototype, "observer", void 0), e([d({ cast: t2, type: j3, nonNullable: true, json: { read: true, write: true } })], x2.prototype, "targets", null), e([d({ value: null, readOnly: true })], x2.prototype, "extent", void 0), e([d({ readOnly: true })], x2.prototype, "spatialReference", null), e([d({ readOnly: true })], x2.prototype, "requiredPropertiesForEditing", null), e([d({ readOnly: true })], x2.prototype, "nonEditableMessage", void 0), x2 = e([n("esri.analysis.LineOfSightAnalysis")], x2); var E = x2; // node_modules/@arcgis/core/layers/LineOfSightLayer.js var u5 = j2.ofType(f2); var d2 = class extends c(O(b)) { constructor(e3) { super(e3), this.type = "line-of-sight", this.operationalLayerType = "LineOfSightLayer", this.analysis = new E(), this.opacity = 1; } initialize() { this.own(l(() => this.analysis, (e3, t4) => { r(t4) && t4.parent === this && (t4.parent = null), r(e3) && (e3.parent = this); }, w2)); } async load() { return r(this.analysis) && this.addResolvingPromise(this.analysis.waitComputeExtent()), this; } get observer() { return o(this.analysis, (e3) => e3.observer); } set observer(e3) { o(this.analysis, (t4) => t4.observer = e3); } get targets() { return r(this.analysis) ? this.analysis.targets : null; } set targets(e3) { o(this.analysis, (t4) => t4.targets = e3); } get fullExtent() { return r(this.analysis) ? this.analysis.extent : null; } get spatialReference() { return r(this.analysis) ? this.analysis.spatialReference : null; } removeAnalysis(e3) { this.analysis === e3 && (this.analysis = new E()); } }; e([d({ json: { read: false }, readOnly: true })], d2.prototype, "type", void 0), e([d({ type: ["LineOfSightLayer"] })], d2.prototype, "operationalLayerType", void 0), e([d({ type: u4, json: { read: true, write: { ignoreOrigin: true } } })], d2.prototype, "observer", null), e([d({ type: u5, json: { read: true, write: { ignoreOrigin: true } } })], d2.prototype, "targets", null), e([d({ nonNullable: true, json: { read: false, write: false } })], d2.prototype, "analysis", void 0), e([d({ readOnly: true })], d2.prototype, "fullExtent", null), e([d({ readOnly: true })], d2.prototype, "spatialReference", null), e([d({ readOnly: true, json: { read: false, write: false, origins: { service: { read: false, write: false }, "portal-item": { read: false, write: false }, "web-document": { read: false, write: false } } } })], d2.prototype, "opacity", void 0), e([d({ type: ["show", "hide"] })], d2.prototype, "listMode", void 0), d2 = e([n("esri.layers.LineOfSightLayer")], d2); var f3 = d2; export { f3 as default }; //# sourceMappingURL=LineOfSightLayer-PLNG76YC.js.map