(self.webpackChunkRemoteClient = self.webpackChunkRemoteClient || []).push([
  [9014],
  {
    30831: (e, t, s) => {
      'use strict';
      s.d(t, { I: () => r });
      var i = s(91700);
      class r {
        constructor(e, t) {
          (this._storage = new i.M()),
            (this._storage.maxSize = e),
            t && this._storage.registerRemoveFunc('', t);
        }
        put(e, t) {
          this._storage.put(e, t, 1, 1);
        }
        pop(e) {
          return this._storage.pop(e);
        }
        get(e) {
          return this._storage.get(e);
        }
        clear() {
          this._storage.clearAll();
        }
        destroy() {
          this._storage.destroy();
        }
      }
    },
    14172: (e, t, s) => {
      'use strict';
      s.d(t, { P: () => r });
      var i = s(50406);
      class r {
        constructor() {
          this._tasks = new Array();
        }
        get length() {
          return this._tasks.length;
        }
        push(e, t, s) {
          return new Promise((i, r) => this._tasks.push(new n(i, r, e, t, s)));
        }
        unshift(e, t, s) {
          return new Promise((i, r) => this._tasks.unshift(new n(i, r, e, t, s)));
        }
        process() {
          if (0 === this._tasks.length) return !1;
          const e = this._tasks.shift();
          try {
            const t = (0, i.Hc)(e.signal);
            if (t && !e.abortCallback) e.reject((0, i.zE)());
            else {
              const s = t ? e.abortCallback((0, i.zE)()) : e.callback();
              (0, i.tI)(s) ? s.then(e.resolve, e.reject) : e.resolve(s);
            }
          } catch (t) {
            e.reject(t);
          }
          return !0;
        }
        cancelAll() {
          const e = (0, i.zE)();
          for (const t of this._tasks)
            if (t.abortCallback) {
              const s = t.abortCallback(e);
              t.resolve(s);
            } else t.reject(e);
          this._tasks.length = 0;
        }
      }
      class n {
        constructor(e, t, s, i, r) {
          (this.resolve = e),
            (this.reject = t),
            (this.callback = s),
            (this.signal = i),
            (this.abortCallback = r);
        }
      }
    },
    50815: (e, t, s) => {
      'use strict';
      s.d(t, { Q: () => D });
      var i = s(60991),
        r = s(76506),
        n = s(91700),
        a = s(53785),
        o = s(53326),
        u = s(92482),
        l = s(98380),
        c = s(32422),
        h = s(95533),
        d = s(60947),
        f = s(30831),
        p = s(72274),
        m = s(24251),
        y = s(89219),
        g = s(71435),
        x = s(40267),
        _ = s(19124),
        I = s(7176),
        w = s(14249),
        S = s(60217),
        b = s(1709),
        R = s(14172),
        F = s(20438);
      const v = new (class {
          constructor(e, t) {
            (this._cache = new f.I(e)), (this._invalidCache = new f.I(t));
          }
          get(e, t) {
            const s = `${t.uid}:${e}`,
              i = this._cache.get(s);
            if (i) return i;
            if (void 0 !== this._invalidCache.get(s)) return null;
            try {
              const i = p.WhereClause.create(e, t);
              return this._cache.put(s, i), i;
            } catch {
              return this._invalidCache.put(s, null), null;
            }
          }
        })(50, 500),
        T = new Set([
          'esriFieldTypeOID',
          'esriFieldTypeSmallInteger',
          'esriFieldTypeInteger',
          'esriFieldTypeSingle',
          'esriFieldTypeDouble',
          'esriFieldTypeLong',
          'esriFieldTypeDate',
        ]);
      function A(e, t) {
        return e ? v.get(e, t) : null;
      }
      function Q(e, t, s, r = !0) {
        const n = [];
        for (const s of t)
          if ('*' !== s && !e.has(s))
            if (r) {
              const t = M(s);
              try {
                const s = A(t, e);
                if (!s)
                  throw new i.Z('feature-store:unsupported-query', 'invalid SQL expression', {
                    where: t,
                  });
                if (!s.isStandardized)
                  throw new i.Z('feature-store:unsupported-query', 'expression is not standard', {
                    clause: s,
                  });
                Q(e, s.fieldNames, 'expression contains missing fields');
              } catch (e) {
                const t = e && e.details;
                if (t && (t.clause || t.where)) throw e;
                t && t.missingFields ? n.push(...t.missingFields) : n.push(s);
              }
            } else n.push(s);
        if (n.length) throw new i.Z('feature-store:unsupported-query', s, { missingFields: n });
      }
      function M(e) {
        return e.split(' as ')[0];
      }
      function N(e, t) {
        const s = t.get(e);
        return !!s && !T.has(s.type);
      }
      class P {
        constructor(e, t, s) {
          (this._fieldDataCache = new Map()),
            (this._returnDistinctMap = new Map()),
            (this.returnDistinctValues = e.returnDistinctValues),
            (this.fieldsIndex = s),
            (this.featureAdapter = t);
          const i = e.outFields;
          if (i && -1 === i.indexOf('*')) {
            this.outFields = i;
            let e = 0;
            for (const t of i) {
              const i = M(t),
                r = this.fieldsIndex.get(i),
                n = r ? null : A(i, s),
                a = r ? r.name : t.split(' as ')[1] || 'FIELD_EXP_' + e++;
              this._fieldDataCache.set(t, { alias: a, clause: n });
            }
          }
        }
        countDistinctValues(e) {
          return this.returnDistinctValues
            ? (e.forEach((e) => this.getAttributes(e)), this._returnDistinctMap.size)
            : e.length;
        }
        getAttributes(e) {
          const t = this._processAttributesForOutFields(e);
          return this._processAttributesForDistinctValues(t);
        }
        getFieldValue(e, t, s) {
          const i = s ? s.name : t;
          let r = null;
          return (
            this._fieldDataCache.has(i)
              ? (r = this._fieldDataCache.get(i).clause)
              : s ||
                ((r = A(t, this.fieldsIndex)),
                this._fieldDataCache.set(i, { alias: i, clause: r })),
            s ? this.featureAdapter.getAttribute(e, i) : r.calculateValue(e, this.featureAdapter)
          );
        }
        getNormalizedValue(e, t) {
          const s = t.normalizationType,
            i = t.normalizationTotal;
          let r = this.getFieldValue(e, t.field, t.fieldInfo);
          if (s && Number.isFinite(r)) {
            const n = this.getFieldValue(e, t.normalizationField, t.normalizationFieldInfo);
            r = (0, _.f)(r, s, n, i);
          }
          return r;
        }
        getExpressionValue(e, t, s) {
          const i = { attributes: this.featureAdapter.getAttributes(e) },
            r = s.createExecContext(i, t.viewInfo);
          return s.executeFunction(t.compiledFunc, r);
        }
        validateItem(e, t) {
          return (
            this._fieldDataCache.has(t) ||
              this._fieldDataCache.set(t, { alias: t, clause: A(t, this.fieldsIndex) }),
            this._fieldDataCache.get(t).clause.testFeature(e, this.featureAdapter)
          );
        }
        validateItems(e, t) {
          return (
            this._fieldDataCache.has(t) ||
              this._fieldDataCache.set(t, { alias: t, clause: A(t, this.fieldsIndex) }),
            this._fieldDataCache.get(t).clause.testSet(e, this.featureAdapter)
          );
        }
        _processAttributesForOutFields(e) {
          const t = this.outFields;
          if (!t || !t.length) return this.featureAdapter.getAttributes(e);
          const s = {};
          for (const i of t) {
            const { alias: t, clause: r } = this._fieldDataCache.get(i);
            s[t] = r
              ? r.calculateValue(e, this.featureAdapter)
              : this.featureAdapter.getAttribute(e, t);
          }
          return s;
        }
        _processAttributesForDistinctValues(e) {
          if ((0, r.b)(e) || !this.returnDistinctValues) return e;
          const t = this.outFields,
            s = [];
          if (t)
            for (const i of t) {
              const { alias: t } = this._fieldDataCache.get(i);
              s.push(e[t]);
            }
          else for (const t in e) s.push(e[t]);
          const i = `${(t || ['*']).join(',')}=${s.join(',')}`;
          let n = this._returnDistinctMap.get(i) || 0;
          return this._returnDistinctMap.set(i, ++n), n > 1 ? null : e;
        }
      }
      function E(e) {
        return (
          e.substr(24, 12) +
          e.substr(19, 4) +
          e.substr(16, 2) +
          e.substr(14, 2) +
          e.substr(11, 2) +
          e.substr(9, 2) +
          e.substr(6, 2) +
          e.substr(4, 2) +
          e.substr(2, 2) +
          e.substr(0, 2)
        );
      }
      function C(e, t, s) {
        return (s ? e > t : e < t) ? -1 : (s ? e < t : e > t) ? 1 : 0;
      }
      function z(e, t, s) {
        return s ? t - e : e - t;
      }
      function V(e, t, s, i) {
        if (s && 'esriFieldTypeDate' === s.type) {
          const s = new Date(e).getTime(),
            r = new Date(t).getTime();
          if (!isNaN(s) && !isNaN(r)) return z(s, r, i);
        }
        if ('number' == typeof e && 'number' == typeof t) return z(e, t, i);
        if ('string' == typeof e && 'string' == typeof t) {
          const r = e.toUpperCase(),
            n = t.toUpperCase();
          return !s || ('esriFieldTypeGUID' !== s.type && 'esriFieldTypeGlobalID' !== s.type)
            ? C(r, n, i)
            : C(E(r), E(n), i);
        }
        return i ? 1 : -1;
      }
      class G {
        constructor(e, t, s) {
          (this.items = e),
            (this.queryGeometry = t),
            (this.definitionExpression = s.definitionExpression),
            (this.geometryType = s.geometryType),
            (this.hasM = s.hasM),
            (this.hasZ = s.hasZ),
            (this.objectIdField = s.objectIdField),
            (this.spatialReference = s.spatialReference),
            (this.fieldsIndex = s.fieldsIndex),
            (this.timeInfo = s.timeInfo),
            (this.featureAdapter = s.featureAdapter),
            (this.aggregateAdapter = s.aggregateAdapter);
        }
        get size() {
          return this.items.length;
        }
        createQueryResponseForCount(e) {
          const t = new P(e, this.featureAdapter, this.fieldsIndex);
          if (!e.outStatistics) return t.countDistinctValues(this.items);
          const { groupByFieldsForStatistics: s, having: i } = e;
          if (!(null == s ? void 0 : s.length)) return 1;
          const r = new Map(),
            n = new Map(),
            a = new Set(),
            o = e.outStatistics;
          for (const e of o) {
            const { statisticType: o } = e,
              u = 'exceedslimit' !== o ? e.onStatisticField : void 0;
            if (!n.has(u)) {
              const e = [];
              for (const i of s) {
                const s = this._getAttributeValues(t, i, r);
                e.push(s);
              }
              n.set(u, this._calculateUniqueValues(e));
            }
            const l = n.get(u);
            for (const e in l) {
              const { data: s, items: r } = l[e],
                n = s.join(',');
              (i && !t.validateItems(r, i)) || a.add(n);
            }
          }
          return a.size;
        }
        createQueryResponse(e) {
          let t;
          return (
            (t = e.outStatistics
              ? e.outStatistics.some((e) => 'exceedslimit' === e.statisticType)
                ? this._createExceedsLimitQueryResponse(e)
                : this._createStatisticsQueryResponse(e)
              : this._createFeatureQueryResponse(e)),
            e.returnQueryGeometry &&
              ((0, d.j)(e.outSR) && !(0, d.e)(this.queryGeometry.spatialReference, e.outSR)
                ? (t.queryGeometry = (0, I.c)({
                    spatialReference: e.outSR,
                    ...(0, m.p)(this.queryGeometry, this.queryGeometry.spatialReference, e.outSR),
                  }))
                : (t.queryGeometry = (0, I.c)({
                    spatialReference: e.outSR,
                    ...this.queryGeometry,
                  }))),
            t
          );
        }
        createSnappingResponse(e, t) {
          const s = this.featureAdapter,
            i = ((r = this.hasZ), (n = this.hasM), r ? (n ? 4 : 3) : n ? 3 : 2);
          var r, n;
          const { x: a, y: o } = e.point,
            u = 'number' == typeof e.distance ? e.distance : e.distance.x,
            l = 'number' == typeof e.distance ? e.distance : e.distance.y,
            c = { candidates: [] },
            h = 'esriGeometryPolygon' === this.geometryType,
            d = this.getPointCreator(e.point, this.spatialReference, t);
          for (const t of this.items) {
            const r = s.getGeometry(t);
            if (!r) continue;
            const { coords: n, lengths: f } = r;
            if (1 & e.types) {
              let e = 0;
              for (let r = 0; r < f.length; r++) {
                const h = f[r];
                for (let r = 0; r < h; r++, e += i) {
                  const f = n[e],
                    p = n[e + 1];
                  if (r !== h - 1) {
                    const r = n[e + i],
                      h = n[e + i + 1],
                      { x: m, y } = j(a, o, f, p, r, h),
                      g = (a - m) / u,
                      x = (o - y) / l,
                      _ = g * g + x * x;
                    _ <= 1 &&
                      c.candidates.push({
                        type: 'edge',
                        objectId: s.getObjectId(t),
                        distance: Math.sqrt(_),
                        target: d(m, y),
                        start: d(f, p),
                        end: d(r, h),
                      });
                  }
                }
              }
            }
            if (2 & e.types) {
              const e = h ? n.length - i : n.length;
              for (let r = 0; r < e; r += i) {
                const e = n[r],
                  i = n[r + 1],
                  h = (a - e) / u,
                  f = (o - i) / l,
                  p = h * h + f * f;
                p <= 1 &&
                  c.candidates.push({
                    type: 'vertex',
                    objectId: s.getObjectId(t),
                    distance: Math.sqrt(p),
                    target: d(e, i),
                  });
              }
            }
          }
          return c.candidates.sort((e, t) => e.distance - t.distance), c;
        }
        getPointCreator(e, t, s) {
          const i = (0, r.i)(s) && !(0, d.e)(t, s) ? (e) => (0, m.p)(e, t, s) : (e) => e;
          return null != e.z && null != e.m
            ? (t, s) => i({ x: t, y: s, z: e.z, m: e.m })
            : null != e.z
            ? (t, s) => i({ x: t, y: s, z: e.z })
            : null != e.m
            ? (t, s) => i({ x: t, y: s, m: e.m })
            : (e, t) => i({ x: e, y: t });
        }
        executeAttributesQuery(e) {
          const t = A(e.where, this.fieldsIndex);
          if (!t) return Promise.resolve(this);
          if (t.isStandardized) {
            let s = 0;
            const i = [];
            for (const e of this.items) t.testFeature(e, this.featureAdapter) && (i[s++] = e);
            const r = new G(i, this.queryGeometry, this);
            return (r.definitionExpression = e.where), Promise.resolve(r);
          }
          return Promise.reject(new TypeError('Where clause is not standardized'));
        }
        executeAggregateIdsQuery(e) {
          if (!e.aggregateIds || !e.aggregateIds.length || (0, r.b)(this.aggregateAdapter))
            return Promise.resolve(this);
          const t = new Set();
          for (const s of e.aggregateIds)
            this.aggregateAdapter.getFeatureObjectIds(s).forEach((e) => t.add(e));
          const s = this.featureAdapter.getObjectId;
          return Promise.resolve(
            new G(
              this.items.filter((e) => t.has(s(e))),
              this.queryGeometry,
              this,
            ),
          );
        }
        executeObjectIdsQuery(e) {
          if (!e.objectIds || !e.objectIds.length) return Promise.resolve(this);
          const t = new Set(e.objectIds),
            s = this.featureAdapter.getObjectId;
          return Promise.resolve(
            new G(
              this.items.filter((e) => t.has(s(e))),
              this.queryGeometry,
              this,
            ),
          );
        }
        executeTimeQuery(e) {
          const t = (0, I.g)(this.timeInfo, e.timeExtent, this.featureAdapter);
          if (!(0, r.i)(t)) return Promise.resolve(this);
          const s = this.items.filter(t);
          return Promise.resolve(new G(s, this.queryGeometry, this));
        }
        filterLatest() {
          const { trackIdField: e, startTimeField: t, endTimeField: s } = this.timeInfo,
            i = s || t,
            r = new Map(),
            n = this.featureAdapter.getAttribute;
          for (const t of this.items) {
            const s = n(t, e),
              a = n(t, i),
              o = r.get(s);
            (!o || a > n(o, i)) && r.set(s, t);
          }
          const a = Array.from(r.values());
          return Promise.resolve(new G(a, this.queryGeometry, this));
        }
        async project(e) {
          if (!e || (0, d.e)(this.spatialReference, e)) return this;
          const t = this.featureAdapter,
            s = (
              await (0, m.a)(
                this.items.map((e) =>
                  (0, I.a)(this.geometryType, this.hasZ, this.hasM, t.getGeometry(e)),
                ),
                this.spatialReference,
                e,
              )
            ).map((e, s) => t.cloneWithGeometry(this.items[s], (0, x.b)(e, this.hasZ, this.hasM)));
          return new G(s, this.queryGeometry, {
            definitionExpression: this.definitionExpression,
            geometryType: this.geometryType,
            hasM: this.hasM,
            hasZ: this.hasZ,
            objectIdField: this.objectIdField,
            spatialReference: e,
            fieldsIndex: this.fieldsIndex,
            timeInfo: this.timeInfo,
            featureAdapter: this.featureAdapter,
          });
        }
        async createSummaryStatisticsResponse(e, t) {
          const {
              field: s,
              normalizationField: i,
              normalizationType: r,
              normalizationTotal: n,
              minValue: a,
              maxValue: o,
            } = t,
            u = new P(e, this.featureAdapter, this.fieldsIndex),
            l = this.fieldsIndex.isDateField(s),
            c = t.valueExpression
              ? await this._getAttributeExpressionValues(u, t.valueExpression, t.viewInfoParams)
              : this._getAttributeNormalizedValues(u, {
                  field: s,
                  normalizationField: i,
                  normalizationType: r,
                  normalizationTotal: n,
                }),
            h = (0, _.i)({ normalizationType: r, normalizationField: i, minValue: a, maxValue: o }),
            d = (0, w.qN)(this.fieldsIndex.get(s))
              ? (0, _.d)({ values: c, supportsNullCount: h })
              : (0, _.e)({
                  values: c,
                  minValue: a,
                  maxValue: o,
                  useSampleStdDev: !r,
                  supportsNullCount: h,
                });
          return (0, _.p)(d, l);
        }
        _sortFeatures(e, t, s) {
          if (e.length > 1 && t && t.length)
            for (const i of t.reverse()) {
              const t = i.split(' '),
                r = t[0],
                n = this.fieldsIndex.get(r),
                a = t[1] && 'desc' === t[1].toLowerCase();
              e.sort((e, t) => V(s(e, r, n), s(t, r, n), n, a));
            }
        }
        _createFeatureQueryResponse(e) {
          const t = this.items,
            { geometryType: s, hasM: i, hasZ: r, objectIdField: n, spatialReference: a } = this,
            {
              outFields: o,
              outSR: u,
              quantizationParameters: l,
              resultRecordCount: c,
              resultOffset: h,
              returnZ: d,
              returnM: f,
            } = e,
            p = null != c && t.length > (h || 0) + c,
            m =
              o &&
              (o.indexOf('*') > -1
                ? [...this.fieldsIndex.fields]
                : o.map((e) => this.fieldsIndex.get(e)));
          return {
            exceededTransferLimit: p,
            features: this._createFeatures(e, t),
            fields: m,
            geometryType: s,
            hasM: i && f,
            hasZ: r && d,
            objectIdFieldName: n,
            spatialReference: (0, I.c)(u || a),
            transform: (l && (0, g.t)(l)) || null,
          };
        }
        _createFeatures(e, t) {
          const s = new P(e, this.featureAdapter, this.fieldsIndex),
            { hasM: i, hasZ: r } = this,
            {
              orderByFields: n,
              quantizationParameters: a,
              returnGeometry: o,
              returnCentroid: u,
              maxAllowableOffset: l,
              resultOffset: c,
              resultRecordCount: h,
              returnZ: d = !1,
              returnM: f = !1,
            } = e,
            p = r && d,
            m = i && f;
          let y = [],
            x = 0;
          const _ = [...t];
          if ((this._sortFeatures(_, n, (e, t, i) => s.getFieldValue(e, t, i)), o || u)) {
            const e = (0, g.t)(a);
            if (o && !u)
              for (const t of _)
                y[x++] = {
                  attributes: s.getAttributes(t),
                  geometry: (0, I.a)(
                    this.geometryType,
                    this.hasZ,
                    this.hasM,
                    this.featureAdapter.getGeometry(t),
                    l,
                    e,
                    p,
                    m,
                  ),
                };
            else if (!o && u)
              for (const t of _)
                y[x++] = {
                  attributes: s.getAttributes(t),
                  centroid: (0, I.t)(this, this.featureAdapter.getCentroid(t, this), e),
                };
            else
              for (const t of _)
                y[x++] = {
                  attributes: s.getAttributes(t),
                  centroid: (0, I.t)(this, this.featureAdapter.getCentroid(t, this), e),
                  geometry: (0, I.a)(
                    this.geometryType,
                    this.hasZ,
                    this.hasM,
                    this.featureAdapter.getGeometry(t),
                    l,
                    e,
                    p,
                    m,
                  ),
                };
          } else
            for (const e of _) {
              const t = s.getAttributes(e);
              t && (y[x++] = { attributes: t });
            }
          const w = c || 0;
          if (null != h) {
            const e = w + h;
            y = y.slice(w, Math.min(y.length, e));
          }
          return y;
        }
        _createExceedsLimitQueryResponse(e) {
          let t = !1,
            s = Number.POSITIVE_INFINITY,
            i = Number.POSITIVE_INFINITY,
            r = Number.POSITIVE_INFINITY;
          for (const t of e.outStatistics)
            if ('exceedslimit' === t.statisticType) {
              (s = null != t.maxPointCount ? t.maxPointCount : Number.POSITIVE_INFINITY),
                (i = null != t.maxRecordCount ? t.maxRecordCount : Number.POSITIVE_INFINITY),
                (r = null != t.maxVertexCount ? t.maxVertexCount : Number.POSITIVE_INFINITY);
              break;
            }
          if ('esriGeometryPoint' === this.geometryType) t = this.items.length > s;
          else if (this.items.length > i) t = !0;
          else {
            const e = this.hasZ ? (this.hasM ? 4 : 3) : this.hasM ? 3 : 2,
              s = this.featureAdapter;
            t =
              this.items.reduce((e, t) => {
                const i = s.getGeometry(t);
                return e + ((i && i.coords.length) || 0);
              }, 0) /
                e >
              r;
          }
          return {
            fields: [
              {
                name: 'exceedslimit',
                type: 'esriFieldTypeInteger',
                alias: 'exceedslimit',
                sqlType: 'sqlTypeInteger',
                domain: null,
                defaultValue: null,
              },
            ],
            features: [{ attributes: { exceedslimit: Number(t) } }],
          };
        }
        _createStatisticsQueryResponse(e) {
          const t = { attributes: {} },
            s = [],
            i = new Map(),
            r = new Map(),
            n = new Map(),
            a = new Map(),
            o = new P(e, this.featureAdapter, this.fieldsIndex),
            u = e.outStatistics,
            { groupByFieldsForStatistics: l, having: c, orderByFields: h } = e,
            d = l && l.length,
            f = !!d,
            p = f && l[0],
            m = f && !this.fieldsIndex.get(p);
          for (const e of u) {
            const { outStatisticFieldName: u, statisticType: h } = e,
              y = e,
              g = 'exceedslimit' !== h ? e.onStatisticField : void 0,
              x = 'percentile_disc' === h || 'percentile_cont' === h,
              _ = f && 1 === d && (g === p || m) && 'count' === h;
            if (f) {
              if (!n.has(g)) {
                const e = [];
                for (const t of l) {
                  const s = this._getAttributeValues(o, t, i);
                  e.push(s);
                }
                n.set(g, this._calculateUniqueValues(e, o.returnDistinctValues));
              }
              const e = n.get(g);
              for (const t in e) {
                const { count: s, data: r, items: n, itemPositions: h } = e[t],
                  d = r.join(',');
                if (!c || o.validateItems(n, c)) {
                  const e = a.get(d) || { attributes: {} };
                  let t = null;
                  if (_) t = s;
                  else {
                    const e = this._getAttributeValues(o, g, i),
                      s = h.map((t) => e[t]);
                    t =
                      x && 'statisticParameters' in y
                        ? this._getPercentileValue(y, s)
                        : this._getStatisticValue(y, s);
                  }
                  (e.attributes[u] = t),
                    l.forEach(
                      (t, s) =>
                        (e.attributes[this.fieldsIndex.get(t) ? t : `EXPR_${s + 1}`] = r[s]),
                    ),
                    a.set(d, e);
                }
              }
            } else {
              const e = this._getAttributeValues(o, g, i);
              t.attributes[u] =
                x && 'statisticParameters' in y
                  ? this._getPercentileValue(y, e)
                  : this._getStatisticValue(y, e, r);
            }
            s.push({ name: u, alias: u, type: 'esriFieldTypeDouble' });
          }
          const y = f ? Array.from(a.values()) : [t];
          return this._sortFeatures(y, h, (e, t) => e.attributes[t]), { fields: s, features: y };
        }
        _getStatisticValue(e, t, s) {
          const { onStatisticField: i, statisticType: r } = e;
          let n = null;
          return (
            (n =
              null != s && s.has(i)
                ? s.get(i)
                : (0, w.qN)(this.fieldsIndex.get(i))
                ? (0, _.d)({ values: t })
                : (0, _.e)({ values: t, minValue: null, maxValue: null, useSampleStdDev: !0 })),
            s && s.set(i, n),
            n['var' === r ? 'variance' : r]
          );
        }
        _getPercentileValue(e, t) {
          const { onStatisticField: s, statisticParameters: i, statisticType: r } = e,
            { value: n, orderBy: a } = i,
            o = 'desc' === a,
            u = this.fieldsIndex.get(s),
            l = [...t].filter((e) => null != e).sort((e, t) => V(e, t, u, o));
          return this._calculatePercentile(l, n, 'percentile_disc' === r);
        }
        _getAttributeValues(e, t, s) {
          if (s.has(t)) return s.get(t);
          const i = this.fieldsIndex.get(t),
            r = this.items.map((s) => e.getFieldValue(s, t, i));
          return s.set(t, r), r;
        }
        _getAttributeNormalizedValues(e, t) {
          return this.items.map((s) =>
            e.getNormalizedValue(s, {
              field: t.field,
              fieldInfo: this.fieldsIndex.get(t.field),
              normalizationField: t.normalizationField,
              normalizationFieldInfo: this.fieldsIndex.get(t.normalizationField),
              normalizationType: t.normalizationType,
              normalizationTotal: t.normalizationTotal,
            }),
          );
        }
        async _getAttributeExpressionValues(e, t, s) {
          const { arcadeUtils: i } = await (0, S.l)(),
            r = i.createFunction(t),
            n = s && i.getViewInfo(s);
          return this.items.map((t) =>
            e.getExpressionValue(t, { compiledFunc: r, viewInfo: n }, i),
          );
        }
        _calculateUniqueValues(e, t) {
          const s = {},
            i = this.items,
            r = i.length;
          for (let n = 0; n < r; n++) {
            const r = i[n],
              a = [];
            for (const t of e) a.push(t[n]);
            const o = a.join(',');
            t
              ? null == s[o] && (s[o] = { count: 1, data: a, items: [r], itemPositions: [n] })
              : null == s[o]
              ? (s[o] = { count: 1, data: a, items: [r], itemPositions: [n] })
              : (s[o].count++, s[o].items.push(r), s[o].itemPositions.push(n));
          }
          return s;
        }
        _calculatePercentile(e, t, s) {
          if (0 === e.length) return null;
          if (t <= 0) return e[0];
          if (t >= 1) return e[e.length - 1];
          const i = (e.length - 1) * t,
            r = Math.floor(i),
            n = r + 1,
            a = i % 1,
            o = e[r],
            u = e[n];
          return n >= e.length || s || 'string' == typeof o || 'string' == typeof u
            ? o
            : o * (1 - a) + u * a;
        }
      }
      function j(e, t, s, i, r, n) {
        const a = r - s,
          o = n - i,
          u = a * a + o * o,
          l = (e - s) * a + (t - i) * o,
          c = Math.min(1, Math.max(0, l / u));
        return { x: s + a * c, y: i + o * c };
      }
      const Z = 'feature-store:unsupported-query',
        q = new Set(),
        O = new n.M(2e6);
      let k = 0;
      class D {
        constructor(e) {
          (this.capabilities = { query: y.q }),
            (this.geometryType = e.geometryType),
            (this.hasM = e.hasM),
            (this.hasZ = e.hasZ),
            (this.objectIdField = e.objectIdField),
            (this.spatialReference = e.spatialReference),
            (this.definitionExpression = e.definitionExpression),
            (this.featureStore = e.featureStore),
            (this.aggregateAdapter = e.aggregateAdapter),
            (this._changeHandle = this.featureStore.events.on('changed', () => this.clearCache())),
            (this.timeInfo = e.timeInfo),
            e.cacheSpatialQueries && (this._geometryQueryCache = new n.a(k++ + '$$', O)),
            (this.fieldsIndex = new b.Z(e.fields)),
            e.scheduler &&
              e.priority &&
              ((this._frameQueue = new R.P()),
              (this._frameTask = e.scheduler.registerTask(e.priority, this)));
        }
        destroy() {
          this._frameTask &&
            (this._frameTask.remove(),
            (this._frameTask = null),
            this._frameQueue.cancelAll(),
            (this._frameQueue = null)),
            this.clearCache(),
            this._geometryQueryCache && this._geometryQueryCache.destroy(),
            this._changeHandle && (this._changeHandle.remove(), (this._changeHandle = null)),
            this.fieldsIndex.destroy();
        }
        get featureAdapter() {
          return this.featureStore.featureAdapter;
        }
        get fullExtent() {
          const e = this.featureStore.fullBounds;
          return e
            ? {
                xmin: e[0],
                ymin: e[1],
                xmax: e[2],
                ymax: e[3],
                spatialReference: (0, I.c)(this.spatialReference),
              }
            : null;
        }
        get timeExtent() {
          return this.timeInfo
            ? (this._timeExtent || (this._timeExtent = (0, I.b)(this.timeInfo, this.featureStore)),
              this._timeExtent)
            : null;
        }
        clearCache() {
          this._geometryQueryCache && this._geometryQueryCache.clear(),
            (this._allItems = null),
            (this._timeExtent = null);
        }
        async executeQuery(e = {}, t) {
          let s,
            i = (0, r.d9)(e);
          try {
            (i = await this._schedule(
              () => (0, I.n)(i, this.definitionExpression, this.spatialReference),
              t,
            )),
              (i = await this._reschedule(() => this._checkQuerySupport(i), t)),
              (s = await this._reschedule(() => this._executeGeometryQuery(i, t), t)),
              (s = await this._reschedule(() => s.executeAggregateIdsQuery(i), t)),
              (s = await this._reschedule(() => s.executeObjectIdsQuery(i), t)),
              (s = await this._reschedule(() => s.executeTimeQuery(i), t)),
              (s = await this._reschedule(() => s.executeAttributesQuery(i), t));
          } catch (e) {
            if (e !== I.Q) throw e;
            s = new G([], null, this);
          }
          return s.createQueryResponse(i);
        }
        async executeQueryForCount(e = {}, t) {
          let s,
            i = (0, r.d9)(e);
          (i.returnGeometry = !1), (i.returnCentroid = !1), (i.outSR = null);
          try {
            (i = await this._schedule(
              () => (0, I.n)(i, this.definitionExpression, this.spatialReference),
              t,
            )),
              (i = await this._reschedule(() => this._checkQuerySupport(i), t)),
              (s = await this._reschedule(() => this._executeGeometryQuery(i, t), t)),
              (s = await this._reschedule(() => s.executeAggregateIdsQuery(i), t)),
              (s = await this._reschedule(() => s.executeObjectIdsQuery(i), t)),
              (s = await this._reschedule(() => s.executeTimeQuery(i), t)),
              (s = await this._reschedule(() => s.executeAttributesQuery(i), t));
          } catch (e) {
            if (e !== I.Q) throw e;
            return 0;
          }
          return s.createQueryResponseForCount(i);
        }
        async executeQueryForExtent(e = {}, t) {
          let s,
            i = (0, r.d9)(e);
          const n = i.outSR;
          try {
            (i = await this._schedule(
              () => (0, I.n)(i, this.definitionExpression, this.spatialReference),
              t,
            )),
              (i = await this._reschedule(() => this._checkQuerySupport(i), t)),
              (i.returnGeometry = !0),
              (i.returnCentroid = !1),
              (i.outSR = null),
              (s = await this._reschedule(() => this._executeGeometryQuery(i, t), t)),
              (s = await this._reschedule(() => s.executeAggregateIdsQuery(i), t)),
              (s = await this._reschedule(() => s.executeObjectIdsQuery(i), t)),
              (s = await this._reschedule(() => s.executeTimeQuery(i), t)),
              (s = await this._reschedule(() => s.executeAttributesQuery(i), t));
            const e = s.size;
            if (!e) return { count: e, extent: null };
            (0, o.s)(Y, o.N), this.featureStore.forEachBounds(s.items, (e) => (0, o.d)(Y, e), B);
            const r = {
              xmin: Y[0],
              ymin: Y[1],
              xmax: Y[3],
              ymax: Y[4],
              spatialReference: (0, I.c)(this.spatialReference),
            };
            this.hasZ && isFinite(Y[2]) && isFinite(Y[5]) && ((r.zmin = Y[2]), (r.zmax = Y[5]));
            const u = (0, m.p)(r, s.spatialReference, n);
            if (
              ((u.spatialReference = (0, I.c)(n || this.spatialReference)), u.xmax - u.xmin == 0)
            ) {
              const e = (0, a.a)(u.spatialReference);
              (u.xmin -= e), (u.xmax += e);
            }
            if (u.ymax - u.ymin == 0) {
              const e = (0, a.a)(u.spatialReference);
              (u.ymin -= e), (u.ymax += e);
            }
            if (this.hasZ && null != u.zmin && null != u.zmax && u.zmax - u.zmin == 0) {
              const e = (0, a.a)(u.spatialReference);
              (u.zmin -= e), (u.zmax += e);
            }
            return { count: e, extent: u };
          } catch (e) {
            if (e === I.Q) return { count: 0, extent: null };
            throw e;
          }
        }
        async executeQueryForIds(e = {}, t) {
          return this.executeQueryForIdSet(e, t).then((e) => Array.from(e));
        }
        async executeQueryForIdSet(e = {}, t) {
          let s,
            i = (0, r.d9)(e);
          (i.returnGeometry = !1), (i.returnCentroid = !1), (i.outSR = null);
          try {
            (i = await this._schedule(
              () => (0, I.n)(i, this.definitionExpression, this.spatialReference),
              t,
            )),
              (i = await this._reschedule(() => this._checkQuerySupport(i), t)),
              (s = await this._reschedule(() => this._executeGeometryQuery(i, t), t)),
              (s = await this._reschedule(() => s.executeAggregateIdsQuery(i), t)),
              (s = await this._reschedule(() => s.executeObjectIdsQuery(i), t)),
              (s = await this._reschedule(() => s.executeTimeQuery(i), t)),
              (s = await this._reschedule(() => s.executeAttributesQuery(i), t));
            const e = s.items,
              r = new Set();
            return (
              await this._reschedule(() => {
                for (const t of e) r.add(s.featureAdapter.getObjectId(t));
              }, t),
              r
            );
          } catch (e) {
            if (e === I.Q) return new Set();
            throw e;
          }
        }
        async executeQueryForSnapping(e, t) {
          const { point: s, distance: i, types: n } = e;
          if (0 === n) return { candidates: [] };
          const a = await this._reschedule(() => this._checkQuerySupport(e.query), t),
            o = !(0, d.e)(s.spatialReference, this.spatialReference);
          o && (await (0, m.c)(s.spatialReference, this.spatialReference));
          const u = 'number' == typeof i ? i : i.x,
            l = 'number' == typeof i ? i : i.y,
            f = {
              xmin: s.x - u,
              xmax: s.x + u,
              ymin: s.y - l,
              ymax: s.y + l,
              spatialReference: s.spatialReference,
            },
            p = o ? (0, m.p)(f, this.spatialReference) : f;
          if (!p) return { candidates: [] };
          const y = (await (0, h.aX)((0, c.im)(s), null, { signal: t }))[0],
            g = (await (0, h.aX)((0, c.im)(p), null, { signal: t }))[0];
          if ((0, r.b)(y) || (0, r.b)(g)) return { candidates: [] };
          let x = new G(this._searchFeatures(this._getQueryBBoxes(g.toJSON())), null, this);
          (x = await this._reschedule(() => x.executeObjectIdsQuery(a), t)),
            (x = await this._reschedule(() => x.executeTimeQuery(a), t)),
            (x = await this._reschedule(() => x.executeAttributesQuery(a), t));
          const _ = y.toJSON(),
            I = o ? (0, m.p)(_, this.spatialReference) : _,
            w = o ? Math.max(p.xmax - p.xmin, p.ymax - p.ymin) / 2 : i;
          return x.createSnappingResponse({ ...e, point: I, distance: w }, s.spatialReference);
        }
        async executeQueryForLatestObservations(e = {}, t) {
          if (!this.timeInfo || !this.timeInfo.trackIdField)
            throw new i.Z(Z, 'Missing timeInfo or timeInfo.trackIdField', {
              query: e,
              timeInfo: this.timeInfo,
            });
          let s,
            n = (0, r.d9)(e);
          try {
            (n = await this._schedule(
              () => (0, I.n)(n, this.definitionExpression, this.spatialReference),
              t,
            )),
              (n = await this._reschedule(() => this._checkQuerySupport(n), t)),
              (s = await this._reschedule(() => this._executeGeometryQuery(n, t), t)),
              (s = await this._reschedule(() => s.executeAggregateIdsQuery(n), t)),
              (s = await this._reschedule(() => s.executeObjectIdsQuery(n), t)),
              (s = await this._reschedule(() => s.executeTimeQuery(n), t)),
              (s = await this._reschedule(() => s.executeAttributesQuery(n), t)),
              (s = await this._reschedule(() => s.filterLatest(), t));
          } catch (e) {
            if (e !== I.Q) throw e;
            s = new G([], null, this);
          }
          return s.createQueryResponse(n);
        }
        async executeQueryForSummaryStatistics(e = {}, t, s) {
          let i;
          e = (0, r.d9)(e);
          try {
            (e = await this._schedule(
              () => (0, I.n)(e, this.definitionExpression, this.spatialReference),
              s,
            )),
              (e = await this._reschedule(() => this._checkSummaryStatisticsSupport(e, t), s)),
              (i = await this._reschedule(() => this._executeGeometryQuery(e, s), s)),
              (i = await this._reschedule(() => i.executeAggregateIdsQuery(e), s)),
              (i = await this._reschedule(() => i.executeObjectIdsQuery(e), s)),
              (i = await this._reschedule(() => i.executeTimeQuery(e), s)),
              (i = await this._reschedule(() => i.executeAttributesQuery(e), s));
          } catch (e) {
            if (e !== I.Q) throw e;
            i = new G([], null, this);
          }
          return i.createSummaryStatisticsResponse(e, t);
        }
        async _schedule(e, t) {
          return this._frameQueue ? this._frameQueue.push(e, t) : e();
        }
        async _reschedule(e, t) {
          return this._frameQueue ? this._frameQueue.unshift(e, t) : e();
        }
        get running() {
          return this._frameQueue.length > 0;
        }
        runTask(e) {
          for (this._budget = e; !e.done && this._frameQueue && this._frameQueue.process(); )
            e.madeProgress();
          this._budget = null;
        }
        _getAll() {
          if (!this._allItems) {
            const e = [];
            this.featureStore.forEach((t) => e.push(t)), (this._allItems = new G(e, null, this));
          }
          return this._allItems;
        }
        async _executeGeometryQuery(e, t) {
          const { geometry: s, outSR: i, spatialRel: n, returnGeometry: a, returnCentroid: o } = e,
            u = a || o,
            l = (0, d.j)(i) && !(0, d.e)(this.spatialReference, i),
            c = this._geometryQueryCache
              ? l && u
                ? JSON.stringify({ geometry: s, spatialRelationship: n, outSpatialReference: i })
                : JSON.stringify({ geometry: s, spatialRelationship: n })
              : null;
          if (c) {
            const e = this._geometryQueryCache.get(c);
            if (!(0, r.E)(e)) return e;
          }
          const h = async (e) => {
            if (l && u) {
              const t = await e.project(i);
              return c && this._geometryQueryCache.put(c, t, t.size || 1), t;
            }
            return c && this._geometryQueryCache.put(c, e, e.size || 1), e;
          };
          if (!s) return h(this._getAll());
          const f = this.featureAdapter;
          if ('esriSpatialRelDisjoint' === n) {
            const e = this._searchFeatures(this._getQueryBBoxes(s));
            if (!e.length) return h(this._getAll());
            let i, r;
            const a = new Set();
            for (const t of e) a.add(f.getObjectId(t));
            return (
              await this._reschedule(() => {
                let e = 0;
                (i = new Array(a.size)), this.featureStore.forEach((t) => (i[e++] = t)), (r = a);
              }, t),
              h(
                await this._reschedule(async () => {
                  const e = await (0, I.d)(n, s, this.geometryType, this.hasZ, this.hasM);
                  return new G(
                    await this._runSpatialFilter(
                      i,
                      (t) => !r.has(f.getObjectId(t)) || e(f.getGeometry(t)),
                      t,
                    ),
                    s,
                    this,
                  );
                }, t),
              )
            );
          }
          const p = this._searchFeatures(this._getQueryBBoxes(s));
          if (!p.length) {
            const e = new G([], s, this);
            return c && this._geometryQueryCache.put(c, e, e.size || 1), e;
          }
          if (this._canExecuteSoloPass(s, e)) return h(new G(p, s, this));
          const m = await (0, I.d)(n, s, this.geometryType, this.hasZ, this.hasM),
            y = await this._runSpatialFilter(p, (e) => m(f.getGeometry(e)), t);
          return h(new G(y, s, this));
        }
        async _runSpatialFilter(e, t, s) {
          if (!t) return e;
          if (!this._budget) return e.filter((e) => t(e));
          let i = 0;
          const r = new Array(),
            n = async () => {
              for (; i < e.length; ) {
                const a = e[i];
                t(a) && r.push(a), this._budget.done && (await this._reschedule(() => n(), s)), ++i;
              }
            };
          return this._reschedule(() => n(), s).then(() => r);
        }
        _canExecuteSoloPass(e, t) {
          const { geometryType: s } = this,
            { spatialRel: i } = t;
          return (
            (0, I.e)(e) &&
            ('esriSpatialRelEnvelopeIntersects' === i ||
              ('esriGeometryPoint' === s &&
                ('esriSpatialRelIntersects' === i ||
                  'esriSpatialRelContains' === i ||
                  'esriSpatialRelWithin' === i)))
          );
        }
        _getQueryBBoxes(e) {
          if ((0, I.e)(e)) {
            if ((0, c.YX)(e)) return [(0, u.f)(e.xmin, e.ymin, e.xmax, e.ymax)];
            if ((0, c.oU)(e))
              return e.rings.map((e) =>
                (0, u.f)(
                  Math.min(e[0][0], e[2][0]),
                  Math.min(e[0][1], e[2][1]),
                  Math.max(e[0][0], e[2][0]),
                  Math.max(e[0][1], e[2][1]),
                ),
              );
          }
          return [(0, l.d)((0, u.a)(), e)];
        }
        _searchFeatures(e) {
          for (const t of e)
            this.featureStore.forEachInBounds(t, (e) => {
              q.add(e);
            });
          const t = new Array(q.size);
          let s = 0;
          return q.forEach((e) => (t[s++] = e)), q.clear(), t;
        }
        async _checkSummaryStatisticsSupport(e, t) {
          if (
            e.distance < 0 ||
            null != e.geometryPrecision ||
            e.multipatchOption ||
            e.pixelSize ||
            e.relationParam ||
            e.text ||
            e.outStatistics ||
            e.groupByFieldsForStatistics ||
            e.having ||
            e.orderByFields
          )
            throw new i.Z(Z, 'Unsupported query options', { query: e });
          return Promise.all([
            this._checkAttributesQuerySupport(e),
            this._checkSummaryStatisticsParamsSupport(t),
            (0, I.f)(e, this.geometryType, this.spatialReference),
            (0, m.c)(this.spatialReference, e.outSR),
          ]).then(() => e);
        }
        async _checkSummaryStatisticsParamsSupport(e) {
          const t = await (0, F.a)({
            field: e.field,
            normalizationField: e.normalizationField,
            valueExpression: e.valueExpression,
          });
          if (!t.length)
            throw new i.Z(Z, 'params should have atleast a field or valueExpression', {
              params: e,
            });
          Q(this.fieldsIndex, t, 'params contains missing fields');
        }
        async _checkQuerySupport(e) {
          if (
            e.distance < 0 ||
            null != e.geometryPrecision ||
            e.multipatchOption ||
            e.pixelSize ||
            e.relationParam ||
            e.text
          )
            throw new i.Z(Z, 'Unsupported query options', { query: e });
          return Promise.all([
            this._checkAttributesQuerySupport(e),
            this._checkStatisticsQuerySupport(e),
            (0, I.f)(e, this.geometryType, this.spatialReference),
            (0, m.c)(this.spatialReference, e.outSR),
          ]).then(() => e);
        }
        _checkAttributesQuerySupport(e) {
          const { outFields: t, orderByFields: s, returnDistinctValues: r, outStatistics: n } = e,
            a = n
              ? n.map((e) => e.outStatisticFieldName && e.outStatisticFieldName.toLowerCase())
              : [];
          if (s && s.length > 0) {
            const e = ' asc',
              t = ' desc',
              i = s
                .map((s) => {
                  const i = s.toLowerCase();
                  return i.indexOf(e) > -1 ? i.split(e)[0] : i.indexOf(t) > -1 ? i.split(t)[0] : s;
                })
                .filter((e) => -1 === a.indexOf(e));
            Q(this.fieldsIndex, i, 'orderByFields contains missing fields');
          }
          if (t && t.length > 0) Q(this.fieldsIndex, t, 'outFields contains missing fields');
          else if (r)
            throw new i.Z(Z, 'outFields should be specified for returnDistinctValues', {
              query: e,
            });
          !(function (e, t) {
            if (!t) return !0;
            const s = v.get(t, e);
            if (!s)
              throw new i.Z('feature-store:unsupported-query', 'invalid SQL expression', {
                where: t,
              });
            if (!s.isStandardized)
              throw new i.Z('feature-store:unsupported-query', 'where clause is not standard', {
                where: t,
              });
            Q(e, s.fieldNames, 'where clause contains missing fields');
          })(this.fieldsIndex, e.where);
        }
        async _checkStatisticsQuerySupport(e) {
          const { outStatistics: t, groupByFieldsForStatistics: s, having: r } = e,
            n = s && s.length,
            a = t && t.length;
          if (r) {
            if (!n || !a)
              throw new i.Z(
                Z,
                'outStatistics and groupByFieldsForStatistics should be specified with having',
                { query: e },
              );
            !(function (e, t, s) {
              if (!t) return !0;
              const r = v.get(t, e);
              if (!r)
                throw new i.Z('feature-store:unsupported-query', 'invalid SQL expression', {
                  having: t,
                });
              if (!r.isAggregate)
                throw new i.Z(
                  'feature-store:unsupported-query',
                  'having does not contain a valid aggregate function',
                  { having: t },
                );
              const n = r.fieldNames;
              if (
                (Q(e, n, 'having contains missing fields'),
                !r.getExpressions().every((t) => {
                  const { aggregateType: i, field: r } = t,
                    n = e.has(r) && e.get(r).name;
                  return s.some((t) => {
                    const { onStatisticField: s, statisticType: r } = t;
                    return (e.has(s) && e.get(s).name) === n && r.toLowerCase().trim() === i;
                  });
                }))
              )
                throw new i.Z(
                  'feature-store:unsupported-query',
                  'expressions in having should also exist in outStatistics',
                  { having: t },
                );
            })(this.fieldsIndex, r, t);
          }
          if (a) {
            if (!t.every((e) => 'exceedslimit' !== e.statisticType)) return;
            const r = t.map((e) => e.onStatisticField);
            Q(this.fieldsIndex, r, 'onStatisticFields contains missing fields'),
              n && Q(this.fieldsIndex, s, 'groupByFieldsForStatistics contains missing fields');
            for (const s of t) {
              const { onStatisticField: t, statisticType: r } = s;
              if (
                ('percentile_disc' !== r && 'percentile_cont' !== r) ||
                !('statisticParameters' in s)
              ) {
                if ('count' !== r && t && N(t, this.fieldsIndex))
                  throw new i.Z(Z, 'outStatistics contains non-numeric fields', {
                    definition: s,
                    query: e,
                  });
              } else {
                const { statisticParameters: t } = s;
                if (!t)
                  throw new i.Z(Z, 'statisticParamters should be set for percentile type', {
                    definition: s,
                    query: e,
                  });
              }
            }
          }
        }
      }
      const B = (0, o.c)(),
        Y = (0, o.c)();
    },
    89219: (e, t, s) => {
      'use strict';
      s.d(t, { q: () => i });
      const i = {
        supportsStatistics: !0,
        supportsPercentileStatistics: !0,
        supportsCentroid: !0,
        supportsCacheHint: !1,
        supportsDistance: !0,
        supportsDistinct: !0,
        supportsExtent: !0,
        supportsGeometryProperties: !1,
        supportsHavingClause: !0,
        supportsOrderBy: !0,
        supportsPagination: !0,
        supportsQuantization: !0,
        supportsQuantizationEditMode: !1,
        supportsQueryGeometry: !0,
        supportsResultType: !1,
        supportsSqlExpression: !0,
        supportsMaxRecordCountFactor: !1,
        supportsStandardizedQueriesOnly: !0,
        supportsTopFeaturesQuery: !1,
        supportsQueryByOthers: !0,
        supportsHistoricMoment: !1,
        supportsFormatPBF: !1,
        supportsDisjointSpatialRelationship: !0,
        maxRecordCountFactor: void 0,
        maxRecordCount: void 0,
        standardMaxRecordCount: void 0,
        tileMaxRecordCount: void 0,
      };
    },
    40705: (e, t, s) => {
      'use strict';
      s(60599), s(15324);
      var i = s(92143);
      s(32101), s(91306), i.L.getLogger('esri.support.basemapUtils');
    },
    71331: (e, t, s) => {
      'use strict';
      function i(e, t) {
        return e ? (t ? 4 : 3) : t ? 3 : 2;
      }
      function r(e, t, s, r, c) {
        if (!t || !t.lengths.length) return null;
        const h = 'upperLeft' === (null == c ? void 0 : c.originPosition) ? -1 : 1;
        e.lengths.length && (e.lengths.length = 0), e.coords.length && (e.coords.length = 0);
        const d = e.coords,
          f = [],
          p = s
            ? [
                Number.POSITIVE_INFINITY,
                Number.NEGATIVE_INFINITY,
                Number.POSITIVE_INFINITY,
                Number.NEGATIVE_INFINITY,
                Number.POSITIVE_INFINITY,
                Number.NEGATIVE_INFINITY,
              ]
            : [
                Number.POSITIVE_INFINITY,
                Number.NEGATIVE_INFINITY,
                Number.POSITIVE_INFINITY,
                Number.NEGATIVE_INFINITY,
              ],
          { lengths: m, coords: y } = t,
          g = i(s, r);
        let x = 0;
        for (const e of m) {
          const t = n(p, y, x, e, s, r, h);
          t && f.push(t), (x += e * g);
        }
        if (
          (f.sort((e, t) => {
            let i = h * e[2] - h * t[2];
            return 0 === i && s && (i = e[4] - t[4]), i;
          }),
          f.length)
        ) {
          let e = 6 * f[0][2];
          (d[0] = f[0][0] / e),
            (d[1] = f[0][1] / e),
            s && ((e = 6 * f[0][4]), (d[2] = 0 !== e ? f[0][3] / e : 0)),
            (d[0] < p[0] ||
              d[0] > p[1] ||
              d[1] < p[2] ||
              d[1] > p[3] ||
              (s && (d[2] < p[4] || d[2] > p[5]))) &&
              (d.length = 0);
        }
        if (!d.length) {
          const e = t.lengths[0]
            ? (function (e, t, s, r, n) {
                const c = i(r, n);
                let h = 0,
                  d = 0 + c,
                  f = 0,
                  p = 0,
                  m = 0,
                  y = 0;
                for (let t = 0, i = s - 1; t < i; t++, h += c, d += c) {
                  const t = e[h],
                    s = e[h + 1],
                    i = e[h + 2],
                    n = e[d],
                    c = e[d + 1],
                    g = e[d + 2],
                    x = r ? o(t, s, i, n, c, g) : a(t, s, n, c);
                  if (x)
                    if (((f += x), r)) {
                      const e = l(t, s, i, n, c, g);
                      (p += x * e[0]), (m += x * e[1]), (y += x * e[2]);
                    } else {
                      const e = u(t, s, n, c);
                      (p += x * e[0]), (m += x * e[1]);
                    }
                }
                return f > 0
                  ? r
                    ? [p / f, m / f, y / f]
                    : [p / f, m / f]
                  : s > 0
                  ? r
                    ? [e[0], e[1], e[2]]
                    : [e[0], e[1]]
                  : null;
              })(y, 0, m[0], s, r)
            : null;
          if (!e) return null;
          (d[0] = e[0]), (d[1] = e[1]), s && e.length > 2 && (d[2] = e[2]);
        }
        return e;
      }
      function n(e, t, s, r, n, a, o = 1) {
        const u = i(n, a);
        let l = s,
          c = s + u,
          h = 0,
          d = 0,
          f = 0,
          p = 0,
          m = 0;
        for (let s = 0, i = r - 1; s < i; s++, l += u, c += u) {
          const s = t[l],
            i = t[l + 1],
            r = t[l + 2],
            a = t[c],
            o = t[c + 1],
            u = t[c + 2];
          let y = s * o - a * i;
          (p += y),
            (h += (s + a) * y),
            (d += (i + o) * y),
            n && ((y = s * u - a * r), (f += (r + u) * y), (m += y)),
            s < e[0] && (e[0] = s),
            s > e[1] && (e[1] = s),
            i < e[2] && (e[2] = i),
            i > e[3] && (e[3] = i),
            n && (r < e[4] && (e[4] = r), r > e[5] && (e[5] = r));
        }
        if ((p * o > 0 && (p *= -1), m * o > 0 && (m *= -1), !p)) return null;
        const y = [h, d, 0.5 * p];
        return n && ((y[3] = f), (y[4] = 0.5 * m)), y;
      }
      function a(e, t, s, i) {
        const r = s - e,
          n = i - t;
        return Math.sqrt(r * r + n * n);
      }
      function o(e, t, s, i, r, n) {
        const a = i - e,
          o = r - t,
          u = n - s;
        return Math.sqrt(a * a + o * o + u * u);
      }
      function u(e, t, s, i) {
        return [e + 0.5 * (s - e), t + 0.5 * (i - t)];
      }
      function l(e, t, s, i, r, n) {
        return [e + 0.5 * (i - e), t + 0.5 * (r - t), s + 0.5 * (n - s)];
      }
      s.d(t, { g: () => r });
    },
    77314: (e, t, s) => {
      'use strict';
      s.d(t, { j: () => i });
      const i = {
        convertToGEGeometry: function (e, t) {
          return null == t ? null : e.convertJSONToGeometry(t);
        },
        exportPoint: function (e, t, s) {
          const i = new r(e.getPointX(t), e.getPointY(t), s),
            n = e.hasZ(t),
            a = e.hasM(t);
          return n && (i.z = e.getPointZ(t)), a && (i.m = e.getPointM(t)), i;
        },
        exportPolygon: function (e, t, s) {
          return new n(e.exportPaths(t), s, e.hasZ(t), e.hasM(t));
        },
        exportPolyline: function (e, t, s) {
          return new a(e.exportPaths(t), s, e.hasZ(t), e.hasM(t));
        },
        exportMultipoint: function (e, t, s) {
          return new o(e.exportPoints(t), s, e.hasZ(t), e.hasM(t));
        },
        exportExtent: function (e, t, s) {
          const i = e.hasZ(t),
            r = e.hasM(t),
            n = new u(e.getXMin(t), e.getYMin(t), e.getXMax(t), e.getYMax(t), s);
          if (i) {
            const s = e.getZExtent(t);
            (n.zmin = s.vmin), (n.zmax = s.vmax);
          }
          if (r) {
            const s = e.getMExtent(t);
            (n.mmin = s.vmin), (n.mmax = s.vmax);
          }
          return n;
        },
      };
      class r {
        constructor(e, t, s) {
          (this.x = e),
            (this.y = t),
            (this.spatialReference = s),
            (this.z = void 0),
            (this.m = void 0);
        }
      }
      class n {
        constructor(e, t, s, i) {
          (this.rings = e),
            (this.spatialReference = t),
            (this.hasZ = void 0),
            (this.hasM = void 0),
            s && (this.hasZ = s),
            i && (this.hasM = i);
        }
      }
      class a {
        constructor(e, t, s, i) {
          (this.paths = e),
            (this.spatialReference = t),
            (this.hasZ = void 0),
            (this.hasM = void 0),
            s && (this.hasZ = s),
            i && (this.hasM = i);
        }
      }
      class o {
        constructor(e, t, s, i) {
          (this.points = e),
            (this.spatialReference = t),
            (this.hasZ = void 0),
            (this.hasM = void 0),
            s && (this.hasZ = s),
            i && (this.hasM = i);
        }
      }
      class u {
        constructor(e, t, s, i, r) {
          (this.xmin = e),
            (this.ymin = t),
            (this.xmax = s),
            (this.ymax = i),
            (this.spatialReference = r),
            (this.zmin = void 0),
            (this.zmax = void 0),
            (this.mmin = void 0),
            (this.mmax = void 0);
        }
      }
    },
    3482: (e, t, s) => {
      'use strict';
      s.d(t, { b: () => p, g: () => c, o: () => d });
      var i,
        r,
        n,
        a = s(76506);
      let o;
      const u =
        null != (i = null == (r = a.g.esriConfig) ? void 0 : r.locale)
          ? i
          : null == (n = a.g.dojoConfig)
          ? void 0
          : n.locale;
      function l() {
        var e, t;
        return null != (e = null != u ? u : null == (t = a.g.navigator) ? void 0 : t.language)
          ? e
          : 'en';
      }
      function c() {
        return void 0 === o && (o = l()), o;
      }
      const h = [];
      function d(e) {
        return (
          h.push(e),
          {
            remove() {
              h.splice(h.indexOf(e), 1);
            },
          }
        );
      }
      const f = [];
      function p(e) {
        return (
          f.push(e),
          {
            remove() {
              h.splice(f.indexOf(e), 1);
            },
          }
        );
      }
      null == a.g.addEventListener ||
        a.g.addEventListener('languagechange', function () {
          const e = null != undefined ? undefined : l();
          o !== e &&
            ((o = e),
            [...f].forEach((t) => {
              t.call(null, e);
            }),
            [...h].forEach((t) => {
              t.call(null, e);
            }));
        });
    },
    24251: (e, t, s) => {
      'use strict';
      s.d(t, { a: () => y, c: () => h, p: () => p });
      var i = s(72334),
        r = s(77314),
        n = s(60947),
        a = s(35132);
      const o = [0, 0];
      function u(e, t) {
        if (!t) return null;
        if ('x' in t) {
          const s = { x: 0, y: 0 };
          return (
            ([s.x, s.y] = e(t.x, t.y, o)), null != t.z && (s.z = t.z), null != t.m && (s.m = t.m), s
          );
        }
        if ('xmin' in t) {
          const s = { xmin: 0, ymin: 0, xmax: 0, ymax: 0 };
          return (
            ([s.xmin, s.ymin] = e(t.xmin, t.ymin, o)),
            ([s.xmax, s.ymax] = e(t.xmax, t.ymax, o)),
            t.hasZ && ((s.zmin = t.zmin), (s.zmax = t.zmax), (s.hasZ = !0)),
            t.hasM && ((s.mmin = t.mmin), (s.mmax = t.mmax), (s.hasM = !0)),
            s
          );
        }
        return 'rings' in t
          ? { rings: l(t.rings, e), hasM: t.hasM, hasZ: t.hasZ }
          : 'paths' in t
          ? { paths: l(t.paths, e), hasM: t.hasM, hasZ: t.hasZ }
          : 'points' in t
          ? { points: c(t.points, e), hasM: t.hasM, hasZ: t.hasZ }
          : void 0;
      }
      function l(e, t) {
        const s = [];
        for (const i of e) s.push(c(i, t));
        return s;
      }
      function c(e, t) {
        const s = [];
        for (const i of e) {
          const e = t(i[0], i[1], [0, 0]);
          s.push(e), i.length > 2 && e.push(i[2]), i.length > 3 && e.push(i[3]);
        }
        return s;
      }
      async function h(e, t) {
        if (!t) return;
        const s = Array.isArray(e)
          ? e.map((e) => {
              var t;
              return null == (t = e.geometry) ? void 0 : t.spatialReference;
            })
          : [e];
        await (0, i.iQ)(s.map((e) => ({ source: e, dest: t })));
      }
      const d = u.bind(null, a.hG),
        f = u.bind(null, a.R6);
      function p(e, t, s) {
        return e
          ? (s || ((s = t), (t = e.spatialReference)),
            (0, n.j)(t) && (0, n.j)(s) && !(0, n.e)(t, s)
              ? (0, a.Q8)(t, s)
                ? (0, n.i)(s)
                  ? d(e)
                  : f(e)
                : (0, i.oj)(r.j, [e], t, s, null)[0]
              : e)
          : e;
      }
      const m = new (class {
        constructor() {
          (this._jobs = []), (this._timer = null), (this._process = this._process.bind(this));
        }
        async push(e, t, s) {
          if (!e || !e.length || !t || !s || (0, n.e)(t, s)) return e;
          const i = { geometries: e, inSpatialReference: t, outSpatialReference: s, resolve: null };
          return (
            this._jobs.push(i),
            new Promise((e) => {
              (i.resolve = e),
                null === this._timer && (this._timer = setTimeout(this._process, 10));
            })
          );
        }
        _process() {
          this._timer = null;
          const e = this._jobs.shift();
          if (!e) return;
          const { geometries: t, inSpatialReference: s, outSpatialReference: o, resolve: u } = e;
          (0, a.Q8)(s, o)
            ? (0, n.i)(o)
              ? u(t.map(d))
              : u(t.map(f))
            : u((0, i.oj)(r.j, t, s, o, null)),
            this._jobs.length > 0 && (this._timer = setTimeout(this._process, 10));
        }
      })();
      function y(e, t, s) {
        return m.push(e, t, s);
      }
    },
    98576: (e, t, s) => {
      'use strict';
      s.d(t, { q: () => a });
      var i,
        r,
        n = { exports: {} };
      (i = n),
        void 0 !==
          (r = (function () {
            function e(s, i, r, n, a) {
              for (; n > r; ) {
                if (n - r > 600) {
                  var o = n - r + 1,
                    u = i - r + 1,
                    l = Math.log(o),
                    c = 0.5 * Math.exp((2 * l) / 3),
                    h = 0.5 * Math.sqrt((l * c * (o - c)) / o) * (u - o / 2 < 0 ? -1 : 1);
                  e(
                    s,
                    i,
                    Math.max(r, Math.floor(i - (u * c) / o + h)),
                    Math.min(n, Math.floor(i + ((o - u) * c) / o + h)),
                    a,
                  );
                }
                var d = s[i],
                  f = r,
                  p = n;
                for (t(s, r, i), a(s[n], d) > 0 && t(s, r, n); f < p; ) {
                  for (t(s, f, p), f++, p--; a(s[f], d) < 0; ) f++;
                  for (; a(s[p], d) > 0; ) p--;
                }
                0 === a(s[r], d) ? t(s, r, p) : t(s, ++p, n),
                  p <= i && (r = p + 1),
                  i <= p && (n = p - 1);
              }
            }
            function t(e, t, s) {
              var i = e[t];
              (e[t] = e[s]), (e[s] = i);
            }
            function s(e, t) {
              return e < t ? -1 : e > t ? 1 : 0;
            }
            return function (t, i, r, n, a) {
              e(t, i, r || 0, n || t.length - 1, a || s);
            };
          })()) && (i.exports = r);
      var a = n.exports;
    },
    7176: (e, t, s) => {
      'use strict';
      s.d(t, {
        Q: () => x,
        a: () => R,
        b: () => m,
        c: () => T,
        d: () => G,
        e: () => Z,
        f: () => j,
        g: () => y,
        h: () => v,
        n: () => F,
        t: () => b,
      });
      var i = s(60991),
        r = s(21801),
        n = s(32422),
        a = s(60947),
        o = s(40267),
        u = s(85674),
        l = s(24251),
        c = s(57251),
        h = s(76506),
        d = s(53785),
        f = s(98380),
        p = s(95533);
      function m(e, t) {
        if (!e) return null;
        const s = t.featureAdapter,
          { startTimeField: i, endTimeField: r } = e;
        let n = Number.POSITIVE_INFINITY,
          a = Number.NEGATIVE_INFINITY;
        if (i && r)
          t.forEach((e) => {
            const t = s.getAttribute(e, i),
              o = s.getAttribute(e, r);
            null == t || isNaN(t) || (n = Math.min(n, t)),
              null == o || isNaN(o) || (a = Math.max(a, o));
          });
        else {
          const e = i || r;
          t.forEach((t) => {
            const i = s.getAttribute(t, e);
            null == i || isNaN(i) || ((n = Math.min(n, i)), (a = Math.max(a, i)));
          });
        }
        return { start: n, end: a };
      }
      function y(e, t, s) {
        if (!t || !e) return null;
        const { startTimeField: i, endTimeField: r } = e;
        if (!i && !r) return null;
        const { start: n, end: a } = t;
        return null === n && null === a
          ? null
          : void 0 === n && void 0 === a
          ? () => !1
          : i && r
          ? (function (e, t, s, i, r) {
              return null != i && null != r
                ? (n) => {
                    const a = e.getAttribute(n, t),
                      o = e.getAttribute(n, s);
                    return (null == a || a <= r) && (null == o || o >= i);
                  }
                : null != i
                ? (t) => {
                    const r = e.getAttribute(t, s);
                    return null == r || r >= i;
                  }
                : null != r
                ? (s) => {
                    const i = e.getAttribute(s, t);
                    return null == i || i <= r;
                  }
                : void 0;
            })(s, i, r, n, a)
          : (function (e, t, s, i) {
              return null != s && null != i && s === i
                ? (i) => e.getAttribute(i, t) === s
                : null != s && null != i
                ? (r) => {
                    const n = e.getAttribute(r, t);
                    return n >= s && n <= i;
                  }
                : null != s
                ? (i) => e.getAttribute(i, t) >= s
                : null != i
                ? (s) => e.getAttribute(s, t) <= i
                : void 0;
            })(s, i || r, n, a);
      }
      const g = new c.J({
          esriSRUnit_Meter: 'meters',
          esriSRUnit_Kilometer: 'kilometers',
          esriSRUnit_Foot: 'feet',
          esriSRUnit_StatuteMile: 'miles',
          esriSRUnit_NauticalMile: 'nautical-miles',
          esriSRUnit_USNauticalMile: 'us-nautical-miles',
        }),
        x = Object.freeze({}),
        _ = new u.a(),
        I = new u.a(),
        w = new u.a(),
        S = {
          esriGeometryPoint: o.f,
          esriGeometryPolyline: o.i,
          esriGeometryPolygon: o.j,
          esriGeometryMultipoint: o.k,
        };
      function b(e, t, s, i = e.hasZ, r = e.hasM) {
        const n = e.hasZ && i,
          a = e.hasM && r;
        if (s) {
          const u = (0, o.q)(w, t, e.hasZ, e.hasM, 'esriGeometryPoint', s, i, r);
          return (0, o.f)(u, n, a);
        }
        return (0, o.f)(t, n, a);
      }
      function R(e, t, s, i, r, n, a = t, u = s) {
        const l = t && a,
          c = s && u,
          h = i ? ('coords' in i ? i : i.geometry) : null;
        if (!h) return null;
        if (r) {
          let i = (0, o.h)(I, h, t, s, e, r, a, u);
          return n && (i = (0, o.q)(w, i, l, c, e, n)), S[e](i, l, c);
        }
        if (n) {
          const i = (0, o.q)(w, h, t, s, e, n, a, u);
          return S[e](i, l, c);
        }
        return (0, o.r)(_, h, t, s, a, u), S[e](_, l, c);
      }
      async function F(e, t, s) {
        const {
          outFields: i,
          orderByFields: r,
          groupByFieldsForStatistics: n,
          outStatistics: a,
        } = e;
        if (i) for (let e = 0; e < i.length; e++) i[e] = i[e].trim();
        if (r) for (let e = 0; e < r.length; e++) r[e] = r[e].trim();
        if (n) for (let e = 0; e < n.length; e++) n[e] = n[e].trim();
        if (a)
          for (let e = 0; e < a.length; e++)
            a[e].onStatisticField && (a[e].onStatisticField = a[e].onStatisticField.trim());
        return e.geometry && !e.outSR && (e.outSR = e.geometry.spatialReference), v(e, t, s);
      }
      async function v(e, t, i) {
        if (!e) return null;
        let { where: r } = e;
        if (
          ((e.where = r = r && r.trim()),
          (!r || /^1 *= *1$/.test(r) || (t && t === r)) && (e.where = null),
          !e.geometry)
        )
          return e;
        let o = await (async function (e) {
          const { geometry: t, distance: i, units: r } = e;
          if (null == i || 'vertexAttributes' in t) return t;
          const n = t.spatialReference,
            o = r ? g.fromJSON(r) : (0, d.z)(n),
            u =
              n && ((0, a.l)(n) || (0, a.i)(n))
                ? t
                : await (0, l.c)(n, a.W).then(() => (0, l.p)(t, a.W));
          return (
            await (async function () {
              return (
                await Promise.all([s.e(3361), s.e(3981)])
                  .then(s.bind(s, 43981))
                  .then(function (e) {
                    return e.g;
                  })
              ).geodesicBuffer;
            })()
          )(u.spatialReference, u, i, o);
        })(e);
        if (
          ((e.distance = 0), (e.units = null), 'esriSpatialRelEnvelopeIntersects' === e.spatialRel)
        ) {
          const { spatialReference: t } = e.geometry;
          (o = (0, f.e)(o)), (o.spatialReference = t);
        }
        (e.geometry = o), await (0, l.c)(o.spatialReference, i);
        const u = (await (0, p.aX)((0, n.im)(o)))[0];
        if ((0, h.b)(u)) throw x;
        const c = u.toJSON(),
          m = await (0, l.p)(c, c.spatialReference, i);
        if (!m) throw x;
        return (m.spatialReference = i), (e.geometry = m), e;
      }
      function T(e) {
        return e && A in e ? JSON.parse(JSON.stringify(e, Q)) : e;
      }
      const A = '_geVersion',
        Q = (e, t) => (e !== A ? t : void 0);
      function M(e, t) {
        return e ? (t ? 4 : 3) : t ? 3 : 2;
      }
      function N(e, t, s, i, r) {
        if (!e) return !1;
        const n = M(t, s),
          { coords: a, lengths: o } = e;
        let u = !1,
          l = 0;
        for (const e of o) (u = P(u, a, n, l, e, i, r)), (l += e * n);
        return u;
      }
      function P(e, t, s, i, r, n, a) {
        let o = e,
          u = i;
        for (let e = i, l = i + r * s; e < l; e += s) {
          (u = e + s), u === l && (u = i);
          const r = t[e],
            c = t[e + 1],
            h = t[u],
            d = t[u + 1];
          ((c < a && d >= a) || (d < a && c >= a)) &&
            r + ((a - c) / (d - c)) * (h - r) < n &&
            (o = !o);
        }
        return o;
      }
      const E = {
          esriSpatialRelIntersects: 'intersects',
          esriSpatialRelContains: 'contains',
          esriSpatialRelCrosses: 'crosses',
          esriSpatialRelDisjoint: 'disjoint',
          esriSpatialRelEnvelopeIntersects: 'intersects',
          esriSpatialRelIndexIntersects: null,
          esriSpatialRelOverlaps: 'overlaps',
          esriSpatialRelTouches: 'touches',
          esriSpatialRelWithin: 'within',
          esriSpatialRelRelation: null,
        },
        C = {
          esriSpatialRelIntersects: !0,
          esriSpatialRelContains: !0,
          esriSpatialRelWithin: !0,
          esriSpatialRelCrosses: !0,
          esriSpatialRelDisjoint: !0,
          esriSpatialRelTouches: !0,
          esriSpatialRelOverlaps: !0,
          esriSpatialRelEnvelopeIntersects: !0,
          esriSpatialRelIndexIntersects: !1,
          esriSpatialRelRelation: !1,
        },
        z = {
          esriGeometryPoint: !0,
          esriGeometryMultipoint: !0,
          esriGeometryPolyline: !0,
          esriGeometryPolygon: !0,
          esriGeometryEnvelope: !0,
        },
        V = {
          esriGeometryPoint: !0,
          esriGeometryMultipoint: !0,
          esriGeometryPolyline: !0,
          esriGeometryPolygon: !0,
          esriGeometryEnvelope: !1,
        };
      function G(e, t, i, a, l) {
        if (
          (0, n.oU)(t) &&
          'esriGeometryPoint' === i &&
          ('esriSpatialRelIntersects' === e || 'esriSpatialRelContains' === e)
        ) {
          const e = (0, o.e)(new u.a(), t, !1, !1);
          return Promise.resolve((t) =>
            (function (e, t, s, i) {
              return N(e, !1, !1, i.coords[0], i.coords[1]);
            })(e, 0, 0, t),
          );
        }
        if ((0, n.oU)(t) && 'esriGeometryMultipoint' === i) {
          const s = (0, o.e)(new u.a(), t, !1, !1);
          if ('esriSpatialRelContains' === e)
            return Promise.resolve((e) =>
              (function (e, t, s, i, r, n) {
                const a = M(r, n),
                  { coords: o, lengths: u } = i;
                if (!u) return !1;
                for (let t = 0, s = 0; t < u.length; t++, s += a)
                  if (!N(e, !1, !1, o[s], o[s + 1])) return !1;
                return !0;
              })(s, 0, 0, e, a, l),
            );
        }
        if (
          (0, n.YX)(t) &&
          'esriGeometryPoint' === i &&
          ('esriSpatialRelIntersects' === e || 'esriSpatialRelContains' === e)
        )
          return Promise.resolve((e) => (0, r.e)(t, R(i, a, l, e)));
        if ((0, n.YX)(t) && 'esriGeometryMultipoint' === i && 'esriSpatialRelContains' === e)
          return Promise.resolve((e) => (0, r.c)(t, R(i, a, l, e)));
        if ((0, n.YX)(t) && 'esriSpatialRelIntersects' === e) {
          const e = (function (e) {
            return 'mesh' === e ? r.b : (0, r.g)(e);
          })(i);
          return Promise.resolve((s) => e(t, R(i, a, l, s)));
        }
        return Promise.all([s.e(3361), s.e(3981)])
          .then(s.bind(s, 43981))
          .then(function (e) {
            return e.g;
          })
          .then((s) => {
            const r = s[E[e]].bind(null, t.spatialReference, t);
            return (e) => r(R(i, a, l, e));
          });
      }
      async function j(e, t, s) {
        const { spatialRel: r, geometry: o } = e;
        if (o) {
          if (!0 !== C[r])
            throw new i.Z(
              'feature-store:unsupported-query',
              'Unsupported query spatial relationship',
              { query: e },
            );
          if ((0, a.j)(o.spatialReference) && (0, a.j)(s)) {
            if (((u = o), !0 !== z[(0, n.Ji)(u)]))
              throw new i.Z('feature-store:unsupported-query', 'Unsupported query geometry type', {
                query: e,
              });
            if (
              !(function (e) {
                return !0 === V[e];
              })(t)
            )
              throw new i.Z('feature-store:unsupported-query', 'Unsupported layer geometry type', {
                query: e,
              });
            if (e.outSR) return (0, l.c)(e.geometry && e.geometry.spatialReference, e.outSR);
          }
        }
        var u;
      }
      function Z(e) {
        if ((0, n.YX)(e)) return !0;
        if ((0, n.oU)(e)) {
          for (const t of e.rings) {
            if (5 !== t.length) return !1;
            if (
              t[0][0] !== t[1][0] ||
              t[0][0] !== t[4][0] ||
              t[2][0] !== t[3][0] ||
              t[0][1] !== t[3][1] ||
              t[0][1] !== t[4][1] ||
              t[1][1] !== t[2][1]
            )
              return !1;
          }
          return !0;
        }
        return !1;
      }
    },
    20438: (e, t, s) => {
      'use strict';
      s.d(t, { a: () => n });
      var i = s(60217);
      s(40705);
      let r = null;
      async function n(e) {
        const t = e.field,
          s = e.normalizationField,
          n = e.valueExpression;
        let a = [];
        if (n) {
          if (!r) {
            const { arcadeUtils: e } = await (0, i.l)();
            r = e;
          }
          a = r.extractFieldNames(n);
        }
        return t && a.push(t), s && a.push(s), a;
      }
    },
  },
]);
