(self.webpackChunkRemoteClient = self.webpackChunkRemoteClient || []).push([
  [3799],
  {
    93314: (e, t, r) => {
      'use strict';
      r.d(t, { Z: () => f });
      var l,
        s = r(29768),
        i = r(74673),
        n = r(76506),
        o = r(35197),
        a = r(34250),
        u = (r(91306), r(92143), r(97714)),
        p = r(17533),
        c = 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 d = (l = 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(l.allTime);
        }
        get isEmpty() {
          return this.equals(l.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 l({ end: this.end, start: this.start });
        }
        expandTo(e) {
          if (this.isEmpty || this.isAllTime) return this.clone();
          const t = (0, n.e)(this.start, (t) => (0, o.t)(t, e)),
            r = (0, n.e)(this.end, (t) => (0, o.o)((0, o.t)(t, e), 1, e));
          return new l({ start: t, end: r });
        }
        intersection(e) {
          if (!e) return this.clone();
          if (this.isEmpty || e.isEmpty) return l.empty;
          if (this.isAllTime) return e.clone();
          if (e.isAllTime) return this.clone();
          const t = (0, n.m)(this.start, -1 / 0, (e) => e.getTime()),
            r = (0, n.m)(this.end, 1 / 0, (e) => e.getTime()),
            s = (0, n.m)(e.start, -1 / 0, (e) => e.getTime()),
            i = (0, n.m)(e.end, 1 / 0, (e) => e.getTime());
          let o, a;
          if (
            (s >= t && s <= r ? (o = s) : t >= s && t <= i && (o = t),
            r >= s && r <= i ? (a = r) : i >= t && i <= r && (a = i),
            !isNaN(o) && !isNaN(a))
          ) {
            const e = new l();
            return (
              (e.start = o === -1 / 0 ? null : new Date(o)),
              (e.end = a === 1 / 0 ? null : new Date(a)),
              e
            );
          }
          return l.empty;
        }
        offset(e, t) {
          if (this.isEmpty || this.isAllTime) return this.clone();
          const r = new l(),
            { start: s, end: i } = this;
          return (
            (0, n.i)(s) && (r.start = (0, o.o)(s, e, t)),
            (0, n.i)(i) && (r.end = (0, o.o)(i, e, t)),
            r
          );
        }
        equals(e) {
          if (!e) return !1;
          const t = (0, n.i)(this.start) ? this.start.getTime() : this.start,
            r = (0, n.i)(this.end) ? this.end.getTime() : this.end,
            l = (0, n.i)(e.start) ? e.start.getTime() : e.start,
            s = (0, n.i)(e.end) ? e.end.getTime() : e.end;
          return t === l && r === s;
        }
        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, n.i)(this.start) && (0, n.i)(e.start)
                ? new Date(Math.min(this.start.getTime(), e.start.getTime()))
                : null,
            r =
              (0, n.i)(this.end) && (0, n.i)(e.end)
                ? new Date(Math.max(this.end.getTime(), e.end.getTime()))
                : null;
          return new l({ start: t, end: r });
        }
      });
      (0, s._)(
        [(0, a.Cb)({ type: Date, json: { write: { allowNull: !0 } } })],
        d.prototype,
        'end',
        void 0,
      ),
        (0, s._)([(0, u.r)('end')], d.prototype, 'readEnd', null),
        (0, s._)([(0, c.w)('end')], d.prototype, 'writeEnd', null),
        (0, s._)([(0, a.Cb)({ readOnly: !0, json: { read: !1 } })], d.prototype, 'isAllTime', null),
        (0, s._)([(0, a.Cb)({ readOnly: !0, json: { read: !1 } })], d.prototype, 'isEmpty', null),
        (0, s._)(
          [(0, a.Cb)({ type: Date, json: { write: { allowNull: !0 } } })],
          d.prototype,
          'start',
          void 0,
        ),
        (0, s._)([(0, u.r)('start')], d.prototype, 'readStart', null),
        (0, s._)([(0, c.w)('start')], d.prototype, 'writeStart', null),
        (d = l = (0, s._)([(0, p.j)('esri.TimeExtent')], d));
      const h = new d(),
        m = new d({ start: void 0, end: void 0 }),
        f = d;
    },
    82673: (e, t, r) => {
      'use strict';
      r.d(t, { I: () => n });
      var l = r(29768),
        s = r(17533);
      let i = 0;
      const n = (e) => {
        let t = class extends e {
          constructor(...e) {
            super(...e),
              Object.defineProperty(this, 'uid', {
                writable: !1,
                configurable: !1,
                value: Date.now().toString(16) + '-object-' + i++,
              });
          }
        };
        return (t = (0, l._)([(0, s.j)('esri.core.Identifiable')], t)), t;
      };
      let o = class extends n(class {}) {};
      o = (0, l._)([(0, s.j)('esri.core.Identifiable')], o);
    },
    62162: (e, t, r) => {
      'use strict';
      r.d(t, { P: () => b });
      var l = r(29768),
        s = r(88762),
        i = r(82058),
        n = r(41864),
        o = r(60991),
        a = r(92143),
        u = r(76506),
        p = r(50406),
        c = r(32101),
        d = r(34250),
        h = (r(91306), r(97714)),
        m = r(17533),
        f = r(2906),
        y = r(49900),
        g = r(56420),
        v = r(74653);
      const w = a.L.getLogger('esri.layers.mixins.PortalLayer'),
        b = (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 l = await r
                    .e(8642)
                    .then(r.bind(r, 8642))
                    .then(function (e) {
                      return e.l;
                    });
                  return (
                    (0, p.k_)(t),
                    await l.load(
                      {
                        instance: this,
                        supportedTypes: e.supportedTypes,
                        validateItem: e.validateItem,
                        supportsData: e.supportsData,
                      },
                      t,
                    )
                  );
                } catch (e) {
                  throw (
                    ((0, p.D_)(e) ||
                      w.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 == s.id ? void 0 : s.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 l = null == (t = this.portalItem) || null == (r = t.portal) ? void 0 : r.user;
              if (l) return l;
              const o = s.id.findServerInfo(this.url);
              if (null == o || !o.owningSystemUrl) return null;
              const a = `${o.owningSystemUrl}/sharing/rest`,
                p = y.Z.getDefault();
              if (p && p.loaded && (0, c.Fv)(p.restUrl) === (0, c.Fv)(a)) return p.user;
              const d = `${a}/community/self`,
                h = (0, u.i)(e) ? e.signal : null,
                m = await (0, n.r)(
                  (0, i.default)(d, { authMode: 'no-prompt', query: { f: 'json' }, signal: h }),
                );
              return m.ok ? v.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,
                l =
                  this.portalItem &&
                  this.portalItem.id &&
                  (this.portalItem.portal || y.Z.getDefault());
              return r && l && !(0, c.tm)(l.restUrl, r.restUrl)
                ? (t.messages &&
                    t.messages.push(
                      new o.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, l._)([(0, d.Cb)({ type: g.default })], t.prototype, 'portalItem', null),
            (0, l._)(
              [(0, h.r)('web-document', 'portalItem', ['itemId'])],
              t.prototype,
              'readPortalItem',
              null,
            ),
            (0, l._)(
              [(0, f.w)('web-document', 'portalItem', { itemId: { type: String } })],
              t.prototype,
              'writePortalItem',
              null,
            ),
            (0, l._)([(0, d.Cb)()], t.prototype, 'resourceReferences', void 0),
            (0, l._)(
              [(0, d.Cb)({ readOnly: !0 })],
              t.prototype,
              'userHasEditingPrivileges',
              void 0,
            ),
            (t = (0, l._)([(0, m.j)('esri.layers.mixins.PortalLayer')], t)),
            t
          );
        },
        _ = { credential: null, user: null };
    },
    92482: (e, t, r) => {
      'use strict';
      r.d(t, {
        N: () => c,
        a: () => s,
        d: () => u,
        f: () => i,
        m: () => p,
        p: () => n,
        t: () => o,
        x: () => a,
      }),
        r(76506);
      var l = r(21801);
      function s(e = d) {
        return [e[0], e[1], e[2], e[3]];
      }
      function i(e, t, r, l, i = s()) {
        return (i[0] = e), (i[1] = t), (i[2] = r), (i[3] = l), i;
      }
      function n(e, t = s()) {
        return (t[0] = e.xmin), (t[1] = e.ymin), (t[2] = e.xmax), (t[3] = e.ymax), t;
      }
      function o(e, t) {
        return new l.Z({ xmin: e[0], ymin: e[1], xmax: e[2], ymax: e[3], spatialReference: t });
      }
      function a(e) {
        return (
          (function (e) {
            return e[0] >= e[2] ? 0 : e[2] - e[0];
          })(e) *
          (function (e) {
            return e[1] >= e[3] ? 0 : e[3] - e[1];
          })(e)
        );
      }
      function u(e, t) {
        return (
          Math.max(t[0], e[0]) <= Math.min(t[2], e[2]) &&
          Math.max(t[1], e[1]) <= Math.min(t[3], e[3])
        );
      }
      function p(e, t) {
        return t[0] >= e[0] && t[2] <= e[2] && t[1] >= e[1] && t[3] <= e[3];
      }
      const c = [1 / 0, 1 / 0, -1 / 0, -1 / 0],
        d = [0, 0, 0, 0];
    },
    85557: (e, t, r) => {
      'use strict';
      r.d(t, { m: () => i });
      var l = r(53785),
        s = r(89623);
      const i = {
        inches: (0, l.c)(1, 'meters', 'inches'),
        feet: (0, l.c)(1, 'meters', 'feet'),
        'us-feet': (0, l.c)(1, 'meters', 'us-feet'),
        yards: (0, l.c)(1, 'meters', 'yards'),
        miles: (0, l.c)(1, 'meters', 'miles'),
        'nautical-miles': (0, l.c)(1, 'meters', 'nautical-miles'),
        millimeters: (0, l.c)(1, 'meters', 'millimeters'),
        centimeters: (0, l.c)(1, 'meters', 'centimeters'),
        decimeters: (0, l.c)(1, 'meters', 'decimeters'),
        meters: (0, l.c)(1, 'meters', 'meters'),
        kilometers: (0, l.c)(1, 'meters', 'kilometers'),
        'decimal-degrees': 1 / (0, l.l)(1, 'meters', s.e.radius),
      };
    },
    34394: (e, t, r) => {
      'use strict';
      r.d(t, { o: () => s, t: () => i });
      var l = r(91306);
      function s(e) {
        const t = (0, l.m)(100 * (1 - e));
        return Math.max(0, Math.min(t, 100));
      }
      function i(e) {
        const t = 1 - e / 100;
        return Math.max(0, Math.min(t, 1));
      }
    },
    38742: (e, t, r) => {
      'use strict';
      r.d(t, { f: () => i, i: () => c, p: () => h, r: () => o, t: () => n, w: () => a });
      var l = r(76506),
        s = r(32101);
      function i(e, t) {
        const r = t && t.url && t.url.path;
        if (
          e &&
          r &&
          ((e = (0, s.hF)(e, r, { preserveProtocolRelative: !0 })),
          t.portalItem && t.readResourcePaths)
        ) {
          const r = (0, s.PF)(e, t.portalItem.itemUrl);
          p.test(r) && t.readResourcePaths.push(t.portalItem.resourceFromPath(r).path);
        }
        return d(e, t && t.portal);
      }
      function n(e, t, r = 0) {
        if (!e) return e;
        !(0, s.YP)(e) && t && t.blockedRelativeUrls && t.blockedRelativeUrls.push(e);
        let l = (0, s.hF)(e);
        if (t) {
          const r =
            (t.verifyItemRelativeUrls && t.verifyItemRelativeUrls.rootPath) ||
            (t.url && t.url.path);
          if (r) {
            const i = d(r, t.portal);
            (l = (0, s.PF)(d(l, t.portal), i, i)),
              l !== e && t.verifyItemRelativeUrls && t.verifyItemRelativeUrls.writtenUrls.push(l);
          }
        }
        return (
          (l = (function (e, t) {
            return t && !t.isPortal && t.urlKey && t.customBaseUrl
              ? (0, s.Ie)(e, `${t.urlKey}.${t.customBaseUrl}`, t.portalHostname)
              : e;
          })(l, t && t.portal)),
          (0, s.YP)(l) && (l = (0, s.Fv)(l)),
          null != t &&
            t.resources &&
            null != t &&
            t.portalItem &&
            !(0, s.YP)(l) &&
            !(0, s.HK)(l) &&
            0 === r &&
            t.resources.toKeep.push({ resource: t.portalItem.resourceFromPath(l) }),
          l
        );
      }
      function o(e, t, r) {
        return i(e, r);
      }
      function a(e, t, r, l) {
        const s = n(e, l);
        void 0 !== s && (t[r] = s);
      }
      const u = /\/items\/([^\/]+)\/resources\//,
        p = /^\.\/resources\//;
      function c(e) {
        const t = (0, l.i)(e) ? e.match(u) : null;
        return (0, l.i)(t) ? t[1] : null;
      }
      function d(e, t) {
        if (!t || t.isPortal || !t.urlKey || !t.customBaseUrl) return e;
        const r = `${t.urlKey}.${t.customBaseUrl}`;
        return (0, s.D6)(s.Gd, `${s.Gd.scheme}://${r}`)
          ? (0, s.Ie)(e, t.portalHostname, r)
          : (0, s.Ie)(e, r, t.portalHostname);
      }
      var h = Object.freeze({
        __proto__: null,
        fromJSON: i,
        toJSON: n,
        read: o,
        write: a,
        itemIdFromResourceUrl: c,
      });
    },
    35197: (e, t, r) => {
      'use strict';
      r.d(t, { c: () => o, o: () => i, t: () => n }), r(76506);
      const l = {
          milliseconds: 1,
          seconds: 1e3,
          minutes: 6e4,
          hours: 36e5,
          days: 864e5,
          weeks: 6048e5,
          months: 26784e5,
          years: 31536e6,
          decades: 31536e7,
          centuries: 31536e8,
        },
        s = {
          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 l = new Date(e.getTime());
        if (t && r) {
          const e = s[r],
            { getter: i, setter: n, multiplier: o } = e;
          l[n](l[i]() + t * o);
        }
        return l;
      }
      function n(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 o(e, t, r) {
        return 0 === e ? 0 : (e * l[t]) / l[r];
      }
    },
    3799: (e, t, r) => {
      'use strict';
      r.r(t), r.d(t, { default: () => j, W: () => C, a: () => P });
      var l,
        s = r(29768),
        i = (r(74569), r(82058)),
        n = r(60991),
        o = r(54179),
        a = r(40642),
        u = r(32101),
        p = r(34250),
        c = r(76506),
        d = (r(91306), r(92143), r(97714)),
        h = r(17533),
        m = r(2906),
        f = r(41617),
        y = r(11118),
        g = r(89440),
        v = r(62162),
        w = r(16647),
        b = r(58912),
        _ = r(92817),
        T = r(43352),
        I = r(74673),
        x = r(21801),
        D = r(60947),
        S = r(91597);
      r(73796),
        r(21972),
        r(23639),
        r(86656),
        r(22723),
        r(91055),
        r(27794),
        r(6906),
        r(50406),
        r(81172),
        r(71552),
        r(31450),
        r(26341),
        r(84069),
        r(35132),
        r(89623),
        r(86787),
        r(44567),
        r(98380),
        r(92896),
        r(22781),
        r(57251),
        r(32422),
        r(88762),
        r(50161),
        r(76996),
        r(82673),
        r(22739),
        r(20543),
        r(43022),
        r(93314),
        r(35197),
        r(38742),
        r(47842),
        r(14249),
        r(9801),
        r(53523),
        r(59465),
        r(42911),
        r(46826),
        r(45433),
        r(60217),
        r(17298),
        r(85557),
        r(53785),
        r(95587),
        r(34394),
        r(41864),
        r(49900),
        r(66284),
        r(33921),
        r(3482),
        r(73173),
        r(67477),
        r(78533),
        r(74653),
        r(91091),
        r(58943),
        r(56420),
        r(74742),
        r(28239),
        r(92482);
      let R = (l = class extends I.a {
        constructor(e) {
          super(e);
        }
        clone() {
          return new l({
            customLayerParameters: (0, c.d9)(this.customLayerParameters),
            customParameters: (0, c.d9)(this.customParameters),
            layerIdentifier: this.layerIdentifier,
            tileMatrixSet: this.tileMatrixSet,
            url: this.url,
          });
        }
      });
      (0, s._)(
        [(0, p.Cb)({ json: { type: Object, write: !0 } })],
        R.prototype,
        'customLayerParameters',
        void 0,
      ),
        (0, s._)(
          [(0, p.Cb)({ json: { type: Object, write: !0 } })],
          R.prototype,
          'customParameters',
          void 0,
        ),
        (0, s._)(
          [(0, p.Cb)({ type: String, json: { write: !0 } })],
          R.prototype,
          'layerIdentifier',
          void 0,
        ),
        (0, s._)(
          [(0, p.Cb)({ type: String, json: { write: !0 } })],
          R.prototype,
          'tileMatrixSet',
          void 0,
        ),
        (0, s._)([(0, p.Cb)({ type: String, json: { write: !0 } })], R.prototype, 'url', void 0),
        (R = l = (0, s._)([(0, h.j)('esri.layer.support.WMTSLayerInfo')], R));
      var C = R;
      let M = class extends (0, y.B)((0, w.R)((0, b.S)((0, g.O)((0, v.P)((0, o.M)(f.Z)))))) {
        constructor(...e) {
          super(...e),
            (this.copyright = ''),
            (this.fullExtent = new x.Z(
              -20037508.342787,
              -20037508.34278,
              20037508.34278,
              20037508.342787,
              D.Z.WebMercator,
            )),
            (this.legendEnabled = !1),
            (this.isReference = null),
            (this.popupEnabled = !1),
            (this.spatialReference = D.Z.WebMercator),
            (this.subDomains = null),
            (this.tileInfo = new T.Z({
              size: [256, 256],
              dpi: 96,
              format: 'png8',
              compressionQuality: 0,
              origin: new S.Z({
                x: -20037508.342787,
                y: 20037508.342787,
                spatialReference: D.Z.WebMercator,
              }),
              spatialReference: D.Z.WebMercator,
              lods: [
                new _.Z({ level: 0, scale: 591657527.591555, resolution: 156543.033928 }),
                new _.Z({ level: 1, scale: 295828763.795777, resolution: 78271.5169639999 }),
                new _.Z({ level: 2, scale: 147914381.897889, resolution: 39135.7584820001 }),
                new _.Z({ level: 3, scale: 73957190.948944, resolution: 19567.8792409999 }),
                new _.Z({ level: 4, scale: 36978595.474472, resolution: 9783.93962049996 }),
                new _.Z({ level: 5, scale: 18489297.737236, resolution: 4891.96981024998 }),
                new _.Z({ level: 6, scale: 9244648.868618, resolution: 2445.98490512499 }),
                new _.Z({ level: 7, scale: 4622324.434309, resolution: 1222.99245256249 }),
                new _.Z({ level: 8, scale: 2311162.217155, resolution: 611.49622628138 }),
                new _.Z({ level: 9, scale: 1155581.108577, resolution: 305.748113140558 }),
                new _.Z({ level: 10, scale: 577790.554289, resolution: 152.874056570411 }),
                new _.Z({ level: 11, scale: 288895.277144, resolution: 76.4370282850732 }),
                new _.Z({ level: 12, scale: 144447.638572, resolution: 38.2185141425366 }),
                new _.Z({ level: 13, scale: 72223.819286, resolution: 19.1092570712683 }),
                new _.Z({ level: 14, scale: 36111.909643, resolution: 9.55462853563415 }),
                new _.Z({ level: 15, scale: 18055.954822, resolution: 4.77731426794937 }),
                new _.Z({ level: 16, scale: 9027.977411, resolution: 2.38865713397468 }),
                new _.Z({ level: 17, scale: 4513.988705, resolution: 1.19432856685505 }),
                new _.Z({ level: 18, scale: 2256.994353, resolution: 0.597164283559817 }),
                new _.Z({ level: 19, scale: 1128.497176, resolution: 0.298582141647617 }),
              ],
            })),
            (this.type = 'web-tile'),
            (this.urlTemplate = null),
            (this.wmtsInfo = null);
        }
        normalizeCtorArgs(e, t) {
          return 'string' == typeof e ? { urlTemplate: e, ...t } : e;
        }
        load(e) {
          const t = this.loadFromPortal({ supportedTypes: ['WMTS'] }, e).then(() => {
            let e = '';
            if (this.urlTemplate)
              if (this.spatialReference.equals(this.tileInfo.spatialReference)) {
                const t = new u.R9(this.urlTemplate);
                (this.subDomains && this.subDomains.length > 0) ||
                  -1 === t.authority.indexOf('{subDomain}') ||
                  (e = "is missing 'subDomains' property");
              } else e = 'spatialReference must match tileInfo.spatialReference';
            else e = "is missing the required 'urlTemplate' property value";
            if (e)
              throw new n.Z(
                'web-tile-layer:load',
                `WebTileLayer (title: '${this.title}', id: '${this.id}') ${e}`,
              );
          });
          return this.addResolvingPromise(t), Promise.resolve(this);
        }
        get levelValues() {
          const e = [];
          if (!this.tileInfo) return null;
          for (const t of this.tileInfo.lods) e[t.level] = t.levelValue || t.level;
          return e;
        }
        readSpatialReference(e, t) {
          return (
            e ||
            (t.fullExtent &&
              t.fullExtent.spatialReference &&
              D.Z.fromJSON(t.fullExtent.spatialReference))
          );
        }
        get tileServers() {
          if (!this.urlTemplate) return null;
          const e = [],
            { urlTemplate: t, subDomains: r } = this,
            l = new u.R9(t),
            s = l.scheme ? l.scheme + '://' : '//',
            i = s + l.authority + '/';
          if (-1 === l.authority.indexOf('{subDomain}')) e.push(i);
          else if (r && r.length > 0 && l.authority.split('.').length > 1)
            for (const t of r) e.push(s + l.authority.replace(/\{subDomain\}/gi, t) + '/');
          return e.map((e) => ('/' !== e.charAt(e.length - 1) && (e += '/'), e));
        }
        get urlPath() {
          if (!this.urlTemplate) return null;
          const e = this.urlTemplate,
            t = new u.R9(e),
            r = (t.scheme ? t.scheme + '://' : '//') + t.authority + '/';
          return e.substring(r.length);
        }
        readUrlTemplate(e, t) {
          return e || t.templateUrl;
        }
        writeUrlTemplate(e, t) {
          e && (0, u.oC)(e) && (e = 'https:' + e),
            e &&
              ((e = e
                .replace(/\{z\}/gi, '{level}')
                .replace(/\{x\}/gi, '{col}')
                .replace(/\{y\}/gi, '{row}')),
              (e = (0, u.Fv)(e))),
            (t.templateUrl = e);
        }
        fetchTile(e, t, r, l = {}) {
          const { signal: s, timestamp: n } = l,
            o = this.getTileUrl(e, t, r),
            a = { responseType: 'image', signal: s };
          return (
            null != n && (a.query = { _ts: l.timestamp }), (0, i.default)(o, a).then((e) => e.data)
          );
        }
        getTileUrl(e, t, r) {
          const l = this.levelValues[e];
          return (
            this.tileServers[t % this.tileServers.length] +
            (0, a.r)(this.urlPath, { level: l, z: l, col: r, x: r, row: t, y: t })
          );
        }
      };
      (0, s._)(
        [(0, p.Cb)({ type: String, value: '', json: { write: !0 } })],
        M.prototype,
        'copyright',
        void 0,
      ),
        (0, s._)(
          [(0, p.Cb)({ type: x.Z, json: { write: !0 } })],
          M.prototype,
          'fullExtent',
          void 0,
        ),
        (0, s._)(
          [(0, p.Cb)({ readOnly: !0, json: { read: !1, write: !1 } })],
          M.prototype,
          'legendEnabled',
          void 0,
        ),
        (0, s._)([(0, p.Cb)({ type: ['show', 'hide'] })], M.prototype, 'listMode', void 0),
        (0, s._)([(0, p.Cb)()], M.prototype, 'levelValues', null),
        (0, s._)(
          [
            (0, p.Cb)({
              type: Boolean,
              json: { read: !1, write: { enabled: !0, overridePolicy: () => ({ enabled: !1 }) } },
            }),
          ],
          M.prototype,
          'isReference',
          void 0,
        ),
        (0, s._)(
          [(0, p.Cb)({ type: ['WebTiledLayer'], value: 'WebTiledLayer' })],
          M.prototype,
          'operationalLayerType',
          void 0,
        ),
        (0, s._)(
          [(0, p.Cb)({ readOnly: !0, json: { read: !1, write: !1 } })],
          M.prototype,
          'popupEnabled',
          void 0,
        ),
        (0, s._)([(0, p.Cb)({ type: D.Z })], M.prototype, 'spatialReference', void 0),
        (0, s._)(
          [(0, d.r)('spatialReference', ['spatialReference', 'fullExtent.spatialReference'])],
          M.prototype,
          'readSpatialReference',
          null,
        ),
        (0, s._)(
          [(0, p.Cb)({ type: [String], json: { write: !0 } })],
          M.prototype,
          'subDomains',
          void 0,
        ),
        (0, s._)([(0, p.Cb)({ type: T.Z, json: { write: !0 } })], M.prototype, 'tileInfo', void 0),
        (0, s._)([(0, p.Cb)({ readOnly: !0 })], M.prototype, 'tileServers', null),
        (0, s._)([(0, p.Cb)({ json: { read: !1 } })], M.prototype, 'type', void 0),
        (0, s._)([(0, p.Cb)()], M.prototype, 'urlPath', null),
        (0, s._)(
          [
            (0, p.Cb)({
              type: String,
              json: { origins: { 'portal-item': { read: { source: 'url' } } } },
            }),
          ],
          M.prototype,
          'urlTemplate',
          void 0,
        ),
        (0, s._)(
          [(0, d.r)('urlTemplate', ['urlTemplate', 'templateUrl'])],
          M.prototype,
          'readUrlTemplate',
          null,
        ),
        (0, s._)(
          [(0, m.w)('urlTemplate', { templateUrl: { type: String } })],
          M.prototype,
          'writeUrlTemplate',
          null,
        ),
        (0, s._)([(0, p.Cb)({ type: C, json: { write: !0 } })], M.prototype, 'wmtsInfo', void 0),
        (M = (0, s._)([(0, h.j)('esri.layers.WebTileLayer')], M));
      var Z = M,
        P = Object.freeze({ __proto__: null, default: Z });
      const j = Z;
    },
    92817: (e, t, r) => {
      'use strict';
      r.d(t, { Z: () => p });
      var l,
        s = r(29768),
        i = r(74673),
        n = r(34250),
        o = (r(76506), r(91306)),
        a = (r(92143), r(17533));
      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 u = (l = class extends i.a {
        constructor(e) {
          super(e),
            (this.level = 0),
            (this.levelValue = null),
            (this.resolution = 0),
            (this.scale = 0);
        }
        clone() {
          return new l({
            level: this.level,
            levelValue: this.levelValue,
            resolution: this.resolution,
            scale: this.scale,
          });
        }
      });
      (0, s._)([(0, n.Cb)({ type: o.I, json: { write: !0 } })], u.prototype, 'level', void 0),
        (0, s._)(
          [(0, n.Cb)({ type: String, json: { write: !0 } })],
          u.prototype,
          'levelValue',
          void 0,
        ),
        (0, s._)(
          [(0, n.Cb)({ type: Number, json: { write: !0 } })],
          u.prototype,
          'resolution',
          void 0,
        ),
        (0, s._)([(0, n.Cb)({ type: Number, json: { write: !0 } })], u.prototype, 'scale', void 0),
        (u = l = (0, s._)([(0, a.j)('esri.layers.support.LOD')], u));
      const p = u;
    },
    43352: (e, t, r) => {
      'use strict';
      r.d(t, { Z: () => b });
      var l,
        s = r(29768),
        i = r(57251),
        n = r(74673),
        o = r(53785),
        a = r(34250),
        u = (r(76506), r(91306)),
        p = (r(92143), r(97714)),
        c = r(17533),
        d = r(2906),
        h = r(91597),
        m = r(60947),
        f = r(92482),
        y = r(35132),
        g = r(92817);
      r(71552),
        r(21972),
        r(23639),
        r(86656),
        r(22723),
        r(91055),
        r(27794),
        r(6906),
        r(50406),
        r(60991),
        r(81172),
        r(31450),
        r(40642),
        r(26341),
        r(95587),
        r(89623),
        r(86787),
        r(73796),
        r(21801);
      const v = new i.J({
        PNG: 'png',
        PNG8: 'png8',
        PNG24: 'png24',
        PNG32: 'png32',
        JPEG: 'jpg',
        JPG: 'jpg',
        DIB: 'dib',
        TIFF: 'tiff',
        EMF: 'emf',
        PS: 'ps',
        PDF: 'pdf',
        GIF: 'gif',
        SVG: 'svg',
        SVGZ: 'svgz',
        Mixed: 'mixed',
        MIXED: 'mixed',
        LERC: 'lerc',
        LERC2D: 'lerc2d',
        RAW: 'raw',
        pbf: 'pbf',
      });
      let w = (l = class extends n.a {
        constructor(e) {
          super(e),
            (this.dpi = 96),
            (this.format = null),
            (this.origin = null),
            (this.minScale = 0),
            (this.maxScale = 0),
            (this.size = null),
            (this.spatialReference = null);
        }
        static create(e = {}) {
          const {
            resolutionFactor: t = 1,
            scales: r,
            size: s = 256,
            spatialReference: i = m.Z.WebMercator,
            numLODs: n = 24,
          } = e;
          if (!(0, m.j)(i)) {
            const e = [];
            if (r)
              for (let t = 0; t < r.length; t++) {
                const l = r[t];
                e.push({ level: t, scale: l, resolution: l });
              }
            else {
              let t = 5e-4;
              for (let r = n - 1; r >= 0; r--)
                e.unshift({ level: r, scale: t, resolution: t }), (t *= 2);
            }
            return new l({
              dpi: 96,
              lods: e,
              origin: new h.Z(0, 0, i),
              size: [s, s],
              spatialReference: i,
            });
          }
          const a = (0, m.g)(i),
            u = e.origin
              ? new h.Z({ x: e.origin.x, y: e.origin.y, spatialReference: i })
              : new h.Z(
                  a
                    ? { x: a.origin[0], y: a.origin[1], spatialReference: i }
                    : { x: 0, y: 0, spatialReference: i },
                ),
            p = 1 / (39.37 * (0, o.a)(i) * 96),
            c = [];
          if (r)
            for (let e = 0; e < r.length; e++) {
              const t = r[e],
                l = t * p;
              c.push({ level: e, scale: t, resolution: l });
            }
          else {
            let e = (0, m.l)(i) ? (512 / s) * 591657527.5917094 : (256 / s) * 591657527.591555;
            const r = Math.ceil(n / t);
            c.push({ level: 0, scale: e, resolution: e * p });
            for (let l = 1; l < r; l++) {
              const r = e / 2 ** t,
                s = r * p;
              c.push({ level: l, scale: r, resolution: s }), (e = r);
            }
          }
          return new l({ dpi: 96, lods: c, origin: u, size: [s, s], spatialReference: i });
        }
        get isWrappable() {
          const { spatialReference: e, origin: t } = this;
          if (e && t) {
            const r = (0, m.g)(e);
            return e.isWrappable && Math.abs(r.origin[0] - t.x) <= r.dx;
          }
          return !1;
        }
        readOrigin(e, t) {
          return h.Z.fromJSON({ spatialReference: t.spatialReference, ...e });
        }
        set lods(e) {
          let t = 0,
            r = 0;
          const l = [];
          (this._levelToLOD = {}),
            e &&
              ((t = -1 / 0),
              (r = 1 / 0),
              e.forEach((e) => {
                l.push(e.scale),
                  (t = e.scale > t ? e.scale : t),
                  (r = e.scale < r ? e.scale : r),
                  (this._levelToLOD[e.level] = e);
              })),
            this._set('scales', l),
            this._set('minScale', t),
            this._set('maxScale', r),
            this._set('lods', e),
            this._initializeUpsampleLevels();
        }
        readSize(e, t) {
          return [t.cols, t.rows];
        }
        writeSize(e, t) {
          (t.cols = e[0]), (t.rows = e[0]);
        }
        zoomToScale(e) {
          const t = this.scales;
          if (e <= 0) return t[0];
          if (e >= t.length - 1) return t[t.length - 1];
          {
            const r = Math.floor(e),
              l = r + 1;
            return t[r] / (t[r] / t[l]) ** (e - r);
          }
        }
        scaleToZoom(e) {
          const t = this.scales,
            r = t.length - 1;
          let l = 0;
          for (; l < r; l++) {
            const r = t[l],
              s = t[l + 1];
            if (r <= e) return l;
            if (s === e) return l + 1;
            if (r > e && s < e) return l + Math.log(r / e) / Math.log(r / s);
          }
          return l;
        }
        snapScale(e, t = 0.95) {
          const r = this.scaleToZoom(e);
          return r % Math.floor(r) >= t
            ? this.zoomToScale(Math.ceil(r))
            : this.zoomToScale(Math.floor(r));
        }
        tileAt(e, t, r, l) {
          const s = this.lodAt(e);
          if (!s) return null;
          let i, n;
          if ('number' == typeof t) (i = t), (n = r);
          else if ((0, m.e)(t.spatialReference, this.spatialReference))
            (i = t.x), (n = t.y), (l = r);
          else {
            const e = (0, y.iV)(t, this.spatialReference);
            if (!e) return null;
            (i = e.x), (n = e.y), (l = r);
          }
          const o = s.resolution * this.size[0],
            a = s.resolution * this.size[1];
          return (
            l || (l = { id: null, level: 0, row: 0, col: 0, extent: (0, f.a)() }),
            (l.level = e),
            (l.row = Math.floor((this.origin.y - n) / a + 0.001)),
            (l.col = Math.floor((i - this.origin.x) / o + 0.001)),
            this.updateTileInfo(l),
            l
          );
        }
        updateTileInfo(e, t = 0) {
          let r = this.lodAt(e.level);
          if (!r && 1 === t) {
            const t = this.lods[this.lods.length - 1];
            t.level < e.level && (r = t);
          }
          if (!r) return;
          const l = e.level - r.level,
            s = (r.resolution * this.size[0]) / 2 ** l,
            i = (r.resolution * this.size[1]) / 2 ** l;
          (e.id = `${e.level}/${e.row}/${e.col}`),
            e.extent || (e.extent = (0, f.a)()),
            (e.extent[0] = this.origin.x + e.col * s),
            (e.extent[1] = this.origin.y - (e.row + 1) * i),
            (e.extent[2] = e.extent[0] + s),
            (e.extent[3] = e.extent[1] + i);
        }
        upsampleTile(e) {
          const t = this._upsampleLevels[e.level];
          return !(
            !t ||
            -1 === t.parentLevel ||
            ((e.level = t.parentLevel),
            (e.row = Math.floor(e.row / t.factor + 0.001)),
            (e.col = Math.floor(e.col / t.factor + 0.001)),
            this.updateTileInfo(e),
            0)
          );
        }
        getTileBounds(e, t) {
          const { resolution: r } = this.lodAt(t.level),
            l = r * this.size[0],
            s = r * this.size[1];
          return (
            (e[0] = this.origin.x + t.col * l),
            (e[1] = this.origin.y - (t.row + 1) * s),
            (e[2] = e[0] + l),
            (e[3] = e[1] + s),
            e
          );
        }
        lodAt(e) {
          return (this._levelToLOD && this._levelToLOD[e]) || null;
        }
        clone() {
          return l.fromJSON(this.write({}));
        }
        _initializeUpsampleLevels() {
          const e = this.lods;
          this._upsampleLevels = [];
          let t = null;
          for (let r = 0; r < e.length; r++) {
            const l = e[r];
            (this._upsampleLevels[l.level] = {
              parentLevel: t ? t.level : -1,
              factor: t ? t.resolution / l.resolution : 0,
            }),
              (t = l);
          }
        }
      });
      (0, s._)(
        [(0, a.Cb)({ type: Number, json: { write: !0 } })],
        w.prototype,
        'compressionQuality',
        void 0,
      ),
        (0, s._)([(0, a.Cb)({ type: Number, json: { write: !0 } })], w.prototype, 'dpi', void 0),
        (0, s._)(
          [
            (0, a.Cb)({
              type: String,
              json: {
                read: v.read,
                write: v.write,
                origins: { 'web-scene': { read: !1, write: !1 } },
              },
            }),
          ],
          w.prototype,
          'format',
          void 0,
        ),
        (0, s._)([(0, a.Cb)({ readOnly: !0 })], w.prototype, 'isWrappable', null),
        (0, s._)([(0, a.Cb)({ type: h.Z, json: { write: !0 } })], w.prototype, 'origin', void 0),
        (0, s._)([(0, p.r)('origin')], w.prototype, 'readOrigin', null),
        (0, s._)(
          [(0, a.Cb)({ type: [g.Z], value: null, json: { write: !0 } })],
          w.prototype,
          'lods',
          null,
        ),
        (0, s._)([(0, a.Cb)({ readOnly: !0 })], w.prototype, 'minScale', void 0),
        (0, s._)([(0, a.Cb)({ readOnly: !0 })], w.prototype, 'maxScale', void 0),
        (0, s._)([(0, a.Cb)({ readOnly: !0 })], w.prototype, 'scales', void 0),
        (0, s._)(
          [
            (0, a.Cb)({
              cast: (e) => (Array.isArray(e) ? e : 'number' == typeof e ? [e, e] : [256, 256]),
            }),
          ],
          w.prototype,
          'size',
          void 0,
        ),
        (0, s._)([(0, p.r)('size', ['rows', 'cols'])], w.prototype, 'readSize', null),
        (0, s._)(
          [(0, d.w)('size', { cols: { type: u.I }, rows: { type: u.I } })],
          w.prototype,
          'writeSize',
          null,
        ),
        (0, s._)(
          [(0, a.Cb)({ type: m.Z, json: { write: !0 } })],
          w.prototype,
          'spatialReference',
          void 0,
        ),
        (w = l = (0, s._)([(0, c.j)('esri.layers.support.TileInfo')], w));
      const b = w;
    },
  },
]);
