chunk-FFRSXQUT.js 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503
  1. import {
  2. A,
  3. B,
  4. C,
  5. D,
  6. E as E2,
  7. F,
  8. H,
  9. J,
  10. K as K2,
  11. L,
  12. M,
  13. N,
  14. O,
  15. P as P2,
  16. R,
  17. S,
  18. U,
  19. W,
  20. b,
  21. d,
  22. g,
  23. h,
  24. j,
  25. k,
  26. m as m2,
  27. p as p2,
  28. v as v4,
  29. w as w3,
  30. x,
  31. y
  32. } from "./chunk-DVIKBNBZ.js";
  33. import {
  34. e as e2,
  35. l,
  36. s,
  37. u as u2
  38. } from "./chunk-C3UFAVPF.js";
  39. import {
  40. a as a2,
  41. c,
  42. r
  43. } from "./chunk-BJT4XIGU.js";
  44. import {
  45. E,
  46. K,
  47. P2 as P,
  48. Se,
  49. V,
  50. Y,
  51. be,
  52. e,
  53. he,
  54. le,
  55. pe,
  56. re,
  57. se,
  58. t,
  59. v2 as v3,
  60. z
  61. } from "./chunk-FT2BCPUP.js";
  62. import {
  63. $
  64. } from "./chunk-3RSFVUKZ.js";
  65. import {
  66. v as v2
  67. } from "./chunk-RMDDCMKS.js";
  68. import {
  69. m2 as m,
  70. u,
  71. v2 as v
  72. } from "./chunk-VCH45Q2I.js";
  73. import {
  74. a
  75. } from "./chunk-FWSQEIAR.js";
  76. import {
  77. p,
  78. w,
  79. w2
  80. } from "./chunk-6T6G6LCQ.js";
  81. // node_modules/@arcgis/core/arcade/functions/geomasync.js
  82. function un(t2) {
  83. return 0 === a.indexOf("4.") ? v.fromExtent(t2) : new v({ spatialReference: t2.spatialReference, rings: [[[t2.xmin, t2.ymin], [t2.xmin, t2.ymax], [t2.xmax, t2.ymax], [t2.xmax, t2.ymin], [t2.xmin, t2.ymin]]] });
  84. }
  85. function fn(n, t2, e3) {
  86. if (V(n, 2, 2, t2, e3), n[0] instanceof p && n[1] instanceof p)
  87. ;
  88. else if (n[0] instanceof p && null === n[1])
  89. ;
  90. else if (n[1] instanceof p && null === n[0])
  91. ;
  92. else if (null !== n[0] || null !== n[1])
  93. throw new t(t2, e.InvalidParameter, e3);
  94. }
  95. async function cn(n, t2) {
  96. if ("polygon" !== n.type && "polyline" !== n.type && "extent" !== n.type)
  97. return 0;
  98. let e3 = 1;
  99. if (n.spatialReference.vcsWkid || n.spatialReference.latestVcsWkid) {
  100. e3 = s(n.spatialReference) / $(n.spatialReference);
  101. }
  102. let r2 = 0;
  103. if ("polyline" === n.type)
  104. for (const a3 of n.paths)
  105. for (let n2 = 1; n2 < a3.length; n2++)
  106. r2 += e2(a3[n2], a3[n2 - 1], e3);
  107. else if ("polygon" === n.type)
  108. for (const a3 of n.rings) {
  109. for (let n2 = 1; n2 < a3.length; n2++)
  110. r2 += e2(a3[n2], a3[n2 - 1], e3);
  111. (a3[0][0] !== a3[a3.length - 1][0] || a3[0][1] !== a3[a3.length - 1][1] || void 0 !== a3[0][2] && a3[0][2] !== a3[a3.length - 1][2]) && (r2 += e2(a3[0], a3[a3.length - 1], e3));
  112. }
  113. else
  114. "extent" === n.type && (r2 += 2 * e2([n.xmin, n.ymin, 0], [n.xmax, n.ymin, 0], e3), r2 += 2 * e2([n.xmin, n.ymin, 0], [n.xmin, n.ymax, 0], e3), r2 *= 2, r2 += 4 * Math.abs(v3(n.zmax, 0) * e3 - v3(n.zmin, 0) * e3));
  115. const i = new m({ hasZ: false, hasM: false, spatialReference: n.spatialReference, paths: [[0, 0], [0, r2]] });
  116. return F(i, t2);
  117. }
  118. function dn(n) {
  119. "async" === n.mode && (n.functions.disjoint = function(t2, e3) {
  120. return n.standardFunctionAsync(t2, e3, (n2, r2, a3) => (fn(a3 = pe(a3), t2, e3), null === a3[0] || null === a3[1] || A(a3[0], a3[1])));
  121. }, n.functions.intersects = function(t2, e3) {
  122. return n.standardFunctionAsync(t2, e3, (n2, r2, a3) => (fn(a3 = pe(a3), t2, e3), null !== a3[0] && null !== a3[1] && h(a3[0], a3[1])));
  123. }, n.functions.touches = function(t2, e3) {
  124. return n.standardFunctionAsync(t2, e3, (n2, r2, a3) => (fn(a3 = pe(a3), t2, e3), null !== a3[0] && null !== a3[1] && S(a3[0], a3[1])));
  125. }, n.functions.crosses = function(t2, e3) {
  126. return n.standardFunctionAsync(t2, e3, (n2, r2, a3) => (fn(a3 = pe(a3), t2, e3), null !== a3[0] && null !== a3[1] && m2(a3[0], a3[1])));
  127. }, n.functions.within = function(t2, e3) {
  128. return n.standardFunctionAsync(t2, e3, (n2, r2, a3) => (fn(a3 = pe(a3), t2, e3), null !== a3[0] && null !== a3[1] && x(a3[0], a3[1])));
  129. }, n.functions.contains = function(t2, e3) {
  130. return n.standardFunctionAsync(t2, e3, (n2, r2, a3) => (fn(a3 = pe(a3), t2, e3), null !== a3[0] && null !== a3[1] && p2(a3[0], a3[1])));
  131. }, n.functions.overlaps = function(t2, e3) {
  132. return n.standardFunctionAsync(t2, e3, (n2, r2, a3) => (fn(a3 = pe(a3), t2, e3), null !== a3[0] && null !== a3[1] && O(a3[0], a3[1])));
  133. }, n.functions.equals = function(t2, e3) {
  134. return n.standardFunctionAsync(t2, e3, (n2, r2, i) => (V(i, 2, 2, t2, e3), i[0] === i[1] || (i[0] instanceof p && i[1] instanceof p ? g(i[0], i[1]) : !(!z(i[0]) || !z(i[1])) && i[0].getTime() === i[1].getTime())));
  135. }, n.functions.relate = function(t2, e3) {
  136. return n.standardFunctionAsync(t2, e3, (n2, r2, o) => {
  137. if (o = pe(o), V(o, 3, 3, t2, e3), o[0] instanceof p && o[1] instanceof p)
  138. return R(o[0], o[1], K(o[2]));
  139. if (o[0] instanceof p && null === o[1])
  140. return false;
  141. if (o[1] instanceof p && null === o[0])
  142. return false;
  143. if (null === o[0] && null === o[1])
  144. return false;
  145. throw new t(t2, e.InvalidParameter, e3);
  146. });
  147. }, n.functions.intersection = function(t2, e3) {
  148. return n.standardFunctionAsync(t2, e3, (n2, r2, a3) => (fn(a3 = pe(a3), t2, e3), null === a3[0] || null === a3[1] ? null : D(a3[0], a3[1])));
  149. }, n.functions.union = function(e3, r2) {
  150. return n.standardFunctionAsync(e3, r2, (n2, a3, o) => {
  151. const s2 = [];
  152. if (0 === (o = pe(o)).length)
  153. throw new t(e3, e.WrongNumberOfParameters, r2);
  154. if (1 === o.length)
  155. if (Y(o[0])) {
  156. const n3 = pe(o[0]);
  157. for (let t2 = 0; t2 < n3.length; t2++)
  158. if (null !== n3[t2]) {
  159. if (!(n3[t2] instanceof p))
  160. throw new t(e3, e.InvalidParameter, r2);
  161. s2.push(n3[t2]);
  162. }
  163. } else {
  164. if (!E(o[0])) {
  165. if (o[0] instanceof p)
  166. return se(c(o[0]), e3.spatialReference);
  167. if (null === o[0])
  168. return null;
  169. throw new t(e3, e.InvalidParameter, r2);
  170. }
  171. {
  172. const n3 = pe(o[0].toArray());
  173. for (let t2 = 0; t2 < n3.length; t2++)
  174. if (null !== n3[t2]) {
  175. if (!(n3[t2] instanceof p))
  176. throw new t(e3, e.InvalidParameter, r2);
  177. s2.push(n3[t2]);
  178. }
  179. }
  180. }
  181. else
  182. for (let t2 = 0; t2 < o.length; t2++)
  183. if (null !== o[t2]) {
  184. if (!(o[t2] instanceof p))
  185. throw new t(e3, e.InvalidParameter, r2);
  186. s2.push(o[t2]);
  187. }
  188. return 0 === s2.length ? null : b(s2);
  189. });
  190. }, n.functions.difference = function(e3, r2) {
  191. return n.standardFunctionAsync(e3, r2, (n2, a3, o) => (fn(o = pe(o), e3, r2), null !== o[0] && null === o[1] ? c(o[0]) : null === o[0] ? null : E2(o[0], o[1])));
  192. }, n.functions.symmetricdifference = function(e3, r2) {
  193. return n.standardFunctionAsync(e3, r2, (n2, a3, o) => (fn(o = pe(o), e3, r2), null === o[0] && null === o[1] ? null : null === o[0] ? c(o[1]) : null === o[1] ? c(o[0]) : k(o[0], o[1])));
  194. }, n.functions.clip = function(t2, e3) {
  195. return n.standardFunctionAsync(t2, e3, (n2, r2, o) => {
  196. if (o = pe(o), V(o, 2, 2, t2, e3), !(o[1] instanceof w2) && null !== o[1])
  197. throw new t(t2, e.InvalidParameter, e3);
  198. if (null === o[0])
  199. return null;
  200. if (!(o[0] instanceof p))
  201. throw new t(t2, e.InvalidParameter, e3);
  202. return null === o[1] ? null : y(o[0], o[1]);
  203. });
  204. }, n.functions.cut = function(e3, r2) {
  205. return n.standardFunctionAsync(e3, r2, (n2, o, s2) => {
  206. if (s2 = pe(s2), V(s2, 2, 2, e3, r2), !(s2[1] instanceof m) && null !== s2[1])
  207. throw new t(e3, e.InvalidParameter, r2);
  208. if (null === s2[0])
  209. return [];
  210. if (!(s2[0] instanceof p))
  211. throw new t(e3, e.InvalidParameter, r2);
  212. return null === s2[1] ? [c(s2[0])] : w3(s2[0], s2[1]);
  213. });
  214. }, n.functions.area = function(t2, r2) {
  215. return n.standardFunctionAsync(t2, r2, async (n2, o, s2) => {
  216. if (V(s2, 1, 2, t2, r2), null === (s2 = pe(s2))[0])
  217. return 0;
  218. if (P(s2[0])) {
  219. const n3 = await s2[0].sumArea(r(v3(s2[1], -1)), false, t2.abortSignal);
  220. if (t2.abortSignal.aborted)
  221. throw new t(t2, e.Cancelled, r2);
  222. return n3;
  223. }
  224. if (Y(s2[0]) || E(s2[0])) {
  225. const n3 = he(s2[0], t2.spatialReference);
  226. return null === n3 ? 0 : W(n3, r(v3(s2[1], -1)));
  227. }
  228. if (!(s2[0] instanceof p))
  229. throw new t(t2, e.InvalidParameter, r2);
  230. return W(s2[0], r(v3(s2[1], -1)));
  231. });
  232. }, n.functions.areageodetic = function(t2, r2) {
  233. return n.standardFunctionAsync(t2, r2, async (n2, o, s2) => {
  234. if (V(s2, 1, 2, t2, r2), null === (s2 = pe(s2))[0])
  235. return 0;
  236. if (P(s2[0])) {
  237. const n3 = await s2[0].sumArea(r(v3(s2[1], -1)), true, t2.abortSignal);
  238. if (t2.abortSignal.aborted)
  239. throw new t(t2, e.Cancelled, r2);
  240. return n3;
  241. }
  242. if (Y(s2[0]) || E(s2[0])) {
  243. const n3 = he(s2[0], t2.spatialReference);
  244. return null === n3 ? 0 : K2(n3, r(v3(s2[1], -1)));
  245. }
  246. if (!(s2[0] instanceof p))
  247. throw new t(t2, e.InvalidParameter, r2);
  248. return K2(s2[0], r(v3(s2[1], -1)));
  249. });
  250. }, n.functions.length = function(t2, e3) {
  251. return n.standardFunctionAsync(t2, e3, async (n2, o, s2) => {
  252. if (V(s2, 1, 2, t2, e3), null === (s2 = pe(s2))[0])
  253. return 0;
  254. if (P(s2[0])) {
  255. const n3 = await s2[0].sumLength(a2(v3(s2[1], -1)), false, t2.abortSignal);
  256. if (t2.abortSignal.aborted)
  257. throw new t(t2, e.Cancelled, e3);
  258. return n3;
  259. }
  260. if (Y(s2[0]) || E(s2[0])) {
  261. const n3 = Se(s2[0], t2.spatialReference);
  262. return null === n3 ? 0 : F(n3, a2(v3(s2[1], -1)));
  263. }
  264. if (!(s2[0] instanceof p))
  265. throw new t(t2, e.InvalidParameter, e3);
  266. return F(s2[0], a2(v3(s2[1], -1)));
  267. });
  268. }, n.functions.length3d = function(t2, e3) {
  269. return n.standardFunctionAsync(t2, e3, (n2, o, s2) => {
  270. if (V(s2, 1, 2, t2, e3), null === (s2 = pe(s2))[0])
  271. return 0;
  272. if (Y(s2[0]) || E(s2[0])) {
  273. const n3 = Se(s2[0], t2.spatialReference);
  274. return null === n3 ? 0 : true === n3.hasZ ? cn(n3, a2(v3(s2[1], -1))) : F(n3, a2(v3(s2[1], -1)));
  275. }
  276. if (!(s2[0] instanceof p))
  277. throw new t(t2, e.InvalidParameter, e3);
  278. return true === s2[0].hasZ ? cn(s2[0], a2(v3(s2[1], -1))) : F(s2[0], a2(v3(s2[1], -1)));
  279. });
  280. }, n.functions.lengthgeodetic = function(t2, e3) {
  281. return n.standardFunctionAsync(t2, e3, async (n2, o, s2) => {
  282. if (V(s2, 1, 2, t2, e3), null === (s2 = pe(s2))[0])
  283. return 0;
  284. if (P(s2[0])) {
  285. const n3 = await s2[0].sumLength(a2(v3(s2[1], -1)), true, t2.abortSignal);
  286. if (t2.abortSignal.aborted)
  287. throw new t(t2, e.Cancelled, e3);
  288. return n3;
  289. }
  290. if (Y(s2[0]) || E(s2[0])) {
  291. const n3 = Se(s2[0], t2.spatialReference);
  292. return null === n3 ? 0 : M(n3, a2(v3(s2[1], -1)));
  293. }
  294. if (!(s2[0] instanceof p))
  295. throw new t(t2, e.InvalidParameter, e3);
  296. return M(s2[0], a2(v3(s2[1], -1)));
  297. });
  298. }, n.functions.distance = function(t2, e3) {
  299. return n.standardFunctionAsync(t2, e3, (n2, o, s2) => {
  300. s2 = pe(s2), V(s2, 2, 3, t2, e3);
  301. let f = s2[0];
  302. (Y(s2[0]) || E(s2[0])) && (f = be(s2[0], t2.spatialReference));
  303. let c2 = s2[1];
  304. if ((Y(s2[1]) || E(s2[1])) && (c2 = be(s2[1], t2.spatialReference)), !(f instanceof p))
  305. throw new t(t2, e.InvalidParameter, e3);
  306. if (!(c2 instanceof p))
  307. throw new t(t2, e.InvalidParameter, e3);
  308. return d(f, c2, a2(v3(s2[2], -1)));
  309. });
  310. }, n.functions.distancegeodetic = function(t2, e3) {
  311. return n.standardFunctionAsync(t2, e3, (n2, o, s2) => {
  312. s2 = pe(s2), V(s2, 2, 3, t2, e3);
  313. const l2 = s2[0], u3 = s2[1];
  314. if (!(l2 instanceof w))
  315. throw new t(t2, e.InvalidParameter, e3);
  316. if (!(u3 instanceof w))
  317. throw new t(t2, e.InvalidParameter, e3);
  318. const f = new m({ paths: [], spatialReference: l2.spatialReference });
  319. return f.addPath([l2, u3]), M(f, a2(v3(s2[2], -1)));
  320. });
  321. }, n.functions.densify = function(t2, e3) {
  322. return n.standardFunctionAsync(t2, e3, (n2, o, s2) => {
  323. if (s2 = pe(s2), V(s2, 2, 3, t2, e3), null === s2[0])
  324. return null;
  325. if (!(s2[0] instanceof p))
  326. throw new t(t2, e.InvalidParameter, e3);
  327. const l2 = re(s2[1]);
  328. if (isNaN(l2))
  329. throw new t(t2, e.InvalidParameter, e3);
  330. if (l2 <= 0)
  331. throw new t(t2, e.InvalidParameter, e3);
  332. return s2[0] instanceof v || s2[0] instanceof m ? C(s2[0], l2, a2(v3(s2[2], -1))) : s2[0] instanceof w2 ? C(un(s2[0]), l2, a2(v3(s2[2], -1))) : s2[0];
  333. });
  334. }, n.functions.densifygeodetic = function(t2, e3) {
  335. return n.standardFunctionAsync(t2, e3, (n2, o, s2) => {
  336. if (s2 = pe(s2), V(s2, 2, 3, t2, e3), null === s2[0])
  337. return null;
  338. if (!(s2[0] instanceof p))
  339. throw new t(t2, e.InvalidParameter, e3);
  340. const l2 = re(s2[1]);
  341. if (isNaN(l2))
  342. throw new t(t2, e.InvalidParameter, e3);
  343. if (l2 <= 0)
  344. throw new t(t2, e.InvalidParameter, e3);
  345. return s2[0] instanceof v || s2[0] instanceof m ? U(s2[0], l2, a2(v3(s2[2], -1))) : s2[0] instanceof w2 ? U(un(s2[0]), l2, a2(v3(s2[2], -1))) : s2[0];
  346. });
  347. }, n.functions.generalize = function(t2, e3) {
  348. return n.standardFunctionAsync(t2, e3, (n2, o, s2) => {
  349. if (s2 = pe(s2), V(s2, 2, 4, t2, e3), null === s2[0])
  350. return null;
  351. if (!(s2[0] instanceof p))
  352. throw new t(t2, e.InvalidParameter, e3);
  353. const l2 = re(s2[1]);
  354. if (isNaN(l2))
  355. throw new t(t2, e.InvalidParameter, e3);
  356. return B(s2[0], l2, le(v3(s2[2], true)), a2(v3(s2[3], -1)));
  357. });
  358. }, n.functions.buffer = function(e3, o) {
  359. return n.standardFunctionAsync(e3, o, (n2, s2, l2) => {
  360. if (l2 = pe(l2), V(l2, 2, 3, e3, o), null === l2[0])
  361. return null;
  362. if (!(l2[0] instanceof p))
  363. throw new t(e3, e.InvalidParameter, o);
  364. const u3 = re(l2[1]);
  365. if (isNaN(u3))
  366. throw new t(e3, e.InvalidParameter, o);
  367. return 0 === u3 ? c(l2[0]) : L(l2[0], u3, a2(v3(l2[2], -1)));
  368. });
  369. }, n.functions.buffergeodetic = function(e3, o) {
  370. return n.standardFunctionAsync(e3, o, (n2, s2, l2) => {
  371. if (l2 = pe(l2), V(l2, 2, 3, e3, o), null === l2[0])
  372. return null;
  373. if (!(l2[0] instanceof p))
  374. throw new t(e3, e.InvalidParameter, o);
  375. const u3 = re(l2[1]);
  376. if (isNaN(u3))
  377. throw new t(e3, e.InvalidParameter, o);
  378. return 0 === u3 ? c(l2[0]) : P2(l2[0], u3, a2(v3(l2[2], -1)));
  379. });
  380. }, n.functions.offset = function(t2, e3) {
  381. return n.standardFunctionAsync(t2, e3, (n2, o, l2) => {
  382. if (l2 = pe(l2), V(l2, 2, 6, t2, e3), null === l2[0])
  383. return null;
  384. if (!(l2[0] instanceof v || l2[0] instanceof m))
  385. throw new t(t2, e.InvalidParameter, e3);
  386. const u3 = re(l2[1]);
  387. if (isNaN(u3))
  388. throw new t(t2, e.InvalidParameter, e3);
  389. const f = re(v3(l2[4], 10));
  390. if (isNaN(f))
  391. throw new t(t2, e.InvalidParameter, e3);
  392. const c2 = re(v3(l2[5], 0));
  393. if (isNaN(c2))
  394. throw new t(t2, e.InvalidParameter, e3);
  395. return v4(l2[0], u3, a2(v3(l2[2], -1)), K(v3(l2[3], "round")).toLowerCase(), f, c2);
  396. });
  397. }, n.functions.rotate = function(t2, e3) {
  398. return n.standardFunctionAsync(t2, e3, (n2, r2, o) => {
  399. o = pe(o), V(o, 2, 3, t2, e3);
  400. let s2 = o[0];
  401. if (null === s2)
  402. return null;
  403. if (!(s2 instanceof p))
  404. throw new t(t2, e.InvalidParameter, e3);
  405. s2 instanceof w2 && (s2 = v.fromExtent(s2));
  406. const l2 = re(o[1]);
  407. if (isNaN(l2))
  408. throw new t(t2, e.InvalidParameter, e3);
  409. const u3 = v3(o[2], null);
  410. if (null === u3)
  411. return H(s2, l2);
  412. if (u3 instanceof w)
  413. return H(s2, l2, u3);
  414. throw new t(t2, e.InvalidParameter, e3);
  415. });
  416. }, n.functions.centroid = function(e3, r2) {
  417. return n.standardFunctionAsync(e3, r2, (n2, o, s2) => {
  418. if (s2 = pe(s2), V(s2, 1, 1, e3, r2), null === s2[0])
  419. return null;
  420. let c2 = s2[0];
  421. if ((Y(s2[0]) || E(s2[0])) && (c2 = be(s2[0], e3.spatialReference)), null === c2)
  422. return null;
  423. if (!(c2 instanceof p))
  424. throw new t(e3, e.InvalidParameter, r2);
  425. return c2 instanceof w ? se(c(s2[0]), e3.spatialReference) : c2 instanceof v ? c2.centroid : c2 instanceof m ? l(c2) : c2 instanceof u ? u2(c2) : c2 instanceof w2 ? c2.center : null;
  426. });
  427. }, n.functions.multiparttosinglepart = function(e3, r2) {
  428. return n.standardFunctionAsync(e3, r2, async (n2, o, s2) => {
  429. s2 = pe(s2), V(s2, 1, 1, e3, r2);
  430. const l2 = [];
  431. if (null === s2[0])
  432. return null;
  433. if (!(s2[0] instanceof p))
  434. throw new t(e3, e.InvalidParameter, r2);
  435. if (s2[0] instanceof w)
  436. return [se(c(s2[0]), e3.spatialReference)];
  437. if (s2[0] instanceof w2)
  438. return [se(c(s2[0]), e3.spatialReference)];
  439. const u3 = await N(s2[0]);
  440. if (u3 instanceof v) {
  441. const n3 = [], t2 = [];
  442. for (let e4 = 0; e4 < u3.rings.length; e4++)
  443. if (u3.isClockwise(u3.rings[e4])) {
  444. const t3 = v2({ rings: [u3.rings[e4]], hasZ: true === u3.hasZ, hazM: true === u3.hasM, spatialReference: u3.spatialReference.toJSON() });
  445. n3.push(t3);
  446. } else
  447. t2.push({ ring: u3.rings[e4], pt: u3.getPoint(e4, 0) });
  448. for (let e4 = 0; e4 < t2.length; e4++)
  449. for (let r3 = 0; r3 < n3.length; r3++)
  450. if (n3[r3].contains(t2[e4].pt)) {
  451. n3[r3].addRing(t2[e4].ring);
  452. break;
  453. }
  454. return n3;
  455. }
  456. if (u3 instanceof m) {
  457. const n3 = [];
  458. for (let t2 = 0; t2 < u3.paths.length; t2++) {
  459. const e4 = v2({ paths: [u3.paths[t2]], hasZ: true === u3.hasZ, hazM: true === u3.hasM, spatialReference: u3.spatialReference.toJSON() });
  460. n3.push(e4);
  461. }
  462. return n3;
  463. }
  464. if (s2[0] instanceof u) {
  465. const n3 = se(c(s2[0]), e3.spatialReference);
  466. for (let t2 = 0; t2 < n3.points.length; t2++)
  467. l2.push(n3.getPoint(t2));
  468. return l2;
  469. }
  470. return null;
  471. });
  472. }, n.functions.issimple = function(t2, e3) {
  473. return n.standardFunctionAsync(t2, e3, (n2, r2, o) => {
  474. if (o = pe(o), V(o, 1, 1, t2, e3), null === o[0])
  475. return true;
  476. if (!(o[0] instanceof p))
  477. throw new t(t2, e.InvalidParameter, e3);
  478. return J(o[0]);
  479. });
  480. }, n.functions.simplify = function(t2, e3) {
  481. return n.standardFunctionAsync(t2, e3, (n2, r2, o) => {
  482. if (o = pe(o), V(o, 1, 1, t2, e3), null === o[0])
  483. return null;
  484. if (!(o[0] instanceof p))
  485. throw new t(t2, e.InvalidParameter, e3);
  486. return N(o[0]);
  487. });
  488. }, n.functions.convexhull = function(t2, e3) {
  489. return n.standardFunctionAsync(t2, e3, (n2, r2, o) => {
  490. if (o = pe(o), V(o, 1, 1, t2, e3), null === o[0])
  491. return null;
  492. if (!(o[0] instanceof p))
  493. throw new t(t2, e.InvalidParameter, e3);
  494. return j(o[0]);
  495. });
  496. });
  497. }
  498. export {
  499. dn
  500. };
  501. //# sourceMappingURL=chunk-FFRSXQUT.js.map