import { n as n3 } from "./chunk-V4I7Q273.js"; import { a, i } from "./chunk-PFY67F6P.js"; import { Ze } from "./chunk-TD4T5KV5.js"; import "./chunk-JNNIUZVW.js"; import "./chunk-6SHVYOIM.js"; import "./chunk-EFTIWDMB.js"; import "./chunk-E3VV75EL.js"; import "./chunk-VIUIPJ2T.js"; import "./chunk-YW3ZWYRO.js"; import "./chunk-JZGM5PAU.js"; import "./chunk-7FZX4UI7.js"; import "./chunk-IR3DRB65.js"; import "./chunk-7ZZ4CSFO.js"; import "./chunk-YVKMCAJV.js"; import "./chunk-FB243F4I.js"; import "./chunk-DKAJ6NC2.js"; import "./chunk-6334AFGG.js"; import "./chunk-WFHIGLUK.js"; import "./chunk-IFWO6QLG.js"; import { An, en, rn, tn, un } from "./chunk-VYQHMPYW.js"; import "./chunk-KAB3V7FU.js"; import { v } from "./chunk-WXUHXYJK.js"; import "./chunk-NTERQTPO.js"; import "./chunk-SOSOZIX6.js"; import "./chunk-FM5OVTDI.js"; import "./chunk-2RHPWGZL.js"; import "./chunk-24RR2OSE.js"; import "./chunk-VICJMAP2.js"; import "./chunk-ESLFDGN5.js"; import "./chunk-TU7WVKU4.js"; import "./chunk-DUH52ME3.js"; import "./chunk-BFKFNCQC.js"; import "./chunk-3C3WGWKN.js"; import "./chunk-5AJSBAUF.js"; import "./chunk-2QIZS77U.js"; import "./chunk-OJUMXZ6B.js"; import "./chunk-F62EJT7L.js"; import "./chunk-JB2527A3.js"; import "./chunk-XODJHDJQ.js"; import "./chunk-O2PIYIHJ.js"; import "./chunk-2BWPQRLB.js"; import "./chunk-HPD2S4QL.js"; import "./chunk-C65ZRRQD.js"; import "./chunk-3HCJD762.js"; import "./chunk-GR4RKUNH.js"; import "./chunk-LTQAWUCK.js"; import "./chunk-W3SLJVWY.js"; import "./chunk-PK4W65H4.js"; import { g } from "./chunk-KJZ6SS3P.js"; import "./chunk-OER54WCN.js"; import { S2 as S, m, m2, y as y4 } from "./chunk-HOCLACFL.js"; import "./chunk-3MLCBRBA.js"; import "./chunk-WTRZAXRY.js"; import "./chunk-SZFMKPVM.js"; import "./chunk-K6QDYFZU.js"; import "./chunk-EY2WJSAJ.js"; import "./chunk-YMULPZCD.js"; import "./chunk-4PNYPUDB.js"; import "./chunk-RDMCXRET.js"; import "./chunk-BQHWPTT7.js"; import "./chunk-ZSW35JPD.js"; import "./chunk-DAWQAVQO.js"; import "./chunk-73AMYZFU.js"; import "./chunk-NKMX5M3L.js"; import { y as y3 } from "./chunk-MGUVQY3Q.js"; import "./chunk-QEWF7QPH.js"; import "./chunk-PJNBFKPF.js"; import "./chunk-C7742RNZ.js"; import "./chunk-SQ2SY4BX.js"; import "./chunk-VLG7MMVR.js"; import "./chunk-TV3CFJQR.js"; import "./chunk-BWATQC2Y.js"; import { v as v2 } from "./chunk-2DSTZVND.js"; import { c } from "./chunk-VXKIGGM4.js"; import "./chunk-KG45D2XL.js"; import { O } from "./chunk-JYRZQPQI.js"; import { x } from "./chunk-3HZQM2NK.js"; import "./chunk-AR2YN3E2.js"; import "./chunk-U3LEOWJX.js"; import "./chunk-4ONPMX2F.js"; import "./chunk-47NSA4T4.js"; import "./chunk-FUODOQDM.js"; import "./chunk-UMJCSYX5.js"; import { n as n2 } from "./chunk-UA6W42KP.js"; import "./chunk-3OSQ6GXO.js"; import "./chunk-3WQOA5CB.js"; import { t as t3 } from "./chunk-2L5METUC.js"; import "./chunk-FZQZIM7U.js"; import "./chunk-CZBRZ6SU.js"; import "./chunk-VGWC3IKZ.js"; import { D, I, K, f, h } from "./chunk-SWMSD4RP.js"; import "./chunk-UKEN2UNL.js"; import "./chunk-UVVU4UUO.js"; import "./chunk-HWSWTWZD.js"; import "./chunk-O6VYMEIX.js"; import "./chunk-X4SA4ELJ.js"; import "./chunk-XJCUT65M.js"; import "./chunk-PE24J2I5.js"; import "./chunk-P3XKUGLS.js"; import "./chunk-PIFOHNWC.js"; import "./chunk-LLO7GCYU.js"; import "./chunk-U7RKABRB.js"; import "./chunk-X7CNGECX.js"; import "./chunk-PSEI52P3.js"; import "./chunk-ZLNEXZAN.js"; import "./chunk-5UVJ64RB.js"; import { b } from "./chunk-O43KLDSX.js"; import "./chunk-AUOH2VSO.js"; import "./chunk-ZYRIJWLX.js"; import "./chunk-RYY6632W.js"; import "./chunk-DW42UVIT.js"; import "./chunk-TJNOJH33.js"; import "./chunk-YAEIHDJH.js"; import "./chunk-OSHI574D.js"; import "./chunk-44GMIOGP.js"; import "./chunk-75U5LM2V.js"; import "./chunk-ZHRAUKVQ.js"; import "./chunk-RZK6A2GY.js"; import { j } from "./chunk-4NQ74ZR6.js"; import "./chunk-X4LLOW7U.js"; import "./chunk-BDA6VH2A.js"; import "./chunk-Z4JTBD7M.js"; import "./chunk-MSBIHK67.js"; import "./chunk-HZRKBTHJ.js"; import "./chunk-5DMBXPN2.js"; import "./chunk-QANZ6BFY.js"; import "./chunk-VEGAOVMY.js"; import { o as o2, w2 as w } from "./chunk-CXCDYJ5R.js"; import "./chunk-GAOW3WRZ.js"; import { E, k2 as k, r as r2 } from "./chunk-QCKFNSN2.js"; import { e, n5 as n, t5 as t2, y3 as y2 } from "./chunk-6SOHRC7T.js"; import "./chunk-U2XHEJM7.js"; import "./chunk-SQOPWYIT.js"; import "./chunk-6KZ2LTDA.js"; import "./chunk-V6P2MAQQ.js"; import { s3 as s } from "./chunk-E5O6P5I2.js"; import { o, y } from "./chunk-SPWQ3AWG.js"; import "./chunk-2TIUKVZN.js"; import { r, t } from "./chunk-YXWMMD76.js"; import "./chunk-S5KM4IGW.js"; // node_modules/@arcgis/core/layers/GraphicsLayer.js var c2 = class extends n2(t3(b)) { constructor(r3) { super(r3), this.elevationInfo = null, this.graphics = new i(), this.screenSizePerspectiveEnabled = true, this.type = "graphics", this.internal = false; } destroy() { this.removeAll(), this.graphics.destroy(); } add(r3) { return this.graphics.add(r3), this; } addMany(r3) { return this.graphics.addMany(r3), this; } removeAll() { return this.graphics.removeAll(), this; } remove(r3) { this.graphics.remove(r3); } removeMany(r3) { this.graphics.removeMany(r3); } on(r3, e2) { return super.on(r3, e2); } graphicChanged(r3) { this.emit("graphic-update", r3); } }; e([y2({ type: x })], c2.prototype, "elevationInfo", void 0), e([y2(a(i, "graphics"))], c2.prototype, "graphics", void 0), e([y2({ type: ["show", "hide"] })], c2.prototype, "listMode", void 0), e([y2()], c2.prototype, "screenSizePerspectiveEnabled", void 0), e([y2({ readOnly: true })], c2.prototype, "type", void 0), e([y2({ constructOnly: true })], c2.prototype, "internal", void 0), c2 = e([n("esri.layers.GraphicsLayer")], c2); var h2 = c2; // node_modules/@arcgis/core/layers/MapNotesLayer.js function z(e2) { return "markup" === e2.featureCollectionType || e2.layers.some((e3) => null != e3.layerDefinition.visibilityField || !U(e3)); } function U({ layerDefinition: e2, featureSet: t4 }) { var _a; const r3 = (_a = e2.geometryType) != null ? _a : t4.geometryType; return H.find((t5) => { var _a2, _b, _c; return r3 === t5.geometryTypeJSON && ((_c = (_b = (_a2 = e2.drawingInfo) == null ? void 0 : _a2.renderer) == null ? void 0 : _b.symbol) == null ? void 0 : _c.type) === t5.identifyingSymbol.type; }); } function W() { return new w({ xmin: -180, ymin: -90, xmax: 180, ymax: 90 }); } var A = new y3({ name: "OBJECTID", alias: "OBJECTID", type: "oid", nullable: false, editable: false }); var $ = new y3({ name: "title", alias: "Title", type: "string", nullable: true, editable: true }); var q = class extends h2 { constructor(e2) { super(e2), this.visibilityMode = "inherited"; } initialize() { for (const e2 of this.graphics) e2.sourceLayer = this.layer; this.graphics.on("after-add", (e2) => { e2.item.sourceLayer = this.layer; }), this.graphics.on("after-remove", (e2) => { e2.item.sourceLayer = null; }); } get fullExtent() { var _a; const e2 = (_a = this.layer) == null ? void 0 : _a.spatialReference, t4 = this.fullBounds; return e2 ? t(t4) ? un(W(), e2).geometry : f(t4, e2) : null; } get fullBounds() { var _a; const e2 = (_a = this.layer) == null ? void 0 : _a.spatialReference; if (!e2) return null; const t4 = D(); return this.graphics.forEach((r3) => { const o3 = r(r3.geometry) ? un(r3.geometry, e2).geometry : null; r(o3) && h(t4, "point" === o3.type ? o3 : o3.extent, t4); }), I(t4, K) ? null : t4; } get sublayers() { return this.graphics; } }; e([y2({ readOnly: true })], q.prototype, "fullExtent", null), e([y2({ readOnly: true })], q.prototype, "fullBounds", null), e([y2({ readOnly: true })], q.prototype, "sublayers", null), e([y2()], q.prototype, "layer", void 0), e([y2()], q.prototype, "layerId", void 0), e([y2({ readOnly: true })], q.prototype, "visibilityMode", void 0), q = e([n("esri.layers.MapNotesLayer.MapNotesSublayer")], q); var H = [{ geometryType: "polygon", geometryTypeJSON: "esriGeometryPolygon", id: "polygonLayer", layerId: 0, title: "Polygons", identifyingSymbol: new S().toJSON() }, { geometryType: "polyline", geometryTypeJSON: "esriGeometryPolyline", id: "polylineLayer", layerId: 1, title: "Polylines", identifyingSymbol: new m().toJSON() }, { geometryType: "multipoint", geometryTypeJSON: "esriGeometryMultipoint", id: "multipointLayer", layerId: 2, title: "Multipoints", identifyingSymbol: new y4().toJSON() }, { geometryType: "point", geometryTypeJSON: "esriGeometryPoint", id: "pointLayer", layerId: 3, title: "Points", identifyingSymbol: new y4().toJSON() }, { geometryType: "point", geometryTypeJSON: "esriGeometryPoint", id: "textLayer", layerId: 4, title: "Text", identifyingSymbol: new m2().toJSON() }]; var K2 = class extends n2(t3(c(v2(O(b))))) { constructor(e2) { super(e2), this.capabilities = { operations: { supportsMapNotesEditing: true } }, this.featureCollections = null, this.featureCollectionJSON = null, this.featureCollectionType = "notes", this.legendEnabled = false, this.listMode = "hide-children", this.minScale = 0, this.maxScale = 0, this.spatialReference = k.WGS84, this.sublayers = new j(H.map((e3) => new q({ id: e3.id, layerId: e3.layerId, title: e3.title, layer: this }))), this.title = "Map Notes", this.type = "map-notes", this.visibilityMode = "inherited"; } readCapabilities(e2, t4, r3) { return { operations: { supportsMapNotesEditing: !z(t4) && "portal-item" !== (r3 == null ? void 0 : r3.origin) } }; } readFeatureCollections(e2, t4, o3) { if (!z(t4)) return null; const i2 = t4.layers.map((e3) => { const t5 = new Ze(); return t5.read(e3, o3), t5; }); return new j({ items: i2 }); } readLegacyfeatureCollectionJSON(e2, t4) { return z(t4) ? y(t4.featureCollection) : null; } get fullExtent() { var _a; const e2 = this.spatialReference, t4 = D(); if (r(this.sublayers)) this.sublayers.forEach(({ fullBounds: e3 }) => r(e3) ? h(t4, e3, t4) : t4, t4); else if ((_a = this.featureCollectionJSON) == null ? void 0 : _a.layers.some((e3) => e3.layerDefinition.extent)) { this.featureCollectionJSON.layers.forEach((r3) => { const o3 = un(r3.layerDefinition.extent, e2).geometry; r(o3) && h(t4, o3, t4); }); } return I(t4, K) ? un(W(), e2).geometry : f(t4, e2); } readMinScale(e2, t4) { for (const r3 of t4.layers) if (null != r3.layerDefinition.minScale) return r3.layerDefinition.minScale; return 0; } readMaxScale(e2, t4) { for (const r3 of t4.layers) if (null != r3.layerDefinition.maxScale) return r3.layerDefinition.maxScale; return 0; } get multipointLayer() { return this._findSublayer("multipointLayer"); } get pointLayer() { return this._findSublayer("pointLayer"); } get polygonLayer() { return this._findSublayer("polygonLayer"); } get polylineLayer() { return this._findSublayer("polylineLayer"); } readSpatialReference(e2, t4) { return t4.layers.length ? k.fromJSON(t4.layers[0].layerDefinition.spatialReference) : k.WGS84; } readSublayers(e2, o3, i2) { var _a; if (z(o3)) return null; const a2 = []; let n4 = o3.layers.reduce((e3, t4) => { var _a2; return Math.max(e3, (_a2 = t4.layerDefinition.id) != null ? _a2 : -1); }, -1) + 1; for (const r3 of o3.layers) { const { layerDefinition: e3, featureSet: o4 } = r3, i3 = (_a = e3.id) != null ? _a : n4++, s2 = U(r3); if (r(s2)) { const r4 = new q({ id: s2.id, title: e3.name, layerId: i3, layer: this, graphics: o4.features.map(({ geometry: e4, symbol: r5, attributes: o5, popupInfo: i4 }) => g.fromJSON({ attributes: o5, geometry: e4, symbol: r5, popupTemplate: i4 })) }); a2.push(r4); } } return new j(a2); } writeSublayers(e2, t4, r3, i2) { var _a; const { minScale: n4, maxScale: p } = this; if (t(e2)) return; const y5 = e2.some((e3) => e3.graphics.length > 0); if (!this.capabilities.operations.supportsMapNotesEditing) return void (y5 && ((_a = i2 == null ? void 0 : i2.messages) == null ? void 0 : _a.push(new s("map-notes-layer:editing-not-supported", "New map notes cannot be added to this layer")))); const m3 = []; let u = this.spatialReference.toJSON(); e: for (const o3 of e2) for (const e3 of o3.graphics) if (r(e3.geometry)) { u = e3.geometry.spatialReference.toJSON(); break e; } for (const o3 of H) { const t5 = e2.find((e3) => o3.id === e3.id); this._writeMapNoteSublayer(m3, t5, o3, n4, p, u, i2); } o("featureCollection.layers", m3, t4); } get textLayer() { return this._findSublayer("textLayer"); } load(e2) { return this.addResolvingPromise(this.loadFromPortal({ supportedTypes: ["Feature Collection"] }, e2)), Promise.resolve(this); } read(e2, t4) { "featureCollection" in e2 && (e2 = y(e2), Object.assign(e2, e2.featureCollection)), super.read(e2, t4); } async beforeSave() { if (t(this.sublayers)) return; let e2 = null; const t4 = []; for (const o3 of this.sublayers) for (const r4 of o3.graphics) if (r(r4.geometry)) { const o4 = r4.geometry; e2 ? E(o4.spatialReference, e2) || (An(o4.spatialReference, e2) || en() || await tn(), r4.geometry = rn(o4, e2)) : e2 = o4.spatialReference, t4.push(r4); } const r3 = await v(t4.map((e3) => e3.geometry)); t4.forEach((e3, t5) => e3.geometry = r3[t5]); } _findSublayer(e2) { var _a, _b; return t(this.sublayers) ? null : (_b = (_a = this.sublayers) == null ? void 0 : _a.find((t4) => t4.id === e2)) != null ? _b : null; } _writeMapNoteSublayer(e2, t4, r3, o3, l, n4, s2) { const p = []; if (!t(t4)) { for (const e3 of t4.graphics) this._writeMapNote(p, e3, r3.geometryType, s2); this._normalizeObjectIds(p, A), e2.push({ layerDefinition: { name: t4.title, drawingInfo: { renderer: { type: "simple", symbol: y(r3.identifyingSymbol) } }, id: t4.layerId, geometryType: r3.geometryTypeJSON, minScale: o3, maxScale: l, objectIdField: "OBJECTID", fields: [A.toJSON(), $.toJSON()], spatialReference: n4 }, featureSet: { features: p, geometryType: r3.geometryTypeJSON } }); } } _writeMapNote(e2, t4, r3, o3) { var _a, _b; if (t(t4)) return; const { geometry: i2, symbol: n4, popupTemplate: s2 } = t4; if (t(i2)) return; if (i2.type !== r3) return void ((_a = o3 == null ? void 0 : o3.messages) == null ? void 0 : _a.push(new t2("map-notes-layer:invalid-geometry-type", `Geometry "${i2.type}" cannot be saved in "${r3}" layer`, { graphic: t4 }))); if (t(n4)) return void ((_b = o3 == null ? void 0 : o3.messages) == null ? void 0 : _b.push(new t2("map-notes-layer:no-symbol", "Skipping map notes with no symbol", { graphic: t4 }))); const y5 = { attributes: { ...t4.attributes }, geometry: i2.toJSON(), symbol: n4.toJSON() }; r(s2) && (y5.popupInfo = s2.toJSON()), e2.push(y5); } _normalizeObjectIds(e2, t4) { const r3 = t4.name; let o3 = n3(r3, e2) + 1; const i2 = /* @__PURE__ */ new Set(); for (const l of e2) { l.attributes || (l.attributes = {}); const { attributes: e3 } = l; (null == e3[r3] || i2.has(e3[r3])) && (e3[r3] = o3++), i2.add(e3[r3]); } } }; e([y2({ readOnly: true })], K2.prototype, "capabilities", void 0), e([o2(["portal-item", "web-map"], "capabilities", ["layers"])], K2.prototype, "readCapabilities", null), e([y2({ readOnly: true })], K2.prototype, "featureCollections", void 0), e([o2(["web-map", "portal-item"], "featureCollections", ["layers"])], K2.prototype, "readFeatureCollections", null), e([y2({ readOnly: true, json: { origins: { "web-map": { write: { enabled: true, target: "featureCollection" } } } } })], K2.prototype, "featureCollectionJSON", void 0), e([o2(["web-map", "portal-item"], "featureCollectionJSON", ["featureCollection"])], K2.prototype, "readLegacyfeatureCollectionJSON", null), e([y2({ readOnly: true, json: { read: true, write: { enabled: true, ignoreOrigin: true } } })], K2.prototype, "featureCollectionType", void 0), e([y2({ readOnly: true })], K2.prototype, "fullExtent", null), e([y2({ readOnly: true, json: { origins: { "web-map": { write: { target: "featureCollection.showLegend", overridePolicy() { return { enabled: null != this.featureCollectionJSON }; } } } } } })], K2.prototype, "legendEnabled", void 0), e([y2({ type: ["show", "hide", "hide-children"] })], K2.prototype, "listMode", void 0), e([y2({ type: Number, nonNullable: true, json: { write: false } })], K2.prototype, "minScale", void 0), e([o2(["web-map", "portal-item"], "minScale", ["layers"])], K2.prototype, "readMinScale", null), e([y2({ type: Number, nonNullable: true, json: { write: false } })], K2.prototype, "maxScale", void 0), e([o2(["web-map", "portal-item"], "maxScale", ["layers"])], K2.prototype, "readMaxScale", null), e([y2({ readOnly: true })], K2.prototype, "multipointLayer", null), e([y2({ value: "ArcGISFeatureLayer", type: ["ArcGISFeatureLayer"] })], K2.prototype, "operationalLayerType", void 0), e([y2({ readOnly: true })], K2.prototype, "pointLayer", null), e([y2({ readOnly: true })], K2.prototype, "polygonLayer", null), e([y2({ readOnly: true })], K2.prototype, "polylineLayer", null), e([y2({ type: k })], K2.prototype, "spatialReference", void 0), e([o2(["web-map", "portal-item"], "spatialReference", ["layers"])], K2.prototype, "readSpatialReference", null), e([y2({ readOnly: true, json: { origins: { "web-map": { write: { ignoreOrigin: true } } } } })], K2.prototype, "sublayers", void 0), e([o2("web-map", "sublayers", ["layers"])], K2.prototype, "readSublayers", null), e([r2("web-map", "sublayers")], K2.prototype, "writeSublayers", null), e([y2({ readOnly: true })], K2.prototype, "textLayer", null), e([y2()], K2.prototype, "title", void 0), e([y2({ readOnly: true, json: { read: false } })], K2.prototype, "type", void 0), K2 = e([n("esri.layers.MapNotesLayer")], K2); var Q = K2; export { Q as default }; //# sourceMappingURL=MapNotesLayer-SMJEY7LZ.js.map