{"version":3,"sources":["node_modules/@arcgis/core/rest/geometryService/cut.js","node_modules/@arcgis/core/rest/geometryService/simplify.js","node_modules/@arcgis/core/geometry/support/normalizeUtils.js"],"sourcesContent":["/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.31/esri/copyright.txt for details.\n*/\nimport \"../../geometry.js\";\nimport e from \"../../request.js\";\nimport { getJsonType as t, fromJSON as r } from \"../../geometry/support/jsonUtils.js\";\nimport { srToRESTValue as s } from \"../../geometry/support/spatialReferenceUtils.js\";\nimport { parseUrl as o } from \"../utils.js\";\nasync function i(i, n, p, m) {\n const a = o(i),\n u = n[0].spatialReference,\n c = {\n ...m,\n responseType: \"json\",\n query: {\n ...a.query,\n f: \"json\",\n sr: s(u),\n target: JSON.stringify({\n geometryType: t(n[0]),\n geometries: n\n }),\n cutter: JSON.stringify(p)\n }\n },\n f = await e(a.path + \"/cut\", c),\n {\n cutIndexes: y,\n geometries: g = []\n } = f.data;\n return {\n cutIndexes: y,\n geometries: g.map(e => {\n const t = r(e);\n return t.spatialReference = u, t;\n })\n };\n}\nexport { i as cut };","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.31/esri/copyright.txt for details.\n*/\nimport r from \"../../request.js\";\nimport { urlToObject as t } from \"../../core/urlUtils.js\";\nimport { getJsonType as e } from \"../../geometry/support/jsonUtils.js\";\nimport { srToRESTValue as s } from \"../../geometry/support/spatialReferenceUtils.js\";\nimport { encodeGeometries as o, decodeGeometries as i } from \"./utils.js\";\nasync function m(m, p, f) {\n const n = \"string\" == typeof m ? t(m) : m,\n a = p[0].spatialReference,\n u = e(p[0]),\n l = {\n ...f,\n query: {\n ...n.query,\n f: \"json\",\n sr: s(a),\n geometries: JSON.stringify(o(p))\n }\n },\n {\n data: y\n } = await r(n.path + \"/simplify\", l);\n return i(y.geometries, u, a);\n}\nexport { m as simplify };","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.31/esri/copyright.txt for details.\n*/\nimport t from \"../../config.js\";\nimport e from \"../../core/Error.js\";\nimport n from \"../../core/Logger.js\";\nimport o from \"../Polygon.js\";\nimport s from \"../Polyline.js\";\nimport { getGeometryParts as r, cutParams as i, offsetMagnitude as l, updatePolyGeometry as c } from \"./normalizeUtilsCommon.js\";\nimport { getInfo as f } from \"./spatialReferenceUtils.js\";\nimport { geographicToWebMercator as u, webMercatorToGeographic as p } from \"./webMercatorUtils.js\";\nimport { cut as a } from \"../../rest/geometryService/cut.js\";\nimport { simplify as h } from \"../../rest/geometryService/simplify.js\";\nconst m = () => n.getLogger(\"esri.geometry.support.normalizeUtils\");\nfunction g(t) {\n return \"polygon\" === t.type;\n}\nfunction y(t) {\n return \"polygon\" === t[0].type;\n}\nfunction x(t) {\n return \"polyline\" === t[0].type;\n}\nfunction d(t) {\n const e = [];\n let n = 0,\n o = 0;\n for (let s = 0; s < t.length; s++) {\n const r = t[s];\n let i = null;\n for (let t = 0; t < r.length; t++) i = r[t], e.push(i), 0 === t ? (n = i[0], o = n) : (n = Math.min(n, i[0]), o = Math.max(o, i[0]));\n i && e.push([(n + o) / 2, 0]);\n }\n return e;\n}\nfunction M(t, n) {\n if (!(t instanceof s || t instanceof o)) {\n const t = \"straightLineDensify: the input geometry is neither polyline nor polygon\";\n throw m().error(t), new e(t);\n }\n const i = r(t),\n l = [];\n for (const e of i) {\n const t = [];\n l.push(t), t.push([e[0][0], e[0][1]]);\n for (let o = 0; o < e.length - 1; o++) {\n const s = e[o][0],\n r = e[o][1],\n i = e[o + 1][0],\n l = e[o + 1][1],\n c = Math.sqrt((i - s) * (i - s) + (l - r) * (l - r)),\n f = (l - r) / c,\n u = (i - s) / c,\n p = c / n;\n if (p > 1) {\n for (let l = 1; l <= p - 1; l++) {\n const e = l * n,\n o = u * e + s,\n i = f * e + r;\n t.push([o, i]);\n }\n const e = (c + Math.floor(p - 1) * n) / 2,\n o = u * e + s,\n i = f * e + r;\n t.push([o, i]);\n }\n t.push([i, l]);\n }\n }\n return g(t) ? new o({\n rings: l,\n spatialReference: t.spatialReference\n }) : new s({\n paths: l,\n spatialReference: t.spatialReference\n });\n}\nfunction w(t, e, n) {\n if (e) {\n const e = M(t, 1e6);\n t = p(e, !0);\n }\n return n && (t = c(t, n)), t;\n}\nfunction b(t, e, n) {\n if (Array.isArray(t)) {\n const o = t[0];\n if (o > e) {\n const n = l(o, e);\n t[0] = o + n * (-2 * e);\n } else if (o < n) {\n const e = l(o, n);\n t[0] = o + e * (-2 * n);\n }\n } else {\n const o = t.x;\n if (o > e) {\n const n = l(o, e);\n t = t.clone().offset(n * (-2 * e), 0);\n } else if (o < n) {\n const e = l(o, n);\n t = t.clone().offset(e * (-2 * n), 0);\n }\n }\n return t;\n}\nfunction j(t, e) {\n let n = -1;\n for (let o = 0; o < e.cutIndexes.length; o++) {\n const s = e.cutIndexes[o],\n i = e.geometries[o],\n c = r(i);\n for (let t = 0; t < c.length; t++) {\n const e = c[t];\n e.some(n => {\n if (n[0] < 180) return !0;\n {\n let n = 0;\n for (let t = 0; t < e.length; t++) {\n const o = e[t][0];\n n = o > n ? o : n;\n }\n n = Number(n.toFixed(9));\n const o = -360 * l(n, 180);\n for (let s = 0; s < e.length; s++) {\n const e = i.getPoint(t, s);\n i.setPoint(t, s, e.clone().offset(o, 0));\n }\n return !0;\n }\n });\n }\n if (s === n) {\n if (y(t)) for (const e of r(i)) t[s] = t[s].addRing(e);else if (x(t)) for (const e of r(i)) t[s] = t[s].addPath(e);\n } else n = s, t[s] = i;\n }\n return t;\n}\nasync function R(e, n, r) {\n if (!Array.isArray(e)) return R([e], n);\n n && \"string\" != typeof n && m().warn(\"normalizeCentralMeridian()\", \"The url object is deprecated, use the url string instead\");\n const p = \"string\" == typeof n ? n : n?.url ?? t.geometryServiceUrl;\n let g,\n y,\n x,\n d,\n M,\n v,\n P,\n L,\n U = 0;\n const z = [],\n A = [];\n for (const t of e) if (null != t) {\n if (g || (g = t.spatialReference, y = f(g), x = g.isWebMercator, v = x ? 102100 : 4326, d = i[v].maxX, M = i[v].minX, P = i[v].plus180Line, L = i[v].minus180Line), y) {\n if (\"mesh\" === t.type) A.push(t);else if (\"point\" === t.type) A.push(b(t.clone(), d, M));else if (\"multipoint\" === t.type) {\n const e = t.clone();\n e.points = e.points.map(t => b(t, d, M)), A.push(e);\n } else if (\"extent\" === t.type) {\n const e = t.clone()._normalize(!1, !1, y);\n A.push(e.rings ? new o(e) : e);\n } else if (t.extent) {\n const e = t.extent,\n n = l(e.xmin, M) * (2 * d);\n let o = 0 === n ? t.clone() : c(t.clone(), n);\n e.offset(n, 0);\n let {\n xmin: s,\n xmax: r\n } = e;\n s = Number(s.toFixed(9)), r = Number(r.toFixed(9)), e.intersects(P) && r !== d ? (U = r > U ? r : U, o = w(o, x), z.push(o), A.push(\"cut\")) : e.intersects(L) && s !== M ? (U = r * (2 * d) > U ? r * (2 * d) : U, o = w(o, x, 360), z.push(o), A.push(\"cut\")) : A.push(o);\n } else A.push(t.clone());\n } else A.push(t);\n } else A.push(t);\n let F = l(U, d),\n N = -90;\n const S = F,\n k = new s();\n for (; F > 0;) {\n const t = 360 * F - 180;\n k.addPath([[t, N], [t, -1 * N]]), N *= -1, F--;\n }\n if (z.length > 0 && S > 0) {\n const t = j(z, await a(p, z, k, r)),\n n = [],\n o = [];\n for (let r = 0; r < A.length; r++) {\n const s = A[r];\n if (\"cut\" !== s) o.push(s);else {\n const s = t.shift(),\n i = e[r];\n null != i && \"polygon\" === i.type && i.rings && i.rings.length > 1 && s.rings.length >= i.rings.length ? (n.push(s), o.push(\"simplify\")) : o.push(x ? u(s) : s);\n }\n }\n if (!n.length) return o;\n const s = await h(p, n, r),\n i = [];\n for (let e = 0; e < o.length; e++) {\n const t = o[e];\n \"simplify\" !== t ? i.push(t) : i.push(x ? u(s.shift()) : s.shift());\n }\n return i;\n }\n const C = [];\n for (let t = 0; t < A.length; t++) {\n const e = A[t];\n if (\"cut\" !== e) C.push(e);else {\n const t = z.shift();\n C.push(!0 === x ? u(t) : t);\n }\n }\n return C;\n}\nfunction v(t) {\n if (!t) return null;\n const e = t.extent;\n if (!e) return null;\n const n = t.spatialReference && f(t.spatialReference);\n if (!n) return e;\n const [o, s] = n.valid,\n r = 2 * s,\n {\n width: i\n } = e;\n let l,\n {\n xmin: c,\n xmax: u\n } = e;\n if ([c, u] = [u, c], \"extent\" === t.type || 0 === i || i <= s || i > r || c < o || u > s) return e;\n switch (t.type) {\n case \"polygon\":\n if (!(t.rings.length > 1)) return e;\n l = d(t.rings);\n break;\n case \"polyline\":\n if (!(t.paths.length > 1)) return e;\n l = d(t.paths);\n break;\n case \"multipoint\":\n l = t.points;\n }\n const p = e.clone();\n for (let f = 0; f < l.length; f++) {\n let t = l[f][0];\n t < 0 ? (t += s, u = Math.max(t, u)) : (t -= s, c = Math.min(t, c));\n }\n return p.xmin = c, p.xmax = u, p.width < i ? (p.xmin -= s, p.xmax -= s, p) : e;\n}\nfunction P(t, e, n) {\n const o = f(n);\n if (null == o) return t;\n const [s, r] = o.valid,\n i = 2 * r;\n let l = 0,\n c = 0;\n e > r ? l = Math.ceil(Math.abs(e - r) / i) : e < s && (l = -Math.ceil(Math.abs(e - s) / i)), t > r ? c = Math.ceil(Math.abs(t - r) / i) : t < s && (c = -Math.ceil(Math.abs(t - s) / i));\n let u = t + (l - c) * i;\n const p = u - e;\n return p > r ? u -= i : p < s && (u += i), u;\n}\nfunction L(t, e) {\n const n = f(e);\n if (n) {\n const [e, o] = n.valid,\n s = o - e;\n if (t < e) for (; t < e;) t += s;\n if (t > o) for (; t > o;) t -= s;\n }\n return t;\n}\nexport { P as getClosestDenormalizedXToReference, v as getDenormalizedExtent, R as normalizeCentralMeridian, L as normalizeMapX, M as straightLineDensify };"],"mappings":"4gBASA,SAAeA,EAAEA,EAAGC,EAAGC,EAAGC,EAAG,QAAAC,EAAA,sBAC3B,IAAMC,EAAIC,EAAEN,CAAC,EACXO,EAAIN,EAAE,CAAC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AG,CAClB,IAAMO,EAAIF,EAAEL,CAAC,EACb,GAAYO,GAAR,KAAW,OAAOL,EACtB,GAAM,CAACM,EAAGC,CAAC,EAAIF,EAAE,MACfG,EAAI,EAAID,EACNI,EAAI,EACNC,EAAI,EACNR,EAAIG,EAAII,EAAI,KAAK,KAAK,KAAK,IAAIP,EAAIG,CAAC,EAAIC,CAAC,EAAIJ,EAAIE,IAAMK,EAAI,CAAC,KAAK,KAAK,KAAK,IAAIP,EAAIE,CAAC,EAAIE,CAAC,GAAIR,EAAIO,EAAIK,EAAI,KAAK,KAAK,KAAK,IAAIZ,EAAIO,CAAC,EAAIC,CAAC,EAAIR,EAAIM,IAAMM,EAAI,CAAC,KAAK,KAAK,KAAK,IAAIZ,EAAIM,CAAC,EAAIE,CAAC,GACtL,IAAIM,EAAId,GAAKW,EAAIC,GAAKJ,EAChB,EAAIM,EAAIV,EACd,OAAO,EAAIG,EAAIO,GAAKN,EAAI,EAAIF,IAAMQ,GAAKN,GAAIM,CAC7C,CACA,SAASQ,GAAEtB,EAAGI,EAAG,CACf,IAAMN,EAAIK,EAAEC,CAAC,EACb,GAAIN,EAAG,CACL,GAAM,CAACM,EAAGC,CAAC,EAAIP,EAAE,MACfQ,EAAID,EAAID,EACV,GAAIJ,EAAII,EAAG,KAAOJ,EAAII,GAAIJ,GAAKM,EAC/B,GAAIN,EAAIK,EAAG,KAAOL,EAAIK,GAAIL,GAAKM,CACjC,CACA,OAAON,CACT","names":["i","n","p","m","__async","a","f","u","c","__spreadProps","__spreadValues","U","y","g","e","t","m","p","f","__async","I","a","u","l","__spreadProps","__spreadValues","c","r","y","U","o","m","n","g","t","y","x","d","e","o","s","r","i","M","v","l","c","f","u","p","w","j","b","R","__async","P","L","U","z","A","F","N","S","k","C"],"x_google_ignoreList":[0,1,2]}