(self.webpackChunkRemoteClient = self.webpackChunkRemoteClient || []).push([
  [5530],
  {
    59765: (e, t, r) => {
      'use strict';
      r.d(t, { Z: () => d, t: () => u });
      var i = r(29768),
        n = r(74673),
        s = r(35197),
        o = r(34250),
        a = (r(76506), r(91306), r(92143), r(17533)),
        l = 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, l.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 c = (p = class extends n.a {
        constructor(e) {
          super(e), (this.value = 0), (this.unit = 'milliseconds');
        }
        toMilliseconds() {
          return (0, s.c)(this.value, this.unit, 'milliseconds');
        }
        clone() {
          return new p({ value: this.value, unit: this.unit });
        }
      });
      (0, i._)(
        [(0, o.Cb)({ type: Number, json: { write: !0 }, nonNullable: !0 })],
        c.prototype,
        'value',
        void 0,
      ),
        (0, i._)(
          [
            (0, o.Cb)({
              type: u.apiValues,
              json: { type: u.jsonValues, read: u.read, write: u.write },
              nonNullable: !0,
            }),
          ],
          c.prototype,
          'unit',
          void 0,
        ),
        (c = p = (0, i._)([(0, a.j)('esri.TimeInterval')], c));
      const d = c;
    },
    75025: (e, t, r) => {
      'use strict';
      r.d(t, { A: () => u });
      var i = r(29768),
        n = r(92143),
        s = r(76506),
        o = r(34250),
        a = (r(91306), r(17533)),
        l = r(21132);
      const u = (e) => {
        let t = class extends e {
          get title() {
            if (this._get('title') && 'defaults' !== this.originOf('title'))
              return this._get('title');
            if (this.url) {
              const e = (0, l.p)(this.url);
              if ((0, s.i)(e) && e.title) return e.title;
            }
            return this._get('title') || '';
          }
          set title(e) {
            this._set('title', e);
          }
          set url(e) {
            this._set('url', (0, l.s)(e, n.L.getLogger(this.declaredClass)));
          }
        };
        return (
          (0, i._)([(0, o.Cb)()], t.prototype, 'title', null),
          (0, i._)([(0, o.Cb)({ type: String })], t.prototype, 'url', null),
          (t = (0, i._)([(0, a.j)('esri.layers.mixins.ArcGISService')], t)),
          t
        );
      };
    },
    19902: (e, t, r) => {
      'use strict';
      r.d(t, { T: () => c });
      var i = r(29768),
        n = r(93314),
        s = r(59765),
        o = r(34250),
        a = (r(76506), r(91306), r(92143), r(97714)),
        l = r(17533),
        u = r(77361),
        p = r(14249);
      const c = (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 i = r.timeOffset,
              n = s.t.fromJSON(r.timeOffsetUnits);
            return i && n ? new s.Z({ value: i, unit: n }) : null;
          }
          set timeInfo(e) {
            (0, p.UF)(e, this.fieldsIndex), this._set('timeInfo', e);
          }
        };
        return (
          (0, i._)(
            [(0, o.Cb)({ type: n.Z, json: { write: !1 } })],
            t.prototype,
            'timeExtent',
            void 0,
          ),
          (0, i._)([(0, o.Cb)({ type: s.Z })], t.prototype, 'timeOffset', void 0),
          (0, i._)(
            [(0, a.r)('service', 'timeOffset', ['timeInfo.exportOptions'])],
            t.prototype,
            'readOffset',
            null,
          ),
          (0, i._)(
            [
              (0, o.Cb)({
                value: null,
                type: u.Z,
                json: { write: !0, origins: { 'web-document': { read: !1, write: !1 } } },
              }),
            ],
            t.prototype,
            'timeInfo',
            null,
          ),
          (0, i._)(
            [
              (0, o.Cb)({
                type: Boolean,
                json: {
                  read: { source: 'timeAnimation' },
                  write: { target: 'timeAnimation' },
                  origins: { 'web-scene': { read: !1, write: !1 } },
                },
              }),
            ],
            t.prototype,
            'useViewTime',
            void 0,
          ),
          (t = (0, i._)([(0, l.j)('esri.layers.mixins.TemporalLayer')], t)),
          t
        );
      };
    },
    21132: (e, t, r) => {
      'use strict';
      r.d(t, {
        a: () => g,
        b: () => y,
        c: () => m,
        d: () => p,
        e: () => b,
        f: () => d,
        p: () => c,
        s: () => f,
        t: () => h,
        w: () => v,
      });
      var i = r(76506),
        n = r(32101),
        s = r(38742);
      const o = [
          'MapServer',
          'ImageServer',
          'FeatureServer',
          'SceneServer',
          'StreamServer',
          'VectorTileServer',
        ],
        a = new RegExp(
          `^((?:https?:)?\\/\\/\\S+?\\/rest\\/services\\/(.+?)\\/(${o.join(
            '|',
          )}))(?:\\/(?:layers\\/)?(\\d+))?`,
          'i',
        ),
        l = new RegExp(
          `^((?:https?:)?\\/\\/\\S+?\\/([^\\/\\n]+)\\/(${o.join(
            '|',
          )}))(?:\\/(?:layers\\/)?(\\d+))?`,
          'i',
        ),
        u = /(.*?)\/(?:layers\/)?(\d+)\/?$/i;
      function p(e) {
        return !!a.test(e);
      }
      function c(e) {
        const t = (0, n.mN)(e),
          r = t.path.match(a) || t.path.match(l);
        if (!r) return null;
        const [, i, s, o, u] = r,
          p = s.indexOf('/');
        return {
          title: m(-1 !== p ? s.slice(p + 1) : s),
          serverType: o,
          sublayer: null != u && '' !== u ? parseInt(u, 10) : null,
          url: { path: i },
        };
      }
      function d(e) {
        const t = (0, n.mN)(e).path.match(u);
        return t ? { serviceUrl: t[1], sublayerId: Number(t[2]) } : null;
      }
      function m(e) {
        return (e = e.replace(/\s*[/_]+\s*/g, ' '))[0].toUpperCase() + e.slice(1);
      }
      function h(e, t) {
        const r = [];
        if (e) {
          const t = c(e);
          (0, i.i)(t) && t.title && r.push(t.title);
        }
        if (t) {
          const e = m(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),
          s = c(r.path);
        let o;
        if ((0, i.i)(s))
          null != s.sublayer && null == e.layer.layerId && (o = s.sublayer), (t = s.url.path);
        else if (e.nonStandardUrlAllowed) {
          const e = d(r.path);
          (0, i.i)(e) && ((t = e.serviceUrl), (o = e.sublayerId));
        }
        return { url: (0, n.Qj)(t), layerId: o };
      }
      function v(e, t, r, i, o) {
        (0, s.w)(t, i, 'url', o),
          i.url && null != e.layerId && (i.url = (0, n.v_)(i.url, r, e.layerId.toString()));
      }
      function b(e) {
        if (!e) return !1;
        const t = e.toLowerCase(),
          r = -1 !== t.indexOf('/services/'),
          i = -1 !== t.indexOf('/mapserver/wmsserver'),
          n = -1 !== t.indexOf('/imageserver/wmsserver'),
          s = -1 !== t.indexOf('/wmsserver');
        return r && (i || n || s);
      }
    },
    85557: (e, t, r) => {
      'use strict';
      r.d(t, { m: () => s });
      var i = r(53785),
        n = r(89623);
      const s = {
        inches: (0, i.c)(1, 'meters', 'inches'),
        feet: (0, i.c)(1, 'meters', 'feet'),
        'us-feet': (0, i.c)(1, 'meters', 'us-feet'),
        yards: (0, i.c)(1, 'meters', 'yards'),
        miles: (0, i.c)(1, 'meters', 'miles'),
        'nautical-miles': (0, i.c)(1, 'meters', 'nautical-miles'),
        millimeters: (0, i.c)(1, 'meters', 'millimeters'),
        centimeters: (0, i.c)(1, 'meters', 'centimeters'),
        decimeters: (0, i.c)(1, 'meters', 'decimeters'),
        meters: (0, i.c)(1, 'meters', 'meters'),
        kilometers: (0, i.c)(1, 'meters', 'kilometers'),
        'decimal-degrees': 1 / (0, i.l)(1, 'meters', n.e.radius),
      };
    },
    55823: (e, t, r) => {
      'use strict';
      r.d(t, { a: () => n });
      var i = r(92847);
      function n(e, t, r) {
        if (!r || !r.features || !r.hasZ) return;
        const n = (0, i.g)(r.geometryType, t, e.outSpatialReference);
        if (n) for (const e of r.features) n(e.geometry);
      }
    },
    92847: (e, t, r) => {
      'use strict';
      r.d(t, { g: () => o, u: () => l });
      var i = r(76506),
        n = r(53785),
        s = r(60947);
      function o(e, t, r) {
        if ((0, i.b)(t) || (0, i.b)(r) || r.vcsWkid || (0, s.e)(t, r)) return null;
        const o = (0, n.d)(t) / (0, n.d)(r);
        if (1 === o) return null;
        switch (e) {
          case 'point':
          case 'esriGeometryPoint':
            return (e) => {
              return (r = o), void ((t = e) && null != t.z && (t.z *= r));
              var t, r;
            };
          case 'polyline':
          case 'esriGeometryPolyline':
            return (e) =>
              (function (e, t) {
                if (e) for (const r of e.paths) for (const e of r) e.length > 2 && (e[2] *= t);
              })(e, o);
          case 'polygon':
          case 'esriGeometryPolygon':
            return (e) =>
              (function (e, t) {
                if (e) for (const r of e.rings) for (const e of r) e.length > 2 && (e[2] *= t);
              })(e, o);
          case 'multipoint':
          case 'esriGeometryMultipoint':
            return (e) =>
              (function (e, t) {
                if (e) for (const r of e.points) r.length > 2 && (r[2] *= t);
              })(e, o);
          default:
            return null;
        }
      }
      function a(e, t, r) {
        if (null == e.hasM || e.hasZ)
          for (const e of t) for (const t of e) t.length > 2 && (t[2] *= r);
      }
      function l(e, t, r) {
        if ((!e && !t) || !r) return;
        const i = (0, n.d)(r);
        u(e, r, i), u(t, r, i);
      }
      function u(e, t, r) {
        if (e) for (const i of e) p(i.geometry, t, r);
      }
      function p(e, t, r) {
        if (!e || !e.spatialReference || (0, s.e)(e.spatialReference, t)) return;
        const i = (0, n.d)(e.spatialReference) / r;
        if (1 !== i)
          if ('x' in e) null != e.z && (e.z *= i);
          else if ('rings' in e) a(e, e.rings, i);
          else if ('paths' in e) a(e, e.paths, i);
          else if ('points' in e && (null == e.hasM || e.hasZ))
            for (const t of e.points) t.length > 2 && (t[2] *= i);
      }
    },
    95530: (e, t, r) => {
      'use strict';
      r.r(t), r.d(t, { default: () => nt });
      var i,
        n = r(29768),
        s = r(86748),
        o = r(76506),
        a = r(54179),
        l = r(50406),
        u = r(34250),
        p = r(91306),
        c = r(92143),
        d = r(17533),
        m = r(2906),
        h = r(41617),
        y = r(74569),
        f = r(23761),
        g = r(88678),
        v = r(82058),
        b = r(60991),
        w = r(57251),
        _ = r(32101),
        R = r(63136),
        S = r(97714),
        x = r(43022),
        C = r(66827),
        I = r(74673),
        j = r(59465);
      r(21972),
        r(23639),
        r(86656),
        r(22723),
        r(91055),
        r(27794),
        r(6906),
        r(81172),
        r(71552),
        r(31450),
        r(40642),
        r(26341);
      const T = new Set(['raster', 'raster2', 'dem', 'fillraster']),
        N = new Set(['rasters']),
        O = (e) => (e && e.rasterFunction ? V.fromJSON(e) : e),
        F = (e) => (e && e instanceof V ? e.toJSON() : e),
        P = (e) => (null == e ? void 0 : e.functionName) && !e.declaredClass,
        D = (e) => (P(e) ? new V(e) : e);
      var M, A;
      ((A = M || (M = {}))[(A.MOSAIC = 0)] = 'MOSAIC'),
        (A[(A.GROUP = 1)] = 'GROUP'),
        (A[(A.ITEM = 2)] = 'ITEM');
      let V = (i = class extends I.a {
        constructor(e) {
          super(e),
            (this.functionName = null),
            (this.outputPixelType = 'unknown'),
            (this.variableName = null),
            (this.description = null),
            (this.functionDefinition = null),
            (this.thumbnail = null);
        }
        set functionArguments(e) {
          if (e) {
            const t = Object.keys(e);
            if (
              t.some((t) => T.has(t.toLowerCase()) && P(e[t])) ||
              t.some((t) => N.has(t.toLowerCase()) && Array.isArray(e[t]) && e[t].some((e) => P(e)))
            ) {
              e = (0, o.d9)(e);
              for (const r of t)
                T.has(r.toLowerCase())
                  ? (e[r] = D(e[r]))
                  : N.has(r.toLowerCase()) && Array.isArray(e[r]) && (e[r] = e[r].map((e) => D(e)));
            }
          }
          this._set('functionArguments', e);
        }
        readFunctionArguments(e, t) {
          return ((e) => {
            if (null == e) return null;
            e = (0, o.d9)(e);
            const t = {};
            for (const r of Object.keys(e))
              T.has(r.toLowerCase())
                ? (t[r] = O(e[r]))
                : N.has(r.toLowerCase()) && Array.isArray(e[r])
                ? (t[r] = e[r].map(O))
                : (t[r] = e[r]);
            return t;
          })(t.arguments || t.rasterFunctionArguments);
        }
        writeFunctionArguments(e, t, r) {
          const i = {};
          for (const t of Object.keys(e))
            T.has(t.toLowerCase())
              ? (i[t] = F(e[t]))
              : N.has(t.toLowerCase()) && Array.isArray(e[t])
              ? (i[t] = e[t].map(F))
              : (i[t] = F(e[t]));
          this.functionDefinition ? (t.arguments = i) : (t[r] = i);
        }
        readFunctionName(e, t) {
          const r = t.rasterFunctionInfos;
          return t.name || (r && r.length && 'None' !== r[0].name ? r[0].name : t.rasterFunction);
        }
        writeFunctionName(e, t, r) {
          this.functionDefinition ? (t.name = e) : (t[r] = e);
        }
        readFunctionType(e) {
          return M[e];
        }
        writeFunctionType(e, t, r) {
          t[r] = M[e];
        }
        clone() {
          return new i({
            functionName: this.functionName,
            functionArguments: (0, o.d9)(this.functionArguments),
            outputPixelType: this.outputPixelType,
            variableName: this.variableName,
            description: this.description,
            functionType: this.functionType,
            functionDefinition: this.functionDefinition,
            thumbnail: this.thumbnail,
          });
        }
      });
      (0, n._)(
        [(0, u.Cb)({ json: { type: Object, write: { target: 'rasterFunctionArguments' } } })],
        V.prototype,
        'functionArguments',
        null,
      ),
        (0, n._)(
          [(0, S.r)('functionArguments', ['rasterFunctionArguments', 'arguments'])],
          V.prototype,
          'readFunctionArguments',
          null,
        ),
        (0, n._)([(0, m.w)('functionArguments')], V.prototype, 'writeFunctionArguments', null),
        (0, n._)(
          [(0, u.Cb)({ json: { type: String, write: { target: 'rasterFunction' } } })],
          V.prototype,
          'functionName',
          void 0,
        ),
        (0, n._)(
          [(0, S.r)('functionName', ['rasterFunction', 'rasterFunctionInfos', 'name'])],
          V.prototype,
          'readFunctionName',
          null,
        ),
        (0, n._)([(0, m.w)('functionName')], V.prototype, 'writeFunctionName', null),
        (0, n._)(
          [
            (0, j.e)(
              {
                C128: 'c128',
                C64: 'c64',
                F32: 'f32',
                F64: 'f64',
                S16: 's16',
                S32: 's32',
                S8: 's8',
                U1: 'u1',
                U16: 'u16',
                U2: 'u2',
                U32: 'u32',
                U4: 'u4',
                U8: 'u8',
                UNKNOWN: 'unknown',
              },
              { ignoreUnknown: !1 },
            ),
            (0, u.Cb)({ json: { default: 'unknown' } }),
          ],
          V.prototype,
          'outputPixelType',
          void 0,
        ),
        (0, n._)(
          [(0, u.Cb)({ type: String, json: { read: !0, write: !0 } })],
          V.prototype,
          'variableName',
          void 0,
        ),
        (0, n._)(
          [
            (0, u.Cb)({
              type: String,
              json: { read: !0, write: !0, origins: { 'web-document': { read: !1, write: !1 } } },
            }),
          ],
          V.prototype,
          'description',
          void 0,
        ),
        (0, n._)(
          [(0, u.Cb)({ json: { origins: { 'web-document': { read: !1, write: !1 } } } })],
          V.prototype,
          'functionType',
          void 0,
        ),
        (0, n._)([(0, S.r)('functionType')], V.prototype, 'readFunctionType', null),
        (0, n._)([(0, m.w)('functionType')], V.prototype, 'writeFunctionType', null),
        (0, n._)(
          [
            (0, u.Cb)({
              type: Object,
              json: {
                read: { source: 'function' },
                write: { target: 'function' },
                origins: { 'web-document': { read: !1, write: !1 } },
              },
            }),
          ],
          V.prototype,
          'functionDefinition',
          void 0,
        ),
        (0, n._)(
          [
            (0, u.Cb)({
              type: String,
              json: { read: !0, write: !0, origins: { 'web-document': { read: !1, write: !1 } } },
            }),
          ],
          V.prototype,
          'thumbnail',
          void 0,
        ),
        (V = i = (0, n._)([(0, d.j)('esri.layers.support.RasterFunction')], V));
      const J = V;
      var E,
        z = r(62484),
        Z = r(86951),
        L = r(90319),
        U = r(86787),
        k = r(91597),
        B = (r(73796), r(60947));
      r(35132), r(89623);
      const q = (0, w.s)()({
          MT_FIRST: 'first',
          MT_LAST: 'last',
          MT_MIN: 'min',
          MT_MAX: 'max',
          MT_MEAN: 'mean',
          MT_BLEND: 'blend',
          MT_SUM: 'sum',
        }),
        H = (0, w.s)()({
          esriMosaicNone: 'none',
          esriMosaicCenter: 'center',
          esriMosaicNadir: 'nadir',
          esriMosaicViewpoint: 'viewpoint',
          esriMosaicAttribute: 'attribute',
          esriMosaicLockRaster: 'lock-raster',
          esriMosaicNorthwest: 'northwest',
          esriMosaicSeamline: 'seamline',
        });
      let G = (E = class extends I.a {
        constructor(e) {
          super(e),
            (this.ascending = !0),
            (this.itemRenderingRule = null),
            (this.lockRasterIds = null),
            (this.method = null),
            (this.multidimensionalDefinition = null),
            (this.objectIds = null),
            (this.operation = null),
            (this.sortField = null),
            (this.sortValue = null),
            (this.viewpoint = null),
            (this.where = null);
        }
        readAscending(e, t) {
          return null != t.ascending ? t.ascending : null == t.sortAscending || t.sortAscending;
        }
        readMethod(e, t) {
          return (function (e) {
            let t;
            switch (e ? e.toLowerCase().replace('esrimosaic', '') : '') {
              case 'byattribute':
              case 'attribute':
                t = 'esriMosaicAttribute';
                break;
              case 'lockraster':
                t = 'esriMosaicLockRaster';
                break;
              case 'center':
                t = 'esriMosaicCenter';
                break;
              case 'northwest':
                t = 'esriMosaicNorthwest';
                break;
              case 'nadir':
                t = 'esriMosaicNadir';
                break;
              case 'viewpoint':
                t = 'esriMosaicViewpoint';
                break;
              case 'seamline':
                t = 'esriMosaicSeamline';
                break;
              case 'none':
              default:
                t = 'esriMosaicNone';
            }
            return H.fromJSON(t);
          })(t.mosaicMethod || t.defaultMosaicMethod);
        }
        readOperation(e, t) {
          const r = t.mosaicOperation,
            i = t.mosaicOperator && t.mosaicOperator.toLowerCase(),
            n = r || (i ? q.toJSON(i) : null);
          return q.fromJSON(n) || 'first';
        }
        castSortValue(e) {
          return null == e || 'string' == typeof e || 'number' == typeof e ? e : `${e}`;
        }
        clone() {
          return new E({
            ascending: this.ascending,
            itemRenderingRule: (0, o.d9)(this.itemRenderingRule),
            lockRasterIds: (0, o.d9)(this.lockRasterIds),
            method: this.method,
            multidimensionalDefinition: (0, o.d9)(this.multidimensionalDefinition),
            objectIds: (0, o.d9)(this.objectIds),
            operation: this.operation,
            sortField: this.sortField,
            sortValue: this.sortValue,
            viewpoint: (0, o.d9)(this.viewpoint),
            where: this.where,
          });
        }
      });
      (0, n._)(
        [(0, u.Cb)({ type: Boolean, json: { write: !0 } })],
        G.prototype,
        'ascending',
        void 0,
      ),
        (0, n._)(
          [(0, S.r)('ascending', ['ascending', 'sortAscending'])],
          G.prototype,
          'readAscending',
          null,
        ),
        (0, n._)(
          [(0, u.Cb)({ type: J, json: { write: !0 } })],
          G.prototype,
          'itemRenderingRule',
          void 0,
        ),
        (0, n._)(
          [
            (0, u.Cb)({
              type: [p.I],
              json: {
                write: {
                  overridePolicy() {
                    return { enabled: 'lock-raster' === this.method };
                  },
                },
              },
            }),
          ],
          G.prototype,
          'lockRasterIds',
          void 0,
        ),
        (0, n._)(
          [
            (0, u.Cb)({
              type: String,
              json: { type: H.jsonValues, write: { target: 'mosaicMethod', writer: H.write } },
            }),
          ],
          G.prototype,
          'method',
          void 0,
        ),
        (0, n._)(
          [(0, S.r)('method', ['mosaicMethod', 'defaultMosaicMethod'])],
          G.prototype,
          'readMethod',
          null,
        ),
        (0, n._)(
          [(0, u.Cb)({ type: [C.Z], json: { write: !0 } })],
          G.prototype,
          'multidimensionalDefinition',
          void 0,
        ),
        (0, n._)(
          [(0, u.Cb)({ type: [p.I], json: { name: 'fids', write: !0 } })],
          G.prototype,
          'objectIds',
          void 0,
        ),
        (0, n._)(
          [
            (0, u.Cb)({
              json: {
                type: q.jsonValues,
                read: { reader: q.read },
                write: { target: 'mosaicOperation', writer: q.write },
              },
            }),
          ],
          G.prototype,
          'operation',
          void 0,
        ),
        (0, n._)(
          [(0, S.r)('operation', ['mosaicOperation', 'mosaicOperator'])],
          G.prototype,
          'readOperation',
          null,
        ),
        (0, n._)(
          [
            (0, u.Cb)({
              type: String,
              json: {
                write: {
                  overridePolicy() {
                    return { enabled: 'attribute' === this.method };
                  },
                },
              },
            }),
          ],
          G.prototype,
          'sortField',
          void 0,
        ),
        (0, n._)(
          [
            (0, u.Cb)({
              type: [String, Number],
              json: {
                write: {
                  allowNull: !0,
                  overridePolicy() {
                    return { enabled: 'attribute' === this.method, allowNull: !0 };
                  },
                },
              },
            }),
          ],
          G.prototype,
          'sortValue',
          void 0,
        ),
        (0, n._)([(0, U.p)('sortValue')], G.prototype, 'castSortValue', null),
        (0, n._)([(0, u.Cb)({ type: k.Z, json: { write: !0 } })], G.prototype, 'viewpoint', void 0),
        (0, n._)([(0, u.Cb)({ type: String, json: { write: !0 } })], G.prototype, 'where', void 0),
        (G = E = (0, n._)([(0, d.j)('esri.layers.support.MosaicRule')], G));
      const Q = G;
      var W = r(88056),
        X = r(97546),
        $ = r(1709),
        K = r(22337),
        Y = r(72246),
        ee = r(13074),
        te = r(40558),
        re = r(1030),
        ie = r(95533),
        ne = r(81731),
        se = r(87258),
        oe = r(21801),
        ae = r(84069),
        le = r(44567),
        ue = (r(98380), r(92896), r(22781), r(32422));
      r(15324),
        r(76996),
        r(14249),
        r(9801),
        r(53523),
        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(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(96467),
        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(38742),
        r(48243),
        r(34635),
        r(10401),
        r(49900),
        r(66284),
        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),
        r(54732);
      let pe = class extends I.a {
        constructor() {
          super(...arguments),
            (this.catalogItemVisibilities = null),
            (this.catalogItems = null),
            (this.location = null),
            (this.name = null),
            (this.objectId = null),
            (this.processedValues = null),
            (this.properties = null),
            (this.value = null);
        }
      };
      (0, n._)(
        [(0, u.Cb)({ json: { write: !0 } })],
        pe.prototype,
        'catalogItemVisibilities',
        void 0,
      ),
        (0, n._)(
          [(0, u.Cb)({ type: se.default, json: { write: !0 } })],
          pe.prototype,
          'catalogItems',
          void 0,
        ),
        (0, n._)([(0, u.Cb)({ type: k.Z, json: { write: !0 } })], pe.prototype, 'location', void 0),
        (0, n._)([(0, u.Cb)({ json: { write: !0 } })], pe.prototype, 'name', void 0),
        (0, n._)([(0, u.Cb)({ json: { write: !0 } })], pe.prototype, 'objectId', void 0),
        (0, n._)([(0, u.Cb)({ json: { write: !0 } })], pe.prototype, 'processedValues', void 0),
        (0, n._)([(0, u.Cb)({ json: { write: !0 } })], pe.prototype, 'properties', void 0),
        (0, n._)([(0, u.Cb)({ json: { write: !0 } })], pe.prototype, 'value', void 0),
        (pe = (0, n._)([(0, d.j)('esri.rest.support.ImageIdentifyResult')], pe));
      const ce = pe;
      let de = class extends I.a {
        constructor() {
          super(...arguments),
            (this.attributes = null),
            (this.location = null),
            (this.locationId = null),
            (this.rasterId = null),
            (this.resolution = null),
            (this.pixelValue = null);
        }
      };
      (0, n._)([(0, u.Cb)({ json: { write: !0 } })], de.prototype, 'attributes', void 0),
        (0, n._)([(0, u.Cb)({ type: k.Z, json: { write: !0 } })], de.prototype, 'location', void 0),
        (0, n._)([(0, u.Cb)({ json: { write: !0 } })], de.prototype, 'locationId', void 0),
        (0, n._)([(0, u.Cb)({ json: { write: !0 } })], de.prototype, 'rasterId', void 0),
        (0, n._)([(0, u.Cb)({ json: { write: !0 } })], de.prototype, 'resolution', void 0),
        (0, n._)([(0, u.Cb)({ json: { write: !0 } })], de.prototype, 'pixelValue', void 0),
        (de = (0, n._)([(0, d.j)('esri.rest.support.ImageSample')], de));
      const me = de;
      let he = class extends I.a {
        constructor() {
          super(...arguments), (this.samples = null);
        }
      };
      (0, n._)([(0, u.Cb)({ type: [me], json: { write: !0 } })], he.prototype, 'samples', void 0),
        (he = (0, n._)([(0, d.j)('esri.rest.support.ImageSampleResult')], he));
      const ye = he;
      function fe(e) {
        const t = null == e ? void 0 : e.time;
        if (t && (null != t.start || null != t.end)) {
          const r = [];
          null != t.start && r.push(t.start),
            null != t.end && -1 === r.indexOf(t.end) && r.push(t.end),
            (e.time = r.join(','));
        }
      }
      async function ge(e, t, r) {
        const i = (0, ne.p)(e),
          n = t.geometry ? [t.geometry] : [],
          s = await (0, ie.aX)(n),
          a = t.toJSON();
        fe(a);
        const l = s && s[0];
        (0, o.i)(l) && (a.geometry = l.toJSON());
        const u = (0, ne.e)({ ...i.query, f: 'json', ...a });
        return (0, ne.a)(u, r);
      }
      r(94751);
      var ve,
        be = r(93314);
      r(35197);
      let we = (ve = class extends I.a {
        constructor() {
          super(...arguments),
            (this.geometry = null),
            (this.mosaicRule = null),
            (this.renderingRule = null),
            (this.pixelSize = null),
            (this.raster = void 0),
            (this.timeExtent = null);
        }
        writeGeometry(e, t, r) {
          null != e && ((t.geometryType = (0, ue.Ji)(e)), (t[r] = e.toJSON()));
        }
        clone() {
          return new ve(
            (0, o.d9)({
              geometry: this.geometry,
              mosaicRule: this.mosaicRule,
              renderingRule: this.renderingRule,
              pixelSize: this.pixelSize,
              raster: this.raster,
              timeExtent: this.timeExtent,
            }),
          );
        }
      });
      (0, n._)(
        [(0, u.Cb)({ types: y.qM, json: { read: ue.im } })],
        we.prototype,
        'geometry',
        void 0,
      ),
        (0, n._)([(0, m.w)('geometry')], we.prototype, 'writeGeometry', null),
        (0, n._)([(0, u.Cb)({ type: Q, json: { write: !0 } })], we.prototype, 'mosaicRule', void 0),
        (0, n._)(
          [(0, u.Cb)({ type: J, json: { write: !0 } })],
          we.prototype,
          'renderingRule',
          void 0,
        ),
        (0, n._)(
          [(0, u.Cb)({ type: k.Z, json: { write: !0 } })],
          we.prototype,
          'pixelSize',
          void 0,
        ),
        (0, n._)([(0, u.Cb)({ json: { write: !0 } })], we.prototype, 'raster', void 0),
        (0, n._)(
          [
            (0, u.Cb)({
              type: be.Z,
              json: { read: { source: 'time' }, write: { target: 'time' } },
            }),
          ],
          we.prototype,
          'timeExtent',
          void 0,
        ),
        (we = ve = (0, n._)([(0, d.j)('esri.rest.support.ImageHistogramParameters')], we));
      const _e = we;
      var Re;
      let Se = (Re = class extends I.a {
        constructor() {
          super(...arguments),
            (this.geometry = null),
            (this.renderingRules = null),
            (this.pixelSize = null),
            (this.returnGeometry = !0),
            (this.returnCatalogItems = !0),
            (this.returnPixelValues = !0),
            (this.maxItemCount = null),
            (this.timeExtent = null),
            (this.raster = void 0),
            (this.viewId = void 0);
        }
        writeGeometry(e, t, r) {
          null != e && ((t.geometryType = (0, ue.Ji)(e)), (t[r] = JSON.stringify(e.toJSON())));
        }
        set mosaicRule(e) {
          let t = e;
          t &&
            t.mosaicMethod &&
            (t = Q.fromJSON({
              ...t.toJSON(),
              mosaicMethod: t.mosaicMethod,
              mosaicOperation: t.mosaicOperation,
            })),
            this._set('mosaicRule', t);
        }
        writeMosaicRule(e, t, r) {
          null != e && (t[r] = JSON.stringify(e.toJSON()));
        }
        set renderingRule(e) {
          let t = e;
          t &&
            t.rasterFunction &&
            (t = J.fromJSON({
              ...t.toJSON(),
              rasterFunction: t.rasterFunction,
              rasterFunctionArguments: t.rasterFunctionArguments,
            })),
            this._set('renderingRule', t);
        }
        writeRenderingRule(e, t, r) {
          null != e && (t[r] = JSON.stringify(e.toJSON()));
        }
        writeRenderingRules(e, t, r) {
          null != e && (t[r] = JSON.stringify(e.map((e) => e.toJSON())));
        }
        writePixelSize(e, t, r) {
          null != e && (t[r] = JSON.stringify(e));
        }
        writeTimeExtent(e, t, r) {
          if (null != e) {
            const i = (0, o.i)(e.start) ? e.start.getTime() : null,
              n = (0, o.i)(e.end) ? e.end.getTime() : null;
            t[r] = null != i ? (null != n ? `${i},${n}` : `${i}`) : null;
          }
        }
        clone() {
          return new Re(
            (0, o.d9)({
              geometry: this.geometry,
              mosaicRule: this.mosaicRule,
              renderingRule: this.renderingRule,
              pixelSize: this.pixelSize,
              returnGeometry: this.returnGeometry,
              returnCatalogItems: this.returnCatalogItems,
              returnPixelValues: this.returnPixelValues,
              maxItemCount: this.maxItemCount,
              raster: this.raster,
              viewId: this.viewId,
              timeExtent: this.timeExtent,
            }),
          );
        }
      });
      (0, n._)([(0, u.Cb)({ json: { write: !0 } })], Se.prototype, 'geometry', void 0),
        (0, n._)([(0, m.w)('geometry')], Se.prototype, 'writeGeometry', null),
        (0, n._)([(0, u.Cb)({ type: Q, json: { write: !0 } })], Se.prototype, 'mosaicRule', null),
        (0, n._)([(0, m.w)('mosaicRule')], Se.prototype, 'writeMosaicRule', null),
        (0, n._)(
          [(0, u.Cb)({ type: J, json: { write: !0 } })],
          Se.prototype,
          'renderingRule',
          null,
        ),
        (0, n._)([(0, m.w)('renderingRule')], Se.prototype, 'writeRenderingRule', null),
        (0, n._)(
          [(0, u.Cb)({ type: [J], json: { write: !0 } })],
          Se.prototype,
          'renderingRules',
          void 0,
        ),
        (0, n._)([(0, m.w)('renderingRules')], Se.prototype, 'writeRenderingRules', null),
        (0, n._)(
          [(0, u.Cb)({ type: k.Z, json: { write: !0 } })],
          Se.prototype,
          'pixelSize',
          void 0,
        ),
        (0, n._)([(0, m.w)('pixelSize')], Se.prototype, 'writePixelSize', null),
        (0, n._)(
          [(0, u.Cb)({ type: Boolean, json: { write: !0 } })],
          Se.prototype,
          'returnGeometry',
          void 0,
        ),
        (0, n._)(
          [(0, u.Cb)({ type: Boolean, json: { write: !0 } })],
          Se.prototype,
          'returnCatalogItems',
          void 0,
        ),
        (0, n._)(
          [(0, u.Cb)({ type: Boolean, json: { write: !0 } })],
          Se.prototype,
          'returnPixelValues',
          void 0,
        ),
        (0, n._)(
          [(0, u.Cb)({ type: Number, json: { write: !0 } })],
          Se.prototype,
          'maxItemCount',
          void 0,
        ),
        (0, n._)(
          [(0, u.Cb)({ type: be.Z, json: { write: { target: 'time' } } })],
          Se.prototype,
          'timeExtent',
          void 0,
        ),
        (0, n._)([(0, m.w)('timeExtent')], Se.prototype, 'writeTimeExtent', null),
        (0, n._)([(0, u.Cb)({ json: { write: !0 } })], Se.prototype, 'raster', void 0),
        (0, n._)([(0, u.Cb)({ json: { write: !0 } })], Se.prototype, 'viewId', void 0),
        (Se = Re = (0, n._)([(0, d.j)('esri.rest.support.ImageIdentifyParameters')], Se));
      const xe = Se;
      var Ce;
      let Ie = (Ce = class extends I.a {
        constructor() {
          super(...arguments),
            (this.geometry = null),
            (this.interpolation = 'nearest'),
            (this.mosaicRule = null),
            (this.outFields = null),
            (this.pixelSize = null),
            (this.returnFirstValueOnly = !0),
            (this.sampleDistance = null),
            (this.sampleCount = null),
            (this.sliceId = null),
            (this.timeExtent = null);
        }
        writeGeometry(e, t, r) {
          null != e && ((t.geometryType = (0, ue.Ji)(e)), (t[r] = e.toJSON()));
        }
        set locations(e) {
          if (null != e && e.length) {
            const t = new ae.Z({ spatialReference: e[0].spatialReference });
            (t.points = e.map((e) => [e.x, e.y])), this._set('locations', e), (this.geometry = t);
          }
        }
        clone() {
          return new Ce(
            (0, o.d9)({
              geometry: this.geometry,
              locations: this.locations,
              interpolation: this.interpolation,
              mosaicRule: this.mosaicRule,
              outFields: this.outFields,
              raster: this.raster,
              returnFirstValueOnly: this.returnFirstValueOnly,
              sampleDistance: this.sampleDistance,
              sampleCount: this.sampleCount,
              sliceId: this.sliceId,
              pixelSize: this.pixelSize,
              timeExtent: this.timeExtent,
            }),
          );
        }
      });
      (0, n._)(
        [(0, u.Cb)({ types: y.qM, json: { read: ue.im } })],
        Ie.prototype,
        'geometry',
        void 0,
      ),
        (0, n._)([(0, m.w)('geometry')], Ie.prototype, 'writeGeometry', null),
        (0, n._)(
          [
            (0, u.Cb)({
              type: String,
              json: { type: W.i.jsonValues, read: W.i.read, write: W.i.write },
            }),
          ],
          Ie.prototype,
          'interpolation',
          void 0,
        ),
        (0, n._)([(0, u.Cb)({ type: Q, json: { write: !0 } })], Ie.prototype, 'mosaicRule', void 0),
        (0, n._)(
          [(0, u.Cb)({ type: [String], json: { write: !0 } })],
          Ie.prototype,
          'outFields',
          void 0,
        ),
        (0, n._)(
          [(0, u.Cb)({ type: k.Z, json: { write: !0 } })],
          Ie.prototype,
          'pixelSize',
          void 0,
        ),
        (0, n._)(
          [(0, u.Cb)({ type: String, json: { write: !0 } })],
          Ie.prototype,
          'raster',
          void 0,
        ),
        (0, n._)(
          [(0, u.Cb)({ type: Boolean, json: { write: !0 } })],
          Ie.prototype,
          'returnFirstValueOnly',
          void 0,
        ),
        (0, n._)(
          [(0, u.Cb)({ type: Number, json: { write: !0 } })],
          Ie.prototype,
          'sampleDistance',
          void 0,
        ),
        (0, n._)(
          [(0, u.Cb)({ type: Number, json: { write: !0 } })],
          Ie.prototype,
          'sampleCount',
          void 0,
        ),
        (0, n._)(
          [(0, u.Cb)({ type: Number, json: { write: !0 } })],
          Ie.prototype,
          'sliceId',
          void 0,
        ),
        (0, n._)(
          [
            (0, u.Cb)({
              type: be.Z,
              json: { read: { source: 'time' }, write: { target: 'time' } },
            }),
          ],
          Ie.prototype,
          'timeExtent',
          void 0,
        ),
        (Ie = Ce = (0, n._)([(0, d.j)('esri.rest.support.ImageSampleParameters')], Ie));
      const je = Ie;
      var Te = r(31292),
        Ne = r(658);
      let Oe = class extends Ne.Z {
        execute(e, t) {
          return (async function (e, t, r) {
            const i = (0, ne.p)(e),
              n = t.geometry ? [t.geometry] : [];
            return (0, ie.aX)(n)
              .then((e) => {
                const n = t.toJSON(),
                  s = e && e[0];
                (0, o.i)(s) && (n.geometry = JSON.stringify(s.toJSON()));
                const a = (0, ne.e)({ ...i.query, f: 'json', ...n }),
                  l = (0, ne.a)(a, r);
                return (0, v.default)(i.path + '/identify', l);
              })
              .then((e) => ce.fromJSON(e.data));
          })(this.url, e, t);
        }
      };
      Oe = (0, n._)([(0, d.j)('esri.tasks.ImageIdentifyTask')], Oe);
      const Fe = Oe;
      var Pe = r(15528),
        De = r(75025),
        Me = r(11118),
        Ae = r(8547),
        Ve = r(89440),
        Je = r(62162),
        Ee = r(16647),
        ze = r(58912),
        Ze = r(19902),
        Le = r(78893);
      r(50161),
        r(55306),
        r(65684),
        r(12158),
        r(74864),
        r(63683),
        r(94479),
        r(45702),
        r(51127),
        r(74071),
        r(51723),
        r(23243),
        r(51669),
        r(6090),
        r(3977),
        r(36741),
        r(11253),
        r(94070),
        r(16218),
        r(9075),
        r(67541),
        r(38822),
        r(74057),
        r(48190),
        r(85557),
        r(53785),
        r(95587),
        r(81050),
        r(55436),
        r(76223),
        r(95310),
        r(93939),
        r(238),
        r(71831),
        r(49500),
        r(84225),
        r(7534),
        r(98402),
        r(41864),
        r(30831),
        r(91700),
        r(53269),
        r(47842),
        r(17298),
        r(65514),
        r(46987),
        r(37453),
        r(46373),
        r(98264),
        r(66774),
        r(69218),
        r(27207),
        r(91171),
        r(53426),
        r(49214),
        r(76733),
        r(11385),
        r(55823),
        r(92847),
        r(34446),
        r(40267),
        r(46646),
        r(39210),
        r(90549),
        r(21132),
        r(56420),
        r(74742),
        r(28239),
        r(59765),
        r(77361);
      const Ue = {
          u1: [0, 1],
          u2: [0, 3],
          u4: [0, 15],
          u8: [0, 255],
          s8: [-128, 127],
          u16: [0, 65535],
          s16: [-32768, 32767],
        },
        ke = {
          simple_scalar: 'Simple Scalar',
          wind_barb: 'Wind Barb',
          single_arrow: 'Single Arrow',
          beaufort_kn: 'Beaufort Wind (Knots)',
          beaufort_m: 'Beaufort Wind (MetersPerSecond)',
          ocean_current_m: 'Ocean Current (MetersPerSecond)',
          ocean_current_kn: 'Ocean Current (Knots)',
        },
        Be = new Set([
          'raster-stretch',
          'unique-value',
          'class-breaks',
          'raster-shaded-relief',
          'vector-field',
          'raster-colormap',
        ]);
      function qe(e) {
        return Be.has(e.type);
      }
      function He(e, t) {
        if (!e || !t) return (0, o.d9)(e || t);
        const r = (0, o.d9)(e);
        return 'none' !== t.functionName.toLowerCase() && (Ge(r.functionArguments).Raster = t), r;
      }
      function Ge(e) {
        const t = e.Raster;
        return t && 'esri.layers.support.RasterFunction' === t.declaredClass
          ? Ge(t.functionArguments)
          : e;
      }
      const Qe = {
        none: 0,
        standardDeviation: 3,
        histogramEqualization: 4,
        minMax: 5,
        percentClip: 6,
        sigmoid: 9,
      };
      function We(e, t) {
        const r = Ue[String(t).toLowerCase()];
        return r && e.push([Math.floor(r[0] - 1), 0, 0, 0], [Math.ceil(r[1] + 1), 0, 0, 0]), e;
      }
      function Xe(e) {
        if (!e) return;
        const { fields: t } = e,
          r = t && t.find((e) => e && e.name && 'value' === e.name.toLowerCase());
        return r && r.name;
      }
      let $e = class extends I.a {
        constructor() {
          super(...arguments),
            (this.layer = null),
            (this.adjustAspectRatio = void 0),
            (this.bandIds = void 0),
            (this.compression = void 0),
            (this.compressionQuality = void 0),
            (this.compressionTolerance = 0.01),
            (this.format = null),
            (this.interpolation = null),
            (this.noData = null),
            (this.noDataInterpretation = void 0),
            (this.pixelType = void 0),
            (this.lercVersion = 2);
        }
        writeAdjustAspectRatio(e, t, r) {
          this.layer.version < 10.3 || (t[r] = e);
        }
        writeCompressionQuality(e, t, r) {
          this.format && this.format.toLowerCase().indexOf('jpg') > -1 && null != e && (t[r] = e);
        }
        writeCompressionTolerance(e, t, r) {
          'lerc' === this.format && null != e && (t[r] = e);
        }
        writeLercVersion(e, t, r) {
          'lerc' === this.format && this.layer.version >= 10.5 && (t[r] = e);
        }
        get version() {
          const e = this.layer;
          return (
            e.commitProperty('bandIds'),
            e.commitProperty('format'),
            e.commitProperty('compressionQuality'),
            e.commitProperty('compressionTolerance'),
            e.commitProperty('interpolation'),
            e.commitProperty('noData'),
            e.commitProperty('noDataInterpretation'),
            e.commitProperty('mosaicRule'),
            e.commitProperty('renderingRule'),
            e.commitProperty('adjustAspectRatio'),
            e.commitProperty('pixelFilter'),
            e.commitProperty('renderer'),
            e.commitProperty('definitionExpression'),
            (this._get('version') || 0) + 1
          );
        }
        set version(e) {
          this._set('version', e);
        }
        get mosaicRule() {
          const e = this.layer;
          let t = e.mosaicRule;
          const r = e.definitionExpression;
          return (
            t
              ? r && r !== t.where && ((t = t.clone()), (t.where = r))
              : r && (t = new Q({ where: r })),
            t
          );
        }
        get renderingRule() {
          const e = this.layer;
          let t = e.renderingRule;
          const r = e.pixelFilter,
            i = !e.format || e.format.indexOf('jpg') > -1 || e.format.indexOf('png') > -1;
          return (
            (t = this._addResampleRasterFunction(t)),
            i && !r && (t = this.combineRendererWithRenderingRule()),
            t
          );
        }
        combineRendererWithRenderingRule() {
          var e;
          const t = this.layer,
            { rasterInfo: r, renderingRule: i, renderer: n } = t;
          return n && qe(n)
            ? He(
                (function (e, t) {
                  switch (((t = t || {}), e.type)) {
                    case 'raster-stretch':
                      return (function (e, t) {
                        const r = new J();
                        r.functionName = 'Stretch';
                        const i = Qe[Z.s.toJSON(e.stretchType)],
                          n = 'u8',
                          s = {
                            StretchType: i,
                            Statistics: (function (e) {
                              const t = [];
                              return (
                                e.forEach((e) => {
                                  const r = e;
                                  if (Array.isArray(r)) t.push(r);
                                  else {
                                    if (null == r.min || null == r.max) return;
                                    const e = [r.min, r.max, r.avg || 0, r.stddev || 0];
                                    t.push(e);
                                  }
                                }),
                                t
                              );
                            })(e.statistics),
                            DRA: e.dynamicRangeAdjustment,
                            UseGamma: e.useGamma,
                            Gamma: e.gamma,
                            ComputeGamma: e.computeGamma,
                          };
                        if (
                          (null != e.outputMin && (s.Min = e.outputMin),
                          null != e.outputMax && (s.Max = e.outputMax),
                          i === Qe.standardDeviation
                            ? ((s.NumberOfStandardDeviations = e.numberOfStandardDeviations),
                              (r.outputPixelType = n))
                            : i === Qe.percentClip
                            ? ((s.MinPercent = e.minPercent),
                              (s.MaxPercent = e.maxPercent),
                              (r.outputPixelType = n))
                            : i === Qe.minMax
                            ? (r.outputPixelType = n)
                            : i === Qe.sigmoid && (s.SigmoidStrengthLevel = e.sigmoidStrengthLevel),
                          (r.functionArguments = s),
                          (r.variableName = 'Raster'),
                          e.colorRamp)
                        ) {
                          const i = e.colorRamp,
                            n = new J(),
                            s = (0, z.g)(i);
                          return (
                            s
                              ? (n.functionArguments = { colorRamp: s })
                              : !t.convertColorRampToColormap ||
                                ('algorithmic' !== i.type && 'multipart' !== i.type)
                              ? (n.functionArguments = { colorRamp: e.colorRamp.toJSON() })
                              : (n.functionArguments = { Colormap: (0, z.c)(i, 256) }),
                            (n.variableName = 'Raster'),
                            (n.functionName = 'Colormap'),
                            (n.functionArguments.Raster = r),
                            n
                          );
                        }
                        return r;
                      })(e, t);
                    case 'class-breaks':
                      return (function (e, t) {
                        const r = [],
                          i = [],
                          n = [],
                          s = [],
                          o = 1e-6,
                          { pixelType: a, rasterAttributeTable: l } = t,
                          u = l && l.features,
                          p = Xe(l);
                        if (u && Array.isArray(u) && e.classBreakInfos) {
                          e.classBreakInfos.forEach((t, r) => {
                            const i = t.symbol.color;
                            let n;
                            i.a &&
                              u.forEach((o) => {
                                (n = o.attributes[e.field]),
                                  ((n >= t.minValue && n < t.maxValue) ||
                                    (r === e.classBreakInfos.length - 1 && n >= t.minValue)) &&
                                    s.push([o.attributes[p], i.r, i.g, i.b]);
                              });
                          });
                          const t = a ? We(s, a) : s,
                            r = new J();
                          return (
                            (r.functionName = 'Colormap'),
                            (r.functionArguments = {}),
                            (r.functionArguments.Colormap = t),
                            (r.variableName = 'Raster'),
                            r
                          );
                        }
                        e.classBreakInfos.forEach((e, t) => {
                          const a = e.symbol && e.symbol.color;
                          a.a
                            ? (0 === t
                                ? r.push(e.minValue, e.maxValue + o)
                                : r.push(e.minValue + o, e.maxValue + o),
                              i.push(t),
                              s.push([t, a.r, a.g, a.b]))
                            : n.push(e.minValue, e.maxValue);
                        });
                        const c = a ? We(s, a) : s,
                          d = new J();
                        (d.functionName = 'Remap'),
                          (d.functionArguments = {
                            InputRanges: r,
                            OutputValues: i,
                            NoDataRanges: n,
                          }),
                          (d.variableName = 'Raster');
                        const m = new J();
                        return (
                          (m.functionName = 'Colormap'),
                          (m.functionArguments = { Colormap: c, Raster: d }),
                          m
                        );
                      })(e, t);
                    case 'unique-value':
                      return (function (e, t) {
                        const r = [],
                          { pixelType: i, rasterAttributeTable: n } = t,
                          s = n && n.features,
                          o = Xe(n);
                        let a = !1;
                        if (
                          (e.uniqueValueInfos &&
                            e.uniqueValueInfos.forEach((t) => {
                              const i = t.symbol.color;
                              null != i &&
                                i.a &&
                                (e.field !== o && s
                                  ? s &&
                                    s.forEach((n) => {
                                      String(n.attributes[e.field]) === String(t.value) &&
                                        r.push([n.attributes[o], i.r, i.g, i.b]);
                                    })
                                  : isNaN(+t.value)
                                  ? (a = !0)
                                  : r.push([+t.value, i.r, i.g, i.b]));
                            }),
                          a)
                        )
                          return null;
                        const l = i && r.length > 0 ? We(r, i) : r,
                          u = new J();
                        return (
                          (u.functionName = 'Colormap'),
                          (u.functionArguments = {}),
                          (u.functionArguments.Colormap = l),
                          (u.variableName = 'Raster'),
                          u
                        );
                      })(e, t);
                    case 'raster-colormap':
                      return (function (e, t) {
                        const r = e.extractColormap();
                        if (!r || 0 === r.length) return;
                        const { pixelType: i } = t,
                          n = i ? We(r, i) : r,
                          s = new J();
                        return (
                          (s.functionName = 'Colormap'),
                          (s.functionArguments = {}),
                          (s.functionArguments.Colormap = n),
                          s
                        );
                      })(e, t);
                    case 'vector-field':
                      return (function (e, t) {
                        const r = new J();
                        r.functionName = 'VectorFieldRenderer';
                        const { dataType: i, bandProperties: n } = t,
                          s = 'vector-uv' === i;
                        let o, a;
                        n &&
                          2 === n.length &&
                          ((o = n.map((e) => e.BandName.toLowerCase()).indexOf('magnitude')),
                          (a = n.map((e) => e.BandName.toLowerCase()).indexOf('direction'))),
                          (-1 !== o && null !== o) || ((o = 0), (a = 1));
                        const l = 'arithmetic' === e.rotationType ? 1 : 2,
                          u = 'flow-from' === e.flowRepresentation ? 0 : 1,
                          p = e.visualVariables
                            ? e.visualVariables.filter((e) => 'Magnitude' === e.field)[0]
                            : new L.Z(),
                          c = {
                            magnitudeBandID: o,
                            directionBandID: a,
                            isUVComponents: s,
                            referenceSystem: l,
                            massFlowAngleRepresentation: u,
                            symbolTileSize: 50,
                            symbolTileSizeUnits: 100,
                            calculationMethod: 'Vector Average',
                            symbologyName: ke[e.style.toLowerCase().replace('-', '_')],
                            minimumMagnitude: p.minDataValue,
                            maximumMagnitude: p.maxDataValue,
                            minimumSymbolSize: p.minSize,
                            maximumSymbolSize: p.maxSize,
                          };
                        return (r.functionArguments = c), r;
                      })(e, t);
                    case 'raster-shaded-relief':
                      return (function (e, t) {
                        if ('elevation' !== t.dataType) return new J();
                        const r = new J();
                        r.functionName = 'Hillshade';
                        const i = 'traditional' === e.hillshadeType ? 0 : 1,
                          n = 'none' === e.scalingType ? 1 : 3,
                          s = { HillshadeType: i, SlopeType: n, ZFactor: e.zFactor };
                        return (
                          0 === i && ((s.Azimuth = e.azimuth), (s.Altitude = e.altitude)),
                          3 === n &&
                            ((s.PSPower = e.pixelSizePower), (s.PSZFactor = e.pixelSizeFactor)),
                          (r.functionArguments = s),
                          (r.variableName = 'Raster'),
                          e.colorRamp &&
                            ((r.functionName = 'ShadedRelief'),
                            (s.Colormap = (0, z.c)(e.colorRamp, 256))),
                          r
                        );
                      })(e, t);
                  }
                })(n, {
                  rasterAttributeTable: r.attributeTable,
                  pixelType: r.pixelType,
                  dataType: r.dataType,
                  bandProperties: null == (e = r.keyProperties) ? void 0 : e.BandProperties,
                  convertColorRampToColormap: t.version < 10.6,
                }),
                i,
              )
            : i;
        }
        _addResampleRasterFunction(e) {
          var t;
          if (
            'vector-field' !== (null == (t = this.layer.renderer) ? void 0 : t.type) ||
            'Resample' === (null == e ? void 0 : e.functionName)
          )
            return e;
          const r = 'esriImageServiceDataTypeVector-UV' === this.layer.serviceDataType ? 7 : 10;
          return He(
            new J({
              functionName: 'Resample',
              functionArguments: {
                ResamplingType: r,
                InputCellSize: { x: this.layer.pixelSizeX, y: this.layer.pixelSizeY },
              },
            }),
            e,
          );
        }
      };
      (0, n._)([(0, u.Cb)()], $e.prototype, 'layer', void 0),
        (0, n._)([(0, u.Cb)({ json: { write: !0 } })], $e.prototype, 'adjustAspectRatio', void 0),
        (0, n._)([(0, m.w)('adjustAspectRatio')], $e.prototype, 'writeAdjustAspectRatio', null),
        (0, n._)(
          [(0, u.Cb)({ json: { write: !0 } }), (0, R.B)('layer.bandIds')],
          $e.prototype,
          'bandIds',
          void 0,
        ),
        (0, n._)([(0, u.Cb)({ json: { write: !0 } })], $e.prototype, 'compression', void 0),
        (0, n._)(
          [(0, u.Cb)({ json: { write: !0 } }), (0, R.B)('layer.compressionQuality')],
          $e.prototype,
          'compressionQuality',
          void 0,
        ),
        (0, n._)([(0, m.w)('compressionQuality')], $e.prototype, 'writeCompressionQuality', null),
        (0, n._)(
          [(0, u.Cb)({ json: { write: !0 } }), (0, R.B)('layer.compressionTolerance')],
          $e.prototype,
          'compressionTolerance',
          void 0,
        ),
        (0, n._)(
          [(0, m.w)('compressionTolerance')],
          $e.prototype,
          'writeCompressionTolerance',
          null,
        ),
        (0, n._)(
          [(0, u.Cb)({ json: { write: !0 } }), (0, R.B)('layer.format')],
          $e.prototype,
          'format',
          void 0,
        ),
        (0, n._)(
          [
            (0, u.Cb)({
              type: String,
              json: { read: { reader: W.i.read }, write: { writer: W.i.write } },
            }),
            (0, R.B)('layer.interpolation'),
          ],
          $e.prototype,
          'interpolation',
          void 0,
        ),
        (0, n._)(
          [(0, u.Cb)({ json: { write: !0 } }), (0, R.B)('layer.noData')],
          $e.prototype,
          'noData',
          void 0,
        ),
        (0, n._)(
          [
            (0, u.Cb)({
              type: String,
              json: { read: { reader: W.n.read }, write: { writer: W.n.write } },
            }),
            (0, R.B)('layer.noDataInterpretation'),
          ],
          $e.prototype,
          'noDataInterpretation',
          void 0,
        ),
        (0, n._)([(0, u.Cb)({ json: { write: !0 } })], $e.prototype, 'pixelType', void 0),
        (0, n._)([(0, u.Cb)({ json: { write: !0 } })], $e.prototype, 'lercVersion', void 0),
        (0, n._)([(0, m.w)('lercVersion')], $e.prototype, 'writeLercVersion', null),
        (0, n._)([(0, u.Cb)({ type: Number })], $e.prototype, 'version', null),
        (0, n._)([(0, u.Cb)({ json: { write: !0 } })], $e.prototype, 'mosaicRule', null),
        (0, n._)([(0, u.Cb)({ json: { write: !0 } })], $e.prototype, 'renderingRule', null),
        ($e = (0, n._)([(0, d.j)('esri.layers.mixins.ExportImageServiceParameters')], $e));
      const Ke = c.L.getLogger('esri.layers.mixins.ArcGISImageService'),
        Ye = (0, w.s)()({
          U1: 'u1',
          U2: 'u2',
          U4: 'u4',
          U8: 'u8',
          S8: 's8',
          U16: 'u16',
          S16: 's16',
          U32: 'u32',
          S32: 's32',
          F32: 'f32',
          F64: 'f64',
          C64: 'c64',
          C128: 'c128',
          UNKNOWN: 'unknown',
        }),
        et = new Set([
          'png',
          'png8',
          'png24',
          'png32',
          'jpg',
          'bmp',
          'gif',
          'jpgpng',
          'lerc',
          'tiff',
        ]),
        tt = (0, u.Eg)(p.l, { min: 0, max: 255 }),
        rt = (e) => {
          let t = class extends e {
            constructor() {
              super(...arguments),
                (this._functionRasterInfos = {}),
                (this._rasterJobHandler = { instance: null, refCount: 0, connectionPromise: null }),
                (this._symbolizer = null),
                (this._defaultServiceMosaicRule = null),
                (this.rasterAttributeTableFieldPrefix = 'Raster.'),
                (this.adjustAspectRatio = null),
                (this.bandCount = null),
                (this.bandIds = void 0),
                (this.capabilities = null),
                (this.compressionQuality = void 0),
                (this.compressionTolerance = 0.01),
                (this.copyright = null),
                (this.definitionExpression = null),
                (this.exportImageServiceParameters = null),
                (this.rasterInfo = null),
                (this.fields = null),
                (this.fullExtent = null),
                (this.hasMultidimensions = !1),
                (this.imageMaxHeight = 4100),
                (this.imageMaxWidth = 4100),
                (this.interpolation = void 0),
                (this.minScale = 0),
                (this.maxScale = 0),
                (this.multidimensionalInfo = null),
                (this.noData = null),
                (this.noDataInterpretation = void 0),
                (this.objectIdField = null),
                (this.pixelSizeX = null),
                (this.pixelSizeY = null),
                (this.pixelFilter = null),
                (this.raster = void 0),
                (this.viewId = void 0),
                (this.renderer = null),
                (this.rasterAttributeTable = null),
                (this.rasterFunctionInfos = null),
                (this.serviceDataType = null),
                (this.spatialReference = null),
                (this.pixelType = null),
                (this.serviceRasterInfo = null),
                (this.sourceJSON = null),
                (this.url = null),
                (this.version = null);
            }
            initialize() {
              this._set('exportImageServiceParameters', new $e({ layer: this }));
            }
            readDefaultServiceMosaicRule(e, t) {
              return Q.fromJSON(t);
            }
            get rasterFunctionNamesIndex() {
              const e = new Map();
              return (
                !this.rasterFunctionInfos ||
                  this.rasterFunctionInfos.length < 1 ||
                  this.rasterFunctionInfos.forEach((t) => {
                    e.set(t.name.toLowerCase().replace(/ /gi, '_'), t.name);
                  }),
                e
              );
            }
            get queryTask() {
              return new Pe.Z({ url: this.url });
            }
            readBandIds(e, t) {
              if (Array.isArray(e) && e.length > 0 && e.every((e) => 'number' == typeof e))
                return e;
            }
            readCapabilities(e, t) {
              return this._readCapabilities(t);
            }
            writeCompressionQuality(e, t, r) {
              null != e && 'lerc' !== this.format && (t[r] = e);
            }
            writeCompressionTolerance(e, t, r) {
              'lerc' === this.format && null != e && (t[r] = e);
            }
            get fieldsIndex() {
              return this.fields ? new $.Z(this.fields) : null;
            }
            set format(e) {
              e && et.has(e.toLowerCase()) && this._set('format', e.toLowerCase());
            }
            readFormat(e, t) {
              return 'esriImageServiceDataTypeVector-UV' === t.serviceDataType ||
                'esriImageServiceDataTypeVector-MagDir' === t.serviceDataType ||
                null != this.pixelFilter
                ? 'lerc'
                : 'jpgpng';
            }
            readMinScale(e, t) {
              return null != t.minLOD && null != t.maxLOD ? e : 0;
            }
            readMaxScale(e, t) {
              return null != t.minLOD && null != t.maxLOD ? e : 0;
            }
            set mosaicRule(e) {
              let t = e;
              t &&
                t.mosaicMethod &&
                (t = Q.fromJSON({
                  ...t.toJSON(),
                  mosaicMethod: t.mosaicMethod,
                  mosaicOperation: t.mosaicOperation,
                })),
                this._set('mosaicRule', t);
            }
            readMosaicRule(e, t) {
              return Q.fromJSON(e || t.mosaicRule || t);
            }
            writeMosaicRule(e, t, r) {
              let i = this.mosaicRule;
              const n = this.definitionExpression;
              i
                ? n && n !== i.where && ((i = i.clone()), (i.where = n))
                : n && (i = new Q({ where: n })),
                this._isValidCustomizedMosaicRule(i) && (t[r] = i.toJSON());
            }
            writeNoData(e, t, r) {
              null != e && 'number' == typeof e && (t[r] = tt(e));
            }
            readObjectIdField(e, t) {
              if (!e) {
                const r = t.fields.filter((e) => 'esriFieldTypeOID' === e.type || 'oid' === e.type);
                e = r && r[0] && r[0].name;
              }
              return e;
            }
            get parsedUrl() {
              return this.url ? (0, _.mN)(this.url) : null;
            }
            readRenderer(e, t, r) {
              var i, n;
              const s =
                  null == t || null == (i = t.layerDefinition) || null == (n = i.drawingInfo)
                    ? void 0
                    : n.renderer,
                o = (0, g.ij)(s, r);
              return null == o
                ? null
                : ('vector-field' === o.type &&
                    t.symbolTileSize &&
                    !s.symbolTileSize &&
                    (o.symbolTileSize = t.symbolTileSize),
                  qe(o) ||
                    Ke.warn(
                      'ArcGISImageService',
                      "Imagery layer doesn't support given renderer type.",
                    ),
                  o);
            }
            writeRenderer(e, t, r) {
              (t.layerDefinition = t.layerDefinition || {}),
                (t.layerDefinition.drawingInfo = t.layerDefinition.drawingInfo || {}),
                (t.layerDefinition.drawingInfo.renderer = e.toJSON()),
                'vector-field' === e.type && (t.symbolTileSize = e.symbolTileSize);
            }
            get rasterFields() {
              const e = this.rasterAttributeTableFieldPrefix || 'Raster.',
                t = new X.Z({
                  name: 'Raster.ItemPixelValue',
                  alias: 'Item Pixel Value',
                  domain: null,
                  editable: !1,
                  length: 50,
                  type: 'string',
                }),
                r = new X.Z({
                  name: 'Raster.ServicePixelValue',
                  alias: 'Service Pixel Value',
                  domain: null,
                  editable: !1,
                  length: 50,
                  type: 'string',
                }),
                i = new X.Z({
                  name: 'Raster.ServicePixelValue.Raw',
                  alias: 'Raw Service Pixel Value',
                  domain: null,
                  editable: !1,
                  length: 50,
                  type: 'string',
                });
              let n = this.fields ? (0, o.d9)(this.fields) : [];
              n.push(r),
                this.capabilities.operations.supportsQuery &&
                  this.fields &&
                  this.fields.length > 0 &&
                  n.push(t),
                this.version >= 10.4 &&
                  this.rasterFunctionInfos &&
                  this.rasterFunctionInfos.some((e) => 'none' === e.name.toLowerCase()) &&
                  n.push(i),
                this.rasterFunctionInfos &&
                  this.rasterFunctionInfos
                    .filter((e) => 'none' !== e.name.toLowerCase())
                    .forEach((e) => {
                      n.push(
                        new X.Z({
                          name: 'Raster.ServicePixelValue.' + e.name,
                          alias: e.name,
                          domain: null,
                          editable: !1,
                          length: 50,
                          type: 'string',
                        }),
                      );
                    }),
                null == this.pixelFilter ||
                  ('esriImageServiceDataTypeVector-UV' !== this.serviceDataType &&
                    'esriImageServiceDataTypeVector-MagDir' !== this.serviceDataType) ||
                  (n.push(
                    new X.Z({
                      name: 'Raster.Magnitude',
                      alias: 'Magnitude',
                      domain: null,
                      editable: !1,
                      type: 'double',
                    }),
                  ),
                  n.push(
                    new X.Z({
                      name: 'Raster.Direction',
                      alias: 'Direction',
                      domain: null,
                      editable: !1,
                      type: 'double',
                    }),
                  ));
              const s =
                (this.rasterInfo.attributeTable && this.rasterInfo.attributeTable.fields) || null;
              if (s && s.length > 0) {
                const t = s
                  .filter((e) => 'esriFieldTypeOID' !== e.type && 'value' !== e.name.toLowerCase())
                  .map((t) => {
                    const r = (0, o.d9)(t);
                    return (r.name = e + t.name), r;
                  });
                n = n.concat(t);
              }
              return n;
            }
            set renderingRule(e) {
              let t = e;
              t &&
                t.rasterFunction &&
                (t = J.fromJSON({
                  ...t.toJSON(),
                  rasterFunction: t.rasterFunction,
                  rasterFunctionArguments: t.rasterFunctionArguments,
                })),
                this._set('renderingRule', t);
            }
            readRenderingRule(e, t) {
              const r = t.rasterFunctionInfos;
              return t.renderingRule || (r && r.length && 'None' !== r[0].name)
                ? J.fromJSON(t.renderingRule || { rasterFunctionInfos: t.rasterFunctionInfos })
                : null;
            }
            writeRenderingRule(e, t, r) {
              this._isRFTJson(e) || (t[r] = e.toJSON());
            }
            readSpatialReference(e, t) {
              const r = e || t.extent.spatialReference;
              return r ? B.Z.fromJSON(r) : null;
            }
            readPixelType(e) {
              return Ye.fromJSON(e) || e;
            }
            writePixelType(e, t, r) {
              ((0, o.b)(this.serviceRasterInfo) ||
                this.pixelType !== this.serviceRasterInfo.pixelType) &&
                (t[r] = Ye.toJSON(e));
            }
            readVersion(e, t) {
              let r = t.currentVersion;
              return (
                r || (r = t.hasOwnProperty('fields') || t.hasOwnProperty('timeInfo') ? 10 : 9.3), r
              );
            }
            applyFilter(e) {
              let t = e;
              return this.pixelFilter && ((t = this._clonePixelData(e)), this.pixelFilter(t)), t;
            }
            async applyRenderer(e, t) {
              let r = e;
              if (!this._isPicture() && this.renderer && this._symbolizer && !this.pixelFilter) {
                const i =
                    JSON.stringify(this._cachedRendererJson) !==
                    JSON.stringify(this.renderer.toJSON()),
                  n = this._rasterJobHandler.instance,
                  { bandIds: s } = this;
                if (n) {
                  i &&
                    (this._symbolizer.bind(),
                    await n.updateSymbolizer(this._symbolizer, t),
                    (this._cachedRendererJson = this.renderer.toJSON()));
                  const o = await n.symbolize({ bandIds: s, ...e }, t);
                  r = { extent: e.extent, pixelBlock: o };
                } else
                  r = {
                    extent: e.extent,
                    pixelBlock: this._symbolizer.symbolize({ bandIds: s, ...e }),
                  };
              }
              return r;
            }
            destroy() {
              this._shutdownJobHandler();
            }
            increaseRasterJobHandlerUsage() {
              this._rasterJobHandler.refCount++;
            }
            decreaseRasterJobHandlerUsage() {
              this._rasterJobHandler.refCount--,
                this._rasterJobHandler.refCount <= 0 && this._shutdownJobHandler();
            }
            async computeHistograms(e, t) {
              if (
                (await this._fetchCapabilities(null == t ? void 0 : t.signal),
                !this.capabilities.operations.supportsComputeHistograms)
              )
                throw new b.Z(
                  'imagery-layer:compute-histograms',
                  'this operation is not supported on the input image service',
                );
              e = (0, p.k)(_e, e).clone();
              const { raster: r, mosaicRule: i, renderingRule: n } = this;
              return (
                n && null == e.renderingRule && (e.renderingRule = n),
                i && null == e.mosaicRule && (e.mosaicRule = i),
                r && null == e.raster && (e.raster = r),
                (async function (e, t, r) {
                  const i = await ge(e, t, r),
                    n = (0, ne.p)(e),
                    { data: s } = await (0, v.default)(`${n.path}/computeHistograms`, i);
                  return { histograms: s.histograms };
                })(this.url, e, this._getRequestOptions(t))
              );
            }
            async computeStatisticsHistograms(e, t) {
              if (
                (await this._fetchCapabilities(null == t ? void 0 : t.signal),
                !this.capabilities.operations.supportsComputeStatisticsHistograms)
              )
                throw new b.Z(
                  'imagery-layer:compute-statistics-histograms',
                  'this operation is not supported on the input image service',
                );
              e = (0, p.k)(_e, e).clone();
              const { raster: r, mosaicRule: i, renderingRule: n } = this;
              return (
                n && null == e.renderingRule && (e.renderingRule = n),
                i && null == e.mosaicRule && (e.mosaicRule = i),
                r && null == e.raster && (e.raster = r),
                (async function (e, t, r) {
                  const i = await ge(e, t, r),
                    n = (0, ne.p)(e),
                    { data: s } = await (0, v.default)(`${n.path}/computeStatisticsHistograms`, i),
                    { statistics: o } = s;
                  return (
                    null != o &&
                      o.length &&
                      o.forEach((e) => {
                        (e.avg = e.mean), (e.stddev = e.standardDeviation);
                      }),
                    { statistics: o, histograms: s.histograms }
                  );
                })(this.url, e, this._getRequestOptions(t))
              );
            }
            fetchImage(e, t, r, i = {}) {
              if (null == e || null == t || null == r)
                return Promise.reject(
                  new b.Z(
                    'imagery-layer:fetch-image',
                    'Insufficient parameters for requesting an image. A valid extent, width and height values are required.',
                  ),
                );
              const n =
                this.renderer || this._symbolizer
                  ? this.generateRasterInfo(this.renderingRule, { signal: i.signal })
                  : null;
              return (0, l.gx)(n).then((n) => {
                n && (this.rasterInfo = n);
                const s = {
                  imageServiceParameters: this.getExportImageServiceParameters(
                    e,
                    t,
                    r,
                    i.timeExtent,
                  ),
                  imageProps: { extent: e, width: t, height: r, format: this.format },
                  requestAsImageElement: (i.requestAsImageElement && !this.pixelFilter) || !1,
                  signal: i.signal,
                };
                return this._requestArrayBuffer(s);
              });
            }
            fetchKeyProperties(e) {
              const t = e && e.renderingRule && e.renderingRule.toJSON();
              return (0, v.default)(this.parsedUrl.path + '/keyProperties', {
                query: this._getQueryParams({
                  renderingRule: this.version >= 10.3 && t ? JSON.stringify(t) : null,
                }),
              }).then((e) => e.data);
            }
            fetchRasterAttributeTable(e) {
              const t = e && e.renderingRule && e.renderingRule.toJSON();
              return this.version < 10.1
                ? Promise.reject(
                    new b.Z('#fetchRasterAttributeTable()', 'Failed to get rasterAttributeTable'),
                  )
                : (0, v.default)(this.parsedUrl.path + '/rasterAttributeTable', {
                    query: this._getQueryParams({
                      renderingRule: this.version >= 10.3 && t ? JSON.stringify(t) : null,
                    }),
                  }).then((e) => se.default.fromJSON(e.data));
            }
            async getCatalogItemRasterInfo(e, t) {
              const r = (0, v.default)(this.parsedUrl.path + '/' + e + '/info', {
                  query: this._getQueryParams(),
                  ...t,
                }).then((e) => e.data),
                i = (0, v.default)(this.parsedUrl.path + '/' + e + '/info/keyProperties', {
                  query: this._getQueryParams(),
                  ...t,
                })
                  .then((e) => e.data)
                  .catch(() => {}),
                n = await Promise.all([r, i]);
              if (!n[0]) return;
              const s = oe.Z.fromJSON(n[0].extent),
                o = n[0].statistics
                  ? n[0].statistics.map((e) => ({ min: e[0], max: e[1], avg: e[2], stddev: e[3] }))
                  : null;
              return new Y.Z({
                bandCount: n[0].bandCount,
                extent: s,
                spatialReference: s.sr,
                pixelSize: new k.Z({
                  x: n[0].pixelSizeX,
                  y: n[0].pixelSizeY,
                  spatialReference: s.sr,
                }),
                pixelType: n[0].pixelType.toLowerCase(),
                statistics: o,
                histograms: n[0].histograms,
                keyProperties: n[1] || {},
              });
            }
            async getCatalogItemICSInfo(e, t) {
              const { data: r } = await (0, v.default)(
                  this.parsedUrl.path + '/' + e + '/info/ics',
                  { query: this._getQueryParams(), ...t },
                ),
                i = r && r.ics;
              if (!i) return;
              let n = null;
              try {
                n = (
                  await (0, v.default)(this.parsedUrl.path + '/' + e + '/info', {
                    query: this._getQueryParams(),
                    ...t,
                  })
                ).data.extent;
              } catch {}
              if (!n || !n.spatialReference)
                return { ics: i, icsToPixelTransform: null, icsExtent: null, northDirection: null };
              const s =
                  this.version >= 10.7
                    ? (0, v.default)(this.parsedUrl.path + '/' + e + '/info/icstopixel', {
                        query: this._getQueryParams(),
                        ...t,
                      })
                        .then((e) => e.data)
                        .catch(() => ({}))
                    : {},
                o = n.spatialReference,
                a = {
                  geometries: JSON.stringify({
                    geometryType: 'esriGeometryEnvelope',
                    geometries: [n],
                  }),
                  inSR: o.wkid || JSON.stringify(o),
                  outSR: '0:' + e,
                },
                l = (0, v.default)(this.parsedUrl.path + '/project', {
                  query: this._getQueryParams(a),
                  ...t,
                })
                  .then((e) => e.data)
                  .catch(() => ({})),
                u = (n.xmin + n.xmax) / 2,
                p = (n.ymax - n.ymin) / 6,
                c = n.ymin + p,
                d = [];
              for (let e = 0; e < 5; e++) d.push({ x: u, y: c + p * e });
              const m = {
                  geometries: JSON.stringify({ geometryType: 'esriGeometryPoint', geometries: d }),
                  inSR: o.wkid || JSON.stringify(o),
                  outSR: '0:' + e,
                },
                h = (0, v.default)(this.parsedUrl.path + '/project', {
                  query: this._getQueryParams(m),
                  ...t,
                })
                  .then((e) => e.data)
                  .catch(() => ({})),
                y = await Promise.all([s, l, h]);
              let f = y[0].ipxf;
              if (null == f) {
                var g, b, w;
                const e = null == (g = i.geodataXform) ? void 0 : g.xf_0;
                'topup' === (null == e || null == (b = e.name) ? void 0 : b.toLowerCase()) &&
                  6 === (null == e || null == (w = e.coefficients) ? void 0 : w.length) &&
                  (f = {
                    affine: {
                      name: 'ics [sensor: Frame] to pixel (column, row) transformation',
                      coefficients: e.coefficients,
                      cellsizeRatio: 0,
                      type: 'GeometricXform',
                    },
                  });
              }
              const _ = oe.Z.fromJSON(y[1] && y[1].geometries && y[1].geometries[0]);
              _ && (_.spatialReference = new B.Z({ wkid: 0, imageCoordinateSystem: i }));
              const R = y[2].geometries
                  ? y[2].geometries.filter(
                      (e) =>
                        null != e && null != e.x && null != e.y && 'NaN' !== e.x && 'NaN' !== e.y,
                    )
                  : [],
                S = R.length;
              if (S < 3)
                return { ics: i, icsToPixelTransform: f, icsExtent: _, northDirection: null };
              let x = 0,
                C = 0,
                I = 0,
                j = 0;
              for (let e = 0; e < S; e++)
                (x += R[e].x), (C += R[e].y), (I += R[e].x * R[e].x), (j += R[e].x * R[e].y);
              const T = (S * j - x * C) / (S * I - x * x);
              let N = 0;
              const O = R[4].x > R[0].x,
                F = R[4].y > R[0].y;
              return (
                T === 1 / 0
                  ? (N = F ? 90 : 270)
                  : 0 === T
                  ? (N = O ? 0 : 180)
                  : T > 0
                  ? (N = O ? (180 * Math.atan(T)) / Math.PI : (180 * Math.atan(T)) / Math.PI + 180)
                  : T < 0 &&
                    (N = F
                      ? 180 + (180 * Math.atan(T)) / Math.PI
                      : 360 + (180 * Math.atan(T)) / Math.PI),
                { ics: i, icsToPixelTransform: f, icsExtent: _, northDirection: N }
              );
            }
            async generateRasterInfo(e, t) {
              if (
                (!e ||
                  'none' === e.functionName.toLowerCase() ||
                  this._isVectorFieldResampleFunction(e)) &&
                (0, o.i)(this.serviceRasterInfo)
              )
                return this.serviceRasterInfo;
              const r = (function (e) {
                if (!e) return null;
                const t = JSON.stringify(e).match(/"rasterFunction":"(.*?")/gi),
                  r =
                    null == t
                      ? void 0
                      : t.map((e) => e.replace('"rasterFunction":"', '').replace('"', ''));
                return r ? r.join('/') : null;
              })(e);
              if (this._functionRasterInfos[r]) return this._functionRasterInfos[r];
              const i = this._generateRasterInfo(e, t);
              this._functionRasterInfos[r] = i;
              try {
                return await i;
              } catch {
                return (this._functionRasterInfos[r] = null), null;
              }
            }
            getExportImageServiceParameters(e, t, r, i) {
              const n = (e = e.clone().shiftCentralMeridian()).spatialReference;
              let s;
              if (n.imageCoordinateSystem) {
                const { id: e, referenceServiceName: t } = n.imageCoordinateSystem;
                s =
                  null != e
                    ? t
                      ? this.parsedUrl.path.toLowerCase().indexOf('/' + t.toLowerCase() + '/') > -1
                        ? '0:' + e
                        : JSON.stringify({ icsid: e, icsns: t })
                      : '0:' + e
                    : JSON.stringify({ ics: n.imageCoordinateSystem });
              } else s = n.wkid || JSON.stringify(n.toJSON());
              (0, o.i)(this.serviceRasterInfo) &&
                this.pixelType !== this.serviceRasterInfo.pixelType &&
                (this.exportImageServiceParameters.pixelType = this.pixelType);
              const a = this.exportImageServiceParameters.toJSON(),
                { bandIds: l, noData: u, mosaicRule: p } = a;
              let { renderingRule: c } = a;
              if (
                (l instanceof Array && l.length > 0 && !this.renderingRule
                  ? (a.bandIds = l.join(','))
                  : (a.bandIds = void 0),
                null != l && l.length && this.renderingRule)
              )
                if ('Colormap' === c.rasterFunction) {
                  const e = new J({
                    functionName: 'ExtractBand',
                    functionArguments: { BandIds: l, raster: c.rasterFunctionArguments.Raster },
                  });
                  c.rasterFunctionArguments.Raster = e;
                } else
                  c = new J({
                    functionName: 'ExtractBand',
                    functionArguments: { BandIds: l, raster: c },
                  });
              u instanceof Array && u.length > 0 && (a.noData = u.join(','));
              const d = this.timeInfo;
              p &&
                p.multidimensionalDefinition &&
                i &&
                d &&
                d.startField &&
                (p.multidimensionalDefinition = p.multidimensionalDefinition.filter(
                  (e) => e.dimensionName !== d.startField,
                )),
                (a.mosaicRule = p && JSON.stringify(p)),
                (a.renderingRule = c && JSON.stringify(c));
              const m = {};
              if (i) {
                const { start: e, end: t } = i.toJSON();
                e && t && e === t
                  ? (m.time = '' + e)
                  : (null == e && null == t) ||
                    (m.time = `${null == e ? 'null' : e},${null == t ? 'null' : t}`);
              }
              return {
                bbox: e.xmin + ',' + e.ymin + ',' + e.xmax + ',' + e.ymax,
                bboxSR: s,
                imageSR: s,
                size: t + ',' + r,
                ...a,
                ...m,
              };
            }
            async getSamples(e, t) {
              if (
                (await this._fetchCapabilities(null == t ? void 0 : t.signal),
                !this.capabilities.operations.supportsGetSamples)
              )
                throw new b.Z(
                  'imagery-layer:get-samples',
                  'getSamples operation is not supported on the input image service',
                );
              e = (0, p.k)(je, e).clone();
              const { raster: r } = this;
              return (
                r && null == e.raster && (e.raster = r),
                (async function (e, t, r) {
                  var i, n;
                  const s = t.toJSON();
                  fe(s),
                    null != (i = s.outFields) && i.length && (s.outFields = s.outFields.join(','));
                  const a = await (0, ie.aX)(t.geometry),
                    l = null == a ? void 0 : a[0];
                  (0, o.i)(l) && (s.geometry = l.toJSON());
                  const u = (0, ne.p)(e),
                    p = (0, ne.e)({ ...u.query, f: 'json', ...s }),
                    c = (0, ne.a)(p, r),
                    { data: d } = await (0, v.default)(`${u.path}/getSamples`, c),
                    m =
                      null == d || null == (n = d.samples)
                        ? void 0
                        : n.map((e) => {
                            const t =
                              'NaN' === e.value || '' === e.value
                                ? null
                                : e.value.split(' ').map((e) => Number(e));
                            return { ...e, pixelValue: t };
                          });
                  return ye.fromJSON({ samples: m });
                })(this.url, e, this._getRequestOptions(t))
              );
            }
            async identify(e, t) {
              if (
                (await this._fetchCapabilities(null == t ? void 0 : t.signal),
                !this.capabilities.operations.supportsIdentify)
              )
                throw new b.Z(
                  'imagery-layer:query-rasters',
                  'query operation is not supported on the input image service',
                );
              e = (0, p.k)(xe, e).clone();
              const { raster: r, mosaicRule: i, renderingRule: n } = this;
              return (
                n && null == e.renderingRule && (e.renderingRule = n),
                i && null == e.mosaicRule && (e.mosaicRule = i),
                r && null == e.raster && (e.raster = r),
                new Fe({ url: this.url }).execute(e, this._getRequestOptions(t))
              );
            }
            async queryRasters(e, t) {
              var r;
              if (
                (await this._fetchCapabilities(null == (r = t) ? void 0 : r.signal),
                !this.capabilities.operations.supportsQuery)
              )
                throw new b.Z(
                  'imagery-layer:query-rasters',
                  'query operation is not supported on the input image service',
                );
              return (
                (e = (0, p.k)(Te.Z, e)),
                (t = this._getRequestOptions(t)),
                this.raster && (t.query = { ...t.query, raster: this.raster }),
                this.queryTask.execute(e, t)
              );
            }
            queryVisibleRasters(e, t) {
              if (!e)
                return Promise.reject(
                  new b.Z('imagery-layer: query-visible-rasters', 'missing query parameter'),
                );
              const {
                pixelSize: r,
                returnDomainValues: i,
                returnTopmostRaster: n,
                showNoDataRecords: s,
              } = t || {
                pixelSize: null,
                returnDomainValues: !1,
                returnTopmostRaster: !1,
                showNoDataRecords: !1,
              };
              let a = !1,
                l = null,
                u = null;
              const p = 'raster.servicepixelvalue',
                c = this.rasterFunctionNamesIndex;
              if (
                (0, o.i)(e.outFields) &&
                ((a = e.outFields.some((e) => -1 === e.toLowerCase().indexOf(p))),
                this.version >= 10.4)
              ) {
                const t = e.outFields
                  .filter((e) => e.toLowerCase().indexOf(p) > -1 && e.length > p.length)
                  .map((e) => {
                    const t = e.slice(p.length + 1);
                    return [this._updateRenderingRulesFunctionName(t, c), t];
                  });
                (l = t.map((e) => new J({ functionName: e[0] }))),
                  (u = t.map((e) => e[1])),
                  0 === l.length
                    ? this.renderingRule
                      ? (l.push(this.renderingRule), u.push(this.renderingRule.functionName))
                      : (l = null)
                    : this.renderingRule &&
                      !l.some((e) => e.functionName === this.renderingRule.functionName) &&
                      (l.push(this.renderingRule), u.push(this.renderingRule.functionName));
              }
              const d =
                  (0, o.b)(e.outSpatialReference) ||
                  e.outSpatialReference.equals(this.spatialReference),
                m = this._getQueryParams({
                  geometry: e.geometry,
                  timeExtent: e.timeExtent || this.timeExtent,
                  mosaicRule: this.exportImageServiceParameters.mosaicRule,
                  renderingRule: this.version < 10.4 ? this.renderingRule : null,
                  renderingRules: l,
                  pixelSize: r,
                  returnCatalogItems: a,
                  returnGeometry: d,
                  raster: this.raster,
                  maxItemCount: n ? 1 : null,
                });
              delete m.f;
              const h = new xe(m),
                y = new Fe({ url: this.url }),
                f = this.generateRasterInfo(this.renderingRule);
              return new Promise((r) => {
                f.then(() => {
                  y.execute(h, {
                    signal: null == t ? void 0 : t.signal,
                    query: { ...this.customParameters },
                  })
                    .then((t) => {
                      const n = e.outFields;
                      if (
                        a &&
                        !d &&
                        t.catalogItems &&
                        t.catalogItems.features &&
                        t.catalogItems.features.length > 0
                      ) {
                        const o = this.objectIdField || 'ObjectId',
                          a = t.catalogItems.features,
                          l = a.map((e) => e.attributes && e.attributes[o]),
                          p = new Te.Z({
                            objectIds: l,
                            returnGeometry: !0,
                            outSpatialReference: e.outSpatialReference,
                            outFields: [o],
                          });
                        return this.queryRasters(p)
                          .then((l) => {
                            l &&
                              l.features &&
                              l.features.length > 0 &&
                              l.features.forEach((t) => {
                                a.forEach((r) => {
                                  r.attributes[o] === t.attributes[o] &&
                                    ((r.geometry = new le.Z(t.geometry)),
                                    (r.geometry.spatialReference = e.outSpatialReference));
                                });
                              }),
                              r(
                                this._processVisibleRastersResponse(t, {
                                  returnDomainValues: i,
                                  templateRRFunctionNames: u,
                                  showNoDataRecords: s,
                                  templateFields: n,
                                }),
                              );
                          })
                          .catch(() => {
                            throw new b.Z(
                              'imagery-layer:query-visible-rasters',
                              'encountered error when querying visible rasters geometry',
                            );
                          });
                      }
                      r(
                        this._processVisibleRastersResponse(t, {
                          returnDomainValues: i,
                          templateRRFunctionNames: u,
                          showNoDataRecords: s,
                          templateFields: n,
                        }),
                      );
                    })
                    .catch(() => {
                      throw new b.Z(
                        'imagery-layer:query-visible-rasters',
                        'encountered error when querying visible rasters',
                      );
                    });
                });
              });
            }
            async fetchVariableStatisticsHistograms(e, t) {
              const r = (0, v.default)(this.parsedUrl.path + '/statistics', {
                  query: this._getQueryParams({ variable: e }),
                  signal: t,
                }).then((e) => {
                  var t;
                  return null == (t = e.data) ? void 0 : t.statistics;
                }),
                i = (0, v.default)(this.parsedUrl.path + '/histograms', {
                  query: this._getQueryParams({ variable: e }),
                  signal: t,
                }).then((e) => {
                  var t;
                  return null == (t = e.data) ? void 0 : t.histograms;
                }),
                n = await Promise.all([r, i]);
              return (
                n[0] &&
                  n[0].forEach((e) => {
                    (e.avg = e.mean), (e.stddev = e.standardDeviation);
                  }),
                { statistics: n[0] || null, histograms: n[1] || null }
              );
            }
            async _fetchService(e) {
              await this._fetchServiceInfo(e),
                (0, o.i)(this.serviceRasterInfo) &&
                  !this.rasterInfo &&
                  (this.rasterInfo = this.serviceRasterInfo);
              const t = this.sourceJSON,
                r = (0, o.i)(this.serviceRasterInfo)
                  ? Promise.resolve(this.serviceRasterInfo)
                  : this._fetchAuxiliaryRasterInfo({ serviceInfo: t, signal: e }).then(
                      (e) => (this._set('serviceRasterInfo', e), e),
                    ),
                i =
                  this.renderingRule && 'none' !== this.renderingRule.functionName.toLowerCase()
                    ? this.generateRasterInfo(this.renderingRule, { signal: e })
                    : null;
              return Promise.all([r, i]).then((e) => {
                e[1] ? this._set('rasterInfo', e[1]) : this._set('rasterInfo', e[0]),
                  this.renderer &&
                    !this._isSupportedRenderer(this.renderer) &&
                    ((this.renderer = null),
                    Ke.warn(
                      'ArcGISImageService',
                      'Switching to the default renderer. Renderer applied is not valid for this Imagery Layer',
                    )),
                  this._configDefaultRenderer(),
                  this.watch('renderer', () => this._configDefaultRenderer()),
                  this.watch('renderingRule', (e) => {
                    (this.renderer ||
                      this._symbolizer ||
                      (this.popupEnabled && this.popupTemplate)) &&
                      this.generateRasterInfo(e).then((e) => {
                        e && (this.rasterInfo = e);
                      });
                  });
                const t =
                  (0, o.i)(this.serviceRasterInfo) && this.serviceRasterInfo.multidimensionalInfo;
                t && this._updateMultidimensionalDefinition(t);
              });
            }
            async _initJobHandler() {
              if (null != this._rasterJobHandler.connectionPromise)
                return this._rasterJobHandler.connectionPromise;
              const e = new ee.R();
              (this._rasterJobHandler.connectionPromise = e.initialize().then(
                () => {
                  this._rasterJobHandler.instance = e;
                },
                () => null,
              )),
                await this._rasterJobHandler.connectionPromise;
            }
            _shutdownJobHandler() {
              this._rasterJobHandler.instance && this._rasterJobHandler.instance.destroy(),
                (this._rasterJobHandler.instance = null),
                (this._rasterJobHandler.connectionPromise = null),
                (this._rasterJobHandler.refCount = 0);
            }
            _isSupportedRenderer(e) {
              const { rasterInfo: t, renderingRule: r } = this;
              return (
                ('unique-value' === e.type &&
                  r &&
                  'none' !== r.functionName.toLowerCase() &&
                  1 === t.bandCount &&
                  ['u8', 's8'].includes(t.pixelType)) ||
                (0, re.g)(this.rasterInfo).includes(this.renderer.type)
              );
            }
            async _fetchCapabilities(e) {
              return this.capabilities || (await this._fetchServiceInfo(e)), this.capabilities;
            }
            async _fetchServiceInfo(e) {
              var t;
              let r = this.sourceJSON;
              if (!r) {
                const { data: t, ssl: i } = await (0, v.default)(this.parsedUrl.path, {
                  query: this._getQueryParams(),
                  signal: e,
                });
                (r = t),
                  (this.sourceJSON = r),
                  i && (this.url = this.url.replace(/^http:/i, 'https:'));
              }
              if (
                (null == (t = r.capabilities)
                  ? void 0
                  : t
                      .toLowerCase()
                      .split(',')
                      .map((e) => e.trim())
                      .indexOf('tilesonly')) > -1
              )
                throw new b.Z(
                  'imagery-layer:fetch-service-info',
                  'use ImageryTileLayer to open tiles-only image services',
                );
              this.read(r, { origin: 'service', url: this.parsedUrl });
            }
            _isVectorFieldResampleFunction(e) {
              if (!(0, o.i)(e)) return !1;
              const { functionName: t, functionArguments: r } = e,
                i = 'resample' === t.toLowerCase(),
                n = (null == r ? void 0 : r.ResampleType) || (null == r ? void 0 : r.resampleType);
              return i && (7 === n || 10 === n);
            }
            _isPicture() {
              return (
                !this.format || this.format.indexOf('jpg') > -1 || this.format.indexOf('png') > -1
              );
            }
            _configDefaultRenderer() {
              if (!this._isPicture() && !this.pixelFilter) {
                if (!this.bandIds && this.rasterInfo.bandCount >= 3) {
                  const e = (0, re.a)(this.rasterInfo);
                  !e ||
                    (3 === this.rasterInfo.bandCount && 0 === e[0] && 1 === e[1] && 2 === e[2]) ||
                    (this.bandIds = e);
                }
                var e, t;
                this.renderer ||
                  (this.renderer = (0, re.c)(this.rasterInfo, {
                    bandIds: this.bandIds,
                    variableName: this.renderingRule
                      ? null
                      : null == (e = this.mosaicRule) || null == (t = e.multidimensionalDefinition)
                      ? void 0
                      : t[0].variableName,
                  })),
                  this._symbolizer
                    ? ((this._symbolizer.rendererJSON = (0, re.n)(this.renderer.toJSON())),
                      (this._symbolizer.rasterInfo = this.rasterInfo))
                    : (this._symbolizer = new te.R({
                        rendererJSON: this.renderer.toJSON(),
                        rasterInfo: this.rasterInfo,
                      })),
                  this._symbolizer.bind() || (this._symbolizer = null);
              }
            }
            _clonePixelData(e) {
              return null == e
                ? e
                : {
                    extent: e.extent && e.extent.clone(),
                    pixelBlock: e.pixelBlock && e.pixelBlock.clone(),
                  };
            }
            _getQueryParams(e) {
              const { raster: t, viewId: r } = this;
              return { raster: t, viewId: r, f: 'json', ...e, ...this.customParameters };
            }
            _getRequestOptions(e) {
              return {
                ...e,
                query: { ...(null == e ? void 0 : e.query), ...this.customParameters },
              };
            }
            _decodePixelBlock(e, t, r) {
              return this._rasterJobHandler.instance
                ? this._rasterJobHandler.instance.decode({ data: e, options: t })
                : (0, te.d)(e, t, r);
            }
            async _fetchMultidimensionalInfo(e) {
              var t;
              const r = await (0, v.default)(this.parsedUrl.path + '/multidimensionalInfo', {
                query: this._getQueryParams(),
                signal: e,
              }).then((e) => {
                var t;
                return null == (t = e.data) ? void 0 : t.multidimensionalInfo;
              });
              return (
                null != (t = r.variables) &&
                  t.length &&
                  r.variables.forEach((e) => {
                    var t;
                    null != (t = e.statistics) &&
                      t.length &&
                      e.statistics.forEach((e) => {
                        (e.avg = e.mean), (e.stddev = e.standardDeviation);
                      });
                  }),
                r
              );
            }
            _fetchAuxiliaryRasterInfo(e) {
              const t = e && e.serviceInfo;
              if (!t)
                return Promise.reject(
                  new b.Z('imagery-layer:fetch-metadata', 'valid serviceInfo is required'),
                );
              const r = e.renderingRule ? JSON.stringify(e.renderingRule.toJSON()) : null,
                i = e.signal,
                n =
                  !!(t.hasRasterAttributeTable && this.version >= 10.1) &&
                  (0, v.default)(this.parsedUrl.path + '/rasterAttributeTable', {
                    query: this._getQueryParams({ renderingRule: this.version >= 10.1 ? r : null }),
                    signal: i,
                  })
                    .then((e) => se.default.fromJSON(e.data))
                    .catch(() => null),
                s =
                  !!(t.hasColormap && this.version >= 10.1) &&
                  (0, v.default)(this.parsedUrl.path + '/colormap', {
                    query: this._getQueryParams({ renderingRule: this.version >= 10.6 ? r : null }),
                    signal: i,
                  }).then((e) => {
                    var t;
                    return null == (t = e.data) ? void 0 : t.colormap;
                  }),
                o =
                  !!(t.hasHistograms && this.version >= 10.1) &&
                  (0, v.default)(this.parsedUrl.path + '/histograms', {
                    query: this._getQueryParams({ renderingRule: this.version >= 10.1 ? r : null }),
                    signal: i,
                  }).then((e) => {
                    var t;
                    return null == (t = e.data) ? void 0 : t.histograms;
                  }),
                a =
                  this.version >= 10.3 &&
                  (0, v.default)(this.parsedUrl.path + '/keyProperties', {
                    query: this._getQueryParams({ renderingRule: r }),
                    signal: i,
                  })
                    .then((e) => e.data)
                    .catch(() => {}),
                l =
                  !!(t.hasMultidimensions && this.version >= 10.3) &&
                  this._fetchMultidimensionalInfo();
              return Promise.all([n, s, o, a, l]).then((e) => {
                let r = null;
                if (t.minValues && t.minValues.length === t.bandCount) {
                  r = [];
                  for (let e = 0; e < t.minValues.length; e++)
                    r.push({
                      min: t.minValues[e],
                      max: t.maxValues[e],
                      avg: t.meanValues[e],
                      stddev: t.stdvValues[e],
                    });
                }
                const i = Math.ceil((t.extent.xmax - t.extent.xmin) / t.pixelSizeX - 0.1),
                  n = Math.ceil((t.extent.ymax - t.extent.ymin) / t.pixelSizeY - 0.1),
                  s = B.Z.fromJSON(t.spatialReference || t.extent.spatialReference);
                return new Y.Z({
                  width: i,
                  height: n,
                  bandCount: t.bandCount,
                  extent: oe.Z.fromJSON(t.extent),
                  spatialReference: s,
                  pixelSize: new k.Z({ x: t.pixelSizeX, y: t.pixelSizeY, spatialReference: s }),
                  pixelType: t.pixelType.toLowerCase(),
                  statistics: r,
                  attributeTable: e[0] || null,
                  colormap: e[1] || null,
                  histograms: e[2] || null,
                  keyProperties: e[3] || {},
                  multidimensionalInfo: e[4] || null,
                });
              });
            }
            _requestArrayBuffer(e) {
              const { imageProps: t, requestAsImageElement: r, signal: i } = e;
              if (r && !this.pixelFilter && t.format && t.format.indexOf('png') > -1)
                return (0, v.default)(this.parsedUrl.path + '/exportImage', {
                  responseType: 'image',
                  query: this._getQueryParams({ f: 'image', ...e.imageServiceParameters }),
                  signal: i,
                }).then((e) => ({ imageElement: e.data, params: t }));
              const n = this._initJobHandler(),
                s = (0, v.default)(this.parsedUrl.path + '/exportImage', {
                  responseType: 'array-buffer',
                  query: this._getQueryParams({ f: 'image', ...e.imageServiceParameters }),
                  signal: i,
                });
              return Promise.all([s, n]).then((e) => {
                const r = e[0].data,
                  n = t.format || 'jpgpng';
                let s = n;
                if (('bsq' !== s && 'bip' !== s && (s = (0, te.g)(r)), !s))
                  throw new b.Z(
                    'imagery-layer:fetch-image',
                    'unsupported format signature ' +
                      String.fromCharCode.apply(null, new Uint8Array(r)),
                  );
                const o =
                    'gif' === n ||
                    'bmp' === n ||
                    (n.indexOf('png') > -1 && ('png' === s || 'jpg' === s)),
                  a = { signal: i };
                return o
                  ? (0, te.d)(r, { useCanvas: !0, ...t }, a).then((e) => ({
                      pixelData: { pixelBlock: e, extent: t.extent },
                      params: t,
                    }))
                  : this._decodePixelBlock(
                      r,
                      {
                        width: t.width,
                        height: t.height,
                        planes: null,
                        pixelType: null,
                        noDataValue: null,
                        format: n,
                      },
                      a,
                    ).then((e) => ({ pixelData: { pixelBlock: e, extent: t.extent }, params: t }));
              });
            }
            async _generateRasterInfo(e, t) {
              const { data: r } = await (0, v.default)(this.parsedUrl.path, {
                query: this._getQueryParams({ renderingRule: e }),
                ...t,
              });
              return await this._fetchAuxiliaryRasterInfo({
                serviceInfo: r,
                renderingRule: e,
                ...t,
              });
            }
            _isValidCustomizedMosaicRule(e) {
              return (
                e &&
                JSON.stringify(e.toJSON()) !==
                  JSON.stringify(
                    this._defaultServiceMosaicRule && this._defaultServiceMosaicRule.toJSON(),
                  )
              );
            }
            _updateMultidimensionalDefinition(e) {
              if (this._isValidCustomizedMosaicRule(this.mosaicRule)) return;
              const t = e.variables[0].dimensions,
                r = [];
              for (const e in t)
                if (t.hasOwnProperty(e)) {
                  const i = t[e],
                    n = i.extent;
                  let s = !0,
                    o = [n[0]];
                  i.hasRanges && !0 === i.hasRanges
                    ? ((s = !1), (o = [i.values[0]]))
                    : 'stdz' === i.name.toLowerCase() &&
                      Math.abs(n[1]) <= Math.abs(n[0]) &&
                      (o = [n[1]]),
                    r.push(
                      new C.Z({
                        variableName: '',
                        dimensionName: t[e].name,
                        isSlice: s,
                        values: o,
                      }),
                    );
                }
              if (r.length > 0) {
                this.mosaicRule = this.mosaicRule || new Q();
                const e = this.mosaicRule.multidimensionalDefinition;
                (!e || (e && e.length <= 0)) && (this.mosaicRule.multidimensionalDefinition = r);
              }
            }
            _formatAttributeValue(e, t) {
              if ('string' == typeof e) {
                const r = this.popupTemplate && this.popupTemplate.fieldInfos,
                  i = this._getFieldInfo(r, t),
                  n = i && i.format;
                if (n) {
                  let t, r;
                  return e.trim().indexOf(',') > -1
                    ? ((t = ','), (r = t + ' '), this._formatDelimitedString(e, t, r, n))
                    : e.trim().indexOf(' ') > -1
                    ? ((t = r = ' '), this._formatDelimitedString(e, t, r, n))
                    : this._formatNumberFromString(e, n);
                }
              }
              return e;
            }
            _getFieldInfo(e, t) {
              if (!e || !e.length || !t) return;
              const r = t.toLowerCase();
              let i;
              return (
                e.some(
                  (e) =>
                    !(
                      !e.fieldName ||
                      (e.fieldName.toLowerCase() !== r &&
                        e.fieldName.toLowerCase() !== r.replace(/ /g, '_')) ||
                      ((i = e), 0)
                    ),
                ),
                i
              );
            }
            _formatDelimitedString(e, t, r, i) {
              return e && t && r && i
                ? e
                    .trim()
                    .split(t)
                    .map((e) => this._formatNumberFromString(e, i))
                    .join(r)
                : e;
            }
            _formatNumberFromString(e, t) {
              if (!e || !t) return e;
              const r = Number(e);
              return isNaN(r) ? e : t.format(r);
            }
            _processVisibleRastersResponse(e, t) {
              t = t || {};
              const r = e.value,
                {
                  templateRRFunctionNames: i,
                  showNoDataRecords: n,
                  returnDomainValues: s,
                  templateFields: a,
                } = t,
                l = e.processedValues;
              let u = e.catalogItems && e.catalogItems.features,
                p =
                  (e.properties &&
                    e.properties.Values &&
                    e.properties.Values.map((e) => e.replace(/ /gi, ', '))) ||
                  [];
              const c = this.objectIdField || 'ObjectId',
                d = 'string' == typeof r && r.toLowerCase().indexOf('nodata') > -1,
                m = [];
              if (r && !u && !d) {
                const e = {};
                (e[c] = 0), (p = [r]), (u = [new f.Z(this.fullExtent, null, e)]);
              }
              if (!u) return [];
              let h, y, g;
              this._updateResponseFieldNames(u, a), d && !n && (u = []);
              for (let e = 0; e < u.length; e++) {
                if (((h = u[e]), null != r && !d)) {
                  if (
                    ((y = p[e]),
                    (g =
                      this.renderingRule &&
                      l &&
                      l.length > 0 &&
                      i &&
                      i.length > 0 &&
                      i.indexOf(this.renderingRule.functionName) > -1
                        ? l[i.indexOf(this.renderingRule.functionName)]
                        : r),
                    'nodata' === y.toLowerCase() && !n)
                  )
                    continue;
                  const t = 'Raster.ItemPixelValue',
                    s = 'Raster.ServicePixelValue';
                  (h.attributes[t] = this._formatAttributeValue(y, t)),
                    (h.attributes[s] = this._formatAttributeValue(g, s)),
                    this._updateFeatureWithMagDirValues(h, y);
                  const a = this.fields && this.fields.length > 0;
                  let u =
                    this.renderingRule &&
                    (0, o.i)(this.serviceRasterInfo) &&
                    this.serviceRasterInfo.attributeTable
                      ? a
                        ? y
                        : r
                      : g;
                  this.renderingRule || (u = a ? y : r),
                    this._updateFeatureWithRasterAttributeTableValues(h, u);
                }
                if (
                  ((h.sourceLayer = this),
                  s && this._updateFeatureWithDomainValues(h),
                  i && l && i.length === l.length)
                )
                  for (let e = 0; e < i.length; e++) {
                    const t = 'Raster.ServicePixelValue.' + i[e];
                    h.attributes[t] = this._formatAttributeValue(l[e], t);
                  }
                m.push(u[e]);
              }
              return m;
            }
            _updateFeatureWithRasterAttributeTableValues(e, t) {
              const r =
                  (this.rasterInfo && this.rasterInfo.attributeTable) ||
                  ((0, o.i)(this.serviceRasterInfo) && this.serviceRasterInfo.attributeTable),
                i = r && r.features;
              if (!i) return;
              const n = r.fields,
                s = n.map((e) => e.name).filter((e) => 'value' === e.toLowerCase()),
                a = s && s[0];
              if (!a) return;
              const l = i.filter((e) => e.attributes[a] === (null != t ? parseInt(t, 10) : null));
              l &&
                l[0] &&
                n.forEach((t) => {
                  const r = this.rasterAttributeTableFieldPrefix + t.name;
                  e.attributes[r] = this._formatAttributeValue(l[0].attributes[t.name], r);
                });
            }
            _updateFeatureWithMagDirValues(e, t) {
              if (
                !this.pixelFilter ||
                ('esriImageServiceDataTypeVector-UV' !== this.serviceDataType &&
                  'esriImageServiceDataTypeVector-MagDir' !== this.serviceDataType)
              )
                return;
              const r = t
                  .replace(' ', ',')
                  .split(',')
                  .map((e) => parseFloat(e)),
                i = r.map((e) => [e]),
                n = r.map((e) => ({ minValue: e, maxValue: e, noDataValue: null })),
                s = new K.Z({ height: 1, width: 1, pixelType: 'f32', pixels: i, statistics: n });
              this.pixelFilter({
                pixelBlock: s,
                extent: new oe.Z(0, 0, 0, 0, this.spatialReference),
              }),
                (e.attributes['Raster.Magnitude'] = s.pixels[0][0]),
                (e.attributes['Raster.Direction'] = s.pixels[1][0]);
            }
            _updateFeatureWithDomainValues(e) {
              const t =
                this.fields &&
                this.fields.filter((e) => e.domain && 'coded-value' === e.domain.type);
              null != t &&
                t.forEach((t) => {
                  const r = e.attributes[t.name];
                  if (null != r) {
                    const i = t.domain.codedValues.filter((e) => e.code === r)[0];
                    i && (e.attributes[t.name] = i.name);
                  }
                });
            }
            _updateResponseFieldNames(e, t) {
              if (!t || t.length < 1) return;
              const r = this.fieldsIndex;
              r &&
                e.forEach((e) => {
                  if (e && e.attributes)
                    for (const i of t)
                      if (r.has(i)) {
                        const t = r.get(i).name;
                        t !== i && ((e.attributes[i] = e.attributes[t]), delete e.attributes[t]);
                      }
                });
            }
            _updateRenderingRulesFunctionName(e, t) {
              if (!e || e.length < 1) return;
              if ('Raw' === e) return e.replace('Raw', 'None');
              const r = e.toLowerCase().replace(/ /gi, '_');
              return t.has(r) ? t.get(r) : e;
            }
            _isRFTJson(e) {
              return e.name && e.arguments && e.function && e.hasOwnProperty('functionType');
            }
            _readCapabilities(e) {
              const t = e.capabilities
                  ? e.capabilities
                      .toLowerCase()
                      .split(',')
                      .map((e) => e.trim())
                  : ['image', 'catalog'],
                { currentVersion: r, advancedQueryCapabilities: i, maxRecordCount: n } = e,
                s = t.indexOf('image') > -1,
                o = 'esriImageServiceDataTypeElevation' === e.serviceDataType,
                a = !!(e.spatialReference || (e.extent && e.extent.spatialReference));
              return {
                operations: {
                  supportsComputeHistograms: s,
                  supportsExportImage: s,
                  supportsIdentify: s,
                  supportsMeasure: t.indexOf('mensuration') > -1 && a,
                  supportsDownload: t.indexOf('download') > -1,
                  supportsQuery: t.indexOf('catalog') > -1 && e.fields && e.fields.length > 0,
                  supportsGetSamples: r >= 10.2 && s,
                  supportsProject: r >= 10.3 && s,
                  supportsComputeStatisticsHistograms: r >= 10.4 && s,
                  supportsQueryBoundary: r >= 10.6 && s,
                  supportsCalculateVolume: r >= 10.7 && o,
                  supportsComputePixelLocation: r >= 10.7 && t.indexOf('catalog') > -1,
                },
                query: {
                  supportsStatistics: !(!i || !i.supportsStatistics),
                  supportsOrderBy: !(!i || !i.supportsOrderBy),
                  supportsDistinct: !(!i || !i.supportsDistinct),
                  supportsPagination: !(!i || !i.supportsPagination),
                  supportsStandardizedQueriesOnly: !(!i || !i.useStandardizedQueries),
                  maxRecordCount: n,
                },
              };
            }
          };
          return (
            (0, n._)([(0, u.Cb)()], t.prototype, '_functionRasterInfos', void 0),
            (0, n._)([(0, u.Cb)()], t.prototype, '_rasterJobHandler', void 0),
            (0, n._)([(0, u.Cb)()], t.prototype, '_symbolizer', void 0),
            (0, n._)([(0, u.Cb)()], t.prototype, '_defaultServiceMosaicRule', void 0),
            (0, n._)(
              [(0, S.r)('_defaultServiceMosaicRule', ['defaultMosaicMethod'])],
              t.prototype,
              'readDefaultServiceMosaicRule',
              null,
            ),
            (0, n._)([(0, u.Cb)()], t.prototype, '_cachedRendererJson', void 0),
            (0, n._)([(0, u.Cb)()], t.prototype, 'rasterAttributeTableFieldPrefix', void 0),
            (0, n._)([(0, u.Cb)({ readOnly: !0 })], t.prototype, 'rasterFunctionNamesIndex', null),
            (0, n._)([(0, u.Cb)({ readOnly: !0 })], t.prototype, 'queryTask', null),
            (0, n._)([(0, u.Cb)()], t.prototype, 'adjustAspectRatio', void 0),
            (0, n._)(
              [(0, u.Cb)({ readOnly: !0 }), (0, R.B)('serviceRasterInfo.bandCount')],
              t.prototype,
              'bandCount',
              void 0,
            ),
            (0, n._)(
              [(0, u.Cb)({ type: [p.I], json: { write: !0 } })],
              t.prototype,
              'bandIds',
              void 0,
            ),
            (0, n._)([(0, S.r)('bandIds')], t.prototype, 'readBandIds', null),
            (0, n._)(
              [(0, u.Cb)({ readOnly: !0, json: { read: !1 } })],
              t.prototype,
              'capabilities',
              void 0,
            ),
            (0, n._)(
              [
                (0, S.r)('service', 'capabilities', [
                  'capabilities',
                  'currentVersion',
                  'serviceDataType',
                ]),
              ],
              t.prototype,
              'readCapabilities',
              null,
            ),
            (0, n._)([(0, u.Cb)({ type: Number })], t.prototype, 'compressionQuality', void 0),
            (0, n._)(
              [(0, m.w)('compressionQuality')],
              t.prototype,
              'writeCompressionQuality',
              null,
            ),
            (0, n._)([(0, u.Cb)({ type: Number })], t.prototype, 'compressionTolerance', void 0),
            (0, n._)(
              [(0, m.w)('compressionTolerance')],
              t.prototype,
              'writeCompressionTolerance',
              null,
            ),
            (0, n._)(
              [(0, u.Cb)({ json: { read: { source: 'copyrightText' } } })],
              t.prototype,
              'copyright',
              void 0,
            ),
            (0, n._)(
              [
                (0, u.Cb)({
                  type: String,
                  json: {
                    name: 'layerDefinition.definitionExpression',
                    write: { enabled: !0, allowNull: !0 },
                  },
                }),
              ],
              t.prototype,
              'definitionExpression',
              void 0,
            ),
            (0, n._)(
              [(0, u.Cb)({ readOnly: !0, constructOnly: !0 })],
              t.prototype,
              'exportImageServiceParameters',
              void 0,
            ),
            (0, n._)([(0, u.Cb)()], t.prototype, 'rasterInfo', void 0),
            (0, n._)([(0, u.Cb)({ readOnly: !0, type: [X.Z] })], t.prototype, 'fields', void 0),
            (0, n._)([(0, u.Cb)({ readOnly: !0 })], t.prototype, 'fieldsIndex', null),
            (0, n._)(
              [
                (0, u.Cb)({
                  type: [
                    'png',
                    'png8',
                    'png24',
                    'png32',
                    'jpg',
                    'bmp',
                    'gif',
                    'jpgpng',
                    'lerc',
                    'tiff',
                  ],
                  json: { write: !0 },
                }),
              ],
              t.prototype,
              'format',
              null,
            ),
            (0, n._)(
              [(0, S.r)('service', 'format', ['serviceDataType'])],
              t.prototype,
              'readFormat',
              null,
            ),
            (0, n._)([(0, u.Cb)({ type: oe.Z })], t.prototype, 'fullExtent', void 0),
            (0, n._)([(0, u.Cb)({ readOnly: !0 })], t.prototype, 'hasMultidimensions', void 0),
            (0, n._)(
              [(0, u.Cb)({ json: { read: { source: 'maxImageHeight' } } })],
              t.prototype,
              'imageMaxHeight',
              void 0,
            ),
            (0, n._)(
              [(0, u.Cb)({ json: { read: { source: 'maxImageWidth' } } })],
              t.prototype,
              'imageMaxWidth',
              void 0,
            ),
            (0, n._)(
              [
                (0, u.Cb)({
                  type: String,
                  json: { type: W.i.jsonValues, read: W.i.read, write: W.i.write },
                }),
              ],
              t.prototype,
              'interpolation',
              void 0,
            ),
            (0, n._)([(0, u.Cb)()], t.prototype, 'minScale', void 0),
            (0, n._)([(0, S.r)('service', 'minScale')], t.prototype, 'readMinScale', null),
            (0, n._)([(0, u.Cb)()], t.prototype, 'maxScale', void 0),
            (0, n._)([(0, S.r)('service', 'maxScale')], t.prototype, 'readMaxScale', null),
            (0, n._)([(0, u.Cb)({ type: Q })], t.prototype, 'mosaicRule', null),
            (0, n._)(
              [(0, S.r)('mosaicRule', ['mosaicRule', 'defaultMosaicMethod'])],
              t.prototype,
              'readMosaicRule',
              null,
            ),
            (0, n._)([(0, m.w)('mosaicRule')], t.prototype, 'writeMosaicRule', null),
            (0, n._)(
              [(0, u.Cb)({ readOnly: !0 }), (0, R.B)('serviceRasterInfo.multidimensionalInfo')],
              t.prototype,
              'multidimensionalInfo',
              void 0,
            ),
            (0, n._)([(0, u.Cb)({ json: { type: p.I } })], t.prototype, 'noData', void 0),
            (0, n._)([(0, m.w)('noData')], t.prototype, 'writeNoData', null),
            (0, n._)(
              [
                (0, u.Cb)({
                  type: String,
                  json: { type: W.n.jsonValues, read: W.n.read, write: W.n.write },
                }),
              ],
              t.prototype,
              'noDataInterpretation',
              void 0,
            ),
            (0, n._)(
              [(0, u.Cb)({ type: String, readOnly: !0, json: { read: { source: ['fields'] } } })],
              t.prototype,
              'objectIdField',
              void 0,
            ),
            (0, n._)([(0, S.r)('objectIdField')], t.prototype, 'readObjectIdField', null),
            (0, n._)([(0, u.Cb)({ readOnly: !0 })], t.prototype, 'parsedUrl', null),
            (0, n._)(
              [(0, u.Cb)({ readOnly: !0 }), (0, R.B)('serviceRasterInfo.pixelSize.x')],
              t.prototype,
              'pixelSizeX',
              void 0,
            ),
            (0, n._)(
              [(0, u.Cb)({ readOnly: !0 }), (0, R.B)('serviceRasterInfo.pixelSize.y')],
              t.prototype,
              'pixelSizeY',
              void 0,
            ),
            (0, n._)([(0, u.Cb)({ type: Function })], t.prototype, 'pixelFilter', void 0),
            (0, n._)([(0, u.Cb)()], t.prototype, 'raster', void 0),
            (0, n._)([(0, u.Cb)()], t.prototype, 'viewId', void 0),
            (0, n._)(
              [
                (0, u.Cb)({
                  types: g.dr,
                  json: {
                    name: 'layerDefinition.drawingInfo.renderer',
                    origins: {
                      'web-scene': {
                        types: g.FK,
                        name: 'layerDefinition.drawingInfo.renderer',
                        write: {
                          overridePolicy: (e) => ({ enabled: e && 'vector-field' !== e.type }),
                        },
                      },
                    },
                  },
                }),
              ],
              t.prototype,
              'renderer',
              void 0,
            ),
            (0, n._)([(0, S.r)('renderer')], t.prototype, 'readRenderer', null),
            (0, n._)([(0, m.w)('renderer')], t.prototype, 'writeRenderer', null),
            (0, n._)([(0, u.Cb)(x.o)], t.prototype, 'opacity', void 0),
            (0, n._)(
              [(0, u.Cb)({ readOnly: !0 }), (0, R.B)('serviceRasterInfo.attributeTable')],
              t.prototype,
              'rasterAttributeTable',
              void 0,
            ),
            (0, n._)([(0, u.Cb)({ readOnly: !0 })], t.prototype, 'rasterFields', null),
            (0, n._)([(0, u.Cb)({ readOnly: !0 })], t.prototype, 'rasterFunctionInfos', void 0),
            (0, n._)([(0, u.Cb)({ type: J })], t.prototype, 'renderingRule', null),
            (0, n._)(
              [(0, S.r)('renderingRule', ['renderingRule', 'rasterFunctionInfos'])],
              t.prototype,
              'readRenderingRule',
              null,
            ),
            (0, n._)([(0, m.w)('renderingRule')], t.prototype, 'writeRenderingRule', null),
            (0, n._)([(0, u.Cb)()], t.prototype, 'serviceDataType', void 0),
            (0, n._)(
              [(0, u.Cb)({ readOnly: !0, type: B.Z })],
              t.prototype,
              'spatialReference',
              void 0,
            ),
            (0, n._)(
              [(0, S.r)('spatialReference', ['spatialReference', 'extent'])],
              t.prototype,
              'readSpatialReference',
              null,
            ),
            (0, n._)(
              [(0, u.Cb)({ json: { type: Ye.jsonValues } })],
              t.prototype,
              'pixelType',
              void 0,
            ),
            (0, n._)([(0, S.r)('pixelType')], t.prototype, 'readPixelType', null),
            (0, n._)([(0, m.w)('pixelType')], t.prototype, 'writePixelType', null),
            (0, n._)(
              [(0, u.Cb)({ constructOnly: !0, type: Y.Z })],
              t.prototype,
              'serviceRasterInfo',
              void 0,
            ),
            (0, n._)([(0, u.Cb)()], t.prototype, 'sourceJSON', void 0),
            (0, n._)([(0, u.Cb)(x.u)], t.prototype, 'url', void 0),
            (0, n._)([(0, u.Cb)({ readOnly: !0 })], t.prototype, 'version', void 0),
            (0, n._)(
              [(0, S.r)('version', ['currentVersion', 'fields', 'timeInfo'])],
              t.prototype,
              'readVersion',
              null,
            ),
            (t = (0, n._)([(0, d.j)('esri.layers.mixins.ArcGISImageService')], t)),
            t
          );
        };
      let it = class extends (0, Me.B)(
        (0, Ze.T)(
          (0, Ee.R)((0, ze.S)((0, Ve.O)((0, Je.P)(rt((0, Ae.C)((0, De.A)((0, a.M)(h.Z)))))))),
        ),
      ) {
        constructor(...e) {
          super(...e),
            (this.legendEnabled = !0),
            (this.isReference = null),
            (this.operationalLayerType = 'ArcGISImageServiceLayer'),
            (this.popupEnabled = !0),
            (this.popupTemplate = null),
            (this.type = 'imagery');
        }
        normalizeCtorArgs(e, t) {
          return 'string' == typeof e ? { url: e, ...t } : e;
        }
        load(e) {
          const t = (0, o.i)(e) ? e.signal : null;
          return (
            this.addResolvingPromise(
              this.loadFromPortal({ supportedTypes: ['Image Service'] }, e)
                .catch(l.r9)
                .then(() => this._fetchService(t)),
            ),
            Promise.resolve(this)
          );
        }
        writeOperationalLayerType(e, t, r) {
          var i;
          const n = 'vector-field' === (null == (i = this.renderer) ? void 0 : i.type);
          t[r] = n ? 'ArcGISImageServiceVectorLayer' : 'ArcGISImageServiceLayer';
        }
        get defaultPopupTemplate() {
          return this.createPopupTemplate();
        }
        createPopupTemplate(e) {
          const t = this.rasterFields,
            r = this.title,
            i = new Set();
          let n = !1,
            s = !1;
          this.capabilities &&
            ((n =
              this.capabilities.operations.supportsQuery && this.fields && this.fields.length > 0),
            (s =
              n &&
              ('esriImageServiceDataTypeVector-UV' === this.serviceDataType ||
                'esriImageServiceDataTypeVector-MagDir' === this.serviceDataType)));
          const o = new Set();
          n &&
            (o.add('raster.itempixelvalue'),
            s && o.add('raster.magnitude').add('raster.direction'));
          for (const e of t) {
            const t = e.name.toLowerCase();
            o.has(t) || t.indexOf('raster.servicepixelvalue.') > -1 || i.add(e.name);
          }
          return (0, Le.eZ)({ fields: t, title: r }, { ...e, visibleFieldNames: i });
        }
        redraw() {
          this.emit('redraw');
        }
      };
      (0, n._)([(0, u.Cb)(x.b)], it.prototype, 'legendEnabled', void 0),
        (0, n._)([(0, u.Cb)({ type: ['show', 'hide'] })], it.prototype, 'listMode', void 0),
        (0, n._)(
          [
            (0, u.Cb)({
              type: Boolean,
              json: { read: !1, write: { enabled: !0, overridePolicy: () => ({ enabled: !1 }) } },
            }),
          ],
          it.prototype,
          'isReference',
          void 0,
        ),
        (0, n._)(
          [
            (0, u.Cb)({
              type: ['ArcGISImageServiceLayer'],
              json: {
                origins: {
                  'web-map': {
                    type: ['ArcGISImageServiceLayer', 'ArcGISImageServiceVectorLayer'],
                    read: !1,
                    write: { target: 'layerType', ignoreOrigin: !0 },
                  },
                },
              },
            }),
          ],
          it.prototype,
          'operationalLayerType',
          void 0,
        ),
        (0, n._)(
          [(0, m.w)('web-map', 'operationalLayerType')],
          it.prototype,
          'writeOperationalLayerType',
          null,
        ),
        (0, n._)([(0, u.Cb)(x.p)], it.prototype, 'popupEnabled', void 0),
        (0, n._)(
          [
            (0, u.Cb)({
              type: s.Z,
              json: { read: { source: 'popupInfo' }, write: { target: 'popupInfo' } },
            }),
          ],
          it.prototype,
          'popupTemplate',
          void 0,
        ),
        (0, n._)([(0, u.Cb)({ readOnly: !0 })], it.prototype, 'defaultPopupTemplate', null),
        (0, n._)([(0, u.Cb)({ readOnly: !0, json: { read: !1 } })], it.prototype, 'type', void 0),
        (it = (0, n._)([(0, d.j)('esri.layers.ImageryLayer')], it));
      const nt = it;
    },
    77361: (e, t, r) => {
      'use strict';
      r.d(t, { Z: () => g });
      var i,
        n = r(29768),
        s = r(93314),
        o = r(59765),
        a = r(74673),
        l = r(76506),
        u = r(34250),
        p = (r(91306), r(92143), r(97714)),
        c = r(17533),
        d = 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 m = (i = 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 i({ respectsDaylightSaving: e, timezone: t });
        }
      });
      (0, n._)(
        [(0, u.Cb)({ type: Boolean, json: { write: !0 } })],
        m.prototype,
        'respectsDaylightSaving',
        void 0,
      ),
        (0, n._)(
          [(0, p.r)('respectsDaylightSaving', ['respectsDaylightSaving', 'respectDaylightSaving'])],
          m.prototype,
          'readRespectsDaylightSaving',
          null,
        ),
        (0, n._)(
          [
            (0, u.Cb)({
              type: String,
              json: { read: { source: 'timeZone' }, write: { target: 'timeZone' } },
            }),
          ],
          m.prototype,
          'timezone',
          void 0,
        ),
        (m = i = (0, n._)([(0, c.j)('esri.layers.support.TimeReference')], m));
      var h,
        y = m;
      let f = (h = 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]),
            i = new Date(t.timeExtent[1]);
          return new s.Z({ start: r, end: i });
        }
        writeFullTimeExtent(e, t) {
          e && (0, l.i)(e.start) && (0, l.i)(e.end)
            ? (t.timeExtent = [e.start.getTime(), e.end.getTime()])
            : (t.timeExtent = null);
        }
        readInterval(e, t) {
          return t.timeInterval && t.timeIntervalUnits
            ? new o.Z({ value: t.timeInterval, unit: o.t.fromJSON(t.timeIntervalUnits) })
            : t.defaultTimeInterval && t.defaultTimeIntervalUnits
            ? new o.Z({
                value: t.defaultTimeInterval,
                unit: o.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: i,
            startField: n,
            timeReference: s,
            fullTimeExtent: o,
            trackIdField: a,
            useTime: u,
          } = this;
          return new h({
            cumulative: e,
            endField: t,
            hasLiveData: r,
            interval: i,
            startField: n,
            timeReference: (0, l.d9)(s),
            fullTimeExtent: (0, l.d9)(o),
            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: s.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, d.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: o.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, d.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 = h = (0, n._)([(0, c.j)('esri.layers.support.TimeInfo')], f));
      const g = f;
    },
    34446: (e, t, r) => {
      'use strict';
      r.d(t, { Z: () => d });
      var i,
        n = r(29768),
        s = r(74673),
        o = r(76506),
        a = r(34250),
        l = r(91306),
        u = (r(92143), r(17533)),
        p = 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 = (i = class extends s.a {
        constructor(e) {
          super(e),
            (this.attachmentTypes = null),
            (this.attachmentsWhere = null),
            (this.keywords = null),
            (this.globalIds = null),
            (this.name = null),
            (this.num = null),
            (this.objectIds = null),
            (this.returnMetadata = !1),
            (this.size = null),
            (this.start = null),
            (this.where = null);
        }
        writeStart(e, t) {
          (t.resultOffset = this.start), (t.resultRecordCount = this.num || 10);
        }
        clone() {
          return new i(
            (0, o.d9)({
              attachmentTypes: this.attachmentTypes,
              attachmentsWhere: this.attachmentsWhere,
              keywords: this.keywords,
              where: this.where,
              globalIds: this.globalIds,
              name: this.name,
              num: this.num,
              objectIds: this.objectIds,
              returnMetadata: this.returnMetadata,
              size: this.size,
              start: this.start,
            }),
          );
        }
      });
      (0, n._)(
        [(0, a.Cb)({ type: [String], json: { write: !0 } })],
        c.prototype,
        'attachmentTypes',
        void 0,
      ),
        (0, n._)(
          [
            (0, a.Cb)({
              type: String,
              json: {
                read: { source: 'attachmentsDefinitionExpression' },
                write: { target: 'attachmentsDefinitionExpression' },
              },
            }),
          ],
          c.prototype,
          'attachmentsWhere',
          void 0,
        ),
        (0, n._)(
          [(0, a.Cb)({ type: [String], json: { write: !0 } })],
          c.prototype,
          'keywords',
          void 0,
        ),
        (0, n._)(
          [(0, a.Cb)({ type: [Number], json: { write: !0 } })],
          c.prototype,
          'globalIds',
          void 0,
        ),
        (0, n._)([(0, a.Cb)({ json: { write: !0 } })], c.prototype, 'name', void 0),
        (0, n._)(
          [(0, a.Cb)({ type: Number, json: { read: { source: 'resultRecordCount' } } })],
          c.prototype,
          'num',
          void 0,
        ),
        (0, n._)(
          [(0, a.Cb)({ type: [Number], json: { write: !0 } })],
          c.prototype,
          'objectIds',
          void 0,
        ),
        (0, n._)(
          [(0, a.Cb)({ type: Boolean, json: { default: !1, write: !0 } })],
          c.prototype,
          'returnMetadata',
          void 0,
        ),
        (0, n._)([(0, a.Cb)({ type: [Number], json: { write: !0 } })], c.prototype, 'size', void 0),
        (0, n._)(
          [(0, a.Cb)({ type: Number, json: { read: { source: 'resultOffset' } } })],
          c.prototype,
          'start',
          void 0,
        ),
        (0, n._)([(0, p.w)('start'), (0, p.w)('num')], c.prototype, 'writeStart', null),
        (0, n._)(
          [
            (0, a.Cb)({
              type: String,
              json: {
                read: { source: 'definitionExpression' },
                write: { target: 'definitionExpression' },
              },
            }),
          ],
          c.prototype,
          'where',
          void 0,
        ),
        (c = i = (0, n._)([(0, u.j)('esri.rest.support.AttachmentQuery')], c)),
        (c.from = (0, l.e)(c));
      const d = c;
    },
    46646: (e, t, r) => {
      'use strict';
      r.d(t, { Z: () => h });
      var i,
        n = r(29768),
        s = (r(74569), r(74673)),
        o = r(76506),
        a = r(34250),
        l = r(91306),
        u = (r(92143), r(17533)),
        p = r(2906),
        c = r(69218),
        d = r(60947);
      r(21801),
        r(40642),
        r(71552),
        r(73796),
        r(97714),
        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(32422),
        r(59465),
        r(97546),
        r(9801),
        r(53523),
        r(42911),
        r(46826),
        r(45433),
        r(54732);
      let m = (i = class extends s.a {
        constructor(e) {
          super(e),
            (this.dynamicDataSource = void 0),
            (this.gdbVersion = null),
            (this.geometryPrecision = void 0),
            (this.historicMoment = null),
            (this.maxAllowableOffset = void 0),
            (this.objectIds = null),
            (this.orderByFields = null),
            (this.outFields = null),
            (this.outSpatialReference = null),
            (this.relationshipId = void 0),
            (this.start = void 0),
            (this.num = void 0),
            (this.returnGeometry = !1),
            (this.returnM = void 0),
            (this.returnZ = void 0),
            (this.where = null);
        }
        _writeHistoricMoment(e, t) {
          t.historicMoment = e && e.getTime();
        }
        writeStart(e, t) {
          (t.resultOffset = this.start), (t.resultRecordCount = this.num || 10), (t.where = '1=1');
        }
        clone() {
          return new i(
            (0, o.d9)({
              dynamicDataSource: this.dynamicDataSource,
              gdbVersion: this.gdbVersion,
              geometryPrecision: this.geometryPrecision,
              historicMoment: this.historicMoment && new Date(this.historicMoment.getTime()),
              maxAllowableOffset: this.maxAllowableOffset,
              objectIds: this.objectIds,
              orderByFields: this.orderByFields,
              outFields: this.outFields,
              outSpatialReference: this.outSpatialReference,
              relationshipId: this.relationshipId,
              start: this.start,
              num: this.num,
              returnGeometry: this.returnGeometry,
              where: this.where,
              returnZ: this.returnZ,
              returnM: this.returnM,
            }),
          );
        }
      });
      (0, n._)(
        [(0, a.Cb)({ type: c.D, json: { write: !0 } })],
        m.prototype,
        'dynamicDataSource',
        void 0,
      ),
        (0, n._)(
          [(0, a.Cb)({ type: String, json: { write: !0 } })],
          m.prototype,
          'gdbVersion',
          void 0,
        ),
        (0, n._)(
          [(0, a.Cb)({ type: Number, json: { write: !0 } })],
          m.prototype,
          'geometryPrecision',
          void 0,
        ),
        (0, n._)([(0, a.Cb)({ type: Date })], m.prototype, 'historicMoment', void 0),
        (0, n._)([(0, p.w)('historicMoment')], m.prototype, '_writeHistoricMoment', null),
        (0, n._)(
          [(0, a.Cb)({ type: Number, json: { write: !0 } })],
          m.prototype,
          'maxAllowableOffset',
          void 0,
        ),
        (0, n._)(
          [(0, a.Cb)({ type: [Number], json: { write: !0 } })],
          m.prototype,
          'objectIds',
          void 0,
        ),
        (0, n._)(
          [(0, a.Cb)({ type: [String], json: { write: !0 } })],
          m.prototype,
          'orderByFields',
          void 0,
        ),
        (0, n._)(
          [(0, a.Cb)({ type: [String], json: { write: !0 } })],
          m.prototype,
          'outFields',
          void 0,
        ),
        (0, n._)(
          [
            (0, a.Cb)({
              type: d.Z,
              json: { read: { source: 'outSR' }, write: { target: 'outSR' } },
            }),
          ],
          m.prototype,
          'outSpatialReference',
          void 0,
        ),
        (0, n._)([(0, a.Cb)({ json: { write: !0 } })], m.prototype, 'relationshipId', void 0),
        (0, n._)(
          [(0, a.Cb)({ type: Number, json: { read: { source: 'resultOffset' } } })],
          m.prototype,
          'start',
          void 0,
        ),
        (0, n._)([(0, p.w)('start'), (0, p.w)('num')], m.prototype, 'writeStart', null),
        (0, n._)(
          [(0, a.Cb)({ type: Number, json: { read: { source: 'resultRecordCount' } } })],
          m.prototype,
          'num',
          void 0,
        ),
        (0, n._)([(0, a.Cb)({ json: { write: !0 } })], m.prototype, 'returnGeometry', void 0),
        (0, n._)(
          [
            (0, a.Cb)({
              type: Boolean,
              json: { write: { overridePolicy: (e) => ({ enabled: e }) } },
            }),
          ],
          m.prototype,
          'returnM',
          void 0,
        ),
        (0, n._)(
          [
            (0, a.Cb)({
              type: Boolean,
              json: { write: { overridePolicy: (e) => ({ enabled: e }) } },
            }),
          ],
          m.prototype,
          'returnZ',
          void 0,
        ),
        (0, n._)(
          [
            (0, a.Cb)({
              type: String,
              json: {
                read: { source: 'definitionExpression' },
                write: { target: 'definitionExpression' },
              },
            }),
          ],
          m.prototype,
          'where',
          void 0,
        ),
        (m = i = (0, n._)([(0, u.j)('esri.rest.support.RelationshipQuery')], m)),
        (m.from = (0, l.e)(m));
      const h = m;
    },
    39210: (e, t, r) => {
      'use strict';
      r.d(t, { Z: () => w });
      var i,
        n = r(29768),
        s = r(74569),
        o = r(93314),
        a = r(57251),
        l = r(74673),
        u = r(76506),
        p = r(34250),
        c = r(91306),
        d = (r(92143), r(17533)),
        m = r(2906),
        h = r(32422),
        y = r(90549),
        f = r(60947);
      r(21801),
        r(40642),
        r(71552),
        r(73796),
        r(97714),
        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(35197);
      const g = new a.J({
          esriSpatialRelIntersects: 'intersects',
          esriSpatialRelContains: 'contains',
          esriSpatialRelCrosses: 'crosses',
          esriSpatialRelDisjoint: 'disjoint',
          esriSpatialRelEnvelopeIntersects: 'envelope-intersects',
          esriSpatialRelIndexIntersects: 'index-intersects',
          esriSpatialRelOverlaps: 'overlaps',
          esriSpatialRelTouches: 'touches',
          esriSpatialRelWithin: 'within',
          esriSpatialRelRelation: 'relation',
        }),
        v = new a.J({
          esriSRUnit_Meter: 'meters',
          esriSRUnit_Kilometer: 'kilometers',
          esriSRUnit_Foot: 'feet',
          esriSRUnit_StatuteMile: 'miles',
          esriSRUnit_NauticalMile: 'nautical-miles',
          esriSRUnit_USNauticalMile: 'us-nautical-miles',
        });
      let b = (i = class extends l.a {
        constructor(e) {
          super(e),
            (this.cacheHint = void 0),
            (this.distance = void 0),
            (this.geometry = null),
            (this.geometryPrecision = void 0),
            (this.maxAllowableOffset = void 0),
            (this.num = void 0),
            (this.objectIds = null),
            (this.orderByFields = null),
            (this.outFields = null),
            (this.outSpatialReference = null),
            (this.resultType = null),
            (this.returnGeometry = !1),
            (this.returnM = void 0),
            (this.returnZ = void 0),
            (this.start = void 0),
            (this.spatialRelationship = 'intersects'),
            (this.timeExtent = null),
            (this.topFilter = void 0),
            (this.units = null),
            (this.where = '1=1');
        }
        writeStart(e, t) {
          (t.resultOffset = this.start), (t.resultRecordCount = this.num || 10);
        }
        clone() {
          return new i(
            (0, u.d9)({
              cacheHint: this.cacheHint,
              distance: this.distance,
              geometry: this.geometry,
              geometryPrecision: this.geometryPrecision,
              maxAllowableOffset: this.maxAllowableOffset,
              num: this.num,
              objectIds: this.objectIds,
              orderByFields: this.orderByFields,
              outFields: this.outFields,
              outSpatialReference: this.outSpatialReference,
              resultType: this.resultType,
              returnGeometry: this.returnGeometry,
              returnZ: this.returnZ,
              returnM: this.returnM,
              start: this.start,
              spatialRelationship: this.spatialRelationship,
              timeExtent: this.timeExtent,
              topFilter: this.topFilter,
              units: this.units,
              where: this.where,
            }),
          );
        }
      });
      (0, n._)(
        [(0, p.Cb)({ type: Boolean, json: { write: !0 } })],
        b.prototype,
        'cacheHint',
        void 0,
      ),
        (0, n._)(
          [
            (0, p.Cb)({
              type: Number,
              json: { write: { overridePolicy: (e) => ({ enabled: e > 0 }) } },
            }),
          ],
          b.prototype,
          'distance',
          void 0,
        ),
        (0, n._)(
          [(0, p.Cb)({ types: s.qM, json: { read: h.im, write: !0 } })],
          b.prototype,
          'geometry',
          void 0,
        ),
        (0, n._)(
          [(0, p.Cb)({ type: Number, json: { write: !0 } })],
          b.prototype,
          'geometryPrecision',
          void 0,
        ),
        (0, n._)(
          [(0, p.Cb)({ type: Number, json: { write: !0 } })],
          b.prototype,
          'maxAllowableOffset',
          void 0,
        ),
        (0, n._)(
          [(0, p.Cb)({ type: Number, json: { read: { source: 'resultRecordCount' } } })],
          b.prototype,
          'num',
          void 0,
        ),
        (0, n._)([(0, p.Cb)({ json: { write: !0 } })], b.prototype, 'objectIds', void 0),
        (0, n._)(
          [(0, p.Cb)({ type: [String], json: { write: !0 } })],
          b.prototype,
          'orderByFields',
          void 0,
        ),
        (0, n._)(
          [(0, p.Cb)({ type: [String], json: { write: !0 } })],
          b.prototype,
          'outFields',
          void 0,
        ),
        (0, n._)(
          [
            (0, p.Cb)({
              type: f.Z,
              json: { read: { source: 'outSR' }, write: { target: 'outSR' } },
            }),
          ],
          b.prototype,
          'outSpatialReference',
          void 0,
        ),
        (0, n._)(
          [(0, p.Cb)({ type: String, json: { write: !0 } })],
          b.prototype,
          'resultType',
          void 0,
        ),
        (0, n._)([(0, p.Cb)({ json: { write: !0 } })], b.prototype, 'returnGeometry', void 0),
        (0, n._)(
          [
            (0, p.Cb)({
              type: Boolean,
              json: { write: { overridePolicy: (e) => ({ enabled: e }) } },
            }),
          ],
          b.prototype,
          'returnM',
          void 0,
        ),
        (0, n._)(
          [
            (0, p.Cb)({
              type: Boolean,
              json: { write: { overridePolicy: (e) => ({ enabled: e }) } },
            }),
          ],
          b.prototype,
          'returnZ',
          void 0,
        ),
        (0, n._)(
          [(0, p.Cb)({ type: Number, json: { read: { source: 'resultOffset' } } })],
          b.prototype,
          'start',
          void 0,
        ),
        (0, n._)([(0, m.w)('start'), (0, m.w)('num')], b.prototype, 'writeStart', null),
        (0, n._)(
          [
            (0, p.Cb)({
              type: String,
              json: {
                read: { source: 'spatialRel', reader: g.read },
                write: { target: 'spatialRel', writer: g.write },
              },
            }),
          ],
          b.prototype,
          'spatialRelationship',
          void 0,
        ),
        (0, n._)(
          [(0, p.Cb)({ type: o.Z, json: { write: !0 } })],
          b.prototype,
          'timeExtent',
          void 0,
        ),
        (0, n._)([(0, p.Cb)({ type: y.Z, json: { write: !0 } })], b.prototype, 'topFilter', void 0),
        (0, n._)(
          [
            (0, p.Cb)({
              type: String,
              json: {
                read: v.read,
                write: {
                  writer: v.write,
                  overridePolicy(e) {
                    return { enabled: e && this.distance > 0 };
                  },
                },
              },
            }),
          ],
          b.prototype,
          'units',
          void 0,
        ),
        (0, n._)([(0, p.Cb)({ type: String, json: { write: !0 } })], b.prototype, 'where', void 0),
        (b = i = (0, n._)([(0, d.j)('esri.rest.support.TopFeaturesQuery')], b)),
        (b.from = (0, c.e)(b));
      const w = b;
    },
    90549: (e, t, r) => {
      'use strict';
      r.d(t, { Z: () => u });
      var i,
        n = r(29768),
        s = r(74673),
        o = r(34250),
        a = (r(76506), r(91306), 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 l = (i = class extends s.a {
        constructor(e) {
          super(e),
            (this.groupByFields = void 0),
            (this.topCount = void 0),
            (this.orderByFields = void 0);
        }
        clone() {
          return new i({
            groupByFields: this.groupByFields,
            topCount: this.topCount,
            orderByFields: this.orderByFields,
          });
        }
      });
      (0, n._)(
        [(0, o.Cb)({ type: [String], json: { write: !0 } })],
        l.prototype,
        'groupByFields',
        void 0,
      ),
        (0, n._)(
          [(0, o.Cb)({ type: Number, json: { write: !0 } })],
          l.prototype,
          'topCount',
          void 0,
        ),
        (0, n._)(
          [(0, o.Cb)({ type: [String], json: { write: !0 } })],
          l.prototype,
          'orderByFields',
          void 0,
        ),
        (l = i = (0, n._)([(0, a.j)('esri.rest.support.TopFilter')], l));
      const u = l;
    },
  },
]);
