chunk-FYNVVMWY.js 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535
  1. import {
  2. e
  3. } from "./chunk-Q52DVFYK.js";
  4. import {
  5. s as s3,
  6. t as t2
  7. } from "./chunk-HBMVUVZX.js";
  8. import {
  9. c,
  10. f,
  11. l,
  12. y
  13. } from "./chunk-2Z6LERTI.js";
  14. import {
  15. s,
  16. s3 as s2
  17. } from "./chunk-EMJ4ZSM2.js";
  18. import {
  19. r,
  20. t
  21. } from "./chunk-GZT4BVFP.js";
  22. // node_modules/@arcgis/core/layers/graphics/featureConversionUtils.js
  23. function h(e2, t3) {
  24. return e2 ? t3 ? 4 : 3 : t3 ? 3 : 2;
  25. }
  26. var a = s.getLogger("esri.layers.graphics.featureConversionUtils");
  27. var g = { esriGeometryPoint: 0, esriGeometryPolyline: 2, esriGeometryPolygon: 3, esriGeometryMultipoint: 0 };
  28. var d = (e2, t3, n, o, r2, s4) => {
  29. e2[n] = r2, e2[n + 1] = s4;
  30. };
  31. var m = (e2, t3, n, o, r2, s4) => {
  32. e2[n] = r2, e2[n + 1] = s4, e2[n + 2] = t3[o + 2];
  33. };
  34. var y2 = (e2, t3, n, o, r2, s4) => {
  35. e2[n] = r2, e2[n + 1] = s4, e2[n + 2] = t3[o + 3];
  36. };
  37. var p = (e2, t3, n, o, r2, s4) => {
  38. e2[n] = r2, e2[n + 1] = s4, e2[n + 2] = t3[o + 2], e2[n + 3] = t3[o + 3];
  39. };
  40. function I(e2, t3, n, o) {
  41. if (e2) {
  42. if (n)
  43. return t3 && o ? p : m;
  44. if (t3 && o)
  45. return y2;
  46. } else if (t3 && o)
  47. return m;
  48. return d;
  49. }
  50. function b({ scale: e2, translate: t3 }, n) {
  51. return Math.round((n - t3[0]) / e2[0]);
  52. }
  53. function M({ scale: e2, translate: t3 }, n) {
  54. return Math.round((t3[1] - n) / e2[1]);
  55. }
  56. function w({ scale: e2, translate: t3 }, n) {
  57. return n * e2[0] + t3[0];
  58. }
  59. function N({ scale: e2, translate: t3 }, n) {
  60. return t3[1] - n * e2[1];
  61. }
  62. function G(e2, t3, n) {
  63. return e2 ? t3 ? n ? k(e2) : P(e2) : n ? Z(e2) : T(e2) : null;
  64. }
  65. function T(e2) {
  66. const t3 = e2.coords;
  67. return { x: t3[0], y: t3[1] };
  68. }
  69. function F(e2, t3) {
  70. return e2.coords[0] = t3.x, e2.coords[1] = t3.y, e2;
  71. }
  72. function P(e2) {
  73. const t3 = e2.coords;
  74. return { x: t3[0], y: t3[1], z: t3[2] };
  75. }
  76. function x(e2, t3) {
  77. return e2.coords[0] = t3.x, e2.coords[1] = t3.y, e2.coords[2] = t3.z, e2;
  78. }
  79. function Z(e2) {
  80. const t3 = e2.coords;
  81. return { x: t3[0], y: t3[1], m: t3[2] };
  82. }
  83. function j(e2, t3) {
  84. return e2.coords[0] = t3.x, e2.coords[1] = t3.y, e2.coords[2] = t3.m, e2;
  85. }
  86. function k(e2) {
  87. const t3 = e2.coords;
  88. return { x: t3[0], y: t3[1], z: t3[2], m: t3[3] };
  89. }
  90. function E(e2, t3) {
  91. return e2.coords[0] = t3.x, e2.coords[1] = t3.y, e2.coords[2] = t3.z, e2.coords[3] = t3.m, e2;
  92. }
  93. function z(e2, t3, n, r2) {
  94. let s4 = T;
  95. n && r2 ? s4 = k : n ? s4 = P : r2 && (s4 = Z);
  96. for (const c2 of t3) {
  97. const { geometry: t4, attributes: n2 } = c2, r3 = r(t4) ? s4(t4) : null;
  98. e2.push({ attributes: n2, geometry: r3 });
  99. }
  100. return e2;
  101. }
  102. function v(e2, t3) {
  103. return e2 && t3 ? E : e2 ? x : t3 ? j : F;
  104. }
  105. function S(e2, t3, n, o, r2) {
  106. const s4 = v(n, o);
  107. for (const c2 of t3) {
  108. const { geometry: t4, attributes: n2 } = c2;
  109. let o2;
  110. t4 && (o2 = s4(new t2(), t4)), e2.push(new s3(o2, n2, null, n2[r2]));
  111. }
  112. return e2;
  113. }
  114. function Y(e2, t3, n, o) {
  115. for (const r2 of t3) {
  116. const { geometry: t4, attributes: s4 } = r2;
  117. let c2;
  118. t4 && (c2 = _(t4, n, o)), e2.push({ attributes: s4, geometry: c2 });
  119. }
  120. return e2;
  121. }
  122. function _(e2, t3, o) {
  123. if (t(e2))
  124. return null;
  125. const r2 = h(t3, o), s4 = [];
  126. for (let n = 0; n < e2.coords.length; n += r2) {
  127. const t4 = [];
  128. for (let o2 = 0; o2 < r2; o2++)
  129. t4.push(e2.coords[n + o2]);
  130. s4.push(t4);
  131. }
  132. return t3 ? o ? { points: s4, hasZ: t3, hasM: o } : { points: s4, hasZ: t3 } : o ? { points: s4, hasM: o } : { points: s4 };
  133. }
  134. function O(e2, t3, n, o, r2) {
  135. const s4 = h(n, o);
  136. for (const c2 of t3) {
  137. const t4 = c2.geometry, n2 = c2.attributes;
  138. let o2;
  139. t4 && (o2 = U(new t2(), t4, s4)), e2.push(new s3(o2, n2, null, n2[r2]));
  140. }
  141. return e2;
  142. }
  143. function U(e2, t3, n = h(t3.hasZ, t3.hasM)) {
  144. e2.lengths[0] = t3.points.length;
  145. const o = e2.coords;
  146. let r2 = 0;
  147. for (const s4 of t3.points)
  148. for (let e3 = 0; e3 < n; e3++)
  149. o[r2++] = s4[e3];
  150. return e2;
  151. }
  152. function A(e2, t3, n, r2) {
  153. for (const s4 of t3) {
  154. const { geometry: t4, attributes: c2 } = s4;
  155. let l2;
  156. r(t4) && (l2 = L(t4, n, r2)), e2.push({ attributes: c2, geometry: l2 });
  157. }
  158. return e2;
  159. }
  160. function L(e2, t3, n) {
  161. if (!e2)
  162. return null;
  163. const o = h(t3, n), { coords: r2, lengths: s4 } = e2, c2 = [];
  164. let l2 = 0;
  165. for (const u of s4) {
  166. const e3 = [];
  167. for (let t4 = 0; t4 < u; t4++) {
  168. const t5 = [];
  169. for (let e4 = 0; e4 < o; e4++)
  170. t5.push(r2[l2++]);
  171. e3.push(t5);
  172. }
  173. c2.push(e3);
  174. }
  175. return t3 ? n ? { paths: c2, hasZ: t3, hasM: n } : { paths: c2, hasZ: t3 } : n ? { paths: c2, hasM: n } : { paths: c2 };
  176. }
  177. function q(e2, t3, n, o, r2) {
  178. const s4 = h(n, o);
  179. for (const c2 of t3) {
  180. const t4 = c2.geometry, n2 = c2.attributes;
  181. let o2;
  182. t4 && (o2 = $(new t2(), t4, s4)), e2.push(new s3(o2, n2, null, n2[r2]));
  183. }
  184. return e2;
  185. }
  186. function $(e2, t3, n = h(t3.hasZ, t3.hasM)) {
  187. const { lengths: o, coords: r2 } = e2;
  188. let s4 = 0;
  189. for (const c2 of t3.paths) {
  190. for (const e3 of c2)
  191. for (let t4 = 0; t4 < n; t4++)
  192. r2[s4++] = e3[t4];
  193. o.push(c2.length);
  194. }
  195. return e2;
  196. }
  197. function R(e2, t3, n, r2) {
  198. for (const s4 of t3) {
  199. const { geometry: t4, attributes: c2, centroid: l2 } = s4;
  200. let u;
  201. if (r(t4) && (u = C(t4, n, r2)), r(l2)) {
  202. const t5 = T(l2);
  203. e2.push({ attributes: c2, centroid: t5, geometry: u });
  204. } else
  205. e2.push({ attributes: c2, geometry: u });
  206. }
  207. return e2;
  208. }
  209. function C(e2, t3, n) {
  210. if (!e2)
  211. return null;
  212. const o = h(t3, n), { coords: r2, lengths: s4 } = e2, c2 = [];
  213. let l2 = 0;
  214. for (const u of s4) {
  215. const e3 = [];
  216. for (let t4 = 0; t4 < u; t4++) {
  217. const t5 = [];
  218. for (let e4 = 0; e4 < o; e4++)
  219. t5.push(r2[l2++]);
  220. e3.push(t5);
  221. }
  222. c2.push(e3);
  223. }
  224. return t3 ? n ? { rings: c2, hasZ: t3, hasM: n } : { rings: c2, hasZ: t3 } : n ? { rings: c2, hasM: n } : { rings: c2 };
  225. }
  226. function B(e2, t3, n, r2, s4) {
  227. for (const c2 of t3) {
  228. const t4 = c2.geometry, l2 = c2.centroid, i = c2.attributes;
  229. let h2;
  230. t4 && (h2 = D(new t2(), t4, n, r2)), r(l2) ? e2.push(new s3(h2, i, F(new t2(), l2), i[s4])) : e2.push(new s3(h2, i, null, i[s4]));
  231. }
  232. return e2;
  233. }
  234. function D(e2, t3, n = t3.hasZ, o = t3.hasM) {
  235. return H(e2, t3.rings, n, o), e2;
  236. }
  237. function H(e2, t3, n, o) {
  238. const r2 = h(n, o), { lengths: s4, coords: c2 } = e2;
  239. let l2 = 0;
  240. s4.length = c2.length = 0;
  241. for (const u of t3) {
  242. for (const e3 of u)
  243. for (let t4 = 0; t4 < r2; t4++)
  244. c2[l2++] = e3[t4];
  245. s4.push(u.length);
  246. }
  247. return e2;
  248. }
  249. var J = [];
  250. var K = [];
  251. function Q(e2, t3, n, o, r2) {
  252. J[0] = e2;
  253. const [s4] = W(K, J, t3, n, o, r2);
  254. return J.length = K.length = 0, s4;
  255. }
  256. function W(t3, n, o, r2, s4, c2) {
  257. if (t3.length = 0, !o) {
  258. for (const e2 of n) {
  259. const n2 = e2.attributes[c2];
  260. t3.push(new s3(null, e2.attributes, null, n2));
  261. }
  262. return t3;
  263. }
  264. switch (o) {
  265. case "esriGeometryPoint":
  266. return S(t3, n, r2, s4, c2);
  267. case "esriGeometryMultipoint":
  268. return O(t3, n, r2, s4, c2);
  269. case "esriGeometryPolyline":
  270. return q(t3, n, r2, s4, c2);
  271. case "esriGeometryPolygon":
  272. return B(t3, n, r2, s4, c2);
  273. default:
  274. a.error("convertToFeatureSet:unknown-geometry", new s2(`Unable to parse unknown geometry type '${o}'`)), t3.length = 0;
  275. }
  276. return t3;
  277. }
  278. function X(t3, n, o, r2, s4, c2) {
  279. const l2 = t3.length;
  280. switch (o) {
  281. case "esriGeometryPoint":
  282. S(t3, n, r2, s4, c2);
  283. break;
  284. case "esriGeometryMultipoint":
  285. O(t3, n, r2, s4, c2);
  286. break;
  287. case "esriGeometryPolyline":
  288. q(t3, n, r2, s4, c2);
  289. break;
  290. case "esriGeometryPolygon":
  291. B(t3, n, r2, s4, c2);
  292. break;
  293. default:
  294. a.error("convertToFeatureSet:unknown-geometry", new s2(`Unable to parse unknown geometry type '${o}'`));
  295. }
  296. for (let e2 = 0; e2 < n.length; e2++)
  297. t3[e2 + l2].geometryType = o, t3[e2 + l2].insertAfter = n[e2].insertAfter, t3[e2 + l2].groupId = n[e2].groupId;
  298. return t3;
  299. }
  300. function ee(e2, t3, n, o) {
  301. K[0] = e2, re(J, K, t3, n, o);
  302. const r2 = J[0];
  303. return J.length = K.length = 0, r2;
  304. }
  305. function te(t3, o, u) {
  306. if (t(t3))
  307. return null;
  308. const i = new t2();
  309. if ("hasZ" in t3 && o == null && (o = t3.hasZ), "hasM" in t3 && u == null && (u = t3.hasM), l(t3)) {
  310. return v(o != null ? o : t3.z != null, u != null ? u : t3.m != null)(i, t3);
  311. }
  312. return c(t3) ? D(i, t3, o, u) : y(t3) ? $(i, t3, h(o, u)) : f(t3) ? U(i, t3, h(o, u)) : void a.error("convertFromGeometry:unknown-geometry", new s2(`Unable to parse unknown geometry type '${t3}'`));
  313. }
  314. function ne(t3, o, r2, s4) {
  315. const c2 = t3 && ("coords" in t3 ? t3 : t3.geometry);
  316. if (t(c2))
  317. return null;
  318. switch (o) {
  319. case "esriGeometryPoint": {
  320. let e2 = T;
  321. return r2 && s4 ? e2 = k : r2 ? e2 = P : s4 && (e2 = Z), e2(c2);
  322. }
  323. case "esriGeometryMultipoint":
  324. return _(c2, r2, s4);
  325. case "esriGeometryPolyline":
  326. return L(c2, r2, s4);
  327. case "esriGeometryPolygon":
  328. return C(c2, r2, s4);
  329. default:
  330. return void a.error("convertToGeometry:unknown-geometry", new s2(`Unable to parse unknown geometry type '${o}'`));
  331. }
  332. }
  333. function oe(e2, t3) {
  334. for (const n of t3)
  335. e2.push({ attributes: n.attributes });
  336. return e2;
  337. }
  338. function re(t3, o, r2, s4, c2) {
  339. if (t3.length = 0, t(r2))
  340. return oe(t3, o);
  341. switch (r2) {
  342. case "esriGeometryPoint":
  343. return z(t3, o, s4, c2);
  344. case "esriGeometryMultipoint":
  345. return Y(t3, o, s4, c2);
  346. case "esriGeometryPolyline":
  347. return A(t3, o, s4, c2);
  348. case "esriGeometryPolygon":
  349. return R(t3, o, s4, c2);
  350. default:
  351. a.error("convertToFeatureSet:unknown-geometry", new s2(`Unable to parse unknown geometry type '${r2}'`));
  352. }
  353. return t3;
  354. }
  355. function se(e2) {
  356. const { objectIdFieldName: t3, spatialReference: n, transform: o, fields: r2, hasM: s4, hasZ: c2, features: l2, geometryType: u, exceededTransferLimit: i, uniqueIdField: f2, queryGeometry: h2, queryGeometryType: a2 } = e2, g2 = { features: re([], l2, u, c2, s4), fields: r2, geometryType: u, objectIdFieldName: t3, spatialReference: n, uniqueIdField: f2, queryGeometry: ne(h2, a2, false, false) };
  357. return o && (g2.transform = o), i && (g2.exceededTransferLimit = i), s4 && (g2.hasM = s4), c2 && (g2.hasZ = c2), g2;
  358. }
  359. function ce(t3, n) {
  360. const o = new e(), { hasM: r2, hasZ: s4, features: c2, objectIdFieldName: l2, spatialReference: u, geometryType: f2, exceededTransferLimit: h2, transform: g2, fields: d2 } = t3;
  361. return d2 && (o.fields = d2), o.geometryType = f2, o.objectIdFieldName = l2 || n, o.spatialReference = u, o.objectIdFieldName ? (c2 && W(o.features, c2, f2, s4, r2, o.objectIdFieldName), h2 && (o.exceededTransferLimit = h2), r2 && (o.hasM = r2), s4 && (o.hasZ = s4), g2 && (o.transform = g2), o) : (a.error(new s2("optimized-features:invalid-objectIdFieldName", "objectIdFieldName is missing")), o);
  362. }
  363. function le(e2) {
  364. const { transform: t3, features: n, hasM: r2, hasZ: s4 } = e2;
  365. if (!t3)
  366. return e2;
  367. for (const c2 of n)
  368. r(c2.geometry) && me(c2.geometry, c2.geometry, r2, s4, t3), r(c2.centroid) && me(c2.centroid, c2.centroid, r2, s4, t3);
  369. return e2.transform = null, e2;
  370. }
  371. function ue(e2, t3) {
  372. const { geometryType: n, features: o, hasM: r2, hasZ: s4 } = t3;
  373. if (!e2)
  374. return t3;
  375. for (let c2 = 0; c2 < o.length; c2++) {
  376. const t4 = o[c2], l2 = t4.weakClone();
  377. l2.geometry = new t2(), ie(l2.geometry, t4.geometry, r2, s4, n, e2), t4.centroid && (l2.centroid = new t2(), ie(l2.centroid, t4.centroid, r2, s4, "esriGeometryPoint", e2)), o[c2] = l2;
  378. }
  379. return t3.transform = e2, t3;
  380. }
  381. function ie(e2, t3, o, r2, s4, c2, l2 = o, u = r2) {
  382. if (e2.lengths.length && (e2.lengths.length = 0), e2.coords.length && (e2.coords.length = 0), t(t3) || !t3.coords.length)
  383. return null;
  384. const i = g[s4], { coords: f2, lengths: a2 } = t3, d2 = h(o, r2), m2 = h(o && l2, r2 && u), y3 = I(o, r2, l2, u);
  385. if (!a2.length)
  386. return y3(e2.coords, f2, 0, 0, b(c2, f2[0]), M(c2, f2[1])), e2.lengths.length && (e2.lengths.length = 0), e2.coords.length = d2, e2;
  387. let p2, w2, N2, G2, T2 = 0, F2 = 0, P2 = F2;
  388. for (const n of a2) {
  389. if (n < i)
  390. continue;
  391. let t4 = 0;
  392. F2 = P2, N2 = p2 = b(c2, f2[T2]), G2 = w2 = M(c2, f2[T2 + 1]), y3(e2.coords, f2, F2, T2, N2, G2), t4++, T2 += d2, F2 += m2;
  393. for (let o2 = 1; o2 < n; o2++, T2 += d2)
  394. N2 = b(c2, f2[T2]), G2 = M(c2, f2[T2 + 1]), N2 === p2 && G2 === w2 || (y3(e2.coords, f2, F2, T2, N2 - p2, G2 - w2), F2 += m2, t4++, p2 = N2, w2 = G2);
  395. t4 >= i && (e2.lengths.push(t4), P2 = F2);
  396. }
  397. return e2.coords.length = P2, e2.coords.length ? e2 : null;
  398. }
  399. function fe(e2, t3, n, o, r2, s4, c2 = n, l2 = o) {
  400. if (e2.lengths.length && (e2.lengths.length = 0), e2.coords.length && (e2.coords.length = 0), !t3 || !t3.coords.length)
  401. return null;
  402. const u = g[r2], { coords: i, lengths: f2 } = t3, a2 = h(n, o), d2 = h(n && c2, o && l2), m2 = I(n, o, c2, l2);
  403. if (!f2.length)
  404. return m2(e2.coords, i, 0, 0, i[0], i[1]), e2.lengths.length && (e2.lengths.length = 0), e2.coords.length = a2, e2;
  405. let y3 = 0;
  406. const p2 = s4 * s4;
  407. for (const h2 of f2) {
  408. if (h2 < u) {
  409. y3 += h2 * a2;
  410. continue;
  411. }
  412. const t4 = e2.coords.length / d2, n2 = y3, o2 = y3 + (h2 - 1) * a2;
  413. m2(e2.coords, i, e2.coords.length, n2, i[n2], i[n2 + 1]), ae(e2.coords, i, a2, p2, m2, n2, o2), m2(e2.coords, i, e2.coords.length, o2, i[o2], i[o2 + 1]);
  414. const r3 = e2.coords.length / d2 - t4;
  415. r3 >= u ? e2.lengths.push(r3) : e2.coords.length = t4 * d2, y3 += h2 * a2;
  416. }
  417. return e2.coords.length ? e2 : null;
  418. }
  419. function he(e2, t3, n, o) {
  420. const r2 = e2[t3], s4 = e2[t3 + 1], c2 = e2[n], l2 = e2[n + 1], u = e2[o], i = e2[o + 1];
  421. let f2 = c2, h2 = l2, a2 = u - f2, g2 = i - h2;
  422. if (a2 !== 0 || g2 !== 0) {
  423. const e3 = ((r2 - f2) * a2 + (s4 - h2) * g2) / (a2 * a2 + g2 * g2);
  424. e3 > 1 ? (f2 = u, h2 = i) : e3 > 0 && (f2 += a2 * e3, h2 += g2 * e3);
  425. }
  426. return a2 = r2 - f2, g2 = s4 - h2, a2 * a2 + g2 * g2;
  427. }
  428. function ae(e2, t3, n, o, r2, s4, c2) {
  429. let l2, u = o, i = 0;
  430. for (let f2 = s4 + n; f2 < c2; f2 += n)
  431. l2 = he(t3, f2, s4, c2), l2 > u && (i = f2, u = l2);
  432. u > o && (i - s4 > n && ae(e2, t3, n, o, r2, s4, i), r2(e2, t3, e2.length, i, t3[i], t3[i + 1]), c2 - i > n && ae(e2, t3, n, o, r2, i, c2));
  433. }
  434. function ge(e2, t3, o, r2) {
  435. if (t(t3) || !t3.coords || !t3.coords.length)
  436. return null;
  437. const s4 = h(o, r2);
  438. let c2 = Number.POSITIVE_INFINITY, l2 = Number.POSITIVE_INFINITY, u = Number.NEGATIVE_INFINITY, i = Number.NEGATIVE_INFINITY;
  439. if (t3 && t3.coords) {
  440. const e3 = t3.coords;
  441. for (let t4 = 0; t4 < e3.length; t4 += s4) {
  442. const n = e3[t4], o2 = e3[t4 + 1];
  443. c2 = Math.min(c2, n), u = Math.max(u, n), l2 = Math.min(l2, o2), i = Math.max(i, o2);
  444. }
  445. }
  446. return e2[0] = c2, e2[1] = l2, e2[2] = u, e2[3] = i, e2;
  447. }
  448. function me(e2, t3, n, o, r2) {
  449. const { coords: s4, lengths: c2 } = t3, l2 = n ? o ? p : m : o ? m : d, u = h(n, o);
  450. if (!s4.length)
  451. return e2 !== t3 && (e2.lengths.length = 0, e2.coords.length = 0), e2;
  452. if (!c2.length)
  453. return l2(e2.coords, s4, 0, 0, w(r2, s4[0]), N(r2, s4[1])), e2 !== t3 && (e2.lengths.length = 0, e2.coords.length = u), e2;
  454. const [i, f2] = r2.scale;
  455. let a2 = 0;
  456. for (let h2 = 0; h2 < c2.length; h2++) {
  457. const t4 = c2[h2];
  458. e2.lengths[h2] = t4;
  459. let n2 = w(r2, s4[a2]), o2 = N(r2, s4[a2 + 1]);
  460. l2(e2.coords, s4, a2, a2, n2, o2), a2 += u;
  461. for (let r3 = 1; r3 < t4; r3++, a2 += u)
  462. n2 += s4[a2] * i, o2 -= s4[a2 + 1] * f2, l2(e2.coords, s4, a2, a2, n2, o2);
  463. }
  464. return e2 !== t3 && (e2.lengths.length = c2.length, e2.coords.length = s4.length), e2;
  465. }
  466. function ye(e2, t3, n, o, r2, s4) {
  467. const c2 = h(n, o), l2 = I(n, o, r2, s4), u = t3.coords;
  468. e2.coords.length = 0, e2.lengths.length = 0, e2.lengths.push(...t3.lengths);
  469. for (let i = 0; i < u.length; i += c2)
  470. l2(e2.coords, u, e2.coords.length, i, u[i], u[i + 1]);
  471. return e2;
  472. }
  473. function Ie(e2, t3, n, o) {
  474. let r2 = 0, s4 = e2[o * t3], c2 = e2[o * (t3 + 1)];
  475. for (let l2 = 1; l2 < n; l2++) {
  476. const n2 = s4 + e2[o * (t3 + l2)], u = c2 + e2[o * (t3 + l2) + 1], i = (n2 - s4) * (u + c2);
  477. s4 = n2, c2 = u, r2 += i;
  478. }
  479. return 0.5 * r2;
  480. }
  481. function be(e2, t3) {
  482. const { coords: n, lengths: o } = e2;
  483. let r2 = 0, s4 = 0;
  484. for (let c2 = 0; c2 < o.length; c2++) {
  485. s4 += Ie(n, r2, o[c2], t3), r2 += c2;
  486. }
  487. return Math.abs(s4);
  488. }
  489. function we(e2, t3) {
  490. if (t(e2))
  491. return null;
  492. const o = e2.clone(), r2 = e2.coords, s4 = e2.lengths;
  493. let c2 = 0;
  494. for (let n = 0; n < s4.length; n++) {
  495. const e3 = s4[n];
  496. let l2 = r2[t3 * c2], u = r2[t3 * c2 + 1];
  497. for (let n2 = 1; n2 < e3; n2++) {
  498. const e4 = l2 + r2[t3 * (c2 + n2)], s5 = u + r2[t3 * (c2 + n2) + 1];
  499. o.coords[t3 * (c2 + n2)] = e4, o.coords[t3 * (c2 + n2) + 1] = s5, l2 = e4, u = s5;
  500. }
  501. c2 += e3;
  502. }
  503. return o;
  504. }
  505. export {
  506. b,
  507. M,
  508. G,
  509. _,
  510. L,
  511. $,
  512. C,
  513. D,
  514. H,
  515. Q,
  516. W,
  517. X,
  518. ee,
  519. te,
  520. ne,
  521. se,
  522. ce,
  523. le,
  524. ue,
  525. ie,
  526. fe,
  527. ge,
  528. me,
  529. ye,
  530. be,
  531. we
  532. };
  533. //# sourceMappingURL=chunk-FYNVVMWY.js.map