LineOfSightLayer-NFAKQGCH.js 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  1. import {
  2. g
  3. } from "./chunk-IN44RUPP.js";
  4. import {
  5. c as c3
  6. } from "./chunk-JNESCGQR.js";
  7. import "./chunk-IZUZZJS7.js";
  8. import {
  9. un
  10. } from "./chunk-P24XEEHY.js";
  11. import "./chunk-SAJAEMIJ.js";
  12. import "./chunk-I4RYNNL6.js";
  13. import {
  14. i,
  15. l as l2
  16. } from "./chunk-JOYXMSKE.js";
  17. import {
  18. c,
  19. m as m2,
  20. u as u2
  21. } from "./chunk-ECY35CJI.js";
  22. import {
  23. l,
  24. w
  25. } from "./chunk-TJV6ODRM.js";
  26. import {
  27. c as c2
  28. } from "./chunk-WLSB4F4I.js";
  29. import "./chunk-GLSWDDR3.js";
  30. import {
  31. O
  32. } from "./chunk-MIQGEDET.js";
  33. import {
  34. x
  35. } from "./chunk-DUEMJ5XS.js";
  36. import "./chunk-VRLXUHP2.js";
  37. import "./chunk-3LVSQLWJ.js";
  38. import "./chunk-4ONPMX2F.js";
  39. import "./chunk-CRGY2SDS.js";
  40. import "./chunk-4T5ZGMEN.js";
  41. import "./chunk-VGWC3IKZ.js";
  42. import "./chunk-2H5MD622.js";
  43. import "./chunk-3RSFVUKZ.js";
  44. import {
  45. n as n2,
  46. t as t2
  47. } from "./chunk-ZAY3CMAZ.js";
  48. import "./chunk-P3XKUGLS.js";
  49. import "./chunk-ZLNEXZAN.js";
  50. import {
  51. b
  52. } from "./chunk-DXVOOCG4.js";
  53. import "./chunk-3GZSQU56.js";
  54. import "./chunk-RYY6632W.js";
  55. import "./chunk-DW42UVIT.js";
  56. import "./chunk-YAEIHDJH.js";
  57. import "./chunk-TJNOJH33.js";
  58. import "./chunk-OSHI574D.js";
  59. import "./chunk-ETGAZ7LF.js";
  60. import "./chunk-75U5LM2V.js";
  61. import "./chunk-RMDDCMKS.js";
  62. import "./chunk-VCH45Q2I.js";
  63. import {
  64. j
  65. } from "./chunk-LBW34VZ2.js";
  66. import "./chunk-GSSTTHIT.js";
  67. import "./chunk-YFSLJIO4.js";
  68. import "./chunk-IM3LVQXV.js";
  69. import "./chunk-55RWC67C.js";
  70. import "./chunk-HZRKBTHJ.js";
  71. import "./chunk-DVUG3KID.js";
  72. import "./chunk-FWSQEIAR.js";
  73. import "./chunk-VEGAOVMY.js";
  74. import {
  75. w as w2
  76. } from "./chunk-6T6G6LCQ.js";
  77. import "./chunk-YEJL5NEF.js";
  78. import "./chunk-PQFTYGF5.js";
  79. import {
  80. e,
  81. m,
  82. n5 as n,
  83. u2 as u,
  84. y3 as y2
  85. } from "./chunk-2Z2TG5CU.js";
  86. import "./chunk-6KZ2LTDA.js";
  87. import "./chunk-U2XHEJM7.js";
  88. import "./chunk-SQOPWYIT.js";
  89. import "./chunk-V6P2MAQQ.js";
  90. import "./chunk-E5O6P5I2.js";
  91. import "./chunk-SPWQ3AWG.js";
  92. import "./chunk-2TIUKVZN.js";
  93. import {
  94. e as e2,
  95. o,
  96. r,
  97. t,
  98. y
  99. } from "./chunk-YXWMMD76.js";
  100. import "./chunk-S5KM4IGW.js";
  101. // node_modules/@arcgis/core/analysis/featureReferenceUtils.js
  102. function t3(e3, t4) {
  103. return l3(e3) === l3(t4);
  104. }
  105. function l3(t4) {
  106. if (t(t4))
  107. return null;
  108. const l4 = null != t4.layer ? t4.layer.id : "";
  109. let r5 = null;
  110. return r5 = null != t4.objectId ? t4.objectId : null != t4.layer && "objectIdField" in t4.layer && null != t4.layer.objectIdField && null != t4.attributes ? t4.attributes[t4.layer.objectIdField] : t4.uid, null == r5 ? null : `o-${l4}-${r5}`;
  111. }
  112. var r2 = { json: { write: { writer: n3, target: { "feature.layerId": { type: [Number, String] }, "feature.objectId": { type: [Number, String] } } }, origins: { "web-scene": { read: u3 } } } };
  113. function n3(t4, l4) {
  114. var _a;
  115. t(t4) || null == ((_a = t4.layer) == null ? void 0 : _a.objectIdField) || null == t4.attributes || (l4.feature = { layerId: t4.layer.id, objectId: t4.attributes[t4.layer.objectIdField] });
  116. }
  117. function u3(e3) {
  118. if (null != e3.layerId && null != e3.objectId)
  119. return { uid: null, layer: { id: e3.layerId, objectIdField: "ObjectId" }, attributes: { ObjectId: e3.objectId } };
  120. }
  121. // node_modules/@arcgis/core/analysis/LineOfSightAnalysisObserver.js
  122. var f = class extends u(i(m)) {
  123. constructor(o2) {
  124. super(o2), this.position = null, this.elevationInfo = null, this.feature = null;
  125. }
  126. equals(o2) {
  127. return y(this.position, o2.position) && y(this.elevationInfo, o2.elevationInfo) && t3(this.feature, o2.feature);
  128. }
  129. };
  130. e([y2({ type: w2 }), g()], f.prototype, "position", void 0), e([y2({ type: x }), g()], f.prototype, "elevationInfo", void 0), e([y2(r2)], f.prototype, "feature", void 0), f = e([n("esri.analysis.LineOfSightAnalysisObserver")], f);
  131. var u4 = f;
  132. // node_modules/@arcgis/core/analysis/LineOfSightAnalysisTarget.js
  133. var m3 = class extends u(l2) {
  134. constructor(o2) {
  135. super(o2), this.position = null, this.elevationInfo = null, this.feature = null;
  136. }
  137. equals(o2) {
  138. return y(this.position, o2.position) && y(this.elevationInfo, o2.elevationInfo) && t3(this.feature, o2.feature);
  139. }
  140. };
  141. e([y2({ type: w2 }), g()], m3.prototype, "position", void 0), e([y2({ type: x }), g()], m3.prototype, "elevationInfo", void 0), e([y2(r2)], m3.prototype, "feature", void 0), m3 = e([n("esri.analysis.LineOfSightAnalysisTarget")], m3);
  142. var f2 = m3;
  143. // node_modules/@arcgis/core/support/elevationInfoUtils.js
  144. function r4(e3) {
  145. return e3 ? E : Z;
  146. }
  147. function u5(t4, n4) {
  148. return t(n4) || !n4.mode ? r4(t4).mode : n4.mode;
  149. }
  150. function i3(e3, n4) {
  151. return u5(!!r(e3) && e3.hasZ, n4);
  152. }
  153. var E = { mode: "absolute-height", offset: 0 };
  154. var Z = { mode: "on-the-ground", offset: null };
  155. // node_modules/@arcgis/core/analysis/LineOfSightAnalysis.js
  156. var b2 = j.ofType(f2);
  157. var x2 = class extends c3 {
  158. constructor(t4) {
  159. super(t4), this.type = "line-of-sight", this.observer = null, this.extent = null;
  160. }
  161. initialize() {
  162. this.addHandles(l(() => this._computeExtent(), (t4) => {
  163. (t(t4) || t(t4.pending)) && this._set("extent", r(t4) ? t4.extent : null);
  164. }, w));
  165. }
  166. get targets() {
  167. return this._get("targets") || new b2();
  168. }
  169. set targets(t4) {
  170. this._set("targets", n2(t4, this.targets, b2));
  171. }
  172. get spatialReference() {
  173. return r(this.observer) && r(this.observer.position) ? this.observer.position.spatialReference : null;
  174. }
  175. get requiredPropertiesForEditing() {
  176. return [o(this.observer, (t4) => t4.position)];
  177. }
  178. async waitComputeExtent() {
  179. const t4 = this._computeExtent();
  180. return r(t4) ? e2(t4.pending) : null;
  181. }
  182. _computeExtent() {
  183. const t4 = this.spatialReference;
  184. if (t(this.observer) || t(this.observer.position) || t(t4))
  185. return null;
  186. const e3 = (t5) => "absolute-height" === i3(t5.position, t5.elevationInfo), r5 = this.observer.position, o2 = u2(r5.x, r5.y, r5.z, r5.x, r5.y, r5.z);
  187. for (const i4 of this.targets)
  188. if (r(i4.position)) {
  189. const e4 = un(i4.position, t4);
  190. if (r(e4.pending))
  191. return { pending: e4.pending, extent: null };
  192. if (r(e4.geometry)) {
  193. const { x: t5, y: r6, z: s2 } = e4.geometry;
  194. c(o2, [t5, r6, s2]);
  195. }
  196. }
  197. const s = m2(o2, t4);
  198. return e3(this.observer) && this.targets.every(e3) || (s.zmin = null, s.zmax = null), { pending: null, extent: s };
  199. }
  200. clear() {
  201. this.observer = null, this.targets.removeAll();
  202. }
  203. };
  204. e([y2({ type: ["line-of-sight"] })], x2.prototype, "type", void 0), e([y2({ type: u4, json: { read: true, write: true } })], x2.prototype, "observer", void 0), e([y2({ cast: t2, type: b2, nonNullable: true, json: { read: true, write: true } })], x2.prototype, "targets", null), e([y2({ value: null, readOnly: true })], x2.prototype, "extent", void 0), e([y2({ readOnly: true })], x2.prototype, "spatialReference", null), e([y2({ readOnly: true })], x2.prototype, "requiredPropertiesForEditing", null), x2 = e([n("esri.analysis.LineOfSightAnalysis")], x2);
  205. var O2 = x2;
  206. // node_modules/@arcgis/core/layers/LineOfSightLayer.js
  207. var f3 = j.ofType(f2);
  208. var g2 = class extends c2(O(b)) {
  209. constructor(e3) {
  210. super(e3), this.type = "line-of-sight", this.operationalLayerType = "LineOfSightLayer", this.analysis = new O2(), this.opacity = 1;
  211. }
  212. initialize() {
  213. this.addHandles(l(() => this.analysis, (e3, t4) => {
  214. r(t4) && t4.parent === this && (t4.parent = null), r(e3) && (e3.parent = this);
  215. }, w));
  216. }
  217. async load() {
  218. return r(this.analysis) && this.addResolvingPromise(this.analysis.waitComputeExtent()), this;
  219. }
  220. get observer() {
  221. return o(this.analysis, (e3) => e3.observer);
  222. }
  223. set observer(e3) {
  224. o(this.analysis, (t4) => t4.observer = e3);
  225. }
  226. get targets() {
  227. return r(this.analysis) ? this.analysis.targets : new j();
  228. }
  229. set targets(e3) {
  230. var _a;
  231. n2(e3, (_a = this.analysis) == null ? void 0 : _a.targets);
  232. }
  233. get fullExtent() {
  234. return r(this.analysis) ? this.analysis.extent : null;
  235. }
  236. get spatialReference() {
  237. return r(this.analysis) ? e2(this.analysis.spatialReference) : null;
  238. }
  239. releaseAnalysis(e3) {
  240. this.analysis === e3 && (this.analysis = new O2());
  241. }
  242. };
  243. e([y2({ json: { read: false }, readOnly: true })], g2.prototype, "type", void 0), e([y2({ type: ["LineOfSightLayer"] })], g2.prototype, "operationalLayerType", void 0), e([y2({ type: u4, json: { read: true, write: { ignoreOrigin: true } } })], g2.prototype, "observer", null), e([y2({ type: f3, json: { read: true, write: { ignoreOrigin: true } } })], g2.prototype, "targets", null), e([y2({ nonNullable: true, json: { read: false, write: false } })], g2.prototype, "analysis", void 0), e([y2({ readOnly: true })], g2.prototype, "fullExtent", null), e([y2({ readOnly: true })], g2.prototype, "spatialReference", null), e([y2({ 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 } } } })], g2.prototype, "opacity", void 0), e([y2({ type: ["show", "hide"] })], g2.prototype, "listMode", void 0), g2 = e([n("esri.layers.LineOfSightLayer")], g2);
  244. var j2 = g2;
  245. export {
  246. j2 as default
  247. };
  248. //# sourceMappingURL=LineOfSightLayer-NFAKQGCH.js.map