(self.webpackChunkRemoteClient = self.webpackChunkRemoteClient || []).push([
  [5107, 2058],
  {
    5107: (e, t, n) => {
      'use strict';
      n.r(t), n.d(t, { default: () => A });
      var r = n(76506),
        o = n(35861),
        i = n(82426),
        s = n(56697),
        a = n(72334),
        u = n(60947),
        c = n(15206),
        l = n(35491),
        f = n(23884),
        d = n(60991);
      function h(e, t, n) {
        return {
          identifier: String.fromCharCode.apply(null, new Uint8Array(e, n + 0, 10)),
          version: t.getUint16(n + 10, !0),
          checksum: t.getUint32(n + 12, !0),
        };
      }
      function m(e, t, n) {
        const r = [];
        t = p(e, t, r);
        const o = [];
        for (let i = 0; i < r.length; i++) {
          (o.length = 0), (t = p(e, t, o));
          for (let e = 0; e < o.length; e++) n.push(o[e] + r[i]);
        }
        return t;
      }
      function p(e, t, n) {
        const r = new DataView(e, t),
          o = r.getUint8(0),
          i = 31 & o,
          s = !!(32 & o),
          a = (192 & o) >> 6;
        let u = 0;
        if (0 === a) (u = r.getUint32(1, !0)), (t += 5);
        else if (1 === a) (u = r.getUint16(1, !0)), (t += 3);
        else {
          if (2 !== a) throw new d.Z('lepcc-decode-error', 'Bad count type');
          (u = r.getUint8(1)), (t += 2);
        }
        if (s) throw new d.Z('lepcc-decode-error', 'LUT not implemented');
        const c = Math.ceil((u * i) / 8),
          l = new Uint8Array(e, t, c);
        let f = 0,
          h = 0,
          m = 0;
        const p = -1 >>> (32 - i);
        for (let e = 0; e < u; e++) {
          for (; h < i; ) (f |= l[m] << h), (h += 8), (m += 1);
          (n[e] = f & p), (f >>>= i), (h -= i), h + i > 32 && (f |= l[m - 1] >> (8 - h));
        }
        return t + m;
      }
      const b = n(92143).L.getLogger('esri.views.3d.layers.i3s.I3SBinaryReader');
      function y(e, t, n) {
        let r = '',
          o = 0;
        for (; o < n; ) {
          const i = e[t + o];
          if (i < 128) (r += String.fromCharCode(i)), o++;
          else if (i >= 192 && i < 224) {
            if (o + 1 >= n)
              throw new d.Z(
                'utf8-decode-error',
                'UTF-8 Decode failed. Two byte character was truncated.',
              );
            const s = ((31 & i) << 6) | (63 & e[t + o + 1]);
            (r += String.fromCharCode(s)), (o += 2);
          } else if (i >= 224 && i < 240) {
            if (o + 2 >= n)
              throw new d.Z(
                'utf8-decode-error',
                'UTF-8 Decode failed. Multi byte character was truncated.',
              );
            const s = ((15 & i) << 12) | ((63 & e[t + o + 1]) << 6) | (63 & e[t + o + 2]);
            (r += String.fromCharCode(s)), (o += 3);
          } else {
            if (!(i >= 240 && i < 248))
              throw new d.Z(
                'utf8-decode-error',
                'UTF-8 Decode failed. Invalid multi byte sequence.',
              );
            {
              if (o + 3 >= n)
                throw new d.Z(
                  'utf8-decode-error',
                  'UTF-8 Decode failed. Multi byte character was truncated.',
                );
              const s =
                ((7 & i) << 18) |
                ((63 & e[t + o + 1]) << 12) |
                ((63 & e[t + o + 2]) << 6) |
                (63 & e[t + o + 3]);
              if (s >= 65536) {
                const e = 55296 + ((s - 65536) >> 10),
                  t = 56320 + (1023 & s);
                r += String.fromCharCode(e, t);
              } else r += String.fromCharCode(s);
              o += 4;
            }
          }
        }
        return r;
      }
      function w(e, t) {
        const n = { byteOffset: 0, byteCount: 0, fields: Object.create(null) };
        let r = 0;
        for (let o = 0; o < t.length; o++) {
          const i = t[o],
            s = i.valueType || i.type,
            a = q[s];
          (n.fields[i.property] = a(e, r)), (r += v[s].BYTES_PER_ELEMENT);
        }
        return (n.byteCount = r), n;
      }
      function g(e, t) {
        return new (0, v[t.valueType])(e, t.byteOffset, t.count * t.valuesPerElement);
      }
      function M(e, t, n) {
        if ((t !== e && b.error(`Invalid ${n} buffer size\n expected: ${e}, actual: ${t})`), t < e))
          throw new d.Z('buffer-too-small', 'Binary buffer is too small', {
            expectedSize: e,
            actualSize: t,
          });
      }
      const U = {
        position: 'position',
        normal: 'normal',
        color: 'color',
        uv0: 'uv0',
        region: 'uvRegion',
      };
      const v = {
          Float32: Float32Array,
          Float64: Float64Array,
          UInt8: Uint8Array,
          Int8: Int8Array,
          UInt16: Uint16Array,
          Int16: Int16Array,
          UInt32: Uint32Array,
          Int32: Int32Array,
        },
        q = {
          Float32: (e, t) => new DataView(e, 0).getFloat32(t, !0),
          Float64: (e, t) => new DataView(e, 0).getFloat64(t, !0),
          UInt8: (e, t) => new DataView(e, 0).getUint8(t),
          Int8: (e, t) => new DataView(e, 0).getInt8(t),
          UInt16: (e, t) => new DataView(e, 0).getUint16(t, !0),
          Int16: (e, t) => new DataView(e, 0).getInt16(t, !0),
          UInt32: (e, t) => new DataView(e, 0).getUint32(t, !0),
          Int32: (e, t) => new DataView(e, 0).getInt32(t, !0),
        };
      function C(e) {
        return v.hasOwnProperty(e);
      }
      function S(e) {
        return C(e) ? v[e].BYTES_PER_ELEMENT : 0;
      }
      function O(e, t, n) {
        return (0, r.i)(e) && e.attributeInfo.useElevation
          ? (function (e, t) {
              const n = new Float64Array(t);
              for (let r = 0; r < t; r++) n[r] = e[3 * r + 2];
              return n;
            })(t, n)
          : (0, r.i)(e)
          ? (function (e, t, n) {
              if ('lepcc-rgb' === e.encoding)
                return (function (e) {
                  const t = new DataView(e, 0);
                  let n = 0;
                  const { identifier: r, version: o } = h(e, t, n);
                  if (((n += 16), 'ClusterRGB' !== r))
                    throw new d.Z('lepcc-decode-error', 'Bad identifier');
                  if (o > 1) throw new d.Z('lepcc-decode-error', 'Unknown version');
                  const i = (function (e, t) {
                    return {
                      sizeLo: e.getUint32(t + 0, !0),
                      sizeHi: e.getUint32(t + 4, !0),
                      count: e.getUint32(t + 8, !0),
                      colorMapCount: e.getUint16(t + 12, !0),
                      lookupMethod: e.getUint8(t + 14),
                      compressionMethod: e.getUint8(t + 15),
                    };
                  })(t, n);
                  if (((n += 16), i.sizeHi * 2 ** 32 + i.sizeLo !== e.byteLength))
                    throw new d.Z('lepcc-decode-error', 'Bad size');
                  if ((2 === i.lookupMethod || 1 === i.lookupMethod) && 0 === i.compressionMethod) {
                    if (3 * i.colorMapCount + i.count + n !== e.byteLength || i.colorMapCount > 256)
                      throw new d.Z('lepcc-decode-error', 'Bad count');
                    const t = new Uint8Array(e, n, 3 * i.colorMapCount),
                      r = new Uint8Array(e, n + 3 * i.colorMapCount, i.count),
                      o = new Uint8Array(3 * i.count);
                    for (let e = 0; e < i.count; e++) {
                      const n = r[e];
                      (o[3 * e] = t[3 * n]),
                        (o[3 * e + 1] = t[3 * n + 1]),
                        (o[3 * e + 2] = t[3 * n + 2]);
                    }
                    return o;
                  }
                  if (0 === i.lookupMethod && 0 === i.compressionMethod) {
                    if (3 * i.count + n !== e.byteLength || 0 !== i.colorMapCount)
                      throw new d.Z('lepcc-decode-error', 'Bad count');
                    return new Uint8Array(e, n).slice();
                  }
                  if (i.lookupMethod <= 2 && 1 === i.compressionMethod) {
                    if (n + 3 !== e.byteLength || 1 !== i.colorMapCount)
                      throw new d.Z('lepcc-decode-error', 'Bad count');
                    const r = t.getUint8(n),
                      o = t.getUint8(n + 1),
                      s = t.getUint8(n + 2),
                      a = new Uint8Array(3 * i.count);
                    for (let e = 0; e < i.count; e++)
                      (a[3 * e] = r), (a[3 * e + 1] = o), (a[3 * e + 2] = s);
                    return a;
                  }
                  throw new d.Z(
                    'lepcc-decode-error',
                    'Bad method ' + i.lookupMethod + ',' + i.compressionMethod,
                  );
                })(t);
              if ('lepcc-intensity' === e.encoding)
                return (function (e) {
                  const t = new DataView(e, 0);
                  let n = 0;
                  const { identifier: r, version: o } = h(e, t, n);
                  if (((n += 16), 'Intensity ' !== r))
                    throw new d.Z('lepcc-decode-error', 'Bad identifier');
                  if (o > 1) throw new d.Z('lepcc-decode-error', 'Unknown version');
                  const i = (function (e, t) {
                    return {
                      sizeLo: e.getUint32(t + 0, !0),
                      sizeHi: e.getUint32(t + 4, !0),
                      count: e.getUint32(t + 8, !0),
                      scaleFactor: e.getUint16(t + 12, !0),
                      bitsPerPoint: e.getUint8(t + 14),
                      reserved: e.getUint8(t + 15),
                    };
                  })(t, n);
                  if (((n += 16), i.sizeHi * 2 ** 32 + i.sizeLo !== e.byteLength))
                    throw new d.Z('lepcc-decode-error', 'Bad size');
                  const s = new Uint16Array(i.count);
                  if (8 === i.bitsPerPoint) {
                    if (i.count + n !== e.byteLength)
                      throw new d.Z('lepcc-decode-error', 'Bad size');
                    const t = new Uint8Array(e, n, i.count);
                    for (let e = 0; e < i.count; e++) s[e] = t[e] * i.scaleFactor;
                  } else if (16 === i.bitsPerPoint) {
                    if (2 * i.count + n !== e.byteLength)
                      throw new d.Z('lepcc-decode-error', 'Bad size');
                    const t = new Uint16Array(e, n, i.count);
                    for (let e = 0; e < i.count; e++) s[e] = t[e] * i.scaleFactor;
                  } else {
                    const t = [];
                    if (p(e, n, t) !== e.byteLength)
                      throw new d.Z('lepcc-decode-error', 'Bad size');
                    for (let e = 0; e < i.count; e++) s[e] = t[e] * i.scaleFactor;
                  }
                  return s;
                })(t);
              if (null != e.encoding && '' !== e.encoding)
                throw new d.Z(
                  'unknown-attribute-storage-info-encoding',
                  'Unknown Attribute Storage Info Encoding',
                );
              e['attributeByteCounts '] &&
                !e.attributeByteCounts &&
                (b.warn("Warning: Trailing space in 'attributeByteCounts '."),
                (e.attributeByteCounts = e['attributeByteCounts '])),
                'ObjectIds' === e.ordering[0] &&
                  e.hasOwnProperty('objectIds') &&
                  (b.warn('Warning: Case error in objectIds'), (e.ordering[0] = 'objectIds'));
              const o = (function (e, t, n) {
                const o =
                    null != t.header
                      ? w(e, t.header)
                      : { byteOffset: 0, byteCount: 0, fields: { count: n } },
                  i = {
                    header: o,
                    byteOffset: o.byteCount,
                    byteCount: 0,
                    entries: Object.create(null),
                  };
                let s = o.byteCount;
                for (let e = 0; e < t.ordering.length; e++) {
                  const n = t.ordering[e],
                    a = (0, r.d9)(t[n]);
                  if (((a.count = o.fields.count), 'String' === a.valueType)) {
                    if (
                      ((a.byteOffset = s),
                      (a.byteCount = o.fields[n + 'ByteCount']),
                      'UTF-8' !== a.encoding)
                    )
                      throw new d.Z('unsupported-encoding', 'Unsupported String encoding.', {
                        encoding: a.encoding,
                      });
                  } else {
                    if (!C(a.valueType))
                      throw new d.Z('unsupported-value-type', 'Unsupported binary valueType', {
                        valueType: a.valueType,
                      });
                    {
                      const e = S(a.valueType);
                      (s += s % e != 0 ? e - (s % e) : 0),
                        (a.byteOffset = s),
                        (a.byteCount = e * a.valuesPerElement * a.count);
                    }
                  }
                  (s += a.byteCount), (i.entries[n] = a);
                }
                return (i.byteCount = s - i.byteOffset), i;
              })(t, e, n);
              M(o.byteOffset + o.byteCount, t.byteLength, 'attribute');
              const i = o.entries.attributeValues || o.entries.objectIds;
              if (i) {
                if ('String' === i.valueType) {
                  const e = o.entries.attributeByteCounts,
                    n = g(t, e),
                    r = (function (e, t) {
                      return new Uint8Array(e, t.byteOffset, t.byteCount);
                    })(t, i);
                  return (function (e, t, n) {
                    const r = [];
                    let o,
                      i,
                      s = 0;
                    for (i = 0; i < e; i += 1) {
                      if (((o = t[i]), o > 0)) {
                        if ((r.push(y(n, s, o - 1)), 0 !== n[s + o - 1]))
                          throw new d.Z(
                            'string-array-error',
                            'Invalid string array: missing null termination.',
                          );
                      } else r.push(null);
                      s += o;
                    }
                    return r;
                  })(e.count, n, r);
                }
                return g(t, i);
              }
              throw new d.Z(
                'bad-attribute-storage-info',
                'Bad attributeStorageInfo specification.',
              );
            })(e.attributeInfo.storageInfo, e.buffer, n)
          : null;
      }
      function T(e) {
        return null == e || 'none' === e
          ? null
          : 'low-four-bit' === e
          ? (e) => 15 & e
          : 'high-four-bit' === e
          ? (e) => (240 & e) >> 4
          : 'absolute-value' === e
          ? (e) => Math.abs(e)
          : 'modulo-ten' === e
          ? (e) => e % 10
          : null;
      }
      function k(e) {
        let t = 0;
        for (const n of e || []) t |= 1 << n;
        return t;
      }
      n(7200),
        n(31450),
        n(71552),
        n(40642),
        n(81172),
        n(50406),
        n(53785),
        n(57251),
        n(95587),
        n(89623),
        n(65775),
        n(21801),
        n(34250),
        n(91306),
        n(86656),
        n(22723),
        n(17533),
        n(73796),
        n(74673),
        n(21972),
        n(23639),
        n(91055),
        n(27794),
        n(6906),
        n(26341),
        n(97714),
        n(2906),
        n(91597),
        n(86787),
        n(35132),
        n(84069),
        n(12381),
        n(73173),
        n(82058),
        n(88762),
        n(32101),
        n(44567),
        n(98380),
        n(92896),
        n(92482),
        n(92624),
        n(59465),
        n(60158),
        n(17035),
        n(51669),
        n(48027),
        n(54174),
        n(6090);
      class I {
        transform(e) {
          const t = this._transform(e),
            n = [t.points.buffer, t.rgb.buffer];
          (0, r.i)(t.pointIdFilterMap) && n.push(t.pointIdFilterMap.buffer);
          for (const e of t.attributes)
            'buffer' in e.values &&
              (0, r.A)(e.values.buffer) &&
              e.values.buffer !== t.rgb.buffer &&
              n.push(e.values.buffer);
          return Promise.resolve({ result: t, transferList: n });
        }
        _transform(e) {
          const t = (function (e, t) {
            if (null == e.encoding || '' === e.encoding) {
              const n = (function (e, t) {
                const n = w(e, t && t.header);
                let r = n.byteCount;
                const o = {
                    isDraco: !1,
                    header: n,
                    byteOffset: n.byteCount,
                    byteCount: 0,
                    vertexAttributes: {},
                  },
                  i = n.fields,
                  s = null != i.vertexCount ? i.vertexCount : i.count;
                for (const e of t.ordering) {
                  if (!t.vertexAttributes[e]) continue;
                  const n = { ...t.vertexAttributes[e], byteOffset: r, count: s },
                    i = U[e] ? U[e] : '_' + e;
                  (o.vertexAttributes[i] = n), (r += S(n.valueType) * n.valuesPerElement * s);
                }
                const a = i.faceCount;
                if (t.faces && a) {
                  o.faces = {};
                  for (const e of t.ordering) {
                    if (!t.faces[e]) continue;
                    const n = { ...t.faces[e], byteOffset: r, count: a };
                    (o.faces[e] = n), (r += S(n.valueType) * n.valuesPerElement * a);
                  }
                }
                const u = i.featureCount;
                if (t.featureAttributes && t.featureAttributeOrder && u) {
                  o.featureAttributes = {};
                  for (const e of t.featureAttributeOrder) {
                    if (!t.featureAttributes[e]) continue;
                    const n = { ...t.featureAttributes[e], byteOffset: r, count: u };
                    (o.featureAttributes[e] = n),
                      (r +=
                        ('UInt64' === n.valueType ? 8 : S(n.valueType)) * n.valuesPerElement * u);
                  }
                }
                return M(r, e.byteLength, 'geometry'), (o.byteCount = r - o.byteOffset), o;
              })(t, e);
              if ((0, r.b)(n.vertexAttributes.position)) return;
              const o = g(t, n.vertexAttributes.position),
                i = n.header.fields,
                s = [i.offsetX, i.offsetY, i.offsetZ],
                a = [i.scaleX, i.scaleY, i.scaleZ],
                u = o.length / 3,
                c = new Float64Array(3 * u);
              for (let e = 0; e < u; e++)
                (c[3 * e] = o[3 * e] * a[0] + s[0]),
                  (c[3 * e + 1] = o[3 * e + 1] * a[1] + s[1]),
                  (c[3 * e + 2] = o[3 * e + 2] * a[2] + s[2]);
              return c;
            }
            if ('lepcc-xyz' === e.encoding)
              return (function (e) {
                const t = new DataView(e, 0);
                let n = 0;
                const { identifier: r, version: o } = h(e, t, n);
                if (((n += 16), 'LEPCC     ' !== r))
                  throw new d.Z('lepcc-decode-error', 'Bad identifier');
                if (o > 1) throw new d.Z('lepcc-decode-error', 'Unknown version');
                const i = (function (e, t) {
                  return {
                    sizeLo: e.getUint32(t + 0, !0),
                    sizeHi: e.getUint32(t + 4, !0),
                    minX: e.getFloat64(t + 8, !0),
                    minY: e.getFloat64(t + 16, !0),
                    minZ: e.getFloat64(t + 24, !0),
                    maxX: e.getFloat64(t + 32, !0),
                    maxY: e.getFloat64(t + 40, !0),
                    maxZ: e.getFloat64(t + 48, !0),
                    errorX: e.getFloat64(t + 56, !0),
                    errorY: e.getFloat64(t + 64, !0),
                    errorZ: e.getFloat64(t + 72, !0),
                    count: e.getUint32(t + 80, !0),
                    reserved: e.getUint32(t + 84, !0),
                  };
                })(t, n);
                if (((n += 88), i.sizeHi * 2 ** 32 + i.sizeLo !== e.byteLength))
                  throw new d.Z('lepcc-decode-error', 'Bad size');
                const s = new Float64Array(3 * i.count),
                  a = [],
                  u = [],
                  c = [],
                  l = [];
                if (
                  ((n = m(e, n, a)),
                  (n = m(e, n, u)),
                  (n = m(e, n, c)),
                  (n = m(e, n, l)),
                  n !== e.byteLength)
                )
                  throw new d.Z('lepcc-decode-error', 'Bad length');
                let f = 0,
                  p = 0;
                for (let e = 0; e < a.length; e++) {
                  p += a[e];
                  let t = 0;
                  for (let n = 0; n < u[e]; n++) {
                    t += c[f];
                    const e = l[f];
                    (s[3 * f] = Math.min(i.maxX, i.minX + 2 * i.errorX * t)),
                      (s[3 * f + 1] = Math.min(i.maxY, i.minY + 2 * i.errorY * p)),
                      (s[3 * f + 2] = Math.min(i.maxZ, i.minZ + 2 * i.errorZ * e)),
                      f++;
                  }
                }
                return { errorX: i.errorX, errorY: i.errorY, errorZ: i.errorZ, result: s };
              })(t).result;
          })(e.schema, e.geometryBuffer);
          let n = t.length / 3,
            o = null;
          const i = [],
            s = O(e.primaryAttributeData, t, n);
          (0, r.i)(e.primaryAttributeData) &&
            s &&
            i.push({ attributeInfo: e.primaryAttributeData.attributeInfo, values: s });
          const a = O(e.modulationAttributeData, t, n);
          (0, r.i)(e.modulationAttributeData) &&
            a &&
            i.push({ attributeInfo: e.modulationAttributeData.attributeInfo, values: a });
          let p = (function (e, t, n, r) {
            const { rendererJSON: o, isRGBRenderer: i } = e;
            let s = null,
              a = null;
            if (t && i) s = t;
            else if (t && 'pointCloudUniqueValueRenderer' === o.type) {
              a = f.Z.fromJSON(o);
              const e = a.colorUniqueValueInfos;
              s = new Uint8Array(3 * r);
              const n = T(a.fieldTransformType);
              for (let o = 0; o < r; o++) {
                const r = (n ? n(t[o]) : t[o]) + '';
                for (let t = 0; t < e.length; t++)
                  if (e[t].values.indexOf(r) >= 0) {
                    (s[3 * o] = e[t].color.r),
                      (s[3 * o + 1] = e[t].color.g),
                      (s[3 * o + 2] = e[t].color.b);
                    break;
                  }
              }
            } else if (t && 'pointCloudStretchRenderer' === o.type) {
              a = l.Z.fromJSON(o);
              const e = a.stops;
              s = new Uint8Array(3 * r);
              const n = T(a.fieldTransformType);
              for (let o = 0; o < r; o++) {
                const r = n ? n(t[o]) : t[o],
                  i = e.length - 1;
                if (r < e[0].value)
                  (s[3 * o] = e[0].color.r),
                    (s[3 * o + 1] = e[0].color.g),
                    (s[3 * o + 2] = e[0].color.b);
                else if (r >= e[i].value)
                  (s[3 * o] = e[i].color.r),
                    (s[3 * o + 1] = e[i].color.g),
                    (s[3 * o + 2] = e[i].color.b);
                else
                  for (let t = 1; t < e.length; t++)
                    if (r < e[t].value) {
                      const n = (r - e[t - 1].value) / (e[t].value - e[t - 1].value);
                      (s[3 * o] = e[t].color.r * n + e[t - 1].color.r * (1 - n)),
                        (s[3 * o + 1] = e[t].color.g * n + e[t - 1].color.g * (1 - n)),
                        (s[3 * o + 2] = e[t].color.b * n + e[t - 1].color.b * (1 - n));
                      break;
                    }
              }
            } else if (t && 'pointCloudClassBreaksRenderer' === o.type) {
              a = c.Z.fromJSON(o);
              const e = a.colorClassBreakInfos;
              s = new Uint8Array(3 * r);
              const n = T(a.fieldTransformType);
              for (let o = 0; o < r; o++) {
                const r = n ? n(t[o]) : t[o];
                for (let t = 0; t < e.length; t++)
                  if (r >= e[t].minValue && r <= e[t].maxValue) {
                    (s[3 * o] = e[t].color.r),
                      (s[3 * o + 1] = e[t].color.g),
                      (s[3 * o + 2] = e[t].color.b);
                    break;
                  }
              }
            } else {
              s = new Uint8Array(3 * r);
              for (let e = 0; e < s.length; e++) s[e] = 255;
            }
            if (n && a && a.colorModulation) {
              const e = a.colorModulation.minValue,
                t = a.colorModulation.maxValue,
                o = 0.3;
              for (let i = 0; i < r; i++) {
                const r = n[i],
                  a = r >= t ? 1 : r <= e ? o : o + ((1 - o) * (r - e)) / (t - e);
                (s[3 * i] = a * s[3 * i]),
                  (s[3 * i + 1] = a * s[3 * i + 1]),
                  (s[3 * i + 2] = a * s[3 * i + 2]);
              }
            }
            return s;
          })(e.rendererInfo, s, a, n);
          if (e.filterInfo && e.filterInfo.length > 0 && (0, r.i)(e.filterAttributesData)) {
            const r = e.filterAttributesData.map((e) => {
              const r = O(e, t, n),
                o = { attributeInfo: e.attributeInfo, values: r };
              return i.push(o), o;
            });
            (o = new Uint32Array(n)),
              (n = (function (e, t, n, r, o) {
                const i = e.length / 3;
                let s = 0;
                for (let a = 0; a < i; a++) {
                  let i = !0;
                  for (let e = 0; e < r.length && i; e++) {
                    const { filterJSON: t } = r[e],
                      n = o[e].values[a];
                    switch (t.type) {
                      case 'pointCloudValueFilter': {
                        const e = 'exclude' === t.mode;
                        (-1 !== t.values.indexOf(n)) === e && (i = !1);
                        break;
                      }
                      case 'pointCloudBitfieldFilter': {
                        const e = k(t.requiredSetBits),
                          r = k(t.requiredClearBits);
                        ((n & e) === e && 0 == (n & r)) || (i = !1);
                        break;
                      }
                      case 'pointCloudReturnFilter': {
                        const e = 15 & n,
                          r = (n >>> 4) & 15,
                          o = r > 1,
                          s = 1 === e,
                          a = e === r;
                        let u = !1;
                        for (const e of t.includedReturns)
                          if (
                            ('last' === e && a) ||
                            ('firstOfMany' === e && s && o) ||
                            ('lastOfMany' === e && a && o) ||
                            ('single' === e && !o)
                          ) {
                            u = !0;
                            break;
                          }
                        u || (i = !1);
                        break;
                      }
                    }
                  }
                  i &&
                    ((n[s] = a),
                    (e[3 * s] = e[3 * a]),
                    (e[3 * s + 1] = e[3 * a + 1]),
                    (e[3 * s + 2] = e[3 * a + 2]),
                    (t[3 * s] = t[3 * a]),
                    (t[3 * s + 1] = t[3 * a + 1]),
                    (t[3 * s + 2] = t[3 * a + 2]),
                    s++);
                }
                return s;
              })(t, p, o, e.filterInfo, r));
          }
          for (const r of e.userAttributesData) {
            const e = O(r, t, n);
            i.push({ attributeInfo: r.attributeInfo, values: e });
          }
          3 * n < p.length && (p = new Uint8Array(p.buffer.slice(0, 3 * n))),
            this._applyElevationOffsetInPlace(t, n, e.elevationOffset);
          const b = this._transformCoordinates(
            t,
            n,
            e.obb,
            u.Z.fromJSON(e.inSR),
            u.Z.fromJSON(e.outSR),
          );
          return { obb: e.obb, points: b, rgb: p, attributes: i, pointIdFilterMap: o };
        }
        _transformCoordinates(e, t, n, r, u) {
          if (!(0, a.CM)(e, r, 0, e, u, 0, t)) throw Error("Can't reproject");
          const c = (0, s.f)(n.center[0], n.center[1], n.center[2]),
            l = (0, s.c)(),
            f = (0, s.c)();
          (0, o.c)(x, n.quaternion);
          const d = new Float32Array(3 * t);
          for (let r = 0; r < t; r++)
            (l[0] = e[3 * r] - c[0]),
              (l[1] = e[3 * r + 1] - c[1]),
              (l[2] = e[3 * r + 2] - c[2]),
              (0, i.C)(f, l, x),
              (n.halfSize[0] = Math.max(n.halfSize[0], Math.abs(f[0]))),
              (n.halfSize[1] = Math.max(n.halfSize[1], Math.abs(f[1]))),
              (n.halfSize[2] = Math.max(n.halfSize[2], Math.abs(f[2]))),
              (d[3 * r] = l[0]),
              (d[3 * r + 1] = l[1]),
              (d[3 * r + 2] = l[2]);
          return d;
        }
        _applyElevationOffsetInPlace(e, t, n) {
          if (0 !== n) for (let r = 0; r < t; r++) e[3 * r + 2] += n;
        }
      }
      const x = (function () {
          const e = new Float32Array(4);
          return (e[3] = 1), e;
        })(),
        A = function () {
          return new I();
        };
    },
    92482: (e, t, n) => {
      'use strict';
      n.d(t, {
        N: () => f,
        a: () => o,
        d: () => c,
        f: () => i,
        m: () => l,
        p: () => s,
        t: () => a,
        x: () => u,
      }),
        n(76506);
      var r = n(21801);
      function o(e = d) {
        return [e[0], e[1], e[2], e[3]];
      }
      function i(e, t, n, r, i = o()) {
        return (i[0] = e), (i[1] = t), (i[2] = n), (i[3] = r), i;
      }
      function s(e, t = o()) {
        return (t[0] = e.xmin), (t[1] = e.ymin), (t[2] = e.xmax), (t[3] = e.ymax), t;
      }
      function a(e, t) {
        return new r.Z({ xmin: e[0], ymin: e[1], xmax: e[2], ymax: e[3], spatialReference: t });
      }
      function u(e) {
        return (
          (function (e) {
            return e[0] >= e[2] ? 0 : e[2] - e[0];
          })(e) *
          (function (e) {
            return e[1] >= e[3] ? 0 : e[3] - e[1];
          })(e)
        );
      }
      function c(e, t) {
        return (
          Math.max(t[0], e[0]) <= Math.min(t[2], e[2]) &&
          Math.max(t[1], e[1]) <= Math.min(t[3], e[3])
        );
      }
      function l(e, t) {
        return t[0] >= e[0] && t[2] <= e[2] && t[1] >= e[1] && t[3] <= e[3];
      }
      const f = [1 / 0, 1 / 0, -1 / 0, -1 / 0],
        d = [0, 0, 0, 0];
    },
    73173: (e, t, n) => {
      'use strict';
      n.d(t, { g: () => u });
      var r = n(31450),
        o = (n(82058), n(60991)),
        i = n(92143),
        s = n(32101);
      const a = i.L.getLogger('esri.assets');
      function u(e) {
        if (!r.Z.assetsPath)
          throw (
            (a.errorOnce(
              'The API assets location needs to be set using config.assetsPath. More information: https://arcg.is/1OzLe50',
            ),
            new o.Z('assets:path-not-set', 'config.assetsPath is not set'))
          );
        return (0, s.v_)(r.Z.assetsPath, e);
      }
    },
    59465: (e, t, n) => {
      'use strict';
      n.d(t, { e: () => i });
      var r = n(57251),
        o = n(34250);
      function i(e, t = {}) {
        var n;
        const i = e instanceof r.J ? e : new r.J(e, t),
          s = {
            type: null == (n = null == t ? void 0 : t.ignoreUnknown) || n ? i.apiValues : String,
            readOnly: null == t ? void 0 : t.readOnly,
            json: {
              type: i.jsonValues,
              read: (null == t || !t.readOnly) && { reader: i.read },
              write: { writer: i.write },
            },
          };
        return (
          void 0 !== (null == t ? void 0 : t.default) && (s.json.default = t.default),
          void 0 !== (null == t ? void 0 : t.name) && (s.json.name = t.name),
          (0, o.Cb)(s)
        );
      }
    },
    82426: (e, t, n) => {
      'use strict';
      function r() {
        return [0, 0, 0];
      }
      function o(e) {
        return [e[0], e[1], e[2]];
      }
      function i(e, t, n) {
        return [e, t, n];
      }
      function s(e) {
        const t = [0, 0, 0],
          n = Math.min(3, e.length);
        for (let r = 0; r < n; ++r) t[r] = e[r];
        return t;
      }
      function a(e, t) {
        return new Float64Array(e, t, 3);
      }
      n.d(t, {
        A: () => v,
        B: () => Q,
        C: () => I,
        D: () => B,
        E: () => l,
        G: () => N,
        H: () => V,
        I: () => H,
        O: () => c,
        R: () => f,
        S: () => X,
        T: () => s,
        Z: () => u,
        a: () => S,
        a4: () => w,
        a6: () => Y,
        aa: () => j,
        b: () => r,
        c: () => G,
        d: () => C,
        e: () => m,
        f: () => g,
        g: () => p,
        h: () => O,
        i: () => W,
        j: () => h,
        k: () => $,
        l: () => d,
        m: () => K,
        n: () => q,
        o: () => U,
        p: () => i,
        r: () => J,
        s: () => b,
        t: () => T,
        u: () => o,
        w: () => M,
        x: () => k,
        y: () => a,
        z: () => E,
      });
      const u = [0, 0, 0],
        c = i(1, 1, 1),
        l = 1e-6,
        f = Math.random;
      function d(e) {
        const t = e[0],
          n = e[1],
          r = e[2];
        return Math.sqrt(t * t + n * n + r * r);
      }
      function h(e, t) {
        return (e[0] = t[0]), (e[1] = t[1]), (e[2] = t[2]), e;
      }
      function m(e, t, n, r) {
        return (e[0] = t), (e[1] = n), (e[2] = r), e;
      }
      function p(e, t, n) {
        return (e[0] = t[0] + n[0]), (e[1] = t[1] + n[1]), (e[2] = t[2] + n[2]), e;
      }
      function b(e, t, n) {
        return (e[0] = t[0] - n[0]), (e[1] = t[1] - n[1]), (e[2] = t[2] - n[2]), e;
      }
      function y(e, t, n) {
        return (e[0] = t[0] * n[0]), (e[1] = t[1] * n[1]), (e[2] = t[2] * n[2]), e;
      }
      function w(e, t, n) {
        return (e[0] = t[0] / n[0]), (e[1] = t[1] / n[1]), (e[2] = t[2] / n[2]), e;
      }
      function g(e, t, n) {
        return (e[0] = t[0] * n), (e[1] = t[1] * n), (e[2] = t[2] * n), e;
      }
      function M(e, t) {
        const n = t[0] - e[0],
          r = t[1] - e[1],
          o = t[2] - e[2];
        return Math.sqrt(n * n + r * r + o * o);
      }
      function U(e, t) {
        const n = t[0] - e[0],
          r = t[1] - e[1],
          o = t[2] - e[2];
        return n * n + r * r + o * o;
      }
      function v(e) {
        const t = e[0],
          n = e[1],
          r = e[2];
        return t * t + n * n + r * r;
      }
      function q(e, t) {
        const n = t[0],
          r = t[1],
          o = t[2];
        let i = n * n + r * r + o * o;
        return (
          i > 0 &&
            ((i = 1 / Math.sqrt(i)), (e[0] = t[0] * i), (e[1] = t[1] * i), (e[2] = t[2] * i)),
          e
        );
      }
      function C(e, t) {
        return e[0] * t[0] + e[1] * t[1] + e[2] * t[2];
      }
      function S(e, t, n) {
        const r = t[0],
          o = t[1],
          i = t[2],
          s = n[0],
          a = n[1],
          u = n[2];
        return (e[0] = o * u - i * a), (e[1] = i * s - r * u), (e[2] = r * a - o * s), e;
      }
      function O(e, t, n, r) {
        const o = t[0],
          i = t[1],
          s = t[2];
        return (
          (e[0] = o + r * (n[0] - o)), (e[1] = i + r * (n[1] - i)), (e[2] = s + r * (n[2] - s)), e
        );
      }
      function T(e, t, n) {
        const r = t[0],
          o = t[1],
          i = t[2];
        return (
          (e[0] = n[0] * r + n[4] * o + n[8] * i + n[12]),
          (e[1] = n[1] * r + n[5] * o + n[9] * i + n[13]),
          (e[2] = n[2] * r + n[6] * o + n[10] * i + n[14]),
          e
        );
      }
      function k(e, t, n) {
        const r = t[0],
          o = t[1],
          i = t[2];
        return (
          (e[0] = r * n[0] + o * n[3] + i * n[6]),
          (e[1] = r * n[1] + o * n[4] + i * n[7]),
          (e[2] = r * n[2] + o * n[5] + i * n[8]),
          e
        );
      }
      function I(e, t, n) {
        const r = n[0],
          o = n[1],
          i = n[2],
          s = n[3],
          a = t[0],
          u = t[1],
          c = t[2];
        let l = o * c - i * u,
          f = i * a - r * c,
          d = r * u - o * a,
          h = o * d - i * f,
          m = i * l - r * d,
          p = r * f - o * l;
        const b = 2 * s;
        return (
          (l *= b),
          (f *= b),
          (d *= b),
          (h *= 2),
          (m *= 2),
          (p *= 2),
          (e[0] = a + l + h),
          (e[1] = u + f + m),
          (e[2] = c + d + p),
          e
        );
      }
      Math.PI, Math.PI;
      const x = [0, 0, 0],
        A = [0, 0, 0];
      function E(e, t) {
        return e[0] === t[0] && e[1] === t[1] && e[2] === t[2];
      }
      function B(e, t, n) {
        const r = n[0] - t[0],
          o = n[1] - t[1],
          i = n[2] - t[2];
        let s = r * r + o * o + i * i;
        return s > 0
          ? ((s = 1 / Math.sqrt(s)), (e[0] = r * s), (e[1] = o * s), (e[2] = i * s), e)
          : ((e[0] = 0), (e[1] = 0), (e[2] = 0), e);
      }
      const P = b,
        L = y,
        Z = w,
        F = M,
        _ = U,
        D = d,
        R = v;
      Object.freeze({
        __proto__: null,
        length: d,
        copy: h,
        set: m,
        add: p,
        subtract: b,
        multiply: y,
        divide: w,
        ceil: function (e, t) {
          return (e[0] = Math.ceil(t[0])), (e[1] = Math.ceil(t[1])), (e[2] = Math.ceil(t[2])), e;
        },
        floor: function (e, t) {
          return (e[0] = Math.floor(t[0])), (e[1] = Math.floor(t[1])), (e[2] = Math.floor(t[2])), e;
        },
        min: function (e, t, n) {
          return (
            (e[0] = Math.min(t[0], n[0])),
            (e[1] = Math.min(t[1], n[1])),
            (e[2] = Math.min(t[2], n[2])),
            e
          );
        },
        max: function (e, t, n) {
          return (
            (e[0] = Math.max(t[0], n[0])),
            (e[1] = Math.max(t[1], n[1])),
            (e[2] = Math.max(t[2], n[2])),
            e
          );
        },
        round: function (e, t) {
          return (e[0] = Math.round(t[0])), (e[1] = Math.round(t[1])), (e[2] = Math.round(t[2])), e;
        },
        scale: g,
        scaleAndAdd: function (e, t, n, r) {
          return (e[0] = t[0] + n[0] * r), (e[1] = t[1] + n[1] * r), (e[2] = t[2] + n[2] * r), e;
        },
        distance: M,
        squaredDistance: U,
        squaredLength: v,
        negate: function (e, t) {
          return (e[0] = -t[0]), (e[1] = -t[1]), (e[2] = -t[2]), e;
        },
        inverse: function (e, t) {
          return (e[0] = 1 / t[0]), (e[1] = 1 / t[1]), (e[2] = 1 / t[2]), e;
        },
        normalize: q,
        dot: C,
        cross: S,
        lerp: O,
        hermite: function (e, t, n, r, o, i) {
          const s = i * i,
            a = s * (2 * i - 3) + 1,
            u = s * (i - 2) + i,
            c = s * (i - 1),
            l = s * (3 - 2 * i);
          return (
            (e[0] = t[0] * a + n[0] * u + r[0] * c + o[0] * l),
            (e[1] = t[1] * a + n[1] * u + r[1] * c + o[1] * l),
            (e[2] = t[2] * a + n[2] * u + r[2] * c + o[2] * l),
            e
          );
        },
        bezier: function (e, t, n, r, o, i) {
          const s = 1 - i,
            a = s * s,
            u = i * i,
            c = a * s,
            l = 3 * i * a,
            f = 3 * u * s,
            d = u * i;
          return (
            (e[0] = t[0] * c + n[0] * l + r[0] * f + o[0] * d),
            (e[1] = t[1] * c + n[1] * l + r[1] * f + o[1] * d),
            (e[2] = t[2] * c + n[2] * l + r[2] * f + o[2] * d),
            e
          );
        },
        random: function (e, t) {
          t = t || 1;
          const n = 2 * f() * Math.PI,
            r = 2 * f() - 1,
            o = Math.sqrt(1 - r * r) * t;
          return (e[0] = Math.cos(n) * o), (e[1] = Math.sin(n) * o), (e[2] = r * t), e;
        },
        transformMat4: T,
        transformMat3: k,
        transformQuat: I,
        rotateX: function (e, t, n, r) {
          const o = [],
            i = [];
          return (
            (o[0] = t[0] - n[0]),
            (o[1] = t[1] - n[1]),
            (o[2] = t[2] - n[2]),
            (i[0] = o[0]),
            (i[1] = o[1] * Math.cos(r) - o[2] * Math.sin(r)),
            (i[2] = o[1] * Math.sin(r) + o[2] * Math.cos(r)),
            (e[0] = i[0] + n[0]),
            (e[1] = i[1] + n[1]),
            (e[2] = i[2] + n[2]),
            e
          );
        },
        rotateY: function (e, t, n, r) {
          const o = [],
            i = [];
          return (
            (o[0] = t[0] - n[0]),
            (o[1] = t[1] - n[1]),
            (o[2] = t[2] - n[2]),
            (i[0] = o[2] * Math.sin(r) + o[0] * Math.cos(r)),
            (i[1] = o[1]),
            (i[2] = o[2] * Math.cos(r) - o[0] * Math.sin(r)),
            (e[0] = i[0] + n[0]),
            (e[1] = i[1] + n[1]),
            (e[2] = i[2] + n[2]),
            e
          );
        },
        rotateZ: function (e, t, n, r) {
          const o = [],
            i = [];
          return (
            (o[0] = t[0] - n[0]),
            (o[1] = t[1] - n[1]),
            (o[2] = t[2] - n[2]),
            (i[0] = o[0] * Math.cos(r) - o[1] * Math.sin(r)),
            (i[1] = o[0] * Math.sin(r) + o[1] * Math.cos(r)),
            (i[2] = o[2]),
            (e[0] = i[0] + n[0]),
            (e[1] = i[1] + n[1]),
            (e[2] = i[2] + n[2]),
            e
          );
        },
        angle: function (e, t) {
          h(x, e), h(A, t), q(x, x), q(A, A);
          const n = C(x, A);
          return n > 1 ? 0 : n < -1 ? Math.PI : Math.acos(n);
        },
        str: function (e) {
          return 'vec3(' + e[0] + ', ' + e[1] + ', ' + e[2] + ')';
        },
        exactEquals: E,
        equals: function (e, t) {
          const n = e[0],
            r = e[1],
            o = e[2],
            i = t[0],
            s = t[1],
            a = t[2];
          return (
            Math.abs(n - i) <= 1e-6 * Math.max(1, Math.abs(n), Math.abs(i)) &&
            Math.abs(r - s) <= 1e-6 * Math.max(1, Math.abs(r), Math.abs(s)) &&
            Math.abs(o - a) <= 1e-6 * Math.max(1, Math.abs(o), Math.abs(a))
          );
        },
        direction: B,
        sub: P,
        mul: L,
        div: Z,
        dist: F,
        sqrDist: _,
        len: D,
        sqrLen: R,
      });
      const z = new Float32Array(1),
        H =
          Number.isFinite ||
          function (e) {
            return 'number' == typeof e && window.isFinite(e);
          },
        j =
          Number.isNaN ||
          function (e) {
            return e != e;
          };
      function N(e) {
        --e;
        for (let t = 1; t < 32; t <<= 1) e |= e >> t;
        return e + 1;
      }
      function G(e, t, n) {
        return Math.min(Math.max(e, t), n);
      }
      function Y(e) {
        return 0 == (e & (e - 1));
      }
      Math.sign;
      const V =
        Math.log2 ||
        function (e) {
          return Math.log(e) / Math.LN2;
        };
      function X(e, t, n) {
        return e + (t - e) * n;
      }
      function $(e) {
        return (e * Math.PI) / 180;
      }
      function J(e) {
        return (180 * e) / Math.PI;
      }
      function W(e) {
        return Math.acos(G(e, -1, 1));
      }
      function K(e) {
        return Math.asin(G(e, -1, 1));
      }
      function Q(e, t) {
        const n = d(e);
        return m(t, n, K(e[2] / n), Math.atan2(e[1] / n, e[0] / n)), t;
      }
      !(function (e) {
        (z[0] = e), z[0];
      })(34028234663852886e22);
    },
    95587: (e, t, n) => {
      'use strict';
      n.d(t, {
        S: () => s,
        W: () => c,
        a: () => a,
        b: () => u,
        c: () => f,
        d: () => l,
        e: () => h,
        g: () => d,
      });
      var r = n(60947),
        o = n(89623);
      function i(e) {
        return new r.Z({
          wkt: `GEOCCS["Spherical geocentric",\n    DATUM["Not specified",\n      SPHEROID["Sphere",${e.radius},0]],\n    PRIMEM["Greenwich",0.0,\n      AUTHORITY["EPSG","8901"]],\n    UNIT["m",1.0],\n    AXIS["Geocentric X",OTHER],\n    AXIS["Geocentric Y",EAST],\n    AXIS["Geocentric Z",NORTH]\n  ]`,
        });
      }
      const s = i(o.e),
        a = i(o.m),
        u = i(o.a),
        c = new r.Z({
          wkt: `GEOCCS["WGS 84",\n  DATUM["WGS_1984",\n    SPHEROID["WGS 84",${o.e.radius},298.257223563,\n      AUTHORITY["EPSG","7030"]],\n    AUTHORITY["EPSG","6326"]],\n  PRIMEM["Greenwich",0,\n    AUTHORITY["EPSG","8901"]],\n  UNIT["m",1.0,\n    AUTHORITY["EPSG","9001"]],\n  AXIS["Geocentric X",OTHER],\n  AXIS["Geocentric Y",OTHER],\n  AXIS["Geocentric Z",NORTH],\n  AUTHORITY["EPSG","4978"]\n]`,
        });
      function l(e) {
        return e && e === o.m ? a : e && e === o.a ? u : s;
      }
      function f(e) {
        return e && ((0, r.f)(e) || e === a) ? a : e && ((0, r.h)(e) || e === u) ? u : s;
      }
      function d(e) {
        return e && ((0, r.f)(e) || e === a) ? o.m : e && ((0, r.h)(e) || e === u) ? o.a : o.e;
      }
      function h(e) {
        return (0, r.c)(e) ? o.m : (0, r.d)(e) ? o.a : o.e;
      }
    },
    35861: (e, t, n) => {
      'use strict';
      n.d(t, { c: () => a, e: () => c, f: () => u, g: () => i, m: () => s, s: () => o });
      var r = n(82426);
      function o(e, t, n) {
        n *= 0.5;
        const r = Math.sin(n);
        return (e[0] = r * t[0]), (e[1] = r * t[1]), (e[2] = r * t[2]), (e[3] = Math.cos(n)), e;
      }
      function i(e, t) {
        const n = 2 * Math.acos(t[3]),
          o = Math.sin(n / 2);
        return (
          o > r.E
            ? ((e[0] = t[0] / o), (e[1] = t[1] / o), (e[2] = t[2] / o))
            : ((e[0] = 1), (e[1] = 0), (e[2] = 0)),
          n
        );
      }
      function s(e, t, n) {
        const r = t[0],
          o = t[1],
          i = t[2],
          s = t[3],
          a = n[0],
          u = n[1],
          c = n[2],
          l = n[3];
        return (
          (e[0] = r * l + s * a + o * c - i * u),
          (e[1] = o * l + s * u + i * a - r * c),
          (e[2] = i * l + s * c + r * u - o * a),
          (e[3] = s * l - r * a - o * u - i * c),
          e
        );
      }
      function a(e, t) {
        return (e[0] = -t[0]), (e[1] = -t[1]), (e[2] = -t[2]), (e[3] = t[3]), e;
      }
      function u(e, t, n, r) {
        const o = (0.5 * Math.PI) / 180;
        (t *= o), (n *= o), (r *= o);
        const i = Math.sin(t),
          s = Math.cos(t),
          a = Math.sin(n),
          u = Math.cos(n),
          c = Math.sin(r),
          l = Math.cos(r);
        return (
          (e[0] = i * u * l - s * a * c),
          (e[1] = s * a * l + i * u * c),
          (e[2] = s * u * c - i * a * l),
          (e[3] = s * u * l + i * a * c),
          e
        );
      }
      const c = n(7200).e;
      (0, r.b)(), (0, r.p)(1, 0, 0), (0, r.p)(0, 1, 0);
    },
    53785: (e, t, n) => {
      'use strict';
      n.d(t, {
        a: () => S,
        b: () => O,
        c: () => M,
        d: () => q,
        e: () => x,
        f: () => A,
        g: () => C,
        i: () => a,
        l: () => U,
        u: () => v,
        z: () => T,
      }),
        n(76506);
      var r = n(57251),
        o = n(95587),
        i = n(60947),
        s = n(89623);
      const a = 39.37,
        u = (s.e.radius * Math.PI) / 200,
        c = /UNIT\[([^\]]+)\]\]$/i,
        l = i.o,
        f = /UNIT\[([^\]]+)\]/i,
        d = new Set([
          4261,
          4305,
          4807,
          4810,
          4811,
          4812,
          4816,
          4819,
          4821,
          4901,
          4902,
          37225,
          104139,
          104140,
        ]),
        h = (0, r.s)()({
          meter: 'meters',
          foot: 'feet',
          foot_us: 'us-feet',
          foot_clarke: 'clarke-feet',
          yard_clarke: 'clarke-yards',
          link_clarke: 'clarke-links',
          yard_sears: 'sears-yards',
          foot_sears: 'sears-feet',
          chain_sears: 'sears-chains',
          chain_benoit_1895_b: 'benoit-1895-b-chains',
          yard_indian: 'indian-yards',
          yard_indian_1937: 'indian-1937-yards',
          foot_gold_coast: 'gold-coast-feet',
          chain_sears_1922_truncated: 'sears-1922-truncated-chains',
          '50_kilometers': '50-kilometers',
          '150_kilometers': '150-kilometers',
        }),
        m = (e) => e * e,
        p = (e) => e * e * e,
        b = {
          length: {
            baseUnit: 'meters',
            units: {
              millimeters: { inBaseUnits: 0.001 },
              centimeters: { inBaseUnits: 0.01 },
              decimeters: { inBaseUnits: 0.1 },
              meters: { inBaseUnits: 1 },
              kilometers: { inBaseUnits: 1e3 },
              inches: { inBaseUnits: 0.0254 },
              feet: { inBaseUnits: 0.3048 },
              yards: { inBaseUnits: 0.9144 },
              miles: { inBaseUnits: 1609.344 },
              'nautical-miles': { inBaseUnits: 1852 },
              'us-feet': { inBaseUnits: 1200 / 3937 },
            },
          },
          area: {
            baseUnit: 'square-meters',
            units: {
              'square-millimeters': { inBaseUnits: m(0.001) },
              'square-centimeters': { inBaseUnits: m(0.01) },
              'square-decimeters': { inBaseUnits: m(0.1) },
              'square-meters': { inBaseUnits: 1 },
              'square-kilometers': { inBaseUnits: m(1e3) },
              'square-inches': { inBaseUnits: m(0.0254) },
              'square-feet': { inBaseUnits: m(0.3048) },
              'square-yards': { inBaseUnits: m(0.9144) },
              'square-miles': { inBaseUnits: m(1609.344) },
              'square-us-feet': { inBaseUnits: m(1200 / 3937) },
              acres: { inBaseUnits: 0.0015625 * m(1609.344) },
              ares: { inBaseUnits: 100 },
              hectares: { inBaseUnits: 1e4 },
            },
          },
          volume: {
            baseUnit: 'liters',
            units: {
              liters: { inBaseUnits: 1 },
              'cubic-millimeters': { inBaseUnits: 1e3 * p(0.001) },
              'cubic-centimeters': { inBaseUnits: 1e3 * p(0.01) },
              'cubic-decimeters': { inBaseUnits: 1e3 * p(0.1) },
              'cubic-meters': { inBaseUnits: 1e3 },
              'cubic-kilometers': { inBaseUnits: 1e3 * p(1e3) },
              'cubic-inches': { inBaseUnits: 1e3 * p(0.0254) },
              'cubic-feet': { inBaseUnits: 1e3 * p(0.3048) },
              'cubic-yards': { inBaseUnits: 1e3 * p(0.9144) },
              'cubic-miles': { inBaseUnits: 1e3 * p(1609.344) },
            },
          },
          angle: {
            baseUnit: 'radians',
            units: { radians: { inBaseUnits: 1 }, degrees: { inBaseUnits: Math.PI / 180 } },
          },
        },
        y = (function () {
          const e = {};
          for (const t in b) for (const n in b[t].units) e[n] = t;
          return e;
        })();
      function w(e) {
        const t = y[e];
        if (t) return t;
        throw new Error('unknown measure');
      }
      function g(e, t = null) {
        return (t = t || w(e)), b[t].baseUnit === e;
      }
      function M(e, t, n) {
        if (t === n) return e;
        const r = w(t);
        if (r !== w(n)) throw new Error('incompatible units');
        const o = g(t, r)
          ? e
          : (function (e, t, n) {
              return e * b[n].units[t].inBaseUnits;
            })(e, t, r);
        return g(n, r)
          ? o
          : (function (e, t, n) {
              return e / b[n].units[t].inBaseUnits;
            })(o, n, r);
      }
      function U(e, t, n) {
        return M(e, t, 'meters') / ((n * Math.PI) / 180);
      }
      function v(e) {
        return h.fromJSON(e.toLowerCase()) || null;
      }
      function q(e) {
        if (e && 'object' == typeof e && !(0, i.b)(e)) return 1;
        const t = S(e);
        return t > 1e5 ? 1 : t;
      }
      function C(e) {
        return S(e) >= (e instanceof i.Z ? (0, o.g)(e).metersPerDegree : 1e5) ? 'meters' : T(e);
      }
      function S(e, t = s.e.metersPerDegree) {
        return O(e, !0) || t;
      }
      function O(e, t = !1) {
        let n,
          r,
          o = null;
        if (
          (null != e &&
            ('object' == typeof e
              ? ((n = e.wkid), (r = e.wkt))
              : 'number' == typeof e
              ? (n = e)
              : 'string' == typeof e && (r = e)),
          n)
        ) {
          if ((0, i.c)(n)) return s.m.metersPerDegree;
          if ((0, i.d)(n)) return s.a.metersPerDegree;
          (o = l.values[l[n]]), !o && t && d.has(n) && (o = u);
        } else if (r)
          if (-1 !== r.search(/^PROJCS/i)) {
            const e = c.exec(r);
            e && e[1] && (o = parseFloat(e[1].split(',')[1]));
          } else if (-1 !== r.search(/^GEOCCS/i)) {
            const e = f.exec(r);
            e && e[1] && (o = parseFloat(e[1].split(',')[1]));
          }
        return o;
      }
      function T(e) {
        let t,
          n,
          r = null;
        if (
          (null != e &&
            ('object' == typeof e
              ? ((t = e.wkid), (n = e.wkt))
              : 'number' == typeof e
              ? (t = e)
              : 'string' == typeof e && (n = e)),
          t)
        )
          r = l.units[l[t]];
        else if (n && -1 !== n.search(/^PROJCS/i)) {
          let e = c.exec(n);
          e && e[1] && ((e = /[\\"\\']{1}([^\\"\\']+)/.exec(e[1])), (r = e && e[1]));
        }
        return r ? v(r) : null;
      }
      const k = {
          esriAcres: 'acres',
          esriAres: 'ares',
          esriHectares: 'hectares',
          esriSquareCentimeters: 'square-centimeters',
          esriSquareDecimeters: 'square-decimeters',
          esriSquareFeet: 'square-feet',
          esriSquareInches: 'square-inches',
          esriSquareKilometers: 'square-kilometers',
          esriSquareMeters: 'square-meters',
          esriSquareMiles: 'square-miles',
          esriSquareMillimeters: 'square-millimeters',
          esriSquareUsFeet: 'square-us-feet',
          esriSquareYards: 'square-yards',
        },
        I = {
          esriCentimeters: 'centimeters',
          esriDecimeters: 'decimeters',
          esriFeet: 'feet',
          esriInches: 'inches',
          esriKilometers: 'kilometers',
          esriMeters: 'meters',
          esriMiles: 'miles',
          esriMillimeters: 'millimeters',
          esriNauticalMiles: 'nautical-miles',
          esriYards: 'yards',
        },
        x = (0, r.s)()(k),
        A = (0, r.s)()(I);
      (0, r.s)()({ ...k, ...I });
    },
    56697: (e, t, n) => {
      'use strict';
      function r() {
        return new Float32Array(3);
      }
      function o(e, t, n) {
        const r = new Float32Array(3);
        return (r[0] = e), (r[1] = t), (r[2] = n), r;
      }
      n.d(t, { c: () => r, f: () => o }), o(1, 1, 1), o(1, 0, 0), o(0, 1, 0), o(0, 0, 1);
    },
    7200: (e, t, n) => {
      'use strict';
      n.d(t, { c: () => o, e: () => h, s: () => i });
      var r = n(82426);
      function o(e, t) {
        return (e[0] = t[0]), (e[1] = t[1]), (e[2] = t[2]), (e[3] = t[3]), e;
      }
      function i(e, t, n, r, o) {
        return (e[0] = t), (e[1] = n), (e[2] = r), (e[3] = o), e;
      }
      function s(e, t, n) {
        return (
          (e[0] = t[0] - n[0]), (e[1] = t[1] - n[1]), (e[2] = t[2] - n[2]), (e[3] = t[3] - n[3]), e
        );
      }
      function a(e, t, n) {
        return (
          (e[0] = t[0] * n[0]), (e[1] = t[1] * n[1]), (e[2] = t[2] * n[2]), (e[3] = t[3] * n[3]), e
        );
      }
      function u(e, t, n) {
        return (
          (e[0] = t[0] / n[0]), (e[1] = t[1] / n[1]), (e[2] = t[2] / n[2]), (e[3] = t[3] / n[3]), e
        );
      }
      function c(e, t) {
        const n = t[0] - e[0],
          r = t[1] - e[1],
          o = t[2] - e[2],
          i = t[3] - e[3];
        return Math.sqrt(n * n + r * r + o * o + i * i);
      }
      function l(e, t) {
        const n = t[0] - e[0],
          r = t[1] - e[1],
          o = t[2] - e[2],
          i = t[3] - e[3];
        return n * n + r * r + o * o + i * i;
      }
      function f(e) {
        const t = e[0],
          n = e[1],
          r = e[2],
          o = e[3];
        return Math.sqrt(t * t + n * n + r * r + o * o);
      }
      function d(e) {
        const t = e[0],
          n = e[1],
          r = e[2],
          o = e[3];
        return t * t + n * n + r * r + o * o;
      }
      function h(e, t) {
        return e[0] === t[0] && e[1] === t[1] && e[2] === t[2] && e[3] === t[3];
      }
      const m = s,
        p = a,
        b = u,
        y = c,
        w = l,
        g = f,
        M = d;
      Object.freeze({
        __proto__: null,
        copy: o,
        set: i,
        add: function (e, t, n) {
          return (
            (e[0] = t[0] + n[0]),
            (e[1] = t[1] + n[1]),
            (e[2] = t[2] + n[2]),
            (e[3] = t[3] + n[3]),
            e
          );
        },
        subtract: s,
        multiply: a,
        divide: u,
        ceil: function (e, t) {
          return (
            (e[0] = Math.ceil(t[0])),
            (e[1] = Math.ceil(t[1])),
            (e[2] = Math.ceil(t[2])),
            (e[3] = Math.ceil(t[3])),
            e
          );
        },
        floor: function (e, t) {
          return (
            (e[0] = Math.floor(t[0])),
            (e[1] = Math.floor(t[1])),
            (e[2] = Math.floor(t[2])),
            (e[3] = Math.floor(t[3])),
            e
          );
        },
        min: function (e, t, n) {
          return (
            (e[0] = Math.min(t[0], n[0])),
            (e[1] = Math.min(t[1], n[1])),
            (e[2] = Math.min(t[2], n[2])),
            (e[3] = Math.min(t[3], n[3])),
            e
          );
        },
        max: function (e, t, n) {
          return (
            (e[0] = Math.max(t[0], n[0])),
            (e[1] = Math.max(t[1], n[1])),
            (e[2] = Math.max(t[2], n[2])),
            (e[3] = Math.max(t[3], n[3])),
            e
          );
        },
        round: function (e, t) {
          return (
            (e[0] = Math.round(t[0])),
            (e[1] = Math.round(t[1])),
            (e[2] = Math.round(t[2])),
            (e[3] = Math.round(t[3])),
            e
          );
        },
        scale: function (e, t, n) {
          return (e[0] = t[0] * n), (e[1] = t[1] * n), (e[2] = t[2] * n), (e[3] = t[3] * n), e;
        },
        scaleAndAdd: function (e, t, n, r) {
          return (
            (e[0] = t[0] + n[0] * r),
            (e[1] = t[1] + n[1] * r),
            (e[2] = t[2] + n[2] * r),
            (e[3] = t[3] + n[3] * r),
            e
          );
        },
        distance: c,
        squaredDistance: l,
        length: f,
        squaredLength: d,
        negate: function (e, t) {
          return (e[0] = -t[0]), (e[1] = -t[1]), (e[2] = -t[2]), (e[3] = -t[3]), e;
        },
        inverse: function (e, t) {
          return (e[0] = 1 / t[0]), (e[1] = 1 / t[1]), (e[2] = 1 / t[2]), (e[3] = 1 / t[3]), e;
        },
        normalize: function (e, t) {
          const n = t[0],
            r = t[1],
            o = t[2],
            i = t[3];
          let s = n * n + r * r + o * o + i * i;
          return (
            s > 0 &&
              ((s = 1 / Math.sqrt(s)),
              (e[0] = n * s),
              (e[1] = r * s),
              (e[2] = o * s),
              (e[3] = i * s)),
            e
          );
        },
        dot: function (e, t) {
          return e[0] * t[0] + e[1] * t[1] + e[2] * t[2] + e[3] * t[3];
        },
        lerp: function (e, t, n, r) {
          const o = t[0],
            i = t[1],
            s = t[2],
            a = t[3];
          return (
            (e[0] = o + r * (n[0] - o)),
            (e[1] = i + r * (n[1] - i)),
            (e[2] = s + r * (n[2] - s)),
            (e[3] = a + r * (n[3] - a)),
            e
          );
        },
        random: function (e, t) {
          let n, o, i, s, a, u;
          t = t || 1;
          do {
            (n = 2 * (0, r.R)() - 1), (o = 2 * (0, r.R)() - 1), (a = n * n + o * o);
          } while (a >= 1);
          do {
            (i = 2 * (0, r.R)() - 1), (s = 2 * (0, r.R)() - 1), (u = i * i + s * s);
          } while (u >= 1);
          const c = Math.sqrt((1 - a) / u);
          return (e[0] = t * n), (e[1] = t * o), (e[2] = t * i * c), (e[3] = t * s * c), e;
        },
        transformMat4: function (e, t, n) {
          const r = t[0],
            o = t[1],
            i = t[2],
            s = t[3];
          return (
            (e[0] = n[0] * r + n[4] * o + n[8] * i + n[12] * s),
            (e[1] = n[1] * r + n[5] * o + n[9] * i + n[13] * s),
            (e[2] = n[2] * r + n[6] * o + n[10] * i + n[14] * s),
            (e[3] = n[3] * r + n[7] * o + n[11] * i + n[15] * s),
            e
          );
        },
        transformQuat: function (e, t, n) {
          const r = t[0],
            o = t[1],
            i = t[2],
            s = n[0],
            a = n[1],
            u = n[2],
            c = n[3],
            l = c * r + a * i - u * o,
            f = c * o + u * r - s * i,
            d = c * i + s * o - a * r,
            h = -s * r - a * o - u * i;
          return (
            (e[0] = l * c + h * -s + f * -u - d * -a),
            (e[1] = f * c + h * -a + d * -s - l * -u),
            (e[2] = d * c + h * -u + l * -a - f * -s),
            (e[3] = t[3]),
            e
          );
        },
        str: function (e) {
          return 'vec4(' + e[0] + ', ' + e[1] + ', ' + e[2] + ', ' + e[3] + ')';
        },
        exactEquals: h,
        equals: function (e, t) {
          const n = e[0],
            o = e[1],
            i = e[2],
            s = e[3],
            a = t[0],
            u = t[1],
            c = t[2],
            l = t[3];
          return (
            Math.abs(n - a) <= r.E * Math.max(1, Math.abs(n), Math.abs(a)) &&
            Math.abs(o - u) <= r.E * Math.max(1, Math.abs(o), Math.abs(u)) &&
            Math.abs(i - c) <= r.E * Math.max(1, Math.abs(i), Math.abs(c)) &&
            Math.abs(s - l) <= r.E * Math.max(1, Math.abs(s), Math.abs(l))
          );
        },
        sub: m,
        mul: p,
        div: b,
        dist: y,
        sqrDist: w,
        len: g,
        sqrLen: M,
      });
    },
    82058: (e, t, n) => {
      'use strict';
      n.r(t), n.d(t, { default: () => A, l: () => f, r: () => x, s: () => l });
      var r = n(31450),
        o = n(88762),
        i = n(60991),
        s = n(76506),
        a = n(50406),
        u = n(32101);
      n(71552), n(92143), n(40642), n(81172);
      const c = [
        'elevation3d.arcgis.com',
        'js.arcgis.com',
        'jsdev.arcgis.com',
        'jsqa.arcgis.com',
        'static.arcgis.com',
      ];
      function l(e) {
        const t = (0, u.P$)(e, !0);
        return (
          t &&
          t.endsWith('.arcgis.com') &&
          !c.includes(t) &&
          !e.endsWith('/sharing/rest/generateToken')
        );
      }
      function f(e, t, n = !1, r) {
        return new Promise((o, i) => {
          if ((0, a.Hc)(r)) return void i(d());
          let u = () => {
              f(), i(new Error(`Unable to load ${t}`));
            },
            c = () => {
              const t = e;
              f(), o(t);
            },
            l = () => {
              if (!e) return;
              const t = e;
              f(), (t.src = ''), i(d());
            };
          const f = () => {
            (0, s.h)('esri-image-decode') ||
              (e.removeEventListener('error', u), e.removeEventListener('load', c)),
              (u = null),
              (c = null),
              (e = null),
              (0, s.i)(r) && r.removeEventListener('abort', l),
              (l = null),
              n && URL.revokeObjectURL(t);
          };
          (0, s.i)(r) && r.addEventListener('abort', l),
            (0, s.h)('esri-image-decode')
              ? e.decode().then(c, u)
              : (e.addEventListener('error', u), e.addEventListener('load', c));
        });
      }
      function d() {
        try {
          return new DOMException('Aborted', 'AbortError');
        } catch {
          const e = new Error();
          return (e.name = 'AbortError'), e;
        }
      }
      async function h(e, t) {
        const c = (0, u.HK)(e),
          f = (0, u.jc)(e);
        f || c || (e = (0, u.Fv)(e));
        const d = { url: e, requestOptions: { ...(0, s.u)(t) } };
        let y = (0, u.oh)(e);
        if (y) {
          const e = await (async function (e, t) {
            if (null != e.responseData) return e.responseData;
            if (
              (e.headers &&
                (t.requestOptions.headers = { ...t.requestOptions.headers, ...e.headers }),
              e.query && (t.requestOptions.query = { ...t.requestOptions.query, ...e.query }),
              e.before)
            ) {
              let n, r;
              try {
                r = await e.before(t);
              } catch (e) {
                n = q('request:interceptor', e, t);
              }
              if (
                ((r instanceof Error || r instanceof i.Z) && (n = q('request:interceptor', r, t)),
                n)
              )
                throw (e.error && e.error(n), n);
              return r;
            }
          })(y, d);
          if (null != e)
            return { data: e, getHeader: M, requestOptions: d.requestOptions, url: d.url };
          y.after || y.error || (y = null);
        }
        if (((e = d.url), 'image' === (t = d.requestOptions).responseType)) {
          if ((0, s.h)('host-webworker') || (0, s.h)('host-node'))
            throw q(
              'request:invalid-parameters',
              new Error("responseType 'image' is not supported in Web Workers or Node environment"),
              d,
            );
        } else if (c)
          throw q(
            'request:invalid-parameters',
            new Error('Data URLs are not supported for responseType = ' + t.responseType),
            d,
          );
        if ('head' === t.method) {
          if (t.body)
            throw q(
              'request:invalid-parameters',
              new Error("body parameter cannot be set when method is 'head'"),
              d,
            );
          if (c || f)
            throw q(
              'request:invalid-parameters',
              new Error("data and blob URLs are not supported for method 'head'"),
              d,
            );
        }
        if (
          (await (async function () {
            (0, s.h)('host-webworker')
              ? m || (m = await n.e(9768).then(n.bind(n, 89768)))
              : h._abortableFetch || (h._abortableFetch = s.g.fetch.bind(s.g));
          })(),
          m)
        )
          return m.execute(e, t);
        const w = (0, a.yi)();
        (0, a.fu)(t, () => w.abort());
        const g = {
            controller: w,
            credential: null,
            credentialToken: null,
            fetchOptions: null,
            hasToken: !1,
            interceptor: y,
            params: d,
            redoRequest: !1,
            useIdentity: p.useIdentity,
            useProxy: !1,
            useSSL: !1,
            withCredentials: !1,
          },
          U = await (async function (e) {
            var t, n;
            let i, c;
            await (async function (e) {
              const t = e.params.url,
                n = e.params.requestOptions,
                i = e.controller.signal,
                u = n.body;
              let c = null,
                f = null,
                d = null;
              if (
                (b &&
                  'HTMLFormElement' in s.g &&
                  (u instanceof FormData
                    ? (c = u)
                    : u instanceof HTMLFormElement && ((f = u), (c = new FormData(f)))),
                'string' == typeof u && (d = u),
                (e.fetchOptions = {
                  cache: n.cacheBust && !h._abortableFetch.polyfill ? 'no-cache' : 'default',
                  credentials: 'same-origin',
                  headers: n.headers || {},
                  method: 'head' === n.method ? 'HEAD' : 'GET',
                  mode: 'cors',
                  redirect: 'follow',
                  signal: i,
                }),
                (c || d) && (e.fetchOptions.body = c || d),
                'anonymous' === n.authMode && (e.useIdentity = !1),
                (e.hasToken = !!(
                  /token=/i.test(t) ||
                  (n.query && n.query.token) ||
                  (c && c.get && c.get('token')) ||
                  (f && f.elements.token)
                )),
                !e.hasToken &&
                  r.Z.apiKey &&
                  l(t) &&
                  (n.query || (n.query = {}), (n.query.token = r.Z.apiKey), (e.hasToken = !0)),
                e.useIdentity && !e.hasToken && !e.credentialToken && !S(t) && !(0, a.Hc)(i))
              ) {
                let r;
                'immediate' === n.authMode
                  ? (await C(),
                    (r = await o.id.getCredential(t, { signal: i })),
                    (e.credential = r))
                  : 'no-prompt' === n.authMode
                  ? (await C(),
                    (r = await o.id.getCredential(t, { prompt: !1, signal: i }).catch(() => {})),
                    (e.credential = r))
                  : o.id && (r = o.id.findCredential(t)),
                  r && ((e.credentialToken = r.token), (e.useSSL = !!r.ssl));
              }
            })(e);
            try {
              do {
                [i, c] = await O(e);
              } while (!(await k(e, i, c)));
            } catch (t) {
              const n = q('request:server', t, e.params, i);
              throw (
                ((n.details.ssl = e.useSSL),
                e.interceptor && e.interceptor.error && e.interceptor.error(n),
                n)
              );
            }
            const f = e.params.url;
            if (
              /\/sharing\/rest\/(accounts|portals)\/self/i.test(f) &&
              !e.hasToken &&
              !e.credentialToken &&
              null != (t = c) &&
              null != (n = t.user) &&
              n.username &&
              !(0, u.kl)(f)
            ) {
              const e = (0, u.P$)(f, !0);
              e && p.trustedServers.push(e);
            }
            const d = e.credential;
            if (d && o.id) {
              const e = o.id.findServerInfo(d.server);
              let t = e && e.owningSystemUrl;
              if (t) {
                t = t.replace(/\/?$/, '/sharing');
                const e = o.id.findCredential(t, d.userId);
                e && -1 === o.id._getIdenticalSvcIdx(t, e) && e.resources.unshift(t);
              }
            }
            return {
              data: c,
              getHeader: i ? (e) => i.headers.get(e) : M,
              requestOptions: e.params.requestOptions,
              ssl: e.useSSL,
              url: e.params.url,
            };
          })(g);
        return y && y.after && y.after(U), U;
      }
      let m;
      const p = r.Z.request,
        b = 'FormData' in s.g,
        y = [499, 498, 403, 401],
        w = ['COM_0056', 'COM_0057', 'SB_0008'],
        g = [/\/arcgis\/tokens/i, /\/sharing(\/rest)?\/generatetoken/i, /\/rest\/info/i],
        M = () => null,
        U = Symbol();
      function v(e) {
        const t = (0, u.P$)(e);
        return !t || t.endsWith('.arcgis.com') || h._corsServers.includes(t) || (0, u.kl)(t);
      }
      function q(e, t, n, r) {
        let o = 'Error';
        const u = { url: n.url, requestOptions: n.requestOptions, getHeader: M, ssl: !1 };
        if (t instanceof i.Z)
          return (
            t.details
              ? ((t.details = (0, s.d9)(t.details)),
                (t.details.url = n.url),
                (t.details.requestOptions = n.requestOptions))
              : (t.details = u),
            t
          );
        if (t) {
          const e = r && ((e) => r.headers.get(e)),
            n = r && r.status,
            i = t.message;
          i && (o = i),
            e && (u.getHeader = e),
            (u.httpStatus = (null != t.httpCode ? t.httpCode : t.code) || n || 0),
            (u.subCode = t.subcode),
            (u.messageCode = t.messageCode),
            'string' == typeof t.details ? (u.messages = [t.details]) : (u.messages = t.details),
            (u.raw = U in t ? t[U] : t);
        }
        return (0, a.D_)(t) ? (0, a.zE)() : new i.Z(e, o, u);
      }
      async function C() {
        o.id || (await Promise.all([n.e(6229), n.e(1503), n.e(4494)]).then(n.bind(n, 64494)));
      }
      function S(e) {
        return g.some((t) => t.test(e));
      }
      async function O(e) {
        let t = e.params.url;
        const n = e.params.requestOptions,
          r = e.fetchOptions,
          i = (0, u.jc)(t) || (0, u.HK)(t),
          c = n.responseType || 'json',
          l = i ? 0 : null != n.timeout ? n.timeout : p.timeout;
        let f = !1;
        if (!i) {
          e.useSSL && (t = (0, u.hO)(t)),
            n.cacheBust &&
              'default' === r.cache &&
              (t = (0, u.ZN)(t, 'request.preventCache', Date.now()));
          let i = { ...n.query };
          e.credentialToken && (i.token = e.credentialToken);
          let a = (0, u.B7)(i);
          (0, s.h)('esri-url-encodes-apostrophe') && (a = a.replace(/'/g, '%27'));
          const c = t.length + 1 + a.length;
          let l;
          f =
            'delete' === n.method ||
            'post' === n.method ||
            'put' === n.method ||
            !!n.body ||
            c > p.maxUrlLength;
          const d = n.useProxy || !!(0, u.ed)(t);
          if (d) {
            const e = (0, u.b7)(t);
            (l = e.path),
              !f && l.length + 1 + c > p.maxUrlLength && (f = !0),
              e.query && (i = { ...e.query, ...i });
          }
          if ('HEAD' === r.method && (f || d)) {
            if (f) {
              if (c > p.maxUrlLength)
                throw q(
                  'request:invalid-parameters',
                  new Error('URL exceeds maximum length'),
                  e.params,
                );
              throw q(
                'request:invalid-parameters',
                new Error("cannot use POST request when method is 'head'"),
                e.params,
              );
            }
            if (d)
              throw q(
                'request:invalid-parameters',
                new Error("cannot use proxy when method is 'head'"),
                e.params,
              );
          }
          if (
            (f
              ? ((r.method =
                  'delete' === n.method ? 'DELETE' : 'put' === n.method ? 'PUT' : 'POST'),
                n.body
                  ? (t = (0, u.fl)(t, i))
                  : ((r.body = (0, u.B7)(i)),
                    (r.headers['Content-Type'] = 'application/x-www-form-urlencoded')))
              : (t = (0, u.fl)(t, i)),
            d && ((e.useProxy = !0), (t = `${l}?${t}`)),
            i.token && b && r.body instanceof FormData)
          ) {
            const e = r.body;
            e.set ? e.set('token', i.token) : e.append('token', i.token);
          }
          if (n.hasOwnProperty('withCredentials')) e.withCredentials = n.withCredentials;
          else if (!(0, u.D6)(t, u.Gd))
            if ((0, u.kl)(t)) e.withCredentials = !0;
            else if (o.id) {
              const n = o.id.findServerInfo(t);
              n && n.webTierAuth && (e.withCredentials = !0);
            }
          e.withCredentials && (r.credentials = 'include');
        }
        let d,
          m,
          y = 0,
          w = !1;
        l > 0 &&
          (y = setTimeout(() => {
            (w = !0), e.controller.abort();
          }, l));
        try {
          if ('native-request-init' === n.responseType) (m = r), (m.url = t);
          else if (
            'image' !== n.responseType ||
            'default' !== r.cache ||
            'GET' !== r.method ||
            f ||
            (function (e) {
              if (e) for (const t of Object.getOwnPropertyNames(e)) if (e[t]) return !0;
              return !1;
            })(n.headers) ||
            (!i && !e.useProxy && p.proxyUrl && !v(t))
          ) {
            if (
              ((d = await h._abortableFetch(t, r)),
              e.useProxy ||
                (function (e) {
                  const t = (0, u.P$)(e);
                  t && !h._corsServers.includes(t) && h._corsServers.push(t);
                })(t),
              'native' === n.responseType)
            )
              m = d;
            else if ('HEAD' !== r.method)
              if (d.ok) {
                switch (c) {
                  case 'array-buffer':
                    m = await d.arrayBuffer();
                    break;
                  case 'blob':
                  case 'image':
                    m = await d.blob();
                    break;
                  default:
                    m = await d.text();
                }
                if (
                  (y && (clearTimeout(y), (y = 0)), 'json' === c || 'xml' === c || 'document' === c)
                )
                  if (m)
                    switch (c) {
                      case 'json':
                        m = JSON.parse(m);
                        break;
                      case 'xml':
                        m = T(m, 'application/xml');
                        break;
                      case 'document':
                        m = T(m, 'text/html');
                    }
                  else m = null;
                if (m) {
                  if ('array-buffer' === c || 'blob' === c) {
                    const e = d.headers.get('Content-Type');
                    if (
                      /application\/json|text\/plain/i.test(e) &&
                      m['blob' === c ? 'size' : 'byteLength'] <= 750
                    )
                      try {
                        const e = await new Response(m).json();
                        e.error && (m = e);
                      } catch {}
                  }
                  'image' === c &&
                    m instanceof Blob &&
                    (m = await I(URL.createObjectURL(m), e, !0));
                }
              } else m = await d.text();
          } else m = await I(t, e);
        } catch (r) {
          if ('AbortError' === r.name) {
            if (w) throw new Error('Timeout exceeded');
            throw (0, a.zE)('Request canceled');
          }
          if (
            !(!d && r instanceof TypeError && p.proxyUrl) ||
            n.body ||
            'delete' === n.method ||
            'head' === n.method ||
            'post' === n.method ||
            'put' === n.method ||
            e.useProxy ||
            v(t)
          )
            throw r;
          (e.redoRequest = !0), (0, u.tD)({ proxyUrl: p.proxyUrl, urlPrefix: (0, u.P$)(t) });
        } finally {
          y && clearTimeout(y);
        }
        return [d, m];
      }
      function T(e, t) {
        let n;
        try {
          n = new DOMParser().parseFromString(e, t);
        } catch {}
        if (!n || n.getElementsByTagName('parsererror').length)
          throw new SyntaxError('XML Parse error');
        return n;
      }
      async function k(e, t, n) {
        if (e.redoRequest) return (e.redoRequest = !1), !1;
        const r = e.params.requestOptions;
        if (!t || 'native' === r.responseType || 'native-request-init' === r.responseType)
          return !0;
        let i, s, a, u;
        if (!t.ok)
          throw ((i = new Error(`Unable to load ${t.url} status: ${t.status}`)), (i[U] = n), i);
        null != n && n.error && (i = n.error),
          i &&
            ((s = Number(i.code)),
            (a = i.hasOwnProperty('subcode') ? Number(i.subcode) : null),
            (u = i.messageCode),
            (u = u && u.toUpperCase()));
        const c = r.authMode;
        if (
          403 === s &&
          (4 === a ||
            (i.message &&
              i.message.toLowerCase().indexOf('ssl') > -1 &&
              -1 === i.message.toLowerCase().indexOf('permission')))
        ) {
          if (!e.useSSL) return (e.useSSL = !0), !1;
        } else if (
          !e.hasToken &&
          e.useIdentity &&
          ('no-prompt' !== c || 498 === s) &&
          -1 !== y.indexOf(s) &&
          !S(e.params.url) &&
          (403 !== s || (-1 === w.indexOf(u) && (null == a || (2 === a && e.credentialToken))))
        ) {
          await C();
          try {
            const t = await o.id.getCredential(e.params.url, {
              error: q('request:server', i, e.params),
              prompt: 'no-prompt' !== c,
              signal: e.controller.signal,
              token: e.credentialToken,
            });
            return (
              (e.credential = t), (e.credentialToken = t.token), (e.useSSL = e.useSSL || t.ssl), !1
            );
          } catch (t) {
            if ('no-prompt' === c) return (e.credential = null), (e.credentialToken = null), !1;
            i = t;
          }
        }
        if (i) throw i;
        return !0;
      }
      function I(e, t, n = !1) {
        const r = t.controller.signal,
          o = new Image();
        return (
          t.withCredentials ? (o.crossOrigin = 'use-credentials') : (o.crossOrigin = 'anonymous'),
          (o.alt = ''),
          (o.src = e),
          f(o, e, n, r)
        );
      }
      (h._abortableFetch = null),
        (h._corsServers = ['https://server.arcgisonline.com', 'https://services.arcgisonline.com']);
      var x = Object.freeze({ __proto__: null, default: h });
      const A = h;
    },
  },
]);
