import { F, I, N, S, T, j, k as k2, v, x as x2 } from "./chunk-C4RSV5VB.js"; import "./chunk-JK76NUHI.js"; import "./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 { x as x3 } from "./chunk-NLLFSKB2.js"; import "./chunk-JKFWEHNK.js"; import "./chunk-EDHROVWI.js"; import "./chunk-3IRT3YKJ.js"; import { a } from "./chunk-XEQ4FTFC.js"; import "./chunk-JM5OVQAD.js"; import { i as i2 } from "./chunk-WWXZOC2Y.js"; import { n as n5 } from "./chunk-NQA5XJGK.js"; import "./chunk-EKYSPJO6.js"; import { i as i3, j2 } from "./chunk-JAUFBT5U.js"; import { o } 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 k3 } 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 } from "./chunk-WD4J43GZ.js"; import "./chunk-JOYXMSKE.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 as v2 } from "./chunk-JUWKPBLS.js"; import { c as c3 } from "./chunk-WLSB4F4I.js"; import { c as c2, d, f, l, m as m2, p as p5 } 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 as F2, 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 as t3 } 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-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, t as t2 } 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 "./chunk-VEGAOVMY.js"; import { w2 as w } from "./chunk-6T6G6LCQ.js"; import "./chunk-YEJL5NEF.js"; import { k2 as k } 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 "./chunk-SQOPWYIT.js"; import "./chunk-V6P2MAQQ.js"; import { s3 as s } from "./chunk-E5O6P5I2.js"; import "./chunk-SPWQ3AWG.js"; import "./chunk-2TIUKVZN.js"; import { r, t } from "./chunk-YXWMMD76.js"; import "./chunk-S5KM4IGW.js"; // node_modules/@arcgis/core/layers/graphics/sources/OGCFeatureSource.js var C = class extends m { constructor() { super(...arguments), this.featureDefinition = null, this.type = "ogc-feature"; } load(e2) { return this.addResolvingPromise(this._loadOGCServices(this.layer, e2)), this.when(); } getSource() { const { featureDefinition: { collection: e2, layerDefinition: t4, spatialReference: s3, supportedCrs: r2 }, layer: { apiKey: o2, customParameters: p6, effectiveMaxRecordCount: i4 } } = this; return { type: "ogc-source", collection: e2, layerDefinition: t4, maxRecordCount: i4, queryParameters: { apiKey: o2, customParameters: p6 }, spatialReference: s3, supportedCrs: r2 }; } queryExtent(e2, t4 = {}) { return null; } queryFeatureCount(e2, t4 = {}) { return null; } queryFeatures(e2, t4 = {}) { return this.queryFeaturesJSON(e2, t4).then((e3) => x3.fromJSON(e3)); } queryFeaturesJSON(e2, t4 = {}) { const s3 = this.getSource(); return this.load(t4).then(() => N(s3, e2, t4)); } queryObjectIds(e2, t4 = {}) { return null; } serviceSupportsSpatialReference(e2) { return !(!e2.isWGS84 && !e2.isWebMercator) || !!this.featureDefinition.supportedCrs[e2.wkid]; } _conformsToType(e2, t4) { var _a; const s3 = new RegExp(`^${t4}$`, "i"); return (_a = e2.conformsTo.some((e3) => s3.test(e3))) != null ? _a : false; } _getCapabilities(e2, t4) { return { analytics: { supportsCacheHint: false }, attachment: null, data: { isVersioned: false, supportsAttachment: false, supportsM: false, supportsZ: e2 }, metadata: { supportsAdvancedFieldProperties: false }, operations: { supportsCalculate: false, supportsTruncate: false, supportsValidateSql: false, supportsAdd: false, supportsDelete: false, supportsEditing: false, supportsChangeTracking: false, supportsQuery: false, supportsQueryAnalytics: false, supportsQueryAttachments: false, supportsQueryTopFeatures: false, supportsResizeAttachments: false, supportsSync: false, supportsUpdate: false, supportsExceedsLimitStatistics: false }, query: { maxRecordCount: t4, maxRecordCountFactor: void 0, standardMaxRecordCount: void 0, supportsCacheHint: false, supportsCentroid: false, supportsDisjointSpatialRelationship: false, supportsDistance: false, supportsDistinct: false, supportsExtent: false, supportsFormatPBF: false, supportsGeometryProperties: false, supportsHavingClause: false, supportsHistoricMoment: false, supportsMaxRecordCountFactor: false, supportsOrderBy: false, supportsPagination: false, supportsPercentileStatistics: false, supportsQuantization: false, supportsQuantizationEditMode: false, supportsQueryByOthers: false, supportsQueryGeometry: false, supportsResultType: false, supportsStandardizedQueriesOnly: false, supportsTopFeaturesQuery: false, supportsStatistics: false, supportsSpatialAggregationStatistics: false, supportedSpatialAggregationStatistics: { envelope: false, centroid: false, convexHull: false }, supportsDefaultSpatialReference: false, supportsFullTextSearch: false, supportsCompactGeometry: false, supportsSqlExpression: false, tileMaxRecordCount: void 0 }, queryRelated: { supportsCount: false, supportsOrderBy: false, supportsPagination: false, supportsCacheHint: false }, queryTopFeatures: { supportsCacheHint: false }, editing: { supportsDeleteByAnonymous: false, supportsDeleteByOthers: false, supportsGeometryUpdate: false, supportsGlobalId: false, supportsReturnServiceEditsInSourceSpatialReference: false, supportsRollbackOnFailure: false, supportsUpdateByAnonymous: false, supportsUpdateByOthers: false, supportsUploadWithItemId: false, supportsUpdateWithoutM: false } }; } _getMaxRecordCount(e2) { var _a, _b, _c, _d, _e, _f, _g, _h, _i; return (_i = (_d = (_c = (_b = (_a = e2 == null ? void 0 : e2.components) == null ? void 0 : _a.parameters) == null ? void 0 : _b.limit) == null ? void 0 : _c.schema) == null ? void 0 : _d.maximum) != null ? _i : (_h = (_g = (_f = (_e = e2 == null ? void 0 : e2.components) == null ? void 0 : _e.parameters) == null ? void 0 : _f.limitFeatures) == null ? void 0 : _g.schema) == null ? void 0 : _h.maximum; } _getStorageSpatialReference(e2) { var _a; const t4 = (_a = e2.storageCrs) != null ? _a : F, s3 = v(t4); return t(s3) ? k.WGS84 : new k({ wkid: s3 }); } _getSupportedSpatialReferences(e2, t4) { var _a; const s3 = "#/crs", r2 = (_a = e2.crs) != null ? _a : [F], o2 = r2.includes(s3) ? r2.filter((e3) => e3 !== s3).concat(t4.crs) : r2, p6 = /^http:\/\/www\.opengis.net\/def\/crs\/epsg\/.*\/3785$/i; return o2.filter((e3) => !p6.test(e3)); } async _loadOGCServices(e2, s3) { const r2 = r(s3) ? s3.signal : null, { apiKey: p6, collectionId: i4, customParameters: a2, fields: u, geometryType: g, hasZ: h, objectIdField: C2, timeInfo: R, url: w2 } = e2, x5 = { fields: u == null ? void 0 : u.map((e3) => e3.toJSON()), geometryType: t2.toJSON(g), hasZ: h, objectIdField: C2, timeInfo: R == null ? void 0 : R.toJSON() }, j3 = { apiKey: p6, customParameters: a2, signal: r2 }, F3 = await x2(w2, j3), [O2, v3] = await Promise.all([k2(F3, j3), T(F3, j3)]); if (!this._conformsToType(O2, "http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/geojson")) throw new s("ogc-feature-layer:no-geojson-support", "Server does not support geojson"); const T2 = v3.collections.find((e3) => e3.id === i4); if (!T2) throw new s("ogc-feature-layer:collection-not-found", "Server does not contain the named collection"); const D = this._conformsToType(O2, "http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/oas30") ? await S(F3, j3) : null, _ = await I(T2, x5, j3), b2 = this._getMaxRecordCount(D), P = this._getCapabilities(_.hasZ, b2), q = this._getStorageSpatialReference(T2).toJSON(), M2 = this._getSupportedSpatialReferences(T2, v3), A = new RegExp(`^${j}`, "i"), E = {}; for (const t4 of M2) { const e3 = v(t4); r(e3) && (E[e3] || (E[e3] = t4.replace(A, ""))); } this.featureDefinition = { capabilities: P, collection: T2, layerDefinition: _, spatialReference: q, supportedCrs: E }; } }; e([y()], C.prototype, "featureDefinition", void 0), e([y({ constructOnly: true })], C.prototype, "layer", void 0), e([y()], C.prototype, "type", void 0), C = e([n("esri.layers.graphics.sources.OGCFeatureSource")], C); // node_modules/@arcgis/core/layers/OGCFeatureLayer.js var M = s2(); var B = class extends i2(o(n4(p3(n2(c(a(t3(c3(v2(p(O(b)))))))))))) { constructor(e2) { super(e2), this.collectionId = null, this.copyright = null, this.definitionExpression = null, this.description = null, this.displayField = null, this.elevationInfo = null, this.fields = null, this.fieldsIndex = null, this.fullExtent = null, this.geometryType = null, this.hasZ = void 0, this.labelingInfo = null, this.labelsVisible = true, this.legendEnabled = true, this.maxRecordCount = null, this.objectIdField = null, this.operationalLayerType = "OGCFeatureLayer", this.popupEnabled = true, this.popupTemplate = null, this.screenSizePerspectiveEnabled = true, this.source = new C({ layer: this }), this.spatialReference = null, this.title = null, this.type = "ogc-feature", this.typeIdField = null, this.types = null, this.url = null; } destroy() { var _a; (_a = this.source) == null ? void 0 : _a.destroy(); } load(e2) { return this.addResolvingPromise(this.loadFromPortal({ supportedTypes: ["OGCFeatureServer"] }, e2).then(() => this._fetchService(e2))), this.when(); } get defaultPopupTemplate() { return this.createPopupTemplate(); } get effectiveMaxRecordCount() { var _a, _b, _c; return (_c = (_b = this.maxRecordCount) != null ? _b : (_a = this.capabilities) == null ? void 0 : _a.query.maxRecordCount) != null ? _c : 5e3; } get isTable() { return this.loaded && null == this.geometryType; } set renderer(e2) { F2(e2, this.fieldsIndex), this._set("renderer", e2); } on(e2, r2) { return super.on(e2, r2); } createPopupTemplate(e2) { return p4(this, e2); } createQuery() { return new x(); } getField(e2) { return this.fieldsIndex.get(e2); } getFieldDomain(e2, r2) { var _a; let t4, i4 = false; const o2 = (_a = r2 == null ? void 0 : r2.feature) == null ? void 0 : _a.attributes, s3 = this.typeIdField && (o2 == null ? void 0 : o2[this.typeIdField]); return null != s3 && this.types && (i4 = this.types.some((r3) => { var _a2; return r3.id == s3 && (t4 = (_a2 = r3.domains) == null ? void 0 : _a2[e2], "inherited" === (t4 == null ? void 0 : t4.type) && (t4 = this._getLayerDomain(e2)), true); })), i4 || t4 || (t4 = this._getLayerDomain(e2)), t4; } queryFeatures(e2, r2) { return this.load().then(() => this.source.queryFeatures(x.from(e2) || this.createQuery(), r2)).then((e3) => { var _a; return (_a = e3 == null ? void 0 : e3.features) == null ? void 0 : _a.forEach((e4) => { e4.layer = e4.sourceLayer = this; }), e3; }); } serviceSupportsSpatialReference(e2) { var _a, _b; return (_b = (_a = this.source) == null ? void 0 : _a.serviceSupportsSpatialReference(e2)) != null ? _b : false; } async _fetchService(e2) { await this.source.load(e2), this.read(this.source.featureDefinition, { origin: "service" }), F2(this.renderer, this.fieldsIndex), x4(this.timeInfo, this.fieldsIndex); } _getLayerDomain(e2) { if (!this.fields) return null; for (const r2 of this.fields) if (r2.name === e2 && r2.domain) return r2.domain; return null; } }; e([y({ readOnly: true, json: { origins: { service: { read: true } } } })], B.prototype, "capabilities", void 0), e([y({ type: String, json: { write: true } })], B.prototype, "collectionId", void 0), e([y({ type: String })], B.prototype, "copyright", void 0), e([y({ readOnly: true })], B.prototype, "defaultPopupTemplate", null), e([y({ type: String })], B.prototype, "definitionExpression", void 0), e([y({ readOnly: true, type: String, json: { origins: { service: { name: "collection.description" } } } })], B.prototype, "description", void 0), e([y({ type: String })], B.prototype, "displayField", void 0), e([y({ type: Number })], B.prototype, "effectiveMaxRecordCount", null), e([y(d)], B.prototype, "elevationInfo", void 0), e([y({ type: [y2], json: { origins: { service: { name: "layerDefinition.fields" } } } })], B.prototype, "fields", void 0), e([y(M.fieldsIndex)], B.prototype, "fieldsIndex", void 0), e([y({ readOnly: true, type: w, json: { origins: { service: { name: "layerDefinition.extent" } } } })], B.prototype, "fullExtent", void 0), e([y({ type: i.apiValues, json: { origins: { service: { name: "layerDefinition.geometryType", read: { reader: i.read } } } } })], B.prototype, "geometryType", void 0), e([y({ type: Boolean, json: { origins: { service: { name: "layerDefinition.hasZ" } } } })], B.prototype, "hasZ", void 0), e([y({ type: Boolean, readOnly: true })], B.prototype, "isTable", null), e([y({ type: [j2], json: { origins: { "web-document": { name: "layerDefinition.drawingInfo.labelingInfo", read: { reader: i3 }, write: true } } } })], B.prototype, "labelingInfo", void 0), e([y(m2)], B.prototype, "labelsVisible", void 0), e([y(c2)], B.prototype, "legendEnabled", void 0), e([y({ type: Number })], B.prototype, "maxRecordCount", void 0), e([y({ type: String, json: { origins: { service: { name: "layerDefinition.objectIdField" } } } })], B.prototype, "objectIdField", void 0), e([y({ type: ["OGCFeatureLayer"] })], B.prototype, "operationalLayerType", void 0), e([y(p5)], B.prototype, "popupEnabled", void 0), e([y({ type: k3, json: { name: "popupInfo", write: true } })], B.prototype, "popupTemplate", void 0), e([y({ types: p2, json: { origins: { service: { name: "layerDefinition.drawingInfo.renderer", write: false }, "web-scene": { types: n3, name: "layerDefinition.drawingInfo.renderer", write: true } }, name: "layerDefinition.drawingInfo.renderer", write: true } })], B.prototype, "renderer", null), e([y(l)], B.prototype, "screenSizePerspectiveEnabled", void 0), e([y({ readOnly: true })], B.prototype, "source", void 0), e([y({ readOnly: true, type: k, json: { origins: { service: { read: true } } } })], B.prototype, "spatialReference", void 0), e([y({ type: String, json: { write: { enabled: true, ignoreOrigin: true, isRequired: true }, origins: { service: { name: "collection.title" } } } })], B.prototype, "title", void 0), e([y({ readOnly: true, json: { read: false } })], B.prototype, "type", void 0), e([y({ type: String, readOnly: true })], B.prototype, "typeIdField", void 0), e([y({ type: [n5] })], B.prototype, "types", void 0), e([y(f)], B.prototype, "url", void 0), B = e([n("esri.layers.OGCFeatureLayer")], B); var V = B; export { V as default }; //# sourceMappingURL=OGCFeatureLayer-BNYVD2AR.js.map