import { f, i, o } from "./chunk-FMPQIGFA.js"; import { j } from "./chunk-LU5IJZB4.js"; import "./chunk-7IBV2TRE.js"; import "./chunk-5UVJ64RB.js"; import "./chunk-SFEFRQCL.js"; import { c } from "./chunk-RMDDCMKS.js"; import "./chunk-VCH45Q2I.js"; import "./chunk-YFSLJIO4.js"; import "./chunk-55RWC67C.js"; import "./chunk-HZRKBTHJ.js"; import { U } from "./chunk-DVUG3KID.js"; import "./chunk-FWSQEIAR.js"; import "./chunk-VEGAOVMY.js"; import "./chunk-6T6G6LCQ.js"; import "./chunk-YEJL5NEF.js"; import "./chunk-PQFTYGF5.js"; import { e, l3 as l, n5 as n, y3 as y } from "./chunk-2Z2TG5CU.js"; import "./chunk-6KZ2LTDA.js"; import "./chunk-U2XHEJM7.js"; import { b } from "./chunk-SQOPWYIT.js"; import "./chunk-V6P2MAQQ.js"; import { s, s3 as s2 } from "./chunk-E5O6P5I2.js"; import "./chunk-SPWQ3AWG.js"; import "./chunk-2TIUKVZN.js"; import "./chunk-YXWMMD76.js"; import "./chunk-S5KM4IGW.js"; // node_modules/@arcgis/core/rest/support/ProjectParameters.js var i2 = class extends l { constructor(r) { super(r), this.geometries = null, this.outSpatialReference = null, this.transformation = null, this.transformForward = null; } toJSON() { const r = this.geometries.map((r2) => r2.toJSON()), t = this.geometries[0], o2 = {}; return o2.outSR = this.outSpatialReference.wkid || JSON.stringify(this.outSpatialReference.toJSON()), o2.inSR = t.spatialReference.wkid || JSON.stringify(t.spatialReference.toJSON()), o2.geometries = JSON.stringify({ geometryType: c(t), geometries: r }), this.transformation && (o2.transformation = this.transformation.wkid || JSON.stringify(this.transformation)), null != this.transformForward && (o2.transformForward = this.transformForward), o2; } }; e([y()], i2.prototype, "geometries", void 0), e([y({ json: { read: { source: "outSR" } } })], i2.prototype, "outSpatialReference", void 0), e([y()], i2.prototype, "transformation", void 0), e([y()], i2.prototype, "transformForward", void 0), i2 = e([n("esri.rest.support.ProjectParameters")], i2); var a = i2; // node_modules/@arcgis/core/rest/geometryService/project.js var i3 = b(a); async function n2(o2, m, n4) { m = i3(m); const u = f(o2), c2 = { ...u.query, f: "json", ...m.toJSON() }, j2 = m.outSpatialReference, a3 = c(m.geometries[0]), f2 = i(c2, n4); return U(u.path + "/project", f2).then(({ data: { geometries: r } }) => o(r, a3, j2)); } // node_modules/@arcgis/core/portal/support/geometryServiceUtils.js async function n3(o2 = null, i4) { var _a, _b; if (s.geometryServiceUrl) return s.geometryServiceUrl; if (!o2) throw new s2("internal:geometry-service-url-not-configured"); let n4; n4 = "portal" in o2 ? o2.portal || j.getDefault() : o2, await n4.load({ signal: i4 }); const a3 = (_b = (_a = n4.helperServices) == null ? void 0 : _a.geometry) == null ? void 0 : _b.url; if (!a3) throw new s2("internal:geometry-service-url-not-configured"); return a3; } async function a2(r, t, a3 = null, l2) { const c2 = await n3(a3, l2), s3 = new a(); s3.geometries = [r], s3.outSpatialReference = t; const m = await n2(c2, s3, { signal: l2 }); if (m && Array.isArray(m) && 1 === m.length) return m[0]; throw new s2("internal:geometry-service-projection-failed"); } export { n3 as getGeometryServiceURL, a2 as projectGeometry }; //# sourceMappingURL=geometryServiceUtils-Y3BMMDSB.js.map