chunk-HBMVUVZX.js 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. import {
  2. t
  3. } from "./chunk-GZT4BVFP.js";
  4. // node_modules/@arcgis/core/layers/graphics/OptimizedFeature.js
  5. var s = class {
  6. constructor(t3 = null, s2 = {}, e2, o2) {
  7. this.geometry = t3, this.attributes = s2, this.centroid = e2, this.objectId = o2, this.displayId = 0, this.geohashX = 0, this.geohashY = 0;
  8. }
  9. weakClone() {
  10. const t3 = new s(this.geometry, this.attributes, this.centroid, this.objectId);
  11. return t3.displayId = this.displayId, t3.geohashX = this.geohashX, t3.geohashY = this.geohashY, t3;
  12. }
  13. };
  14. function e(s2) {
  15. return !(t(s2.geometry) || !s2.geometry.coords || !s2.geometry.coords.length);
  16. }
  17. var o = class extends s {
  18. };
  19. // node_modules/@arcgis/core/layers/graphics/OptimizedGeometry.js
  20. var t2 = class {
  21. constructor(t3 = [], e2 = [], s2 = false) {
  22. this.lengths = t3 ?? [], this.coords = e2 ?? [], this.hasIndeterminateRingOrder = s2;
  23. }
  24. static fromRect(e2) {
  25. const [s2, h, n, r] = e2, i = n - s2, o2 = r - h;
  26. return new t2([5], [s2, h, i, 0, 0, o2, -i, 0, 0, -o2]);
  27. }
  28. get isPoint() {
  29. return this.lengths.length === 0;
  30. }
  31. get maxLength() {
  32. return Math.max(...this.lengths);
  33. }
  34. get size() {
  35. return this.lengths.reduce((t3, e2) => t3 + e2);
  36. }
  37. forEachVertex(t3) {
  38. let e2 = 0;
  39. this.lengths.length || t3(this.coords[0], this.coords[1]);
  40. for (let s2 = 0; s2 < this.lengths.length; s2++) {
  41. const h = this.lengths[s2];
  42. for (let s3 = 0; s3 < h; s3++) {
  43. t3(this.coords[2 * (s3 + e2)], this.coords[2 * (s3 + e2) + 1]);
  44. }
  45. e2 += h;
  46. }
  47. }
  48. clone(e2) {
  49. return e2 ? (e2.set(this.coords), new t2(this.lengths.slice(), e2, this.hasIndeterminateRingOrder)) : new t2(this.lengths.slice(), this.coords.slice(), this.hasIndeterminateRingOrder);
  50. }
  51. };
  52. export {
  53. s,
  54. e,
  55. o,
  56. t2 as t
  57. };
  58. //# sourceMappingURL=chunk-HBMVUVZX.js.map