chunk-PTEMIS7J.js 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482
  1. import {
  2. s as s3
  3. } from "./chunk-AJFR3FGC.js";
  4. import {
  5. n as n2,
  6. r as r6
  7. } from "./chunk-K7B6OWCU.js";
  8. import {
  9. M,
  10. c,
  11. e as e2,
  12. f,
  13. h,
  14. i as i3,
  15. r as r5
  16. } from "./chunk-RG3AHHRL.js";
  17. import {
  18. C,
  19. a as a3,
  20. g,
  21. j as j2,
  22. l as l2,
  23. o as o2,
  24. q as q2,
  25. r as r4,
  26. s as s2,
  27. v as v2,
  28. y as y2,
  29. z
  30. } from "./chunk-E3G7BRZB.js";
  31. import {
  32. An,
  33. en,
  34. rn,
  35. tn
  36. } from "./chunk-P24XEEHY.js";
  37. import {
  38. i as i2
  39. } from "./chunk-JOYXMSKE.js";
  40. import {
  41. $
  42. } from "./chunk-3RSFVUKZ.js";
  43. import {
  44. a as a2
  45. } from "./chunk-RYY6632W.js";
  46. import {
  47. r as r3
  48. } from "./chunk-OSHI574D.js";
  49. import {
  50. i
  51. } from "./chunk-ETGAZ7LF.js";
  52. import {
  53. v
  54. } from "./chunk-RMDDCMKS.js";
  55. import {
  56. j
  57. } from "./chunk-LBW34VZ2.js";
  58. import {
  59. o,
  60. p,
  61. w,
  62. w2
  63. } from "./chunk-6T6G6LCQ.js";
  64. import {
  65. s
  66. } from "./chunk-YEJL5NEF.js";
  67. import {
  68. E,
  69. I,
  70. R,
  71. k2 as k,
  72. r as r2
  73. } from "./chunk-PQFTYGF5.js";
  74. import {
  75. e,
  76. l3 as l,
  77. n5 as n,
  78. y3 as y
  79. } from "./chunk-2Z2TG5CU.js";
  80. import {
  81. a
  82. } from "./chunk-SQOPWYIT.js";
  83. import {
  84. q,
  85. r,
  86. t
  87. } from "./chunk-YXWMMD76.js";
  88. // node_modules/@arcgis/core/Camera.js
  89. var d = class extends i2(l) {
  90. constructor(...o4) {
  91. super(...o4), this.position = new w([0, 0, 0]), this.heading = 0, this.tilt = 0, this.fov = 55;
  92. }
  93. normalizeCtorArgs(o4, r8, t3, e4) {
  94. if (o4 && "object" == typeof o4 && ("x" in o4 || Array.isArray(o4))) {
  95. const s4 = { position: o4 };
  96. return null != r8 && (s4.heading = r8), null != t3 && (s4.tilt = t3), null != e4 && (s4.fov = e4), s4;
  97. }
  98. return o4;
  99. }
  100. writePosition(o4, r8, t3, e4) {
  101. const s4 = o4.clone();
  102. 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);
  103. }
  104. readPosition(o4, r8) {
  105. const t3 = new w();
  106. 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;
  107. }
  108. equals(o4) {
  109. return !t(o4) && (this.tilt === o4.tilt && this.heading === o4.heading && this.fov === o4.fov && this.position.equals(o4.position));
  110. }
  111. };
  112. 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);
  113. var y3 = d;
  114. // node_modules/@arcgis/core/Viewpoint.js
  115. var m;
  116. var n3 = m = class extends l {
  117. constructor(r8) {
  118. super(r8), this.rotation = 0, this.scale = 0, this.targetGeometry = null, this.camera = null;
  119. }
  120. castRotation(r8) {
  121. return (r8 %= 360) < 0 && (r8 += 360), r8;
  122. }
  123. clone() {
  124. 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 });
  125. }
  126. };
  127. function l3() {
  128. return { enabled: !this.camera };
  129. }
  130. 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);
  131. var u = n3;
  132. // node_modules/@arcgis/core/chunks/mat2df64.js
  133. function e3() {
  134. return [1, 0, 0, 1, 0, 0];
  135. }
  136. function r7(e4) {
  137. return [e4[0], e4[1], e4[2], e4[3], e4[4], e4[5]];
  138. }
  139. function t2(e4, r8, t3, n5, o4, a4) {
  140. return [e4, r8, t3, n5, o4, a4];
  141. }
  142. function n4(e4, r8) {
  143. return new Float64Array(e4, r8, 6);
  144. }
  145. var o3 = Object.freeze(Object.defineProperty({ __proto__: null, create: e3, clone: r7, fromValues: t2, createView: n4 }, Symbol.toStringTag, { value: "Module" }));
  146. // node_modules/@arcgis/core/views/2d/viewpointUtils.js
  147. var Q = 96;
  148. var U = 39.37;
  149. var B = 180 / Math.PI;
  150. function D(t3) {
  151. return t3.wkid ? t3 : t3.spatialReference || k.WGS84;
  152. }
  153. function T(t3, e4) {
  154. return e4.type ? r4(t3, e4.x, e4.y) : a3(t3, e4);
  155. }
  156. function W(t3) {
  157. return $(t3);
  158. }
  159. function H(t3, e4) {
  160. const n5 = Math.max(1, e4[0]), r8 = Math.max(1, e4[1]);
  161. return Math.max(t3.width / n5, t3.height / r8) * ct(t3.spatialReference);
  162. }
  163. async function J(t3, a4, i4, c2) {
  164. let s4, u2;
  165. if (!t3)
  166. return null;
  167. if (Array.isArray(t3) && !t3.length)
  168. return null;
  169. if (j.isCollection(t3) && (t3 = t3.toArray()), Array.isArray(t3) && t3.length && "object" == typeof t3[0]) {
  170. const e4 = t3.every((t4) => "attributes" in t4), r8 = t3.some((t4) => !t4.geometry);
  171. let o4 = t3;
  172. if (e4 && r8 && a4 && a4.allLayerViews) {
  173. const e5 = /* @__PURE__ */ new Map();
  174. for (const n5 of t3) {
  175. const t4 = n5.layer, r10 = e5.get(t4) || [], o5 = n5.attributes[t4.objectIdField];
  176. null != o5 && r10.push(o5), e5.set(t4, r10);
  177. }
  178. const r9 = [];
  179. e5.forEach((t4, e6) => {
  180. const n5 = a4.allLayerViews.find((t5) => t5.layer.id === e6.id);
  181. if ("queryFeatures" in n5) {
  182. const o5 = e6.createQuery();
  183. o5.objectIds = t4, o5.returnGeometry = true, r9.push(n5.queryFeatures(o5));
  184. }
  185. });
  186. const i5 = await Promise.all(r9), c3 = [];
  187. for (const t4 of i5)
  188. if (t4 && t4.features && t4.features.length)
  189. for (const e6 of t4.features)
  190. r(e6.geometry) && c3.push(e6.geometry);
  191. o4 = c3;
  192. }
  193. for (const t4 of o4)
  194. c2 = await J(t4, a4, i4, c2);
  195. return c2;
  196. }
  197. if (Array.isArray(t3) && 2 === t3.length && "number" == typeof t3[0] && "number" == typeof t3[1])
  198. s4 = new w(t3);
  199. else if (t3 instanceof p)
  200. s4 = t3;
  201. else if ("geometry" in t3) {
  202. if (t3.geometry)
  203. s4 = t3.geometry;
  204. else if (t3.layer) {
  205. const e4 = t3.layer, n5 = a4.allLayerViews.find((t4) => t4.layer.id === e4.id);
  206. if ("queryFeatures" in n5) {
  207. const o4 = e4.createQuery();
  208. o4.objectIds = [t3.attributes[e4.objectIdField]], o4.returnGeometry = true;
  209. const a5 = await n5.queryFeatures(o4);
  210. s4 = q(a5, "features", 0, "geometry");
  211. }
  212. }
  213. }
  214. if (t(s4))
  215. return null;
  216. 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)
  217. return null;
  218. en() || An(u2.spatialReference, i4) || await tn();
  219. const f2 = rn(u2, i4);
  220. return f2 ? c2 = c2 ? c2.union(f2) : f2 : null;
  221. }
  222. function K(t3) {
  223. if (t3 && (!Array.isArray(t3) || "number" != typeof t3[0]) && ("object" == typeof t3 || Array.isArray(t3) && "object" == typeof t3[0])) {
  224. if ("layer" in t3 && t3.layer && t3.layer.minScale && t3.layer.maxScale) {
  225. const e4 = t3.layer;
  226. return { min: e4.minScale, max: e4.maxScale };
  227. }
  228. if (Array.isArray(t3) && t3.length && t3.every((t4) => "layer" in t4)) {
  229. let e4 = 0, n5 = 0;
  230. for (const r8 of t3) {
  231. const t4 = r8.layer;
  232. t4 && t4.minScale && t4.maxScale && (e4 = t4.minScale < e4 ? t4.minScale : e4, n5 = t4.maxScale > n5 ? t4.maxScale : n5);
  233. }
  234. return e4 && n5 ? { min: e4, max: n5 } : null;
  235. }
  236. }
  237. }
  238. function X(t3, e4) {
  239. return E(D(t3), e4) ? t3 : rn(t3, e4);
  240. }
  241. async function Y(e4, r8) {
  242. if (!e4 || !r8)
  243. return new u({ targetGeometry: new w(), scale: 0, rotation: 0 });
  244. let o4 = r8.spatialReference;
  245. 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]];
  246. let f2 = null;
  247. e4 instanceof u ? f2 = e4 : e4.viewpoint ? f2 = e4.viewpoint : e4.target && "esri.Viewpoint" === e4.target.declaredClass && (f2 = e4.target);
  248. let l4 = null;
  249. 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();
  250. const m2 = X(l4.center ? l4.center : l4, o4);
  251. let y4 = null;
  252. if (f2 && r(f2.targetGeometry) && "point" === f2.targetGeometry.type)
  253. y4 = f2.scale;
  254. else if ("scale" in e4 && e4.scale)
  255. y4 = e4.scale;
  256. else if ("zoom" in e4 && -1 !== e4.zoom && a4 && a4.effectiveLODs)
  257. y4 = a4.zoomToScale(e4.zoom);
  258. else if (Array.isArray(l4) || "point" === l4.type || "extent" === l4.type && 0 === l4.width && 0 === l4.height) {
  259. const t3 = X(r8.extent, o4);
  260. y4 = r(t3) ? H(t3, u2) : r8.extent ? H(r8.extent, u2) : c2.scale;
  261. } else
  262. y4 = H(X(l4.extent, o4), u2);
  263. const p2 = K(e4);
  264. p2 && (p2.min && p2.min > y4 ? y4 = p2.min : p2.max && p2.max < y4 && (y4 = p2.max));
  265. let g2 = 0;
  266. f2 ? g2 = f2.rotation : e4.hasOwnProperty("rotation") ? g2 = e4.rotation : c2 && (g2 = c2.rotation);
  267. let x = new u({ targetGeometry: m2, scale: y4, rotation: g2 });
  268. return a4 && (x = a4.fit(x), a4.constrainByGeometry(x), a4.rotationEnabled || (x.rotation = g2)), x;
  269. }
  270. function Z(t3, e4) {
  271. const n5 = t3.targetGeometry, r8 = e4.targetGeometry;
  272. return n5.x = r8.x, n5.y = r8.y, n5.spatialReference = r8.spatialReference, t3.scale = e4.scale, t3.rotation = e4.rotation, t3;
  273. }
  274. function $2(t3, e4, n5) {
  275. 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);
  276. }
  277. var _ = function() {
  278. const t3 = n2();
  279. return function(e4, n5, r8) {
  280. const o4 = n5.targetGeometry;
  281. T(t3, o4);
  282. const a4 = 0.5 * ot(n5);
  283. 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;
  284. };
  285. }();
  286. function tt(t3, e4, n5, r8, o4) {
  287. return xt(t3, e4, n5.center), t3.scale = H(n5, r8), o4 && o4.constraints && o4.constraints.constrain(t3), t3;
  288. }
  289. function et(t3, e4, n5, r8) {
  290. return ft(t3, e4, n5, r8), r5(t3, t3);
  291. }
  292. var nt = function() {
  293. const t3 = n2();
  294. return function(e4, n5, r8) {
  295. return C(e4, st(e4, n5), $2(t3, n5, r8));
  296. };
  297. }();
  298. var rt = function() {
  299. const t3 = e3(), e4 = n2();
  300. return function(n5, r8, o4, a4) {
  301. const i4 = ot(r8), f2 = it(r8);
  302. 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]);
  303. };
  304. }();
  305. function ot(t3) {
  306. return t3.scale * at(t3.targetGeometry);
  307. }
  308. function at(t3) {
  309. return r(t3) && I(t3.spatialReference) ? 1 / (W(t3.spatialReference) * U * Q) : 1;
  310. }
  311. function it(t3) {
  312. return r3(t3.rotation) || 0;
  313. }
  314. function ct(t3) {
  315. return I(t3) ? W(t3) * U * Q : 1;
  316. }
  317. function st(t3, e4) {
  318. return l2(t3, e4, 0.5);
  319. }
  320. var ut = function() {
  321. const t3 = n2(), e4 = n2(), n5 = n2();
  322. return function(r8, o4, a4, i4, c2, m2) {
  323. 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;
  324. };
  325. }();
  326. var ft = function() {
  327. const t3 = n2();
  328. return function(e4, n5, r8, o4) {
  329. const a4 = ot(n5), i4 = it(n5);
  330. return T(t3, n5.targetGeometry), ut(e4, t3, r8, a4, i4, o4);
  331. };
  332. }();
  333. var lt = function() {
  334. const t3 = n2();
  335. return function(e4, n5, r8, o4) {
  336. const a4 = ot(n5);
  337. return T(t3, n5.targetGeometry), ut(e4, t3, r8, a4, 0, o4);
  338. };
  339. }();
  340. function mt(t3) {
  341. const e4 = R(t3);
  342. return e4 ? e4.valid[1] - e4.valid[0] : 0;
  343. }
  344. function yt(t3, e4) {
  345. return Math.round(mt(t3) / e4);
  346. }
  347. var pt = function() {
  348. const t3 = n2(), e4 = n2(), n5 = [0, 0, 0];
  349. return function(r8, o4, a4) {
  350. o2(t3, r8, o4), v2(t3, t3), o2(e4, r8, a4), v2(e4, e4), y2(n5, t3, e4);
  351. let i4 = Math.acos(j2(t3, e4) / (q2(t3) * q2(e4))) * B;
  352. return n5[2] < 0 && (i4 = -i4), isNaN(i4) && (i4 = 0), i4;
  353. };
  354. }();
  355. var gt = function() {
  356. const t3 = n2();
  357. return function(e4, n5, r8, o4) {
  358. const a4 = e4.targetGeometry;
  359. return Z(e4, n5), rt(t3, n5, r8, o4), a4.x += t3[0], a4.y += t3[1], e4;
  360. };
  361. }();
  362. var xt = function(t3, e4, n5) {
  363. Z(t3, e4);
  364. const r8 = t3.targetGeometry;
  365. return r8.x = n5.x, r8.y = n5.y, r8.spatialReference = n5.spatialReference, t3;
  366. };
  367. var ht = function() {
  368. const t3 = n2();
  369. return function(e4, n5, r8, o4, a4) {
  370. a4 || (a4 = "center"), C(t3, r8, o4), l2(t3, t3, 0.5);
  371. const i4 = t3[0], c2 = t3[1];
  372. switch (a4) {
  373. case "center":
  374. r4(t3, 0, 0);
  375. break;
  376. case "left":
  377. r4(t3, -i4, 0);
  378. break;
  379. case "top":
  380. r4(t3, 0, c2);
  381. break;
  382. case "right":
  383. r4(t3, i4, 0);
  384. break;
  385. case "bottom":
  386. r4(t3, 0, -c2);
  387. break;
  388. case "top-left":
  389. r4(t3, -i4, c2);
  390. break;
  391. case "bottom-left":
  392. r4(t3, -i4, -c2);
  393. break;
  394. case "top-right":
  395. r4(t3, i4, c2);
  396. break;
  397. case "bottom-right":
  398. r4(t3, i4, -c2);
  399. }
  400. return St(e4, n5, t3), e4;
  401. };
  402. }();
  403. function bt(t3, e4, n5) {
  404. return Z(t3, e4), t3.rotation += n5, t3;
  405. }
  406. function wt(t3, e4, n5) {
  407. return Z(t3, e4), t3.rotation = n5, t3;
  408. }
  409. var dt = function() {
  410. const t3 = n2();
  411. return function(e4, n5, r8, o4, a4) {
  412. 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;
  413. };
  414. }();
  415. function jt(t3, e4, n5) {
  416. return Z(t3, e4), t3.scale = n5, t3;
  417. }
  418. var Gt = function() {
  419. const t3 = n2();
  420. return function(e4, n5, r8, o4, a4, i4) {
  421. 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;
  422. };
  423. }();
  424. var Rt = function() {
  425. const t3 = n2(), e4 = n2();
  426. return function(n5, r8, o4, a4, i4, c2, s4) {
  427. return nt(e4, c2, s4), s2(t3, i4, e4), a4 ? Gt(n5, r8, o4, a4, t3, c2) : dt(n5, r8, o4, t3, c2);
  428. };
  429. }();
  430. var At = function() {
  431. const t3 = e3();
  432. return function(e4, n5, r8, o4) {
  433. return z(e4, n5, et(t3, r8, o4, 1));
  434. };
  435. }();
  436. var kt = function() {
  437. const t3 = e3();
  438. return function(e4, n5, r8, o4) {
  439. return z(e4, n5, ft(t3, r8, o4, 1));
  440. };
  441. }();
  442. var St = function() {
  443. const t3 = n2(), e4 = e3();
  444. return function(n5, r8, o4) {
  445. Z(n5, r8);
  446. const a4 = ot(r8), i4 = n5.targetGeometry;
  447. return h(e4, it(r8)), c(e4, e4, r6(a4, a4)), z(t3, o4, e4), i4.x += t3[0], i4.y += t3[1], n5;
  448. };
  449. }();
  450. export {
  451. u,
  452. e3 as e,
  453. H,
  454. Y,
  455. Z,
  456. $2 as $,
  457. _,
  458. tt,
  459. nt,
  460. ot,
  461. ut,
  462. ft,
  463. lt,
  464. mt,
  465. yt,
  466. pt,
  467. gt,
  468. xt,
  469. ht,
  470. bt,
  471. wt,
  472. jt,
  473. Gt,
  474. Rt,
  475. St
  476. };
  477. //# sourceMappingURL=chunk-PTEMIS7J.js.map