import { C, D, W, X, z } from "./chunk-DVYEME2A.js"; import "./chunk-YINMVLPI.js"; import "./chunk-JK76NUHI.js"; import { l, o as o2 } from "./chunk-A6WD5XTM.js"; import "./chunk-OP2HNSVZ.js"; import { c } from "./chunk-AOQ55JXI.js"; import { n as n4, p as p3 } from "./chunk-X42TFXOU.js"; import "./chunk-JFSMKLAQ.js"; import "./chunk-LXOC7SMQ.js"; import { s as s2 } from "./chunk-DN6W4TJU.js"; import { u } from "./chunk-OUUXJOLT.js"; import "./chunk-NBKUI76A.js"; import "./chunk-6334AFGG.js"; import { x as x3 } from "./chunk-NLLFSKB2.js"; import "./chunk-P24XEEHY.js"; import "./chunk-3IRT3YKJ.js"; import "./chunk-SAJAEMIJ.js"; import "./chunk-S6EFEKAU.js"; import { a as a2 } from "./chunk-XEQ4FTFC.js"; import "./chunk-JM5OVQAD.js"; import { i as i2, j2 } from "./chunk-JAUFBT5U.js"; import { o as o3 } from "./chunk-W6U6FKJ3.js"; import { p as p4 } from "./chunk-7C2KDOAI.js"; import { n as n3, p2 } from "./chunk-RHFU6KWO.js"; import "./chunk-3FNKD2EB.js"; import "./chunk-ZOO4I2U4.js"; import "./chunk-JPUFJK2B.js"; import "./chunk-HZ2WKB3G.js"; import "./chunk-3HCJD762.js"; import "./chunk-RVCE264D.js"; import "./chunk-HKJ7X3BD.js"; import "./chunk-Y74D3LKQ.js"; import "./chunk-PK4W65H4.js"; import "./chunk-7C23ILQ4.js"; import { k as k2 } from "./chunk-P6VVVEX6.js"; import "./chunk-3Z755LKF.js"; import "./chunk-LTZ5XXDV.js"; import "./chunk-IEU3AM37.js"; import "./chunk-SKKBVHTF.js"; import "./chunk-DLMAGHHC.js"; import { x as x2 } from "./chunk-WD4J43GZ.js"; import "./chunk-JOYXMSKE.js"; import { a } from "./chunk-YZVAB3DF.js"; import "./chunk-JLYTER4T.js"; import "./chunk-CRHRHOXH.js"; import "./chunk-ZSW35JPD.js"; import "./chunk-JLSNMUQJ.js"; import "./chunk-ECY35CJI.js"; import "./chunk-PT62335L.js"; import { y as y2 } from "./chunk-JGBXYDGB.js"; import "./chunk-QEWF7QPH.js"; import "./chunk-PJNBFKPF.js"; import "./chunk-C7742RNZ.js"; import "./chunk-FNA5GLRW.js"; import "./chunk-MCWCB5IY.js"; import "./chunk-TV3CFJQR.js"; import "./chunk-TJV6ODRM.js"; import { v } from "./chunk-JUWKPBLS.js"; import { c as c3 } from "./chunk-WLSB4F4I.js"; import { c as c2, d, f, l as l2, m as m2, p as p5, u as u2 } from "./chunk-GLSWDDR3.js"; import { O } from "./chunk-MIQGEDET.js"; import "./chunk-DUEMJ5XS.js"; import "./chunk-VRLXUHP2.js"; import "./chunk-3LVSQLWJ.js"; import "./chunk-4ONPMX2F.js"; import { F, x as x4 } from "./chunk-CRGY2SDS.js"; import "./chunk-4T5ZGMEN.js"; import { p } from "./chunk-GN35O2ZO.js"; import { n as n2 } from "./chunk-XTVKPAWY.js"; import "./chunk-3OSQ6GXO.js"; import "./chunk-3WQOA5CB.js"; import { t } from "./chunk-PLWDAYK7.js"; import "./chunk-FZQZIM7U.js"; import "./chunk-CZBRZ6SU.js"; import "./chunk-VGWC3IKZ.js"; import "./chunk-2H5MD622.js"; import "./chunk-3RSFVUKZ.js"; import "./chunk-UVVU4UUO.js"; import "./chunk-HWSWTWZD.js"; import "./chunk-O6VYMEIX.js"; import "./chunk-X4SA4ELJ.js"; import "./chunk-5N7JLUJJ.js"; import "./chunk-ZAY3CMAZ.js"; import "./chunk-P3XKUGLS.js"; import "./chunk-2ZSOO377.js"; import "./chunk-YUA3AHKR.js"; import "./chunk-LU5IJZB4.js"; import "./chunk-7IBV2TRE.js"; import "./chunk-ZLNEXZAN.js"; import "./chunk-5UVJ64RB.js"; import "./chunk-SFEFRQCL.js"; import { b } from "./chunk-DXVOOCG4.js"; import "./chunk-3GZSQU56.js"; import "./chunk-ZYRIJWLX.js"; import "./chunk-RYY6632W.js"; import "./chunk-DW42UVIT.js"; import "./chunk-YAEIHDJH.js"; import "./chunk-TJNOJH33.js"; import "./chunk-OSHI574D.js"; import "./chunk-ETGAZ7LF.js"; import { i } from "./chunk-75U5LM2V.js"; import "./chunk-RMDDCMKS.js"; import "./chunk-VCH45Q2I.js"; import "./chunk-LBW34VZ2.js"; import "./chunk-GSSTTHIT.js"; import { m } from "./chunk-YFSLJIO4.js"; import "./chunk-IM3LVQXV.js"; import "./chunk-55RWC67C.js"; import "./chunk-HZRKBTHJ.js"; import "./chunk-DVUG3KID.js"; import "./chunk-FWSQEIAR.js"; import { j } from "./chunk-VEGAOVMY.js"; import { w2 as w } from "./chunk-6T6G6LCQ.js"; import "./chunk-YEJL5NEF.js"; import { k2 as k, r as r2 } from "./chunk-PQFTYGF5.js"; import { e, n5 as n, y3 as y } from "./chunk-2Z2TG5CU.js"; import "./chunk-6KZ2LTDA.js"; import "./chunk-U2XHEJM7.js"; import { T } from "./chunk-SQOPWYIT.js"; import { E, x } from "./chunk-V6P2MAQQ.js"; import { s3 as s } from "./chunk-E5O6P5I2.js"; import { has, o } from "./chunk-SPWQ3AWG.js"; import "./chunk-2TIUKVZN.js"; import { e as e2, r } from "./chunk-YXWMMD76.js"; import "./chunk-S5KM4IGW.js"; // node_modules/@arcgis/core/layers/graphics/sources/WFSSource.js var F2 = class extends a(m) { constructor() { super(...arguments), this._connection = null, this.capabilities = l(false, false), this.type = "wfs", this.refresh = x(async (e3) => { await this.load(); const { extent: t2 } = await this._connection.invoke("refresh", e3); return t2 && (this.sourceJSON.extent = t2), { dataChanged: true, updates: { extent: this.sourceJSON.extent } }; }); } load(e3) { const t2 = r(e3) ? e3.signal : null; return this.addResolvingPromise(this._startWorker({ signal: t2 })), Promise.resolve(this); } destroy() { var _a; (_a = this._connection) == null ? void 0 : _a.close(), this._connection = null; } async openPorts() { return await this.load(), this._connection.openPorts(); } async queryFeatures(e3, t2 = {}) { await this.load(t2); const r3 = await this._connection.invoke("queryFeatures", e3 ? e3.toJSON() : null, t2); return x3.fromJSON(r3); } async queryFeaturesJSON(e3, t2 = {}) { return await this.load(t2), this._connection.invoke("queryFeatures", e3 ? e3.toJSON() : null, t2); } async queryFeatureCount(e3, t2 = {}) { return await this.load(t2), this._connection.invoke("queryFeatureCount", e3 ? e3.toJSON() : null, t2); } async queryObjectIds(e3, t2 = {}) { return await this.load(t2), this._connection.invoke("queryObjectIds", e3 ? e3.toJSON() : null, t2); } async queryExtent(e3, t2 = {}) { await this.load(t2); const r3 = await this._connection.invoke("queryExtent", e3 ? e3.toJSON() : null, t2); return { count: r3.count, extent: w.fromJSON(r3.extent) }; } async querySnapping(e3, t2 = {}) { return await this.load(t2), this._connection.invoke("querySnapping", e3, t2); } async _createLoadOptions(e3) { var _a, _b; const { url: r3, customParameters: o4, name: s3, namespaceUri: i3, spatialReference: n5, fields: c4, geometryType: p6, swapXY: l3 } = this.layer; if (!r3) throw new s("wfs-layer:missing-url", "WFSLayer must be created with a url"); this.wfsCapabilities || (this.wfsCapabilities = await D(r3, { customParameters: o4, ...e3 })); const m3 = ["fields", "geometryType", "name", "namespaceUri", "spatialReference", "swapXY"].some((e4) => null == this.layer[e4]), y3 = m3 ? await X(this.wfsCapabilities, s3, i3, { spatialReference: n5, customParameters: o4, signal: e3 == null ? void 0 : e3.signal }) : { ...z(c4 != null ? c4 : []), geometryType: p6, name: s3, namespaceUri: i3, spatialReference: n5, swapXY: l3 }, g = e2(W(this.wfsCapabilities.readFeatureTypes(), y3.name, y3.namespaceUri)), S = i.toJSON(y3.geometryType); return { customParameters: o4, featureType: g, fields: (_b = (_a = y3.fields) == null ? void 0 : _a.map((e4) => e4.toJSON())) != null ? _b : [], geometryField: y3.geometryField, geometryType: S, getFeatureUrl: this.wfsCapabilities.operations.GetFeature.url, getFeatureOutputFormat: this.wfsCapabilities.operations.GetFeature.outputFormat, objectIdField: y3.objectIdField, spatialReference: y3.spatialReference.toJSON(), swapXY: !!y3.swapXY }; } async _startWorker(e3) { const [t2, r3] = await E([this._createLoadOptions(e3), u("WFSSourceWorker", { ...e3, strategy: has("feature-layers-workers") ? "dedicated" : "local" })]), o4 = t2.error || r3.error || null, s3 = r3.value || null; if (o4) throw s3 && s3.close(), o4; const a3 = t2.value; this._connection = r3.value; const { extent: i3 } = await this._connection.invoke("load", a3, e3); this.sourceJSON = { extent: i3, fields: a3.fields, geometryType: a3.geometryType, objectIdField: a3.objectIdField, geometryField: a3.geometryField, drawingInfo: o2(a3.geometryType), name: a3.featureType.title, wfsInfo: { name: a3.featureType.name, featureUrl: a3.getFeatureUrl, maxFeatures: 3e3, swapXY: a3.swapXY, supportedSpatialReferences: a3.featureType.supportedSpatialReferences, version: "2.0.0", wfsNamespace: a3.featureType.namespaceUri } }; } }; e([y()], F2.prototype, "capabilities", void 0), e([y({ constructOnly: true })], F2.prototype, "layer", void 0), e([y()], F2.prototype, "sourceJSON", void 0), e([y()], F2.prototype, "type", void 0), e([y()], F2.prototype, "wfsCapabilities", void 0), F2 = e([n("esri.layers.graphics.sources.WFSSource")], F2); // node_modules/@arcgis/core/layers/WFSLayer.js var J; var M = s2(); var _ = J = class extends c(o3(n4(p3(n2(a2(p(t(c3(v(O(b))))))))))) { constructor(e3) { super(e3), this.copyright = null, this.customParameters = null, this.definitionExpression = null, this.displayField = null, this.elevationInfo = null, this.featureUrl = void 0, this.fields = null, this.fieldsIndex = null, this.fullExtent = null, this.geometryType = null, this.labelsVisible = true, this.labelingInfo = null, this.legendEnabled = true, this.objectIdField = null, this.operationalLayerType = "WFS", this.maxFeatures = 3e3, this.mode = 0, this.name = null, this.namespaceUri = null, this.outFields = null, this.popupEnabled = true, this.popupTemplate = null, this.screenSizePerspectiveEnabled = true, this.source = new F2({ layer: this }), this.spatialReference = k.WGS84, this.spatialReferences = [4326], this.swapXY = void 0, this.title = "WFS", this.type = "wfs", this.url = null, this.version = void 0; } static fromWFSLayerInfo(e3) { const { customParameters: r3, fields: t2, geometryField: i3, geometryType: o4, name: s3, namespaceUri: n5, objectIdField: p6, spatialReference: a3, swapXY: l3, url: d2, wfsCapabilities: m3 } = e3; return new J({ customParameters: r3, fields: t2, geometryField: i3, geometryType: o4, name: s3, namespaceUri: n5, objectIdField: p6, spatialReference: a3, swapXY: l3, url: d2, wfsCapabilities: m3 }); } destroy() { var _a; (_a = this.source) == null ? void 0 : _a.destroy(); } load(e3) { return this.addResolvingPromise(this.loadFromPortal({ supportedTypes: ["WFS"] }, e3).then(() => this.source.load(e3)).then(() => { this.read(this.source.sourceJSON, { origin: "service", url: this.parsedUrl }), this.revert(["objectIdField", "fields", "timeInfo", "spatialReference", "name", "namespaceUri"], "service"), F(this.renderer, this.fieldsIndex), x4(this.timeInfo, this.fieldsIndex); })), Promise.resolve(this); } get capabilities() { var _a; return (_a = this.source) == null ? void 0 : _a.capabilities; } get createQueryVersion() { return this.commitProperty("definitionExpression"), this.commitProperty("timeExtent"), this.commitProperty("timeOffset"), this.commitProperty("geometryType"), this.commitProperty("capabilities"), (this._get("createQueryVersion") || 0) + 1; } get defaultPopupTemplate() { return this.createPopupTemplate(); } writeFields(e3, r3, t2) { const i3 = e3.filter((e4) => e4.name !== C); this.geometryField && i3.unshift(new y2({ name: this.geometryField, alias: this.geometryField, type: "geometry" })), o(t2, i3.map((e4) => e4.toJSON()), r3); } get parsedUrl() { return j(this.url); } set renderer(e3) { F(e3, this.fieldsIndex), this._set("renderer", e3); } get wfsCapabilities() { var _a; return (_a = this.source) == null ? void 0 : _a.wfsCapabilities; } set wfsCapabilities(e3) { this.source && (this.source.wfsCapabilities = e3); } createPopupTemplate(e3) { return p4(this, e3); } createQuery() { const e3 = new x2(); e3.returnGeometry = true, e3.outFields = ["*"], e3.where = this.definitionExpression || "1=1"; const { timeOffset: r3, timeExtent: t2 } = this; return e3.timeExtent = null != r3 && null != t2 ? t2.offset(-r3.value, r3.unit) : t2 || null, e3; } getFieldDomain(e3, r3) { var _a; return (_a = this.getField(e3)) == null ? void 0 : _a.domain; } getField(e3) { var _a; return (_a = this.fieldsIndex) == null ? void 0 : _a.get(e3); } queryFeatures(e3, r3) { return this.load().then(() => this.source.queryFeatures(x2.from(e3) || this.createQuery(), r3)).then((e4) => { if (e4 == null ? void 0 : e4.features) for (const r4 of e4.features) r4.layer = r4.sourceLayer = this; return e4; }); } queryObjectIds(e3, r3) { return this.load().then(() => this.source.queryObjectIds(x2.from(e3) || this.createQuery(), r3)); } queryFeatureCount(e3, r3) { return this.load().then(() => this.source.queryFeatureCount(x2.from(e3) || this.createQuery(), r3)); } queryExtent(e3, r3) { return this.load().then(() => this.source.queryExtent(x2.from(e3) || this.createQuery(), r3)); } async hasDataChanged() { try { const { dataChanged: e3, updates: r3 } = await this.source.refresh(this.customParameters); return r(r3) && this.read(r3, { origin: "service", url: this.parsedUrl, ignoreDefaults: true }), e3; } catch { } return false; } }; e([y({ readOnly: true })], _.prototype, "capabilities", null), e([y({ type: String })], _.prototype, "copyright", void 0), e([y({ readOnly: true })], _.prototype, "createQueryVersion", null), e([y({ json: { name: "wfsInfo.customParameters", write: { ignoreOrigin: true } } })], _.prototype, "customParameters", void 0), e([y({ readOnly: true })], _.prototype, "defaultPopupTemplate", null), e([y({ type: String, json: { name: "layerDefinition.definitionExpression", write: { enabled: true, allowNull: true } } })], _.prototype, "definitionExpression", void 0), e([y({ type: String })], _.prototype, "displayField", void 0), e([y(d)], _.prototype, "elevationInfo", void 0), e([y({ type: String, readOnly: true, json: { name: "wfsInfo.featureUrl", write: { ignoreOrigin: true, isRequired: true } } })], _.prototype, "featureUrl", void 0), e([y({ type: [y2], json: { name: "layerDefinition.fields", write: { ignoreOrigin: true, isRequired: true }, origins: { service: { name: "fields" } } } })], _.prototype, "fields", void 0), e([r2("fields")], _.prototype, "writeFields", null), e([y(M.fieldsIndex)], _.prototype, "fieldsIndex", void 0), e([y({ type: w, json: { name: "extent" } })], _.prototype, "fullExtent", void 0), e([y()], _.prototype, "geometryField", void 0), e([y({ type: String, json: { read: { source: "layerDefinition.geometryType", reader: i.read }, write: { target: "layerDefinition.geometryType", writer: i.write, ignoreOrigin: true }, origins: { service: { read: i.read } } } })], _.prototype, "geometryType", void 0), e([y({ type: String })], _.prototype, "id", void 0), e([y(m2)], _.prototype, "labelsVisible", void 0), e([y({ type: [j2], json: { name: "layerDefinition.drawingInfo.labelingInfo", read: { reader: i2 }, write: true } })], _.prototype, "labelingInfo", void 0), e([y(c2)], _.prototype, "legendEnabled", void 0), e([y({ type: ["show", "hide"] })], _.prototype, "listMode", void 0), e([y({ type: String })], _.prototype, "objectIdField", void 0), e([y({ type: ["WFS"] })], _.prototype, "operationalLayerType", void 0), e([y({ type: T, json: { name: "wfsInfo.maxFeatures", write: { ignoreOrigin: true, isRequired: true } } })], _.prototype, "maxFeatures", void 0), e([y({ type: [0], readOnly: true, json: { origins: { "web-map": { write: { ignoreOrigin: true, isRequired: true } } } } })], _.prototype, "mode", void 0), e([y({ type: String, json: { name: "wfsInfo.name", write: { ignoreOrigin: true, isRequired: true } } })], _.prototype, "name", void 0), e([y({ type: String, json: { name: "wfsInfo.wfsNamespace", write: { ignoreOrigin: true, isRequired: true } } })], _.prototype, "namespaceUri", void 0), e([y(u2)], _.prototype, "opacity", void 0), e([y(M.outFields)], _.prototype, "outFields", void 0), e([y({ readOnly: true })], _.prototype, "parsedUrl", null), e([y(p5)], _.prototype, "popupEnabled", void 0), e([y({ type: k2, json: { name: "popupInfo", write: true } })], _.prototype, "popupTemplate", void 0), e([y({ types: p2, json: { origins: { service: { name: "drawingInfo.renderer" }, "web-scene": { types: n3, name: "layerDefinition.drawingInfo.renderer", write: true } }, name: "layerDefinition.drawingInfo.renderer", write: { ignoreOrigin: true } } })], _.prototype, "renderer", null), e([y(l2)], _.prototype, "screenSizePerspectiveEnabled", void 0), e([y({ readOnly: true })], _.prototype, "source", void 0), e([y({ type: k, json: { name: "layerDefinition.spatialReference", write: { ignoreOrigin: true, isRequired: true }, origins: { service: { name: "extent.spatialReference" } } } })], _.prototype, "spatialReference", void 0), e([y({ readOnly: true, type: [T], json: { name: "wfsInfo.supportedSpatialReferences", write: { ignoreOrigin: true, isRequired: true } } })], _.prototype, "spatialReferences", void 0), e([y({ type: Boolean, value: false, json: { name: "wfsInfo.swapXY", write: { ignoreOrigin: true, isRequired: true } } })], _.prototype, "swapXY", void 0), e([y({ json: { write: { ignoreOrigin: true, isRequired: true }, origins: { service: { name: "name" } } } })], _.prototype, "title", void 0), e([y({ json: { read: false }, readOnly: true })], _.prototype, "type", void 0), e([y(f)], _.prototype, "url", void 0), e([y({ type: String, readOnly: true, json: { name: "wfsInfo.version", write: { ignoreOrigin: true, isRequired: true } } })], _.prototype, "version", void 0), e([y()], _.prototype, "wfsCapabilities", null), _ = J = e([n("esri.layers.WFSLayer")], _); var k3 = _; export { k3 as default }; //# sourceMappingURL=WFSLayer-4H7O247D.js.map