(self.webpackChunkRemoteClient = self.webpackChunkRemoteClient || []).push([
  [403],
  {
    23761: (e, t, r) => {
      'use strict';
      r.d(t, { Z: () => y });
      var s,
        n = r(29768),
        i = r(74569),
        l = r(86748),
        a = r(96467),
        o = r(74673),
        u = r(76506),
        p = r(42788),
        d = r(34250),
        c = (r(91306), r(92143), r(17533)),
        h = r(32422);
      r(21801),
        r(40642),
        r(71552),
        r(73796),
        r(97714),
        r(60947),
        r(2906),
        r(21972),
        r(23639),
        r(86656),
        r(22723),
        r(91055),
        r(27794),
        r(6906),
        r(50406),
        r(60991),
        r(81172),
        r(31450),
        r(26341),
        r(91597),
        r(86787),
        r(35132),
        r(89623),
        r(84069),
        r(44567),
        r(98380),
        r(92896),
        r(22781),
        r(57251),
        r(15324),
        r(76996),
        r(14249),
        r(9801),
        r(53523),
        r(59465),
        r(42911),
        r(46826),
        r(45433),
        r(60217),
        r(29107),
        r(30574),
        r(2157),
        r(25977),
        r(7471),
        r(54414),
        r(1648),
        r(8925),
        r(33921),
        r(3482),
        r(45154),
        r(16769),
        r(55531),
        r(30582),
        r(593),
        r(85699),
        r(63136),
        r(96055),
        r(47776),
        r(18033),
        r(6331),
        r(62048),
        r(4292),
        r(75626),
        r(72652),
        r(29641),
        r(30493),
        r(70821),
        r(82673),
        r(34229),
        r(37029),
        r(63571),
        r(30776),
        r(48027),
        r(54174),
        r(82426),
        r(63130),
        r(25696),
        r(66396),
        r(42775),
        r(95834),
        r(34394),
        r(57150),
        r(76726),
        r(20444),
        r(76393),
        r(78548),
        r(2497),
        r(49906),
        r(46527),
        r(48649),
        r(9960),
        r(3101),
        r(5853),
        r(39141),
        r(32101),
        r(38742),
        r(48243),
        r(34635),
        r(10401),
        r(49900),
        r(66284),
        r(82058),
        r(88762),
        r(73173),
        r(22739),
        r(20543),
        r(67477),
        r(78533),
        r(74653),
        r(91091),
        r(58943),
        r(70737),
        r(8487),
        r(17817),
        r(90814),
        r(15459),
        r(61847),
        r(16796),
        r(16955),
        r(22401),
        r(77894),
        r(55187),
        r(8586),
        r(44509),
        r(69814),
        r(11305),
        r(62259),
        r(44790),
        r(5909),
        r(60669),
        r(48208),
        r(51589);
      let m = (s = class extends o.a {
        constructor(...e) {
          super(...e),
            (this.isAggregate = !1),
            (this.layer = null),
            (this.popupTemplate = null),
            (this.sourceLayer = null),
            Object.defineProperty(this, 'uid', { value: (0, p.g)(), configurable: !0 });
        }
        normalizeCtorArgs(e, t, r, s) {
          return e && !e.declaredClass
            ? e
            : { geometry: e, symbol: t, attributes: r, popupTemplate: s };
        }
        set attributes(e) {
          const t = this._get('attributes');
          t !== e && (this._set('attributes', e), this._notifyLayer('attributes', t, e));
        }
        set geometry(e) {
          const t = this._get('geometry');
          t !== e && (this._set('geometry', e), this._notifyLayer('geometry', t, e));
        }
        set symbol(e) {
          const t = this._get('symbol');
          t !== e && (this._set('symbol', e), this._notifyLayer('symbol', t, e));
        }
        set visible(e) {
          const t = this._get('visible');
          t !== e && (this._set('visible', e), this._notifyLayer('visible', t, e));
        }
        getEffectivePopupTemplate(e = !1) {
          if (this.popupTemplate) return this.popupTemplate;
          for (const t of [this.sourceLayer, this.layer])
            if (t) {
              if ('popupTemplate' in t && t.popupTemplate) return t.popupTemplate;
              if (e && 'defaultPopupTemplate' in t && (0, u.i)(t.defaultPopupTemplate))
                return t.defaultPopupTemplate;
            }
          return null;
        }
        getAttribute(e) {
          return this.attributes && this.attributes[e];
        }
        setAttribute(e, t) {
          if (this.attributes) {
            const r = this.getAttribute(e);
            (this.attributes[e] = t), this._notifyLayer('attributes', r, t, e);
          } else (this.attributes = { [e]: t }), this._notifyLayer('attributes', void 0, t, e);
        }
        getObjectId() {
          return this.sourceLayer &&
            'objectIdField' in this.sourceLayer &&
            this.sourceLayer.objectIdField
            ? this.getAttribute(this.sourceLayer.objectIdField)
            : null;
        }
        toJSON() {
          return {
            geometry: (0, u.i)(this.geometry) ? this.geometry.toJSON() : null,
            symbol: (0, u.i)(this.symbol) ? this.symbol.toJSON() : null,
            attributes: { ...this.attributes },
            popupTemplate: this.popupTemplate && this.popupTemplate.toJSON(),
          };
        }
        clone() {
          return new s(this.cloneProperties());
        }
        notifyGeometryChanged() {
          this._notifyLayer('geometry', this.geometry, this.geometry);
        }
        cloneProperties() {
          return {
            attributes: (0, u.d9)(this.attributes),
            geometry: (0, u.d9)(this.geometry),
            layer: this.layer,
            popupTemplate: this.popupTemplate && this.popupTemplate.clone(),
            sourceLayer: this.sourceLayer,
            symbol: (0, u.d9)(this.symbol),
            visible: this.visible,
          };
        }
        _notifyLayer(e, t, r, s) {
          if (!this.layer || !('graphicChanged' in this.layer)) return;
          const n = { graphic: this, property: e, oldValue: t, newValue: r };
          'attributes' === e && (n.attributeName = s), this.layer.graphicChanged(n);
        }
      });
      (0, n._)([(0, d.Cb)({ value: null })], m.prototype, 'attributes', null),
        (0, n._)(
          [(0, d.Cb)({ value: null, types: i.qM, json: { read: h.im } })],
          m.prototype,
          'geometry',
          null,
        ),
        (0, n._)([(0, d.Cb)({ type: Boolean })], m.prototype, 'isAggregate', void 0),
        (0, n._)([(0, d.Cb)()], m.prototype, 'layer', void 0),
        (0, n._)([(0, d.Cb)({ type: l.Z })], m.prototype, 'popupTemplate', void 0),
        (0, n._)([(0, d.Cb)()], m.prototype, 'sourceLayer', void 0),
        (0, n._)([(0, d.Cb)({ value: null, types: a.LB })], m.prototype, 'symbol', null),
        (0, n._)([(0, d.Cb)({ type: Boolean, value: !0 })], m.prototype, 'visible', null),
        (m = s = (0, n._)([(0, c.j)('esri.Graphic')], m)),
        ((m || (m = {})).generateUID = p.g);
      const y = m;
    },
    93314: (e, t, r) => {
      'use strict';
      r.d(t, { Z: () => y });
      var s,
        n = r(29768),
        i = r(74673),
        l = r(76506),
        a = r(35197),
        o = r(34250),
        u = (r(91306), r(92143), r(97714)),
        p = r(17533),
        d = r(2906);
      r(21972),
        r(23639),
        r(86656),
        r(22723),
        r(91055),
        r(27794),
        r(6906),
        r(50406),
        r(60991),
        r(81172),
        r(71552),
        r(31450),
        r(40642),
        r(26341);
      let c = (s = class extends i.a {
        constructor(e) {
          super(e), (this.end = null), (this.start = null);
        }
        static get allTime() {
          return h;
        }
        static get empty() {
          return m;
        }
        readEnd(e, t) {
          return null != t.end ? new Date(t.end) : null;
        }
        writeEnd(e, t) {
          t.end = e ? e.getTime() : null;
        }
        get isAllTime() {
          return this.equals(s.allTime);
        }
        get isEmpty() {
          return this.equals(s.empty);
        }
        readStart(e, t) {
          return null != t.start ? new Date(t.start) : null;
        }
        writeStart(e, t) {
          t.start = e ? e.getTime() : null;
        }
        clone() {
          return new s({ end: this.end, start: this.start });
        }
        expandTo(e) {
          if (this.isEmpty || this.isAllTime) return this.clone();
          const t = (0, l.e)(this.start, (t) => (0, a.t)(t, e)),
            r = (0, l.e)(this.end, (t) => (0, a.o)((0, a.t)(t, e), 1, e));
          return new s({ start: t, end: r });
        }
        intersection(e) {
          if (!e) return this.clone();
          if (this.isEmpty || e.isEmpty) return s.empty;
          if (this.isAllTime) return e.clone();
          if (e.isAllTime) return this.clone();
          const t = (0, l.m)(this.start, -1 / 0, (e) => e.getTime()),
            r = (0, l.m)(this.end, 1 / 0, (e) => e.getTime()),
            n = (0, l.m)(e.start, -1 / 0, (e) => e.getTime()),
            i = (0, l.m)(e.end, 1 / 0, (e) => e.getTime());
          let a, o;
          if (
            (n >= t && n <= r ? (a = n) : t >= n && t <= i && (a = t),
            r >= n && r <= i ? (o = r) : i >= t && i <= r && (o = i),
            !isNaN(a) && !isNaN(o))
          ) {
            const e = new s();
            return (
              (e.start = a === -1 / 0 ? null : new Date(a)),
              (e.end = o === 1 / 0 ? null : new Date(o)),
              e
            );
          }
          return s.empty;
        }
        offset(e, t) {
          if (this.isEmpty || this.isAllTime) return this.clone();
          const r = new s(),
            { start: n, end: i } = this;
          return (
            (0, l.i)(n) && (r.start = (0, a.o)(n, e, t)),
            (0, l.i)(i) && (r.end = (0, a.o)(i, e, t)),
            r
          );
        }
        equals(e) {
          if (!e) return !1;
          const t = (0, l.i)(this.start) ? this.start.getTime() : this.start,
            r = (0, l.i)(this.end) ? this.end.getTime() : this.end,
            s = (0, l.i)(e.start) ? e.start.getTime() : e.start,
            n = (0, l.i)(e.end) ? e.end.getTime() : e.end;
          return t === s && r === n;
        }
        union(e) {
          if (!e || e.isEmpty) return this.clone();
          if (this.isEmpty) return e.clone();
          if (this.isAllTime || e.isAllTime) return h.clone();
          const t =
              (0, l.i)(this.start) && (0, l.i)(e.start)
                ? new Date(Math.min(this.start.getTime(), e.start.getTime()))
                : null,
            r =
              (0, l.i)(this.end) && (0, l.i)(e.end)
                ? new Date(Math.max(this.end.getTime(), e.end.getTime()))
                : null;
          return new s({ start: t, end: r });
        }
      });
      (0, n._)(
        [(0, o.Cb)({ type: Date, json: { write: { allowNull: !0 } } })],
        c.prototype,
        'end',
        void 0,
      ),
        (0, n._)([(0, u.r)('end')], c.prototype, 'readEnd', null),
        (0, n._)([(0, d.w)('end')], c.prototype, 'writeEnd', null),
        (0, n._)([(0, o.Cb)({ readOnly: !0, json: { read: !1 } })], c.prototype, 'isAllTime', null),
        (0, n._)([(0, o.Cb)({ readOnly: !0, json: { read: !1 } })], c.prototype, 'isEmpty', null),
        (0, n._)(
          [(0, o.Cb)({ type: Date, json: { write: { allowNull: !0 } } })],
          c.prototype,
          'start',
          void 0,
        ),
        (0, n._)([(0, u.r)('start')], c.prototype, 'readStart', null),
        (0, n._)([(0, d.w)('start')], c.prototype, 'writeStart', null),
        (c = s = (0, n._)([(0, p.j)('esri.TimeExtent')], c));
      const h = new c(),
        m = new c({ start: void 0, end: void 0 }),
        y = c;
    },
    59765: (e, t, r) => {
      'use strict';
      r.d(t, { Z: () => c, t: () => u });
      var s = r(29768),
        n = r(74673),
        i = r(35197),
        l = r(34250),
        a = (r(76506), r(91306), r(92143), r(17533)),
        o = r(57251);
      r(21972),
        r(23639),
        r(86656),
        r(22723),
        r(91055),
        r(27794),
        r(6906),
        r(50406),
        r(60991),
        r(81172),
        r(71552),
        r(31450),
        r(40642),
        r(26341);
      const u = (0, o.s)()({
        esriTimeUnitsMilliseconds: 'milliseconds',
        esriTimeUnitsSeconds: 'seconds',
        esriTimeUnitsMinutes: 'minutes',
        esriTimeUnitsHours: 'hours',
        esriTimeUnitsDays: 'days',
        esriTimeUnitsWeeks: 'weeks',
        esriTimeUnitsMonths: 'months',
        esriTimeUnitsYears: 'years',
        esriTimeUnitsDecades: 'decades',
        esriTimeUnitsCenturies: 'centuries',
        esriTimeUnitsUnknown: void 0,
      });
      var p;
      let d = (p = class extends n.a {
        constructor(e) {
          super(e), (this.value = 0), (this.unit = 'milliseconds');
        }
        toMilliseconds() {
          return (0, i.c)(this.value, this.unit, 'milliseconds');
        }
        clone() {
          return new p({ value: this.value, unit: this.unit });
        }
      });
      (0, s._)(
        [(0, l.Cb)({ type: Number, json: { write: !0 }, nonNullable: !0 })],
        d.prototype,
        'value',
        void 0,
      ),
        (0, s._)(
          [
            (0, l.Cb)({
              type: u.apiValues,
              json: { type: u.jsonValues, read: u.read, write: u.write },
              nonNullable: !0,
            }),
          ],
          d.prototype,
          'unit',
          void 0,
        ),
        (d = p = (0, s._)([(0, a.j)('esri.TimeInterval')], d));
      const c = d;
    },
    22203: (e, t, r) => {
      'use strict';
      r.d(t, { C: () => d });
      var s = r(29768),
        n = r(15324),
        i = r(95873),
        l = r(76506),
        a = r(34250),
        o = (r(91306), r(92143), r(17533)),
        u = r(21972);
      let p = class extends (0, i.p)(n.Z) {
        constructor(e) {
          super(e), (this.getCollections = null);
        }
        initialize() {
          this.handles.add((0, u.a)(() => this.refresh()));
        }
        destroy() {
          this.getCollections = null;
        }
        refresh() {
          const e = (0, l.i)(this.getCollections) ? this.getCollections() : null;
          if ((0, l.b)(e)) return void this.removeAll();
          let t = 0;
          for (const r of e) (0, l.i)(r) && (t = this._processCollection(t, r));
          this.splice(t, this.length);
        }
        _createNewInstance(e) {
          return new n.Z(e);
        }
        _processCollection(e, t) {
          if (!t) return e;
          const r = this.itemFilterFunction ? this.itemFilterFunction : (e) => !!e;
          for (const s of t)
            if (s) {
              if (r(s)) {
                const t = this.indexOf(s, e);
                t >= 0 ? t !== e && this.reorder(s, e) : this.add(s, e), ++e;
              }
              if (this.getChildrenFunction) {
                const t = this.getChildrenFunction(s);
                if (Array.isArray(t)) for (const r of t) e = this._processCollection(e, r);
                else e = this._processCollection(e, t);
              }
            }
          return e;
        }
      };
      (0, s._)([(0, a.Cb)()], p.prototype, 'getCollections', void 0),
        (0, s._)([(0, a.Cb)()], p.prototype, 'getChildrenFunction', void 0),
        (0, s._)([(0, a.Cb)()], p.prototype, 'itemFilterFunction', void 0),
        (p = (0, s._)([(0, o.j)('esri.core.CollectionFlattener')], p));
      var d = p;
    },
    62162: (e, t, r) => {
      'use strict';
      r.d(t, { P: () => w });
      var s = r(29768),
        n = r(88762),
        i = r(82058),
        l = r(41864),
        a = r(60991),
        o = r(92143),
        u = r(76506),
        p = r(50406),
        d = r(32101),
        c = r(34250),
        h = (r(91306), r(97714)),
        m = r(17533),
        y = r(2906),
        f = r(49900),
        g = r(56420),
        b = r(74653);
      const v = o.L.getLogger('esri.layers.mixins.PortalLayer'),
        w = (e) => {
          let t = class extends e {
            constructor() {
              super(...arguments),
                (this.resourceReferences = { portalItem: null, paths: [] }),
                (this.userHasEditingPrivileges = !0);
            }
            destroy() {
              var e;
              null == (e = this.portalItem) || e.destroy(), (this.portalItem = null);
            }
            set portalItem(e) {
              e !== this._get('portalItem') &&
                (this.removeOrigin('portal-item'), this._set('portalItem', e));
            }
            readPortalItem(e, t, r) {
              if (t.itemId) return new g.default({ id: t.itemId, portal: r && r.portal });
            }
            writePortalItem(e, t) {
              e && e.id && (t.itemId = e.id);
            }
            async loadFromPortal(e, t) {
              if (this.portalItem && this.portalItem.id)
                try {
                  const s = await r
                    .e(8642)
                    .then(r.bind(r, 8642))
                    .then(function (e) {
                      return e.l;
                    });
                  return (
                    (0, p.k_)(t),
                    await s.load(
                      {
                        instance: this,
                        supportedTypes: e.supportedTypes,
                        validateItem: e.validateItem,
                        supportsData: e.supportsData,
                      },
                      t,
                    )
                  );
                } catch (e) {
                  throw (
                    ((0, p.D_)(e) ||
                      v.warn(
                        `Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n  ${e}`,
                      ),
                    e)
                  );
                }
            }
            async finishLoadEditablePortalLayer(e) {
              this._set(
                'userHasEditingPrivileges',
                await this.fetchUserHasEditingPrivileges(e).catch((e) => ((0, p.r9)(e), !0)),
              );
            }
            async fetchUserHasEditingPrivileges(e) {
              const t = this.url ? (null == n.id ? void 0 : n.id.findCredential(this.url)) : null;
              if (!t) return !0;
              const r = _.credential === t ? _.user : await this.fetchEditingUser(e);
              return (
                (_.credential = t),
                (_.user = r),
                (0, u.b)(r) || null == r.privileges || r.privileges.includes('features:user:edit')
              );
            }
            async fetchEditingUser(e) {
              var t, r;
              const s = null == (t = this.portalItem) || null == (r = t.portal) ? void 0 : r.user;
              if (s) return s;
              const a = n.id.findServerInfo(this.url);
              if (null == a || !a.owningSystemUrl) return null;
              const o = `${a.owningSystemUrl}/sharing/rest`,
                p = f.Z.getDefault();
              if (p && p.loaded && (0, d.Fv)(p.restUrl) === (0, d.Fv)(o)) return p.user;
              const c = `${o}/community/self`,
                h = (0, u.i)(e) ? e.signal : null,
                m = await (0, l.r)(
                  (0, i.default)(c, { authMode: 'no-prompt', query: { f: 'json' }, signal: h }),
                );
              return m.ok ? b.default.fromJSON(m.value.data) : null;
            }
            read(e, t) {
              t && (t.layer = this), super.read(e, t);
            }
            write(e, t) {
              const r = t && t.portal,
                s =
                  this.portalItem &&
                  this.portalItem.id &&
                  (this.portalItem.portal || f.Z.getDefault());
              return r && s && !(0, d.tm)(s.restUrl, r.restUrl)
                ? (t.messages &&
                    t.messages.push(
                      new a.Z(
                        'layer:cross-portal',
                        `The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save the scene, set the layer.portalItem to null or save the scene to the same portal as the item associated with the layer`,
                        { layer: this },
                      ),
                    ),
                  null)
                : super.write(e, { ...t, layer: this });
            }
          };
          return (
            (0, s._)([(0, c.Cb)({ type: g.default })], t.prototype, 'portalItem', null),
            (0, s._)(
              [(0, h.r)('web-document', 'portalItem', ['itemId'])],
              t.prototype,
              'readPortalItem',
              null,
            ),
            (0, s._)(
              [(0, y.w)('web-document', 'portalItem', { itemId: { type: String } })],
              t.prototype,
              'writePortalItem',
              null,
            ),
            (0, s._)([(0, c.Cb)()], t.prototype, 'resourceReferences', void 0),
            (0, s._)(
              [(0, c.Cb)({ readOnly: !0 })],
              t.prototype,
              'userHasEditingPrivileges',
              void 0,
            ),
            (t = (0, s._)([(0, m.j)('esri.layers.mixins.PortalLayer')], t)),
            t
          );
        },
        _ = { credential: null, user: null };
    },
    19902: (e, t, r) => {
      'use strict';
      r.d(t, { T: () => d });
      var s = r(29768),
        n = r(93314),
        i = r(59765),
        l = r(34250),
        a = (r(76506), r(91306), r(92143), r(97714)),
        o = r(17533),
        u = r(77361),
        p = r(14249);
      const d = (e) => {
        let t = class extends e {
          constructor() {
            super(...arguments),
              (this.timeExtent = null),
              (this.timeOffset = null),
              (this.useViewTime = !0);
          }
          readOffset(e, t) {
            const r = t.timeInfo.exportOptions;
            if (!r) return null;
            const s = r.timeOffset,
              n = i.t.fromJSON(r.timeOffsetUnits);
            return s && n ? new i.Z({ value: s, unit: n }) : null;
          }
          set timeInfo(e) {
            (0, p.UF)(e, this.fieldsIndex), this._set('timeInfo', e);
          }
        };
        return (
          (0, s._)(
            [(0, l.Cb)({ type: n.Z, json: { write: !1 } })],
            t.prototype,
            'timeExtent',
            void 0,
          ),
          (0, s._)([(0, l.Cb)({ type: i.Z })], t.prototype, 'timeOffset', void 0),
          (0, s._)(
            [(0, a.r)('service', 'timeOffset', ['timeInfo.exportOptions'])],
            t.prototype,
            'readOffset',
            null,
          ),
          (0, s._)(
            [
              (0, l.Cb)({
                value: null,
                type: u.Z,
                json: { write: !0, origins: { 'web-document': { read: !1, write: !1 } } },
              }),
            ],
            t.prototype,
            'timeInfo',
            null,
          ),
          (0, s._)(
            [
              (0, l.Cb)({
                type: Boolean,
                json: {
                  read: { source: 'timeAnimation' },
                  write: { target: 'timeAnimation' },
                  origins: { 'web-scene': { read: !1, write: !1 } },
                },
              }),
            ],
            t.prototype,
            'useViewTime',
            void 0,
          ),
          (t = (0, s._)([(0, o.j)('esri.layers.mixins.TemporalLayer')], t)),
          t
        );
      };
    },
    21132: (e, t, r) => {
      'use strict';
      r.d(t, {
        a: () => g,
        b: () => y,
        c: () => h,
        d: () => p,
        e: () => v,
        f: () => c,
        p: () => d,
        s: () => f,
        t: () => m,
        w: () => b,
      });
      var s = r(76506),
        n = r(32101),
        i = r(38742);
      const l = [
          'MapServer',
          'ImageServer',
          'FeatureServer',
          'SceneServer',
          'StreamServer',
          'VectorTileServer',
        ],
        a = new RegExp(
          `^((?:https?:)?\\/\\/\\S+?\\/rest\\/services\\/(.+?)\\/(${l.join(
            '|',
          )}))(?:\\/(?:layers\\/)?(\\d+))?`,
          'i',
        ),
        o = new RegExp(
          `^((?:https?:)?\\/\\/\\S+?\\/([^\\/\\n]+)\\/(${l.join(
            '|',
          )}))(?:\\/(?:layers\\/)?(\\d+))?`,
          'i',
        ),
        u = /(.*?)\/(?:layers\/)?(\d+)\/?$/i;
      function p(e) {
        return !!a.test(e);
      }
      function d(e) {
        const t = (0, n.mN)(e),
          r = t.path.match(a) || t.path.match(o);
        if (!r) return null;
        const [, s, i, l, u] = r,
          p = i.indexOf('/');
        return {
          title: h(-1 !== p ? i.slice(p + 1) : i),
          serverType: l,
          sublayer: null != u && '' !== u ? parseInt(u, 10) : null,
          url: { path: s },
        };
      }
      function c(e) {
        const t = (0, n.mN)(e).path.match(u);
        return t ? { serviceUrl: t[1], sublayerId: Number(t[2]) } : null;
      }
      function h(e) {
        return (e = e.replace(/\s*[/_]+\s*/g, ' '))[0].toUpperCase() + e.slice(1);
      }
      function m(e, t) {
        const r = [];
        if (e) {
          const t = d(e);
          (0, s.i)(t) && t.title && r.push(t.title);
        }
        if (t) {
          const e = h(t);
          r.push(e);
        }
        if (2 === r.length) {
          if (-1 !== r[0].toLowerCase().indexOf(r[1].toLowerCase())) return r[0];
          if (-1 !== r[1].toLowerCase().indexOf(r[0].toLowerCase())) return r[1];
        }
        return r.join(' - ');
      }
      function y(e) {
        if (!e) return !1;
        const t = -1 !== (e = e.toLowerCase()).indexOf('.arcgis.com/'),
          r =
            -1 !== e.indexOf('//services') ||
            -1 !== e.indexOf('//tiles') ||
            -1 !== e.indexOf('//features');
        return t && r;
      }
      function f(e, t) {
        return e ? (0, n.Qj)((0, n.Hu)(e, t)) : e;
      }
      function g(e) {
        let { url: t } = e;
        if (!t) return { url: t };
        t = (0, n.Hu)(t, e.logger);
        const r = (0, n.mN)(t),
          i = d(r.path);
        let l;
        if ((0, s.i)(i))
          null != i.sublayer && null == e.layer.layerId && (l = i.sublayer), (t = i.url.path);
        else if (e.nonStandardUrlAllowed) {
          const e = c(r.path);
          (0, s.i)(e) && ((t = e.serviceUrl), (l = e.sublayerId));
        }
        return { url: (0, n.Qj)(t), layerId: l };
      }
      function b(e, t, r, s, l) {
        (0, i.w)(t, s, 'url', l),
          s.url && null != e.layerId && (s.url = (0, n.v_)(s.url, r, e.layerId.toString()));
      }
      function v(e) {
        if (!e) return !1;
        const t = e.toLowerCase(),
          r = -1 !== t.indexOf('/services/'),
          s = -1 !== t.indexOf('/mapserver/wmsserver'),
          n = -1 !== t.indexOf('/imageserver/wmsserver'),
          i = -1 !== t.indexOf('/wmsserver');
        return r && (s || n || i);
      }
    },
    85557: (e, t, r) => {
      'use strict';
      r.d(t, { m: () => i });
      var s = r(53785),
        n = r(89623);
      const i = {
        inches: (0, s.c)(1, 'meters', 'inches'),
        feet: (0, s.c)(1, 'meters', 'feet'),
        'us-feet': (0, s.c)(1, 'meters', 'us-feet'),
        yards: (0, s.c)(1, 'meters', 'yards'),
        miles: (0, s.c)(1, 'meters', 'miles'),
        'nautical-miles': (0, s.c)(1, 'meters', 'nautical-miles'),
        millimeters: (0, s.c)(1, 'meters', 'millimeters'),
        centimeters: (0, s.c)(1, 'meters', 'centimeters'),
        decimeters: (0, s.c)(1, 'meters', 'decimeters'),
        meters: (0, s.c)(1, 'meters', 'meters'),
        kilometers: (0, s.c)(1, 'meters', 'kilometers'),
        'decimal-degrees': 1 / (0, s.l)(1, 'meters', n.e.radius),
      };
    },
    69997: (e, t, r) => {
      'use strict';
      r.d(t, { a: () => n });
      var s = r(53785);
      function n(e, t) {
        const r = t || e.extent,
          n = e.width,
          i = (0, s.a)(r && r.spatialReference);
        return r && n ? (r.width / n) * i * s.i * 96 : 0;
      }
    },
    35197: (e, t, r) => {
      'use strict';
      r.d(t, { c: () => a, o: () => i, t: () => l }), r(76506);
      const s = {
          milliseconds: 1,
          seconds: 1e3,
          minutes: 6e4,
          hours: 36e5,
          days: 864e5,
          weeks: 6048e5,
          months: 26784e5,
          years: 31536e6,
          decades: 31536e7,
          centuries: 31536e8,
        },
        n = {
          milliseconds: { getter: 'getMilliseconds', setter: 'setMilliseconds', multiplier: 1 },
          seconds: { getter: 'getSeconds', setter: 'setSeconds', multiplier: 1 },
          minutes: { getter: 'getMinutes', setter: 'setMinutes', multiplier: 1 },
          hours: { getter: 'getHours', setter: 'setHours', multiplier: 1 },
          days: { getter: 'getDate', setter: 'setDate', multiplier: 1 },
          weeks: { getter: 'getDate', setter: 'setDate', multiplier: 7 },
          months: { getter: 'getMonth', setter: 'setMonth', multiplier: 1 },
          years: { getter: 'getFullYear', setter: 'setFullYear', multiplier: 1 },
          decades: { getter: 'getFullYear', setter: 'setFullYear', multiplier: 10 },
          centuries: { getter: 'getFullYear', setter: 'setFullYear', multiplier: 100 },
        };
      function i(e, t, r) {
        const s = new Date(e.getTime());
        if (t && r) {
          const e = n[r],
            { getter: i, setter: l, multiplier: a } = e;
          s[l](s[i]() + t * a);
        }
        return s;
      }
      function l(e, t) {
        switch (t) {
          case 'milliseconds':
            return new Date(e.getTime());
          case 'seconds':
            return new Date(
              e.getFullYear(),
              e.getMonth(),
              e.getDate(),
              e.getHours(),
              e.getMinutes(),
              e.getSeconds(),
            );
          case 'minutes':
            return new Date(
              e.getFullYear(),
              e.getMonth(),
              e.getDate(),
              e.getHours(),
              e.getMinutes(),
            );
          case 'hours':
            return new Date(e.getFullYear(), e.getMonth(), e.getDate(), e.getHours());
          case 'days':
            return new Date(e.getFullYear(), e.getMonth(), e.getDate());
          case 'weeks':
            return new Date(e.getFullYear(), e.getMonth(), e.getDate() - e.getDay());
          case 'months':
            return new Date(e.getFullYear(), e.getMonth(), 1);
          case 'years':
            return new Date(e.getFullYear(), 0, 1);
          case 'decades':
            return new Date(e.getFullYear() - (e.getFullYear() % 10), 0, 1);
          case 'centuries':
            return new Date(e.getFullYear() - (e.getFullYear() % 100), 0, 1);
          default:
            return new Date();
        }
      }
      function a(e, t, r) {
        return 0 === e ? 0 : (e * s[t]) / s[r];
      }
    },
    42788: (e, t, r) => {
      'use strict';
      r.d(t, { g: () => n });
      let s = 0;
      function n() {
        return ++s;
      }
    },
    95873: (e, t, r) => {
      'use strict';
      r.d(t, { r: () => m, p: () => h, W: () => d });
      var s = r(29768),
        n = r(21972),
        i = r(82933),
        l = r(34250),
        a = r(17533),
        o = r(76506),
        u = r(6906),
        p = r(617);
      r(23639),
        r(92143),
        r(31450),
        r(71552),
        r(40642),
        r(86656),
        r(22723),
        r(91055),
        r(27794),
        r(91306),
        r(81172),
        r(50406),
        r(60991),
        r(15324),
        r(76996);
      let d = class extends n.Z {
        constructor() {
          super(...arguments),
            (this.updating = !1),
            (this.handleId = 0),
            (this.handles = new i.Z()),
            (this.scheduleHandleId = 0),
            (this.pendingPromises = new Set());
        }
        destroy() {
          this.removeAll(), this.handles.destroy();
        }
        add(e, t, r, s = 0) {
          const n = 0 != (1 & s),
            i = ++this.handleId;
          n || this.installSyncUpdatingWatch(e, t, i);
          const l = 0 != (2 & s) ? (0, p.S1)(e, t, r, n) : e.watch(t, r, n);
          return this.handles.add(l, i), { remove: () => this.handles.remove(i) };
        }
        addOnCollectionPropertyChange(e, t, r, s = 0) {
          const n = 0 != (2 & s),
            i = ++this.handleId;
          return (
            this.handles.add(
              [
                (0, p.on)(e, t, 'after-changes', this.createSyncUpdatingCallback()),
                (0, p.on)(
                  e,
                  t,
                  'change',
                  r,
                  n
                    ? (e) => {
                        r({ added: e.items, removed: [], moved: [], target: e });
                      }
                    : void 0,
                ),
              ],
              i,
            ),
            {
              remove: () => {
                this.handles.remove(i);
              },
            }
          );
        }
        addOnCollectionChange(e, t, r = 0) {
          const s = 0 != (2 & r),
            n = ++this.handleId;
          return (
            this.handles.add(
              [e.on('after-changes', this.createSyncUpdatingCallback()), e.on('change', t)],
              n,
            ),
            s && t({ added: e.items, removed: [], moved: [], target: e }),
            {
              remove: () => {
                this.handles.remove(n);
              },
            }
          );
        }
        addPromise(e) {
          if ((0, o.b)(e)) return e;
          const t = ++this.handleId;
          this.handles.add(
            {
              remove: () => {
                this.pendingPromises.delete(e) &&
                  (0 !== this.pendingPromises.size ||
                    this.handles.has(c) ||
                    this._set('updating', !1));
              },
            },
            t,
          ),
            this.pendingPromises.add(e),
            this._set('updating', !0);
          const r = () => this.handles.remove(t);
          return e.then(r, r), e;
        }
        removeAll() {
          this.pendingPromises.clear(), this.handles.removeAll(), this._set('updating', !1);
        }
        installSyncUpdatingWatch(e, t, r) {
          const s = this.createSyncUpdatingCallback(),
            i = (0, n.r)(() => (0, l.v)(e, t), s);
          return this.handles.add(i, r), i;
        }
        createSyncUpdatingCallback() {
          return () => {
            this.handles.remove(c), ++this.scheduleHandleId;
            const e = this.scheduleHandleId;
            this._get('updating') || this._set('updating', !0),
              this.handles.add(
                (0, u.Os)(() => {
                  e === this.scheduleHandleId &&
                    (this._set('updating', this.pendingPromises.size > 0), this.handles.remove(c));
                }),
                c,
              );
          };
        }
      };
      (0, s._)([(0, l.Cb)({ readOnly: !0 })], d.prototype, 'updating', void 0),
        (d = (0, s._)([(0, a.j)('esri.views.support.WatchUpdatingTracking')], d));
      const c = -42,
        h = (e) => {
          let t = class extends e {
            destroy() {
              this.destroyed || (this.handles.destroy(), this.updatingHandles.destroy());
            }
            get handles() {
              return this._get('handles') || new i.Z();
            }
            get updatingHandles() {
              return this._get('updatingHandles') || new d();
            }
          };
          return (
            (0, s._)([(0, l.Cb)({ readOnly: !0 })], t.prototype, 'handles', null),
            (0, s._)([(0, l.Cb)({ readOnly: !0 })], t.prototype, 'updatingHandles', null),
            (t = (0, s._)([(0, a.j)('esri.core.HandleOwner')], t)),
            t
          );
        };
      let m = class extends h(n.Z) {};
      m = (0, s._)([(0, a.j)('esri.core.HandleOwner')], m);
    },
    82933: (e, t, r) => {
      'use strict';
      r.d(t, { Z: () => p });
      var s = r(29768),
        n = r(21972),
        i = r(15324),
        l = r(76506),
        a = r(34250),
        o = r(17533);
      r(23639),
        r(92143),
        r(31450),
        r(71552),
        r(40642),
        r(86656),
        r(22723),
        r(91055),
        r(27794),
        r(6906),
        r(50406),
        r(60991),
        r(81172),
        r(91306),
        r(76996);
      let u = class extends n.Z {
        constructor(e) {
          super(e), (this._groups = new Map());
        }
        destroy() {
          this.removeAll();
        }
        get size() {
          let e = 0;
          return (
            this._groups.forEach((t) => {
              e += t.length;
            }),
            e
          );
        }
        add(e, t) {
          if (!this._isHandle(e) && !Array.isArray(e) && !i.Z.isCollection(e)) return this;
          const r = this._getOrCreateGroup(t);
          return (
            Array.isArray(e) || i.Z.isCollection(e)
              ? e.forEach((e) => this._isHandle(e) && r.push(e))
              : r.push(e),
            this.notifyChange('size'),
            this
          );
        }
        forEach(e, t) {
          if ('function' == typeof e) this._groups.forEach((t) => t.forEach(e));
          else {
            const r = this._getGroup(e);
            r && t && r.forEach(t);
          }
        }
        has(e) {
          return this._groups.has(this._ensureGroupKey(e));
        }
        remove(e) {
          if (Array.isArray(e) || i.Z.isCollection(e)) return e.forEach(this.remove, this), this;
          if (!this.has(e)) return this;
          const t = this._getGroup(e);
          for (let e = 0; e < t.length; e++) t[e].remove();
          return this._deleteGroup(e), this.notifyChange('size'), this;
        }
        removeAll() {
          return (
            this._groups.forEach((e) => {
              for (let t = 0; t < e.length; t++) e[t].remove();
            }),
            this._groups.clear(),
            this.notifyChange('size'),
            this
          );
        }
        _isHandle(e) {
          return e && !!e.remove;
        }
        _getOrCreateGroup(e) {
          if (this.has(e)) return this._getGroup(e);
          const t = [];
          return this._groups.set(this._ensureGroupKey(e), t), t;
        }
        _getGroup(e) {
          return (0, l.a)(this._groups.get(this._ensureGroupKey(e)));
        }
        _deleteGroup(e) {
          return this._groups.delete(this._ensureGroupKey(e));
        }
        _ensureGroupKey(e) {
          return e || '_default_';
        }
      };
      (0, s._)([(0, a.Cb)({ readOnly: !0 })], u.prototype, 'size', null),
        (u = (0, s._)([(0, o.j)('esri.core.Handles')], u));
      const p = u;
    },
    617: (e, t, r) => {
      'use strict';
      r.d(t, {
        S1: () => p,
        on: () => y,
        OY: () => m,
        cm: () => c,
        N1: () => d,
        LR: () => h,
        tH: () => n,
      });
      var s = r(50406);
      function n(e, t, r, n, i) {
        const l = 'function' == typeof n ? n : null,
          a = 'object' == typeof n ? n : null;
        'boolean' == typeof n && (i = n);
        let o,
          u = !1;
        function p() {
          o && (o.remove(), (o = null));
        }
        const d = (0, s.dD)();
        (0, s.fu)(a, () => {
          p(), d.reject((0, s.zE)());
        });
        const c = {
          then: d.promise.then.bind(d.promise),
          catch: d.promise.catch.bind(d.promise),
          remove: p,
        };
        return (
          Object.freeze(c),
          (o = (function (e, t, r, s, n) {
            const i = e.watch(
              t,
              (t, n, i, l) => {
                (r && !r(t)) || null == s || s.call(e, t, n, i, l);
              },
              n,
            );
            if (Array.isArray(t))
              for (const n of t) {
                const i = e.get(n);
                r && r(i) && (null == s || s.call(e, i, i, t, e));
              }
            else {
              const n = e.get(t);
              r && r(n) && (null == s || s.call(e, n, n, t, e));
            }
            return i;
          })(
            e,
            t,
            r,
            (t, r, s, n) => {
              (u = !0),
                p(),
                l && l.call(e, t, r, s, n),
                d.resolve({ value: t, oldValue: r, propertyName: s, target: n });
            },
            i,
          )),
          u && p(),
          c
        );
      }
      function i(e) {
        return !!e;
      }
      function l(e) {
        return !e;
      }
      function a(e) {
        return !0 === e;
      }
      function o(e) {
        return !1 === e;
      }
      r(76506), r(60991), r(92143), r(31450), r(71552), r(40642), r(81172);
      const u = /\?(\.|$)/g;
      function p(e, t, r, s) {
        const n = Array.isArray(t) ? t : t.indexOf(',') > -1 ? t.split(',') : [t],
          i = (function (e, t, r, s) {
            return e.watch(t, r, s);
          })(e, t, r, s);
        for (const t of n) {
          const s = t.trim().replace(u, '$1'),
            n = e.get(s);
          r.call(e, n, n, s, e);
        }
        return i;
      }
      function d(e, t, r, s) {
        return n(e, t, i, r, s);
      }
      function c(e, t, r, s) {
        return n(e, t, l, r, s);
      }
      function h(e, t, r, s) {
        return n(e, t, a, r, s);
      }
      function m(e, t, r, s) {
        return n(e, t, o, r, s);
      }
      function y(e, t, r, n, i, l, a) {
        const o = {};
        function u(t) {
          const s = o[t];
          s && (l && l(s.target, t, e, r), s.handle.remove(), delete o[t]);
        }
        const d = p(
          e,
          t,
          (t, l, a) => {
            u(a),
              (0, s.i)(t) &&
                ((o[a] = { handle: (0, s.o)(t, r, n), target: t }), i && i(t, a, e, r));
          },
          a,
        );
        return {
          remove() {
            d.remove();
            for (const e in o) u(e);
          },
        };
      }
    },
    40403: (e, t, r) => {
      'use strict';
      r.r(t), r.d(t, { default: () => fe });
      var s = r(29768),
        n = r(31450),
        i = r(23761),
        l = r(86748),
        a = r(82058),
        o = r(15324),
        u = r(22203),
        p = r(95873),
        d = r(57251),
        c = r(76506),
        h = r(54179),
        m = r(50406),
        y = r(32101),
        f = r(34250),
        g = r(91306),
        b = (r(92143), r(97714)),
        v = r(17533),
        w = r(2906),
        _ = r(26341),
        x = r(21801),
        C = r(60947),
        I = r(69997),
        S = r(41617),
        E = r(11118),
        T = r(89440),
        O = r(62162),
        N = r(16647),
        F = r(58912),
        U = r(19902),
        L = r(21132),
        A = r(43022),
        j = r(21972);
      const P = { visible: 'visibleSublayers' };
      let R = class extends (0, p.p)(j.Z) {
        constructor(e) {
          super(e), (this.scale = 0);
        }
        set layer(e) {
          this._get('layer') !== e &&
            (this._set('layer', e),
            this.handles.remove('layer'),
            e &&
              this.handles.add(
                [
                  e.sublayers.on('change', () => this.notifyChange('visibleSublayers')),
                  e.on('wms-sublayer-update', (e) => this.notifyChange(P[e.propertyName])),
                ],
                'layer',
              ));
        }
        get layers() {
          const { visibleSublayers: e } = this;
          return e
            .filter((e) => e.name)
            .map((e) => e.name)
            .join(',');
        }
        get version() {
          this.commitProperty('layers');
          const e = this.layer;
          return e && e.commitProperty('imageTransparency'), (this._get('version') || 0) + 1;
        }
        get visibleSublayers() {
          const { layer: e, scale: t } = this,
            r = null == e ? void 0 : e.sublayers,
            s = [],
            n = (e) => {
              const { minScale: r, maxScale: i, sublayers: l, visible: a } = e;
              a &&
                (0 === t || ((0 === r || t <= r) && (0 === i || t >= i))) &&
                (l ? l.forEach(n) : s.unshift(e));
            };
          return null == r || r.forEach(n), s;
        }
        toJSON() {
          const { layer: e, layers: t } = this,
            { imageFormat: r, imageTransparency: s, version: n } = e;
          return {
            format: r,
            request: 'GetMap',
            service: 'WMS',
            styles: '',
            transparent: s,
            version: n,
            layers: t,
          };
        }
      };
      (0, s._)([(0, f.Cb)()], R.prototype, 'layer', null),
        (0, s._)([(0, f.Cb)({ readOnly: !0 })], R.prototype, 'layers', null),
        (0, s._)([(0, f.Cb)({ type: Number })], R.prototype, 'scale', void 0),
        (0, s._)([(0, f.Cb)({ readOnly: !0 })], R.prototype, 'version', null),
        (0, s._)([(0, f.Cb)({ readOnly: !0 })], R.prototype, 'visibleSublayers', null),
        (R = (0, s._)([(0, v.j)('esri.layers.support.ExportWMSImageParameters')], R));
      var D,
        M = r(82933),
        Z = r(86787),
        q = (r(91055), r(76996), r(23639), r(86656), r(22723), r(27794), r(6906), r(60991));
      r(81172), r(71552), r(40642), r(50161), r(73796), r(74673), r(91597), r(35132), r(89623);
      let H = 0,
        k = (D = class extends h.a {
          constructor(e) {
            super(e),
              (this._sublayersHandles = new M.Z()),
              (this.dimensions = null),
              (this.fullExtents = null),
              (this.featureInfoFormat = null),
              (this.featureInfoUrl = null),
              (this.legendUrl = null),
              (this.legendEnabled = !0),
              (this.maxScale = 0),
              (this.minScale = 0),
              (this.popupEnabled = !1),
              (this.queryable = !1),
              (this.spatialReferences = null);
          }
          get description() {
            return this._get('description');
          }
          set description(e) {
            this._set('description', e);
          }
          get fullExtent() {
            return this._get('fullExtent');
          }
          set fullExtent(e) {
            this._set('fullExtent', e);
          }
          readExtent(e, t) {
            return (e = t.extent) ? x.Z.fromJSON(e) : null;
          }
          get id() {
            const e = this._get('id');
            return null == e ? H++ : e;
          }
          set id(e) {
            this._set('id', e);
          }
          readLegendUrl(e, t) {
            return t ? t.legendUrl || t.legendURL : null;
          }
          set layer(e) {
            this._set('layer', e), this.sublayers && this.sublayers.forEach((t) => (t.layer = e));
          }
          get name() {
            return this._get('name');
          }
          set name(e) {
            this._set('name', e);
          }
          set sublayers(e) {
            const t = this._get('sublayers');
            t &&
              (t.forEach((e) => {
                e.layer = null;
              }),
              this._sublayersHandles.removeAll(),
              (this._sublayersHandles = null)),
              e &&
                (e.forEach((e) => {
                  (e.parent = this), (e.layer = this.layer);
                }),
                this._sublayersHandles.add([
                  e.on('after-add', ({ item: e }) => {
                    (e.parent = this), (e.layer = this.layer);
                  }),
                  e.on('after-remove', ({ item: e }) => {
                    (e.parent = null), (e.layer = null);
                  }),
                ])),
              this._set('sublayers', e);
          }
          castSublayers(e) {
            return (0, g.e)(o.Z.ofType(D), e);
          }
          get title() {
            return this._get('title');
          }
          set title(e) {
            this._set('title', e);
          }
          get visible() {
            return this._get('visible');
          }
          set visible(e) {
            this._setAndNotifyLayer('visible', e);
          }
          clone() {
            const e = new D();
            return (
              this.hasOwnProperty('description') && (e.description = this.description),
              this.hasOwnProperty('fullExtent') && (e.fullExtent = this.fullExtent.clone()),
              this.hasOwnProperty('fullExtents') &&
                (e.fullExtents = this.fullExtents.map((e) => e.clone())),
              this.hasOwnProperty('featureInfoFormat') &&
                (e.featureInfoFormat = this.featureInfoFormat),
              this.hasOwnProperty('featureInfoUrl') && (e.featureInfoUrl = this.featureInfoUrl),
              this.hasOwnProperty('legendUrl') && (e.legendUrl = this.legendUrl),
              this.hasOwnProperty('legendEnabled') && (e.legendEnabled = this.legendEnabled),
              this.hasOwnProperty('layer') && (e.layer = this.layer),
              this.hasOwnProperty('name') && (e.name = this.name),
              this.hasOwnProperty('parent') && (e.parent = this.parent),
              this.hasOwnProperty('queryable') && (e.queryable = this.queryable),
              this.hasOwnProperty('sublayers') &&
                (e.sublayers = this.sublayers && this.sublayers.map((e) => e.clone())),
              this.hasOwnProperty('spatialReferences') &&
                (e.spatialReferences = this.spatialReferences.map((e) => e)),
              this.hasOwnProperty('visible') && (e.visible = this.visible),
              this.hasOwnProperty('title') && (e.title = this.title),
              e
            );
          }
          _setAndNotifyLayer(e, t) {
            const r = this.layer;
            this._get(e) !== t &&
              (this._set(e, t),
              r && r.emit('wms-sublayer-update', { propertyName: e, id: this.id }));
          }
        });
      (0, s._)([(0, f.Cb)()], k.prototype, 'description', null),
        (0, s._)([(0, f.Cb)({ readOnly: !0 })], k.prototype, 'dimensions', void 0),
        (0, s._)([(0, f.Cb)({ value: null })], k.prototype, 'fullExtent', null),
        (0, s._)([(0, b.r)('fullExtent', ['extent'])], k.prototype, 'readExtent', null),
        (0, s._)([(0, f.Cb)()], k.prototype, 'fullExtents', void 0),
        (0, s._)([(0, f.Cb)()], k.prototype, 'featureInfoFormat', void 0),
        (0, s._)([(0, f.Cb)()], k.prototype, 'featureInfoUrl', void 0),
        (0, s._)(
          [
            (0, f.Cb)({
              type: Number,
              json: {
                write: { enabled: !1, overridePolicy: () => ({ ignoreOrigin: !0, enabled: !0 }) },
              },
            }),
          ],
          k.prototype,
          'id',
          null,
        ),
        (0, s._)(
          [
            (0, f.Cb)({
              type: String,
              json: {
                origins: {
                  'web-document': {
                    read: { source: ['legendUrl', 'legendURL'] },
                    write: { target: 'legendUrl', ignoreOrigin: !0 },
                  },
                },
                read: { source: 'legendURL' },
                write: { ignoreOrigin: !0 },
              },
            }),
          ],
          k.prototype,
          'legendUrl',
          void 0,
        ),
        (0, s._)([(0, b.r)(['web-document'], 'legendUrl')], k.prototype, 'readLegendUrl', null),
        (0, s._)(
          [
            (0, f.Cb)({
              value: !0,
              type: Boolean,
              json: {
                read: { source: 'showLegend' },
                write: { target: 'showLegend' },
                origins: {
                  'web-map': { read: !1, write: !1 },
                  'web-scene': { read: !1, write: !1 },
                },
              },
            }),
          ],
          k.prototype,
          'legendEnabled',
          void 0,
        ),
        (0, s._)([(0, f.Cb)({ value: null })], k.prototype, 'layer', null),
        (0, s._)([(0, f.Cb)()], k.prototype, 'maxScale', void 0),
        (0, s._)([(0, f.Cb)()], k.prototype, 'minScale', void 0),
        (0, s._)(
          [
            (0, f.Cb)({
              type: String,
              value: null,
              json: { read: { source: 'name' }, write: { ignoreOrigin: !0 } },
            }),
          ],
          k.prototype,
          'name',
          null,
        ),
        (0, s._)([(0, f.Cb)()], k.prototype, 'parent', void 0),
        (0, s._)(
          [
            (0, f.Cb)({
              type: Boolean,
              json: {
                read: { source: 'showPopup' },
                write: { ignoreOrigin: !0, target: 'showPopup' },
              },
            }),
          ],
          k.prototype,
          'popupEnabled',
          void 0,
        ),
        (0, s._)(
          [(0, f.Cb)({ type: Boolean, json: { write: { ignoreOrigin: !0 } } })],
          k.prototype,
          'queryable',
          void 0,
        ),
        (0, s._)([(0, f.Cb)()], k.prototype, 'sublayers', null),
        (0, s._)([(0, Z.p)('sublayers')], k.prototype, 'castSublayers', null),
        (0, s._)(
          [(0, f.Cb)({ type: [Number], json: { read: { source: 'spatialReferences' } } })],
          k.prototype,
          'spatialReferences',
          void 0,
        ),
        (0, s._)(
          [(0, f.Cb)({ type: String, value: null, json: { write: { ignoreOrigin: !0 } } })],
          k.prototype,
          'title',
          null,
        ),
        (0, s._)(
          [
            (0, f.Cb)({
              type: Boolean,
              value: !0,
              json: { read: { source: 'defaultVisibility' } },
            }),
          ],
          k.prototype,
          'visible',
          null,
        ),
        (k = D = (0, s._)([(0, v.j)('esri.layers.support.WMSSublayer')], k));
      const V = k,
        B = [
          [4001, 4999],
          [2044, 2045],
          [2081, 2083],
          [2085, 2086],
          [2093, 2093],
          [2096, 2098],
          [2105, 2132],
          [2169, 2170],
          [2176, 2180],
          [2193, 2193],
          [2200, 2200],
          [2206, 2212],
          [2319, 2319],
          [2320, 2462],
          [2523, 2549],
          [2551, 2735],
          [2738, 2758],
          [2935, 2941],
          [2953, 2953],
          [3006, 3030],
          [3034, 3035],
          [3058, 3059],
          [3068, 3068],
          [3114, 3118],
          [3126, 3138],
          [3300, 3301],
          [3328, 3335],
          [3346, 3346],
          [3350, 3352],
          [3366, 3366],
          [3416, 3416],
          [20004, 20032],
          [20064, 20092],
          [21413, 21423],
          [21473, 21483],
          [21896, 21899],
          [22171, 22177],
          [22181, 22187],
          [22191, 22197],
          [25884, 25884],
          [27205, 27232],
          [27391, 27398],
          [27492, 27492],
          [28402, 28432],
          [28462, 28492],
          [30161, 30179],
          [30800, 30800],
          [31251, 31259],
          [31275, 31279],
          [31281, 31290],
          [31466, 31700],
        ],
        G = { 84: 4326, 83: 4269, 27: 4267 };
      function W(e) {
        if (!e) return null;
        const t = { idCounter: -1 };
        'string' == typeof e && (e = new DOMParser().parseFromString(e, 'text/xml'));
        const r = e.documentElement;
        if ('ServiceExceptionReport' === r.nodeName) {
          const e = Array.prototype.slice
            .call(r.childNodes)
            .map((e) => e.textContent)
            .join('\r\n');
          throw new q.Z(
            'wmslayer:wms-capabilities-xml-is-not-valid',
            'The server returned errors when the WMS capabilities were requested.',
            e,
          );
        }
        const s = J('Capability', r),
          n = J('Service', r),
          i = J('Request', s);
        if (!s || !n || !i) return null;
        const l = J('Layer', s);
        if (!l) return null;
        const a =
            'WMS_Capabilities' === r.nodeName || 'WMT_MS_Capabilities' === r.nodeName
              ? r.getAttribute('version')
              : '1.3.0',
          o = K('Title', n, '') || K('Name', n, ''),
          u = K('AccessConstraints', n, ''),
          p = K('Abstract', n, ''),
          d = parseInt(K('MaxWidth', n, '5000'), 10),
          c = parseInt(K('MaxHeight', n, '5000'), 10),
          h = te(i, 'GetMap'),
          m = ee(i, 'GetMap'),
          y = se(l, a, t);
        let f,
          g,
          b,
          v,
          w = 0;
        if (
          (Array.prototype.slice.call(s.childNodes).forEach((e) => {
            'Layer' === e.nodeName &&
              (0 === w
                ? (f = e)
                : 1 === w
                ? (y.name && ((y.name = ''), y.sublayers.push(se(f, a, t))),
                  y.sublayers.push(se(e, a, t)))
                : y.sublayers.push(se(e, a, t)),
              w++);
          }),
          !y)
        )
          return null;
        const _ = y.fullExtents;
        if (((g = y.sublayers), g || (g = []), 0 === g.length && g.push(y), (b = y.extent), !b)) {
          const e = new x.Z(g[0].extent);
          (y.extent = e.toJSON()), (b = y.extent);
        }
        if (((v = y.spatialReferences), !v.length && g.length > 0)) {
          const e = (t) => {
            let r = [];
            return (
              t.sublayers.forEach((t) => {
                !r.length && t.spatialReferences.length && (r = t.spatialReferences || e(t));
              }),
              r
            );
          };
          g.forEach((t) => {
            v.length || (v = t.spatialReferences || e(t));
          });
        }
        const C = ee(i, 'GetFeatureInfo');
        let I;
        if (C) {
          const e = te(i, 'GetFeatureInfo');
          e.indexOf('text/html') > -1
            ? (I = 'text/html')
            : e.indexOf('text/plain') > -1 && (I = 'text/plain');
        }
        if (!I) {
          const e = function (t) {
            t &&
              ((t.queryable = !1),
              t.sublayers &&
                t.sublayers.forEach((t) => {
                  e(t);
                }));
          };
          e(y);
        }
        const S = Y(g),
          E = y.minScale || 0,
          T = y.maxScale || 0,
          O = y.dimensions,
          N = S.reduce((e, t) => e.concat(t.dimensions), []),
          F = O.concat(N).filter(ie);
        let U = null;
        if (F.length > 0) {
          let e = Number.POSITIVE_INFINITY,
            t = Number.NEGATIVE_INFINITY;
          F.forEach((r) => {
            const { extent: s } = r;
            var n;
            (n = s),
              Array.isArray(n) && n.length > 0 && n[0] instanceof Date
                ? s.forEach((r) => {
                    (e = Math.min(e, r.getTime())), (t = Math.max(t, r.getTime()));
                  })
                : s.forEach((r) => {
                    (e = Math.min(e, r.min.getTime())), (t = Math.max(t, r.max.getTime()));
                  });
          }),
            (U = {
              startTimeField: null,
              endTimeField: null,
              trackIdField: null,
              timeExtent: [e, t],
            });
        }
        return {
          copyright: u,
          description: p,
          dimensions: O,
          extent: b,
          fullExtents: _,
          featureInfoFormat: I,
          featureInfoUrl: C,
          mapUrl: m,
          maxWidth: d,
          maxHeight: c,
          maxScale: T,
          minScale: E,
          layers: S,
          spatialReferences: v,
          supportedImageFormatTypes: h,
          timeInfo: U,
          title: o,
          version: a,
        };
      }
      function $(e) {
        return B.some(([t, r]) => e >= t && e <= r);
      }
      function Y(e) {
        let t = [];
        return (
          e.forEach((e) => {
            t.push(e),
              e.sublayers &&
                e.sublayers.length &&
                ((t = t.concat(Y(e.sublayers))), delete e.sublayers);
          }),
          t
        );
      }
      function z(e, t, r) {
        var s;
        return null != (s = t.getAttribute(e)) ? s : r;
      }
      function J(e, t) {
        for (let r = 0; r < t.childNodes.length; r++) {
          const s = t.childNodes[r];
          if (ne(s) && s.nodeName === e) return s;
        }
        return null;
      }
      function X(e, t) {
        const r = [];
        for (let s = 0; s < t.childNodes.length; s++) {
          const n = t.childNodes[s];
          ne(n) && n.nodeName === e && r.push(n);
        }
        return r;
      }
      function K(e, t, r) {
        const s = J(e, t);
        return s ? s.textContent : r;
      }
      function Q(e, t, r) {
        if (!e) return null;
        const s = parseFloat(e.getAttribute('minx')),
          n = parseFloat(e.getAttribute('miny')),
          i = parseFloat(e.getAttribute('maxx')),
          l = parseFloat(e.getAttribute('maxy'));
        let a, o, u, p;
        r
          ? ((a = isNaN(n) ? -Number.MAX_VALUE : n),
            (o = isNaN(s) ? -Number.MAX_VALUE : s),
            (u = isNaN(l) ? Number.MAX_VALUE : l),
            (p = isNaN(i) ? Number.MAX_VALUE : i))
          : ((a = isNaN(s) ? -Number.MAX_VALUE : s),
            (o = isNaN(n) ? -Number.MAX_VALUE : n),
            (u = isNaN(i) ? Number.MAX_VALUE : i),
            (p = isNaN(l) ? Number.MAX_VALUE : l));
        const d = new C.Z({ wkid: t });
        return new x.Z({ xmin: a, ymin: o, xmax: u, ymax: p, spatialReference: d });
      }
      function ee(e, t) {
        const r = J(t, e);
        if (r) {
          const e = J('DCPType', r);
          if (e) {
            const t = J('HTTP', e);
            if (t) {
              const e = J('Get', t);
              if (e) {
                let t = (function (e, t, r, s) {
                  const n = J('OnlineResource', r);
                  return n ? z('xlink:href', n, null) : null;
                })(0, 0, e);
                if (t)
                  return (
                    t.indexOf('&') === t.length - 1 && (t = t.substring(0, t.length - 1)),
                    (function (e, t) {
                      const r = [],
                        s = (0, y.mN)(e);
                      for (const e in s.query)
                        s.query.hasOwnProperty(e) &&
                          -1 === t.indexOf(e.toLowerCase()) &&
                          r.push(e + '=' + s.query[e]);
                      return s.path + (r.length ? '?' + r.join('&') : '');
                    })(t, ['service', 'request'])
                  );
              }
            }
          }
        }
        return null;
      }
      function te(e, t) {
        const r = X('Operation', e);
        if (0 === r.length) return X('Format', J(t, e)).map((e) => e.textContent);
        const s = [];
        return (
          r.forEach((e) => {
            e.getAttribute('name') === t &&
              X('Format', e).forEach((e) => {
                s.push(e.textContent);
              });
          }),
          s
        );
      }
      function re(e, t, r) {
        const s = J(t, e);
        if (!s) return r;
        const { textContent: n } = s;
        if (null == n || '' === n) return r;
        const i = Number(n);
        return isNaN(i) ? r : i;
      }
      function se(e, t, r) {
        var s;
        if (!e) return null;
        const n = {
            id: r.idCounter++,
            fullExtents: [],
            parentLayerId: null,
            queryable: '1' === e.getAttribute('queryable'),
            spatialReferences: [],
            sublayers: null,
          },
          i = J('LatLonBoundingBox', e),
          l = J('EX_GeographicBoundingBox', e);
        let a = null;
        i && (a = Q(i, 4326)),
          l &&
            ((a = new x.Z(0, 0, 0, 0, new C.Z({ wkid: 4326 }))),
            (a.xmin = parseFloat(K('westBoundLongitude', l, '0'))),
            (a.ymin = parseFloat(K('southBoundLatitude', l, '0'))),
            (a.xmax = parseFloat(K('eastBoundLongitude', l, '0'))),
            (a.ymax = parseFloat(K('northBoundLatitude', l, '0')))),
          i || l || (a = new x.Z(-180, -90, 180, 90, new C.Z({ wkid: 4326 }))),
          (n.minScale = re(e, 'MaxScaleDenominator', 0)),
          (n.maxScale = re(e, 'MinScaleDenominator', 0));
        const o = ['1.0.0', '1.1.0', '1.1.1'].indexOf(t) > -1 ? 'SRS' : 'CRS';
        return (
          Array.prototype.slice.call(e.childNodes).forEach((e) => {
            if ('Name' === e.nodeName) n.name = e.textContent || '';
            else if ('Title' === e.nodeName) n.title = e.textContent || '';
            else if ('Abstract' === e.nodeName) n.description = e.textContent || '';
            else if ('BoundingBox' === e.nodeName) {
              const r = e.getAttribute(o);
              if (r && 0 === r.indexOf('EPSG:')) {
                const s = parseInt(r.substring(5), 10);
                0 === s || isNaN(s) || a || (a = '1.3.0' === t ? Q(e, s, $(s)) : Q(e, s));
              }
              const s = r && r.indexOf(':');
              if (s && s > -1) {
                let i = parseInt(r.substring(s + 1, r.length), 10);
                0 === i || isNaN(i) || (i = G[i] ? G[i] : i);
                const l = '1.3.0' === t ? Q(e, i, $(i)) : Q(e, i);
                n.fullExtents.push(l);
              }
            } else if (e.nodeName === o)
              e.textContent.split(' ').forEach((e) => {
                0 === (e = e.indexOf(':') > -1 ? parseInt(e.split(':')[1], 10) : parseInt(e, 10)) ||
                  isNaN(e) ||
                  (G[e] && (e = G[e]),
                  -1 === n.spatialReferences.indexOf(e) && n.spatialReferences.push(e));
              });
            else if ('Style' !== e.nodeName || n.legendURL) {
              if ('Layer' === e.nodeName) {
                const s = se(e, t, r);
                s &&
                  ((s.parentLayerId = n.id),
                  n.sublayers || (n.sublayers = []),
                  n.sublayers.push(s));
              }
            } else {
              const t = J('LegendURL', e);
              if (t) {
                const e = J('OnlineResource', t);
                e && (n.legendURL = e.getAttribute('xlink:href'));
              }
            }
          }),
          (n.extent = null == (s = a) ? void 0 : s.toJSON()),
          (n.dimensions = X('Dimension', e)
            .filter((e) => e.getAttribute('name') && e.getAttribute('units') && e.textContent)
            .map((e) => {
              const t = e.getAttribute('name'),
                r = e.getAttribute('units'),
                s = e.textContent,
                n = e.getAttribute('unitSymbol'),
                i = e.getAttribute('default'),
                l = '0' !== z('default', e, '0'),
                a = '0' !== z('nearestValue', e, '0'),
                o = '0' !== z('current', e, '0');
              return /^time$/i.test(t) && /^ISO8601$/i.test(r)
                ? {
                    name: 'time',
                    units: 'ISO8601',
                    extent: oe(s),
                    default: oe(i),
                    multipleValues: l,
                    nearestValue: a,
                    current: o,
                  }
                : /^elevation$/i.test(t)
                ? {
                    name: 'elevation',
                    units: r,
                    extent: le(s),
                    unitSymbol: n,
                    default: le(i),
                    multipleValues: l,
                    nearestValue: a,
                  }
                : {
                    name: t,
                    units: r,
                    extent: ae(s),
                    unitSymbol: n,
                    default: ae(i),
                    multipleValues: l,
                    nearestValue: a,
                  };
            })),
          n
        );
      }
      function ne(e) {
        return e.nodeType === Node.ELEMENT_NODE;
      }
      function ie(e) {
        return 'time' === e.name;
      }
      function le(e) {
        if (!e) return null;
        const t = -1 !== e.indexOf('/'),
          r = e.split(',');
        return t
          ? r
              .map((e) => {
                const t = e.split('/');
                return t.length < 2
                  ? null
                  : {
                      min: parseFloat(t[0]),
                      max: parseFloat(t[1]),
                      resolution: t.length >= 3 && '0' !== t[2] ? parseFloat(t[2]) : void 0,
                    };
              })
              .filter((e) => e)
          : r.map((e) => parseFloat(e));
      }
      function ae(e) {
        if (!e) return null;
        const t = -1 !== e.indexOf('/'),
          r = e.split(',');
        return t
          ? r
              .map((e) => {
                const t = e.split('/');
                return t.length < 2
                  ? null
                  : {
                      min: t[0],
                      max: t[1],
                      resolution: t.length >= 3 && '0' !== t[2] ? t[2] : void 0,
                    };
              })
              .filter((e) => e)
          : r;
      }
      function oe(e) {
        if (!e) return null;
        const t = -1 !== e.indexOf('/'),
          r = e.split(',');
        return t
          ? r
              .map((e) => {
                const t = e.split('/');
                return t.length < 2
                  ? null
                  : {
                      min: new Date(t[0]),
                      max: new Date(t[1]),
                      resolution:
                        t.length >= 3 && '0' !== t[2]
                          ? (function (e) {
                              const t = e.match(
                                /(?:p(\d+y|\d+(?:.|,)\d+y)?(\d+m|\d+(?:.|,)\d+m)?(\d+d|\d+(?:.|,)\d+d)?)?(?:t(\d+h|\d+(?:.|,)\d+h)?(\d+m|\d+(?:.|,)\d+m)?(\d+s|\d+(?:.|,)\d+s)?)?/i,
                              );
                              return t
                                ? {
                                    years: ue(t[1]),
                                    months: ue(t[2]),
                                    days: ue(t[3]),
                                    hours: ue(t[4]),
                                    minutes: ue(t[5]),
                                    seconds: ue(t[6]),
                                  }
                                : null;
                            })(t[2])
                          : void 0,
                    };
              })
              .filter((e) => e)
          : r.map((e) => new Date(e));
      }
      function ue(e) {
        if (!e) return 0;
        const t = e.match(/(?:\d+(?:.|,)\d+|\d+)/);
        if (!t) return 0;
        const r = t[0].replace(',', '.');
        return Number(r);
      }
      function pe(e) {
        return e.toISOString().replace(/\.[0-9]{3}/, '');
      }
      const de = new Set([102100, 3857, 102113, 900913]),
        ce = new Set([3395, 54004]);
      r(74569),
        r(84069),
        r(44567),
        r(98380),
        r(92896),
        r(22781),
        r(32422),
        r(96467),
        r(63571),
        r(59465),
        r(14249),
        r(9801),
        r(53523),
        r(42911),
        r(46826),
        r(45433),
        r(60217),
        r(30776),
        r(48027),
        r(54174),
        r(82426),
        r(63130),
        r(25696),
        r(66396),
        r(42775),
        r(95834),
        r(34394),
        r(57150),
        r(76726),
        r(20444),
        r(76393),
        r(78548),
        r(2497),
        r(49906),
        r(46527),
        r(48649),
        r(9960),
        r(3101),
        r(5853),
        r(39141),
        r(38742),
        r(48243),
        r(34635),
        r(10401),
        r(49900),
        r(66284),
        r(33921),
        r(3482),
        r(73173),
        r(88762),
        r(22739),
        r(20543),
        r(67477),
        r(78533),
        r(74653),
        r(91091),
        r(58943),
        r(70737),
        r(8487),
        r(17817),
        r(90814),
        r(15459),
        r(61847),
        r(16796),
        r(16955),
        r(22401),
        r(77894),
        r(55187),
        r(8586),
        r(44509),
        r(69814),
        r(11305),
        r(62259),
        r(44790),
        r(5909),
        r(60669),
        r(48208),
        r(51589),
        r(29107),
        r(30574),
        r(2157),
        r(25977),
        r(7471),
        r(54414),
        r(1648),
        r(8925),
        r(45154),
        r(16769),
        r(55531),
        r(30582),
        r(593),
        r(85699),
        r(63136),
        r(96055),
        r(47776),
        r(18033),
        r(6331),
        r(62048),
        r(4292),
        r(75626),
        r(72652),
        r(29641),
        r(30493),
        r(70821),
        r(82673),
        r(34229),
        r(37029),
        r(617),
        r(53785),
        r(95587),
        r(41864),
        r(56420),
        r(74742),
        r(28239),
        r(93314),
        r(35197),
        r(59765),
        r(77361),
        r(47842),
        r(17298),
        r(85557);
      const he = new d.J(
        {
          bmp: 'image/bmp',
          gif: 'image/gif',
          jpg: 'image/jpeg',
          png: 'image/png',
          svg: 'image/svg+xml',
        },
        { ignoreUnknown: !1 },
      );
      let me = class extends (0, p.p)(
        (0, E.B)((0, U.T)((0, N.R)((0, F.S)((0, T.O)((0, O.P)((0, h.M)(S.Z))))))),
      ) {
        constructor(...e) {
          super(...e),
            (this.allSublayers = new u.C({
              getCollections: () => [this.sublayers],
              getChildrenFunction: (e) => e.sublayers,
            })),
            (this.customParameters = null),
            (this.customLayerParameters = null),
            (this.copyright = null),
            (this.description = null),
            (this.dimensions = null),
            (this.fullExtent = null),
            (this.fullExtents = null),
            (this.featureInfoFormat = null),
            (this.featureInfoUrl = null),
            (this.imageFormat = null),
            (this.imageMaxHeight = 2048),
            (this.imageMaxWidth = 2048),
            (this.imageTransparency = !0),
            (this.legendEnabled = !0),
            (this.mapUrl = null),
            (this.isReference = null),
            (this.operationalLayerType = 'WMS'),
            (this.spatialReference = null),
            (this.spatialReferences = null),
            (this.sublayers = null),
            (this.type = 'wms'),
            (this.url = null),
            (this.version = null),
            this.watch(
              'sublayers',
              (e, t) => {
                if (t) {
                  for (const e of t) e.layer = null;
                  this.handles.remove('wms-sublayer');
                }
                if (e) {
                  for (const t of e) (t.parent = this), (t.layer = this);
                  this.handles.add(
                    [
                      e.on('after-add', ({ item: e }) => {
                        (e.parent = this), (e.layer = this);
                      }),
                      e.on('after-remove', ({ item: e }) => {
                        (e.parent = null), (e.layer = null);
                      }),
                    ],
                    'wms-sublayer',
                  );
                }
              },
              !0,
            );
        }
        normalizeCtorArgs(e, t) {
          return 'string' == typeof e ? { url: e, ...t } : e;
        }
        load(e) {
          const t = (0, c.i)(e) ? e.signal : null;
          return (
            this.addResolvingPromise(
              this.loadFromPortal({ supportedTypes: ['WMS'] }, e)
                .catch(m.r9)
                .then(() => this._fetchService(t)),
            ),
            Promise.resolve(this)
          );
        }
        readFullExtentFromItemOrMap(e, t) {
          const r = t.extent;
          return new x.Z({ xmin: r[0][0], ymin: r[0][1], xmax: r[1][0], ymax: r[1][1] });
        }
        writeFullExtent(e, t) {
          t.extent = [
            [e.xmin, e.ymin],
            [e.xmax, e.ymax],
          ];
        }
        readImageFormat(e, t) {
          const r = t.supportedImageFormatTypes;
          return r && r.indexOf('image/png') > -1 ? 'image/png' : r && r[0];
        }
        readSpatialReferenceFromItemOrDocument(e, t) {
          return new C.Z(t.spatialReferences[0]);
        }
        writeSpatialReferences(e, t) {
          const r = this.spatialReference && this.spatialReference.wkid;
          e && r
            ? ((t.spatialReferences = e.filter((e) => e !== r)), t.spatialReferences.unshift(r))
            : (t.spatialReferences = e);
        }
        readSublayersFromItemOrMap(e, t, r) {
          return ye(t.layers, r, t.visibleLayers);
        }
        readSublayers(e, t, r) {
          return ye(t.layers, r);
        }
        writeSublayers(e, t, r, s) {
          t.layers = [];
          const n = new Map(),
            i = e.flatten(({ sublayers: e }) => e && e.toArray()).toArray();
          i.forEach((e) => {
            'number' == typeof e.parent.id &&
              (n.has(e.parent.id) ? n.get(e.parent.id).push(e.id) : n.set(e.parent.id, [e.id]));
          }),
            i.forEach((e) => {
              const r = { sublayer: e, ...s },
                i = e.write(
                  { parentLayerId: 'number' == typeof e.parent.id ? e.parent.id : -1 },
                  r,
                );
              if ((n.has(e.id) && (i.sublayerIds = n.get(e.id)), !e.sublayers && e.name)) {
                const s = e.write({}, r);
                delete s.id, t.layers.push(s);
              }
            }),
            (t.visibleLayers = i.filter((e) => e.visible && !e.sublayers).map((e) => e.name));
        }
        createExportImageParameters(e, t, r, s) {
          const n = (s && s.pixelRatio) || 1,
            i = (0, I.a)({ extent: e, width: t }) * n,
            l = new R({ layer: this, scale: i }),
            { xmin: a, ymin: o, xmax: u, ymax: p, spatialReference: d } = e,
            h = (function (e, t) {
              let r = e.wkid;
              return (0, c.b)(t)
                ? r
                : (!t.includes(r) && e.latestWkid && (r = e.latestWkid),
                  de.has(r) ? t.find((e) => de.has(e)) || t.find((e) => ce.has(e)) || 102100 : r);
            })(d, this.spatialReferences),
            m = '1.3.0' === this.version && $(h) ? `${o},${a},${p},${u}` : `${a},${o},${u},${p}`,
            y = l.toJSON();
          return {
            bbox: m,
            ['1.3.0' === this.version ? 'crs' : 'srs']: isNaN(h) ? void 0 : 'EPSG:' + h,
            ...y,
          };
        }
        async fetchImage(e, t, r, s) {
          var n, i;
          const l = this.mapUrl,
            o = this.createExportImageParameters(e, t, r, s);
          if (!o.layers) {
            const e = document.createElement('canvas');
            return (e.width = t), (e.height = r), e;
          }
          const u = null == s || null == (n = s.timeExtent) ? void 0 : n.start,
            p = null == s || null == (i = s.timeExtent) ? void 0 : i.end,
            d =
              (0, c.i)(u) && (0, c.i)(p)
                ? u.getTime() === p.getTime()
                  ? pe(u)
                  : `${pe(u)}/${pe(p)}`
                : void 0,
            h = {
              responseType: 'image',
              query: this._mixCustomParameters({ width: t, height: r, ...o, time: d }),
              signal: null == s ? void 0 : s.signal,
            };
          return (
            null != s && s.timestamp && (h.query = { _ts: s.timestamp, ...h.query }),
            (0, a.default)(l, h).then((e) => e.data)
          );
        }
        fetchFeatureInfo(e, t, r, s, n) {
          const a = (0, I.a)({ extent: e, width: t }),
            o = (function (e) {
              return e.length
                ? e
                    .filter((e) => e.popupEnabled && e.name && e.queryable)
                    .map((e) => e.name)
                    .join(',')
                : '';
            })(new R({ layer: this, scale: a }).visibleSublayers);
          if (!this.featureInfoUrl || !o) return null;
          const u = '1.3.0' === this.version ? { I: s, J: n } : { x: s, y: n },
            p = {
              query_layers: o,
              request: 'GetFeatureInfo',
              info_format: this.featureInfoFormat,
              feature_count: 25,
              width: t,
              height: r,
              ...u,
            },
            d = { ...this.createExportImageParameters(e, t, r), ...p },
            c = this._mixCustomParameters(d),
            h = (0, y.fl)(this.featureInfoUrl, c),
            m = document.createElement('iframe');
          (m.src = h),
            (m.frameBorder = '0'),
            (m.marginHeight = '0'),
            (m.marginWidth = '0'),
            (m.style.width = '100%'),
            m.setAttribute('sandbox', '');
          const f = new l.Z({ title: this.title, content: m });
          return new i.Z({ sourceLayer: this, popupTemplate: f });
        }
        findSublayerById(e) {
          return this.allSublayers.find((t) => t.id === e);
        }
        findSublayerByName(e) {
          return this.allSublayers.find((t) => t.name === e);
        }
        supportsSpatialReference(e) {
          return (
            (0, L.e)(this.url) ||
            this.spatialReferences.some((t) => {
              const r = 900913 === t ? C.Z.WebMercator : new C.Z({ wkid: t });
              return (0, C.e)(r, e);
            })
          );
        }
        async _fetchService(e) {
          if (!this.resourceInfo) {
            this.parsedUrl.query &&
              this.parsedUrl.query.service &&
              ((this.parsedUrl.query.SERVICE = this.parsedUrl.query.service),
              delete this.parsedUrl.query.service),
              this.parsedUrl.query &&
                this.parsedUrl.query.request &&
                ((this.parsedUrl.query.REQUEST = this.parsedUrl.query.request),
                delete this.parsedUrl.query.request);
            const t = await (0, a.default)(this.parsedUrl.path, {
              query: {
                SERVICE: 'WMS',
                REQUEST: 'GetCapabilities',
                ...this.parsedUrl.query,
                ...this.customParameters,
              },
              responseType: 'xml',
              signal: e,
            });
            this.resourceInfo = W(t.data);
          }
          if (this.parsedUrl) {
            const e = new y.R9(this.parsedUrl.path);
            'https' !== e.scheme ||
              (e.port && '443' !== e.port) ||
              -1 !== n.Z.request.httpsDomains.indexOf(e.host) ||
              n.Z.request.httpsDomains.push(e.host);
          }
          this.read(this.resourceInfo, { origin: 'service' });
        }
        _mixCustomParameters(e) {
          if (!this.customLayerParameters && !this.customParameters) return e;
          const t = { ...this.customParameters, ...this.customLayerParameters };
          for (const r in t) e[r.toLowerCase()] = t[r];
          return e;
        }
      };
      function ye(e, t, r) {
        const s = new Map();
        e.every((e) => null == e.id) && (e = (0, c.d9)(e)).forEach((e, t) => (e.id = t));
        for (const n of e) {
          const e = new V();
          e.read(n, t),
            -1 === (null == r ? void 0 : r.indexOf(e.name)) && (e.visible = !1),
            s.set(e.id, e);
        }
        const n = [];
        for (const t of e) {
          const e = s.get(t.id);
          if (null != t.parentLayerId && t.parentLayerId >= 0) {
            const r = s.get(t.parentLayerId);
            r.sublayers || (r.sublayers = new o.Z()), r.sublayers.unshift(e);
          } else n.unshift(e);
        }
        return n;
      }
      (0, s._)([(0, f.Cb)({ readOnly: !0 })], me.prototype, 'allSublayers', void 0),
        (0, s._)(
          [(0, f.Cb)({ json: { type: Object, write: !0 } })],
          me.prototype,
          'customParameters',
          void 0,
        ),
        (0, s._)(
          [(0, f.Cb)({ json: { type: Object, write: !0 } })],
          me.prototype,
          'customLayerParameters',
          void 0,
        ),
        (0, s._)(
          [(0, f.Cb)({ type: String, json: { write: !0 } })],
          me.prototype,
          'copyright',
          void 0,
        ),
        (0, s._)([(0, f.Cb)()], me.prototype, 'description', void 0),
        (0, s._)([(0, f.Cb)({ readOnly: !0 })], me.prototype, 'dimensions', void 0),
        (0, s._)(
          [
            (0, f.Cb)({
              json: {
                type: [[Number]],
                read: { source: 'extent' },
                write: { target: 'extent' },
                origins: { service: { read: { source: 'extent' } } },
              },
            }),
          ],
          me.prototype,
          'fullExtent',
          void 0,
        ),
        (0, s._)(
          [(0, b.r)(['web-document', 'portal-item'], 'fullExtent', ['extent'])],
          me.prototype,
          'readFullExtentFromItemOrMap',
          null,
        ),
        (0, s._)(
          [
            (0, w.w)(['web-document', 'portal-item'], 'fullExtent', {
              extent: { type: [[Number]] },
            }),
          ],
          me.prototype,
          'writeFullExtent',
          null,
        ),
        (0, s._)([(0, f.Cb)()], me.prototype, 'fullExtents', void 0),
        (0, s._)(
          [(0, f.Cb)({ type: String, json: { write: { ignoreOrigin: !0 } } })],
          me.prototype,
          'featureInfoFormat',
          void 0,
        ),
        (0, s._)(
          [(0, f.Cb)({ type: String, json: { write: { ignoreOrigin: !0 } } })],
          me.prototype,
          'featureInfoUrl',
          void 0,
        ),
        (0, s._)(
          [
            (0, f.Cb)({
              type: String,
              json: {
                origins: {
                  'web-document': {
                    default: 'image/png',
                    type: he.jsonValues,
                    read: { reader: he.read, source: 'format' },
                    write: { writer: he.write, target: 'format' },
                  },
                },
              },
            }),
          ],
          me.prototype,
          'imageFormat',
          void 0,
        ),
        (0, s._)(
          [(0, b.r)('imageFormat', ['supportedImageFormatTypes'])],
          me.prototype,
          'readImageFormat',
          null,
        ),
        (0, s._)(
          [
            (0, f.Cb)({
              type: Number,
              json: { read: { source: 'maxHeight' }, write: { target: 'maxHeight' } },
            }),
          ],
          me.prototype,
          'imageMaxHeight',
          void 0,
        ),
        (0, s._)(
          [
            (0, f.Cb)({
              type: Number,
              json: { read: { source: 'maxWidth' }, write: { target: 'maxWidth' } },
            }),
          ],
          me.prototype,
          'imageMaxWidth',
          void 0,
        ),
        (0, s._)([(0, f.Cb)()], me.prototype, 'imageTransparency', void 0),
        (0, s._)([(0, f.Cb)(A.b)], me.prototype, 'legendEnabled', void 0),
        (0, s._)(
          [(0, f.Cb)({ type: ['show', 'hide', 'hide-children'] })],
          me.prototype,
          'listMode',
          void 0,
        ),
        (0, s._)(
          [(0, f.Cb)({ type: String, json: { write: { ignoreOrigin: !0 } } })],
          me.prototype,
          'mapUrl',
          void 0,
        ),
        (0, s._)(
          [
            (0, f.Cb)({
              type: Boolean,
              json: { read: !1, write: { enabled: !0, overridePolicy: () => ({ enabled: !1 }) } },
            }),
          ],
          me.prototype,
          'isReference',
          void 0,
        ),
        (0, s._)([(0, f.Cb)({ type: ['WMS'] })], me.prototype, 'operationalLayerType', void 0),
        (0, s._)(
          [
            (0, f.Cb)({
              type: C.Z,
              json: {
                origins: { service: { read: { source: 'extent.spatialReference' } } },
                write: !1,
              },
            }),
          ],
          me.prototype,
          'spatialReference',
          void 0,
        ),
        (0, s._)(
          [(0, b.r)(['web-document', 'portal-item'], 'spatialReference', ['spatialReferences'])],
          me.prototype,
          'readSpatialReferenceFromItemOrDocument',
          null,
        ),
        (0, s._)(
          [
            (0, f.Cb)({
              type: [g.I],
              json: { read: { source: 'spatialReferences' }, write: { ignoreOrigin: !0 } },
            }),
          ],
          me.prototype,
          'spatialReferences',
          void 0,
        ),
        (0, s._)(
          [(0, w.w)(['web-document', 'portal-item'], 'spatialReferences')],
          me.prototype,
          'writeSpatialReferences',
          null,
        ),
        (0, s._)(
          [
            (0, f.Cb)({
              type: o.Z.ofType(V),
              json: {
                write: {
                  target: 'layers',
                  overridePolicy(e, t, r) {
                    if (
                      (function (e, t) {
                        return e.some((e) => {
                          for (const r in e) if ((0, _.b)(e, r, null, t)) return !0;
                          return !1;
                        });
                      })(this.allSublayers, r)
                    )
                      return { ignoreOrigin: !0 };
                  },
                },
              },
            }),
          ],
          me.prototype,
          'sublayers',
          void 0,
        ),
        (0, s._)(
          [(0, b.r)(['web-document', 'portal-item'], 'sublayers', ['layers', 'visibleLayers'])],
          me.prototype,
          'readSublayersFromItemOrMap',
          null,
        ),
        (0, s._)(
          [(0, b.r)('service', 'sublayers', ['layers'])],
          me.prototype,
          'readSublayers',
          null,
        ),
        (0, s._)(
          [(0, w.w)('sublayers', { layers: { type: [V] }, visibleLayers: { type: [String] } })],
          me.prototype,
          'writeSublayers',
          null,
        ),
        (0, s._)(
          [(0, f.Cb)({ json: { read: !1 }, readOnly: !0, value: 'wms' })],
          me.prototype,
          'type',
          void 0,
        ),
        (0, s._)([(0, f.Cb)(A.u)], me.prototype, 'url', void 0),
        (0, s._)(
          [(0, f.Cb)({ type: String, json: { write: { ignoreOrigin: !0 } } })],
          me.prototype,
          'version',
          void 0,
        ),
        (me = (0, s._)([(0, v.j)('esri.layers.WMSLayer')], me));
      const fe = me;
    },
    77361: (e, t, r) => {
      'use strict';
      r.d(t, { Z: () => g });
      var s,
        n = r(29768),
        i = r(93314),
        l = r(59765),
        a = r(74673),
        o = r(76506),
        u = r(34250),
        p = (r(91306), r(92143), r(97714)),
        d = r(17533),
        c = r(2906);
      r(35197),
        r(21972),
        r(23639),
        r(86656),
        r(22723),
        r(91055),
        r(27794),
        r(6906),
        r(50406),
        r(60991),
        r(81172),
        r(71552),
        r(31450),
        r(40642),
        r(26341),
        r(57251);
      let h = (s = class extends a.a {
        constructor(e) {
          super(e), (this.respectsDaylightSaving = !1), (this.timezone = null);
        }
        readRespectsDaylightSaving(e, t) {
          return void 0 !== t.respectsDaylightSaving
            ? t.respectsDaylightSaving
            : void 0 !== t.respectDaylightSaving && t.respectDaylightSaving;
        }
        clone() {
          const { respectsDaylightSaving: e, timezone: t } = this;
          return new s({ respectsDaylightSaving: e, timezone: t });
        }
      });
      (0, n._)(
        [(0, u.Cb)({ type: Boolean, json: { write: !0 } })],
        h.prototype,
        'respectsDaylightSaving',
        void 0,
      ),
        (0, n._)(
          [(0, p.r)('respectsDaylightSaving', ['respectsDaylightSaving', 'respectDaylightSaving'])],
          h.prototype,
          'readRespectsDaylightSaving',
          null,
        ),
        (0, n._)(
          [
            (0, u.Cb)({
              type: String,
              json: { read: { source: 'timeZone' }, write: { target: 'timeZone' } },
            }),
          ],
          h.prototype,
          'timezone',
          void 0,
        ),
        (h = s = (0, n._)([(0, d.j)('esri.layers.support.TimeReference')], h));
      var m,
        y = h;
      let f = (m = class extends a.a {
        constructor(e) {
          super(e),
            (this.cumulative = !1),
            (this.endField = null),
            (this.fullTimeExtent = null),
            (this.hasLiveData = !1),
            (this.interval = null),
            (this.startField = null),
            (this.timeReference = null),
            (this.trackIdField = null),
            (this.useTime = !0);
        }
        readFullTimeExtent(e, t) {
          if (!t.timeExtent || !Array.isArray(t.timeExtent) || 2 !== t.timeExtent.length)
            return null;
          const r = new Date(t.timeExtent[0]),
            s = new Date(t.timeExtent[1]);
          return new i.Z({ start: r, end: s });
        }
        writeFullTimeExtent(e, t) {
          e && (0, o.i)(e.start) && (0, o.i)(e.end)
            ? (t.timeExtent = [e.start.getTime(), e.end.getTime()])
            : (t.timeExtent = null);
        }
        readInterval(e, t) {
          return t.timeInterval && t.timeIntervalUnits
            ? new l.Z({ value: t.timeInterval, unit: l.t.fromJSON(t.timeIntervalUnits) })
            : t.defaultTimeInterval && t.defaultTimeIntervalUnits
            ? new l.Z({
                value: t.defaultTimeInterval,
                unit: l.t.fromJSON(t.defaultTimeIntervalUnits),
              })
            : null;
        }
        writeInterval(e, t) {
          if (e) {
            const r = e.toJSON();
            (t.timeInterval = r.value), (t.timeIntervalUnits = r.unit);
          } else (t.timeInterval = null), (t.timeIntervalUnits = null);
        }
        clone() {
          const {
            cumulative: e,
            endField: t,
            hasLiveData: r,
            interval: s,
            startField: n,
            timeReference: i,
            fullTimeExtent: l,
            trackIdField: a,
            useTime: u,
          } = this;
          return new m({
            cumulative: e,
            endField: t,
            hasLiveData: r,
            interval: s,
            startField: n,
            timeReference: (0, o.d9)(i),
            fullTimeExtent: (0, o.d9)(l),
            trackIdField: a,
            useTime: u,
          });
        }
      });
      (0, n._)(
        [
          (0, u.Cb)({
            type: Boolean,
            json: {
              read: { source: 'exportOptions.timeDataCumulative' },
              write: { target: 'exportOptions.timeDataCumulative' },
            },
          }),
        ],
        f.prototype,
        'cumulative',
        void 0,
      ),
        (0, n._)(
          [
            (0, u.Cb)({
              type: String,
              json: {
                read: { source: 'endTimeField' },
                write: { target: 'endTimeField', allowNull: !0 },
              },
            }),
          ],
          f.prototype,
          'endField',
          void 0,
        ),
        (0, n._)(
          [(0, u.Cb)({ type: i.Z, json: { write: { enabled: !0, allowNull: !0 } } })],
          f.prototype,
          'fullTimeExtent',
          void 0,
        ),
        (0, n._)(
          [(0, p.r)('fullTimeExtent', ['timeExtent'])],
          f.prototype,
          'readFullTimeExtent',
          null,
        ),
        (0, n._)([(0, c.w)('fullTimeExtent')], f.prototype, 'writeFullTimeExtent', null),
        (0, n._)(
          [(0, u.Cb)({ type: Boolean, json: { write: !0 } })],
          f.prototype,
          'hasLiveData',
          void 0,
        ),
        (0, n._)(
          [(0, u.Cb)({ type: l.Z, json: { write: { enabled: !0, allowNull: !0 } } })],
          f.prototype,
          'interval',
          void 0,
        ),
        (0, n._)(
          [
            (0, p.r)('interval', [
              'timeInterval',
              'timeIntervalUnits',
              'defaultTimeInterval',
              'defaultTimeIntervalUnits',
            ]),
          ],
          f.prototype,
          'readInterval',
          null,
        ),
        (0, n._)([(0, c.w)('interval')], f.prototype, 'writeInterval', null),
        (0, n._)(
          [
            (0, u.Cb)({
              type: String,
              json: {
                read: { source: 'startTimeField' },
                write: { target: 'startTimeField', allowNull: !0 },
              },
            }),
          ],
          f.prototype,
          'startField',
          void 0,
        ),
        (0, n._)(
          [(0, u.Cb)({ type: y, json: { write: { enabled: !0, allowNull: !0 } } })],
          f.prototype,
          'timeReference',
          void 0,
        ),
        (0, n._)(
          [(0, u.Cb)({ type: String, json: { write: { enabled: !0, allowNull: !0 } } })],
          f.prototype,
          'trackIdField',
          void 0,
        ),
        (0, n._)(
          [
            (0, u.Cb)({
              type: Boolean,
              json: {
                read: { source: 'exportOptions.useTime' },
                write: { target: 'exportOptions.useTime' },
              },
            }),
          ],
          f.prototype,
          'useTime',
          void 0,
        ),
        (f = m = (0, n._)([(0, d.j)('esri.layers.support.TimeInfo')], f));
      const g = f;
    },
  },
]);
