{"version":3,"sources":["node_modules/@arcgis/core/core/Evented.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 { _ as e } from \"../chunks/tslib.es6.js\";\nimport t from \"./Accessor.js\";\nimport { handlesGroup as r, makeHandle as s } from \"./handleUtils.js\";\nimport { subclass as n } from \"./accessorSupport/decorators/subclass.js\";\nclass i {\n constructor() {\n this._emitter = new i.EventEmitter(this);\n }\n emit(e, t) {\n return this._emitter.emit(e, t);\n }\n on(e, t) {\n return this._emitter.on(e, t);\n }\n once(e, t) {\n return this._emitter.once(e, t);\n }\n hasEventListener(e) {\n return this._emitter.hasEventListener(e);\n }\n}\n!function (o) {\n class c {\n constructor(e = null) {\n this._target = e, this._listenersMap = null;\n }\n clear() {\n this._listenersMap?.clear(), this._listenersMap = null;\n }\n destroy() {\n this.clear();\n }\n emit(e, t) {\n let r = this._listenersMap?.get(e);\n if (!r) return !1;\n const s = this._target || this;\n let n = !1;\n for (const i of r.slice()) {\n const e = \"deref\" in i ? i.deref() : i;\n e ? e?.call(s, t) : n = !0;\n }\n return n && (r = r.filter(e => !(\"deref\" in e) || null != e.deref()), this._listenersMap.set(e, r)), r.length > 0;\n }\n on(e, t) {\n if (Array.isArray(e)) {\n const s = e.map(e => this.on(e, t));\n return r(s);\n }\n if (e.includes(\",\")) throw new TypeError(\"Evented.on() with a comma delimited string of event types is not supported\");\n this._listenersMap ??= new Map();\n const n = this._listenersMap.get(e) || [];\n return n.push(t), this._listenersMap.set(e, n), s(() => {\n const r = this._listenersMap?.get(e),\n s = r?.indexOf(t) ?? -1;\n s >= 0 && r.splice(s, 1);\n });\n }\n once(e, t) {\n const r = this.on(e, e => {\n r.remove();\n const s = \"deref\" in t ? t.deref() : t;\n s?.call(null, e);\n });\n return r;\n }\n hasEventListener(e) {\n const t = this._listenersMap?.get(e);\n return null != t && t.length > 0;\n }\n }\n o.EventEmitter = c, o.EventedMixin = t => {\n let r = class extends t {\n constructor() {\n super(...arguments), this._emitter = new c();\n }\n destroy() {\n this._emitter.clear();\n }\n emit(e, t) {\n return this._emitter.emit(e, t);\n }\n on(e, t) {\n return this._emitter.on(e, t);\n }\n once(e, t) {\n return this._emitter.once(e, t);\n }\n hasEventListener(e) {\n return this._emitter.hasEventListener(e);\n }\n };\n return r = e([n(\"esri.core.Evented\")], r), r;\n };\n let l = class extends t {\n constructor() {\n super(...arguments), this._emitter = new i.EventEmitter(this);\n }\n destroy() {\n this._emitter.clear();\n }\n emit(e, t) {\n return this._emitter.emit(e, t);\n }\n on(e, t) {\n return this._emitter.on(e, t);\n }\n once(e, t) {\n return this._emitter.once(e, t);\n }\n hasEventListener(e) {\n return this._emitter.hasEventListener(e);\n }\n };\n l = e([n(\"esri.core.Evented.EventedAccessor\")], l), o.EventedAccessor = l;\n}(i || (i = {}));\nconst o = i;\nexport { o as default };"],"mappings":"uKAQA,IAAMA,EAAN,MAAMC,CAAE,CACN,aAAc,CACZ,KAAK,SAAW,IAAIA,EAAE,aAAa,IAAI,CACzC,CACA,KAAKC,EAAGC,EAAG,CACT,OAAO,KAAK,SAAS,KAAKD,EAAGC,CAAC,CAChC,CACA,GAAGD,EAAGC,EAAG,CACP,OAAO,KAAK,SAAS,GAAGD,EAAGC,CAAC,CAC9B,CACA,KAAKD,EAAGC,EAAG,CACT,OAAO,KAAK,SAAS,KAAKD,EAAGC,CAAC,CAChC,CACA,iBAAiBD,EAAG,CAClB,OAAO,KAAK,SAAS,iBAAiBA,CAAC,CACzC,CACF,GACC,SAAUE,EAAG,CACZ,MAAMC,CAAE,CACN,YAAY,EAAI,KAAM,CACpB,KAAK,QAAU,EAAG,KAAK,cAAgB,IACzC,CACA,OAAQ,CACN,KAAK,eAAe,MAAM,EAAG,KAAK,cAAgB,IACpD,CACA,SAAU,CACR,KAAK,MAAM,CACb,CACA,KAAK,EAAG,EAAG,CACT,IAAI,EAAI,KAAK,eAAe,IAAI,CAAC,EACjC,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