chunk-2H5MD622.js 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. import {
  2. w2 as w
  3. } from "./chunk-6T6G6LCQ.js";
  4. import {
  5. t
  6. } from "./chunk-YXWMMD76.js";
  7. // node_modules/@arcgis/core/geometry/support/aaBoundingRect.js
  8. function i(n) {
  9. return n;
  10. }
  11. function u(n = L) {
  12. return i([n[0], n[1], n[2], n[3]]);
  13. }
  14. function e(n) {
  15. return i([n[0], n[1], n[2], n[3]]);
  16. }
  17. function a2(n, t2) {
  18. return n !== t2 && (n[0] = t2[0], n[1] = t2[1], n[2] = t2[2], n[3] = t2[3]), n;
  19. }
  20. function o(n, t2, r, i2, e2 = u()) {
  21. return e2[0] = n, e2[1] = t2, e2[2] = r, e2[3] = i2, e2;
  22. }
  23. function c(n, t2 = u()) {
  24. return t2[0] = n.xmin, t2[1] = n.ymin, t2[2] = n.xmax, t2[3] = n.ymax, t2;
  25. }
  26. function f(n, t2) {
  27. return new w({ xmin: n[0], ymin: n[1], xmax: n[2], ymax: n[3], spatialReference: t2 });
  28. }
  29. function m(n, t2) {
  30. t2[0] < n[0] && (n[0] = t2[0]), t2[0] > n[2] && (n[2] = t2[0]), t2[1] < n[1] && (n[1] = t2[1]), t2[1] > n[3] && (n[3] = t2[1]);
  31. }
  32. function h(n, r, i2) {
  33. if (t(r))
  34. a2(i2, n);
  35. else if ("length" in r)
  36. G(r) ? (i2[0] = Math.min(n[0], r[0]), i2[1] = Math.min(n[1], r[1]), i2[2] = Math.max(n[2], r[2]), i2[3] = Math.max(n[3], r[3])) : 2 !== r.length && 3 !== r.length || (i2[0] = Math.min(n[0], r[0]), i2[1] = Math.min(n[1], r[1]), i2[2] = Math.max(n[2], r[0]), i2[3] = Math.max(n[3], r[1]));
  37. else
  38. switch (r.type) {
  39. case "extent":
  40. i2[0] = Math.min(n[0], r.xmin), i2[1] = Math.min(n[1], r.ymin), i2[2] = Math.max(n[2], r.xmax), i2[3] = Math.max(n[3], r.ymax);
  41. break;
  42. case "point":
  43. i2[0] = Math.min(n[0], r.x), i2[1] = Math.min(n[1], r.y), i2[2] = Math.max(n[2], r.x), i2[3] = Math.max(n[3], r.y);
  44. }
  45. }
  46. function s(n) {
  47. return t(n) || n[0] >= n[2] ? 0 : n[2] - n[0];
  48. }
  49. function l(n) {
  50. return n[1] >= n[3] ? 0 : n[3] - n[1];
  51. }
  52. function y(n) {
  53. return s(n) * l(n);
  54. }
  55. function w2(n, t2, r) {
  56. return t2 >= n[0] && r >= n[1] && t2 <= n[2] && r <= n[3];
  57. }
  58. function q(n, t2, r) {
  59. return t2[0] >= n[0] - r && t2[1] >= n[1] - r && t2[0] <= n[2] + r && t2[1] <= n[3] + r;
  60. }
  61. function E(n, t2) {
  62. return Math.max(t2[0], n[0]) <= Math.min(t2[2], n[2]) && Math.max(t2[1], n[1]) <= Math.min(t2[3], n[3]);
  63. }
  64. function R(n, t2) {
  65. return t2[0] >= n[0] && t2[2] <= n[2] && t2[1] >= n[1] && t2[3] <= n[3];
  66. }
  67. function D(n) {
  68. return n ? a2(n, K) : u(K);
  69. }
  70. function G(n) {
  71. return null != n && 4 === n.length;
  72. }
  73. function I(n, t2) {
  74. return G(n) && G(t2) ? n[0] === t2[0] && n[1] === t2[1] && n[2] === t2[2] && n[3] === t2[3] : n === t2;
  75. }
  76. var J = i([-1 / 0, -1 / 0, 1 / 0, 1 / 0]);
  77. var K = i([1 / 0, 1 / 0, -1 / 0, -1 / 0]);
  78. var L = i([0, 0, 0, 0]);
  79. var N = i([0, 0, 1, 1]);
  80. export {
  81. u,
  82. e,
  83. o,
  84. c,
  85. f,
  86. m,
  87. h,
  88. s,
  89. l,
  90. y,
  91. w2 as w,
  92. q,
  93. E,
  94. R,
  95. D,
  96. I,
  97. K
  98. };
  99. //# sourceMappingURL=chunk-2H5MD622.js.map