{"version":3,"sources":["node_modules/@arcgis/core/support/collectionUtils.js","node_modules/@arcgis/core/support/LayersMixin.js","node_modules/@arcgis/core/support/TablesMixin.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 e from \"../core/CollectionFlattener.js\";\nfunction t(t) {\n return new e({\n getCollections: () => [t.tables, t.layers],\n getChildrenFunction: e => {\n const t = [];\n return \"tables\" in e && t.push(e.tables), \"layers\" in e && t.push(e.layers), t;\n },\n itemFilterFunction: e => {\n const t = e.parent;\n return !!t && \"tables\" in t && t.tables.includes(e);\n }\n });\n}\nfunction n(e) {\n for (const t of e.values()) t?.destroy();\n e.clear();\n}\nexport { t as createFlattenedTablesCollection, n as destroyMap };","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.31/esri/copyright.txt for details.\n*/\nimport { _ as e } from \"../chunks/tslib.es6.js\";\nimport r from \"../core/Collection.js\";\nimport { referenceSetter as t } from \"../core/collectionUtils.js\";\nimport s from \"../core/Logger.js\";\nimport { isPromiseLike as o } from \"../core/promiseUtils.js\";\nimport { property as a } from \"../core/accessorSupport/decorators/property.js\";\nimport \"../core/has.js\";\nimport \"../core/RandomLCG.js\";\nimport { subclass as i } from \"../core/accessorSupport/decorators/subclass.js\";\nimport n from \"../layers/Layer.js\";\nfunction d(e, r, t) {\n let s, o;\n if (e) for (let a = 0, i = e.length; a < i; a++) {\n if (s = e.at(a), s?.[r] === t) return s;\n if (\"group\" === s?.type && (o = d(s.layers, r, t), o)) return o;\n }\n}\nconst l = l => {\n let y = class extends l {\n constructor(...e) {\n super(...e), this.layers = new r();\n const t = e => {\n e.parent && \"remove\" in e.parent && e.parent.remove(e);\n },\n o = e => {\n e.parent = this, this.layerAdded(e), \"elevation\" !== e.type && \"base-elevation\" !== e.type || s.getLogger(this).error(`Layer 'title:${e.title}, id:${e.id}' of type '${e.type}' is not supported as an operational layer and will therefore be ignored.`);\n },\n a = e => {\n e.parent = null, this.layerRemoved(e);\n };\n this.addHandles([this.layers.on(\"before-add\", e => {\n if (e.item === this) return e.preventDefault(), void s.getLogger(this).error(\"#add()\", \"Cannot add layer to itself.\");\n t(e.item);\n }), this.layers.on(\"after-add\", e => o(e.item)), this.layers.on(\"after-remove\", e => a(e.item))]);\n }\n destroy() {\n const e = this.layers.toArray();\n for (const r of e) r.destroy();\n this.layers.destroy();\n }\n set layers(e) {\n this._set(\"layers\", t(e, this._get(\"layers\")));\n }\n add(e, r) {\n const t = this.layers;\n if (r = t.getNextIndex(r), e instanceof n) {\n const s = e;\n s.parent === this ? this.reorder(s, r) : t.add(s, r);\n } else o(e) ? e.then(e => {\n this.destroyed || this.add(e, r);\n }) : s.getLogger(this).error(\"#add()\", \"The item being added is not a Layer or a Promise that resolves to a Layer.\");\n }\n addMany(e, r) {\n const t = this.layers;\n let s = t.getNextIndex(r);\n e.slice().forEach(e => {\n e.parent !== this ? (t.add(e, s), s += 1) : this.reorder(e, s);\n });\n }\n findLayerById(e) {\n return d(this.layers, \"id\", e);\n }\n findLayerByUid(e) {\n return d(this.layers, \"uid\", e);\n }\n remove(e) {\n return this.layers.remove(e);\n }\n removeMany(e) {\n return this.layers.removeMany(e);\n }\n removeAll() {\n return this.layers.removeAll();\n }\n reorder(e, r) {\n return this.layers.reorder(e, r);\n }\n layerAdded(e) {}\n layerRemoved(e) {}\n };\n return e([a()], y.prototype, \"layers\", null), y = e([i(\"esri.support.LayersMixin\")], y), y;\n};\nexport { l as LayersMixin };","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.31/esri/copyright.txt for details.\n*/\nimport { _ as t } from \"../chunks/tslib.es6.js\";\nimport e from \"../core/Collection.js\";\nimport { referenceSetter as r } from \"../core/collectionUtils.js\";\nimport s from \"../core/Logger.js\";\nimport { property as o } from \"../core/accessorSupport/decorators/property.js\";\nimport \"../core/has.js\";\nimport \"../core/RandomLCG.js\";\nimport { subclass as i } from \"../core/accessorSupport/decorators/subclass.js\";\nfunction a(t, e, r) {\n if (t) for (let s = 0, o = t.length; s < o; s++) {\n const o = t.at(s);\n if (o[e] === r) return o;\n if (\"group\" === o?.type) {\n const t = a(o.tables, e, r);\n if (t) return t;\n }\n }\n}\nconst n = n => {\n let l = class extends n {\n constructor(...t) {\n super(...t), this.tables = new e(), this.addHandles([this.tables.on(\"after-add\", t => {\n const e = t.item;\n e.parent && e.parent !== this && \"tables\" in e.parent && e.parent.tables.remove(e), e.parent = this, \"feature\" !== e.type && s.getLogger(this).error(`Layer 'title:${e.title}, id:${e.id}' of type '${e.type}' is not supported as a table and will therefore be ignored.`);\n }), this.tables.on(\"after-remove\", t => {\n t.item.parent = null;\n })]);\n }\n destroy() {\n const t = this.tables.toArray();\n for (const e of t) e.destroy();\n this.tables.destroy();\n }\n set tables(t) {\n this._set(\"tables\", r(t, this._get(\"tables\")));\n }\n findTableById(t) {\n return a(this.tables, \"id\", t);\n }\n findTableByUid(t) {\n return a(this.tables, \"uid\", t);\n }\n };\n return t([o()], l.prototype, \"tables\", null), l = t([i(\"esri.support.TablesMixin\")], l), l;\n};\nexport { n as TablesMixin };"],"mappings":"wWAKA,SAASA,EAAEA,EAAG,CACZ,OAAO,IAAIC,EAAE,CACX,eAAgB,IAAM,CAACD,EAAE,OAAQA,EAAE,MAAM,EACzC,oBAAqBE,GAAK,CACxB,IAAMF,EAAI,CAAC,EACX,MAAO,WAAYE,GAAKF,EAAE,KAAKE,EAAE,MAAM,EAAG,WAAYA,GAAKF,EAAE,KAAKE,EAAE,MAAM,EAAGF,CAC/E,EACA,mBAAoBE,GAAK,CACvB,IAAMF,EAAIE,EAAE,OACZ,MAAO,CAAC,CAACF,GAAK,WAAYA,GAAKA,EAAE,OAAO,SAASE,CAAC,CACpD,CACF,CAAC,CACH,CACA,SAASD,EAAEC,EAAG,CACZ,QAAWF,KAAKE,EAAE,OAAO,EAAGF,GAAG,QAAQ,EACv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