(self.webpackChunkRemoteClient = self.webpackChunkRemoteClient || []).push([
  [6611],
  {
    48027: (t, e, r) => {
      'use strict';
      r.d(e, { Z: () => c });
      var i = r(54174),
        n = r(82426),
        a = r(76506),
        s = r(91306);
      function o(t) {
        return (0, n.c)((0, s.m)(t), 0, 255);
      }
      function l(t, e, r) {
        return (t = Number(t)), isNaN(t) ? r : t < e ? e : t > r ? r : t;
      }
      r(92143), r(31450), r(71552), r(40642);
      class u {
        constructor(t) {
          (this.r = 255), (this.g = 255), (this.b = 255), (this.a = 1), t && this.setColor(t);
        }
        static blendColors(t, e, r, i = new u()) {
          return (
            (i.r = Math.round(t.r + (e.r - t.r) * r)),
            (i.g = Math.round(t.g + (e.g - t.g) * r)),
            (i.b = Math.round(t.b + (e.b - t.b) * r)),
            (i.a = t.a + (e.a - t.a) * r),
            i._sanitize()
          );
        }
        static fromRgb(t, e) {
          const r = t.toLowerCase().match(/^(rgba?|hsla?)\(([\s\.\-,%0-9]+)\)/);
          if (r) {
            const t = r[2].split(/\s*,\s*/),
              n = r[1];
            if (('rgb' === n && 3 === t.length) || ('rgba' === n && 4 === t.length)) {
              const r = t[0];
              if ('%' === r.charAt(r.length - 1)) {
                const r = t.map((t) => 2.56 * parseFloat(t));
                return 4 === t.length && (r[3] = parseFloat(t[3])), u.fromArray(r, e);
              }
              return u.fromArray(
                t.map((t) => parseFloat(t)),
                e,
              );
            }
            if (('hsl' === n && 3 === t.length) || ('hsla' === n && 4 === t.length))
              return u.fromArray(
                (0, i.h)(
                  parseFloat(t[0]),
                  parseFloat(t[1]) / 100,
                  parseFloat(t[2]) / 100,
                  parseFloat(t[3]),
                ),
                e,
              );
          }
          return null;
        }
        static fromHex(t, e = new u()) {
          if ((4 !== t.length && 7 !== t.length) || '#' !== t[0]) return null;
          const r = 4 === t.length ? 4 : 8,
            i = (1 << r) - 1;
          let n = Number('0x' + t.substr(1));
          return isNaN(n)
            ? null
            : (['b', 'g', 'r'].forEach((t) => {
                const a = n & i;
                (n >>= r), (e[t] = 4 === r ? 17 * a : a);
              }),
              (e.a = 1),
              e);
        }
        static fromArray(t, e = new u()) {
          return (
            e._set(Number(t[0]), Number(t[1]), Number(t[2]), Number(t[3])),
            isNaN(e.a) && (e.a = 1),
            e._sanitize()
          );
        }
        static fromString(t, e) {
          const r = (0, i.g)(t);
          return (r && u.fromArray(r, e)) || u.fromRgb(t, e) || u.fromHex(t, e);
        }
        static fromJSON(t) {
          return t && new u([t[0], t[1], t[2], t[3] / 255]);
        }
        static toUnitRGB(t) {
          return (0, a.i)(t) ? [t.r / 255, t.g / 255, t.b / 255] : null;
        }
        static toUnitRGBA(t) {
          return (0, a.i)(t) ? [t.r / 255, t.g / 255, t.b / 255, null != t.a ? t.a : 1] : null;
        }
        get isBright() {
          return 0.299 * this.r + 0.587 * this.g + 0.114 * this.b >= 127;
        }
        setColor(t) {
          if ('string' == typeof t) u.fromString(t, this);
          else if (Array.isArray(t)) u.fromArray(t, this);
          else {
            var e, r, i, n;
            this._set(
              null != (e = t.r) ? e : 0,
              null != (r = t.g) ? r : 0,
              null != (i = t.b) ? i : 0,
              null != (n = t.a) ? n : 1,
            ),
              t instanceof u || this._sanitize();
          }
          return this;
        }
        toRgb() {
          return [this.r, this.g, this.b];
        }
        toRgba() {
          return [this.r, this.g, this.b, this.a];
        }
        toHex() {
          const t = this.r.toString(16),
            e = this.g.toString(16),
            r = this.b.toString(16);
          return `#${t.length < 2 ? '0' + t : t}${e.length < 2 ? '0' + e : e}${
            r.length < 2 ? '0' + r : r
          }`;
        }
        toCss(t = !1) {
          const e = this.r + ', ' + this.g + ', ' + this.b;
          return t ? `rgba(${e}, ${this.a})` : `rgb(${e})`;
        }
        toString() {
          return this.toCss(!0);
        }
        toJSON() {
          return this.toArray();
        }
        toArray(t = 0) {
          const e = o(this.r),
            r = o(this.g),
            i = o(this.b);
          return 0 === t || 1 !== this.a ? [e, r, i, o(255 * this.a)] : [e, r, i];
        }
        clone() {
          return new u(this.toRgba());
        }
        hash() {
          return (this.r << 24) | (this.g << 16) | (this.b << 8) | (255 * this.a);
        }
        _sanitize() {
          return (
            (this.r = Math.round(l(this.r, 0, 255))),
            (this.g = Math.round(l(this.g, 0, 255))),
            (this.b = Math.round(l(this.b, 0, 255))),
            (this.a = l(this.a, 0, 1)),
            this
          );
        }
        _set(t, e, r, i) {
          (this.r = t), (this.g = e), (this.b = r), (this.a = i);
        }
      }
      u.prototype.declaredClass = 'esri.Color';
      const c = u;
    },
    96611: (t, e, r) => {
      'use strict';
      r.d(e, {
        C: () => E,
        I: () => Ot,
        M: () => l,
        S: () => Ft,
        T: () => Nt,
        a: () => x,
        b: () => _,
        c: () => T,
        i: () => A,
        l: () => k,
        p: () => D,
        r: () => L,
      });
      var i = r(76506),
        n = r(48027),
        a = r(43916),
        s = r(79682),
        o = r(82356);
      class l {
        constructor(t) {
          (this._array = []),
            t <= 0 && console.error('strideInBytes must be positive!'),
            (this._stride = t);
        }
        get array() {
          return this._array;
        }
        get index() {
          return (4 * this._array.length) / this._stride;
        }
        get itemSize() {
          return this._stride;
        }
        get sizeInBytes() {
          return 4 * this._array.length;
        }
        reset() {
          this.array.length = 0;
        }
        toBuffer() {
          return new Uint32Array(this._array).buffer;
        }
        static i1616to32(t, e) {
          return (65535 & t) | (e << 16);
        }
        static i8888to32(t, e, r, i) {
          return (255 & t) | ((255 & e) << 8) | ((255 & r) << 16) | (i << 24);
        }
        static i8816to32(t, e, r) {
          return (255 & t) | ((255 & e) << 8) | (r << 16);
        }
      }
      class u {
        constructor(t) {
          (this._locations = new Map()), (this._key = t);
        }
        get key() {
          return this._key;
        }
        get type() {
          return 7 & this._key;
        }
        defines() {
          return [];
        }
        getStride() {
          return this._layoutInfo || this._buildAttributesInfo(), this._stride;
        }
        getAttributeLocations() {
          return 0 === this._locations.size && this._buildAttributesInfo(), this._locations;
        }
        getLayoutInfo() {
          return this._layoutInfo || this._buildAttributesInfo(), this._layoutInfo;
        }
        getEncodingInfos() {
          return (
            this._propertyEncodingInfo || this._buildAttributesInfo(), this._propertyEncodingInfo
          );
        }
        getUniforms() {
          return this._uniforms || this._buildAttributesInfo(), this._uniforms;
        }
        getShaderHeader() {
          return this._shaderHeader || this._buildAttributesInfo(), this._shaderHeader;
        }
        getShaderMain() {
          return this._shaderMain || this._buildAttributesInfo(), this._shaderMain;
        }
        setDataUniforms(t, e, r, i, n) {
          const a = this.getUniforms();
          for (const s of a) {
            const { name: a, type: o, getValue: l } = s,
              u = l(r, e, i, n);
            if (null !== u)
              switch (o) {
                case 'float':
                  t.setUniform1f(a, u);
                  break;
                case 'vec2':
                  t.setUniform2fv(a, u);
                  break;
                case 'vec4':
                  t.setUniform4fv(a, u);
              }
          }
        }
        encodeAttributes(t, e, r, i) {
          const n = this.attributesInfo(),
            a = this.getEncodingInfos(),
            s = [];
          let o = 0,
            l = 0;
          for (const c of Object.keys(a)) {
            var u;
            const h = a[c],
              { type: p, precisionFactor: y, isLayout: f } = n[c],
              d = f ? r.getLayoutProperty(c) : r.getPaintProperty(c),
              m = null == (u = d.interpolator) ? void 0 : u.getInterpolationRange(e);
            let g = 0;
            for (const r of h) {
              const { offset: n, bufferElementsToAdd: a } = r;
              if (a > 0) {
                for (let t = 0; t < a; t++) s.push(0);
                (o += l), (l = r.bufferElementsToAdd);
              }
              const u = null != i ? i : d.getValue(m ? m[g] : e, t);
              switch (p) {
                case 0:
                case 1:
                  s[o] |= this._encodeByte(u * (y || 1), 8 * n);
                  break;
                case 2:
                case 3:
                  s[o] |= this._encodeShort(u * (y || 1), 8 * n);
                  break;
                case 4:
                case 5:
                  (s[o] |= this._encodeByte(u * (y || 1), 8 * n)),
                    (s[o] |= this._encodeByte(u * (y || 1), 8 * n + 8));
                  break;
                case 6:
                case 7:
                  (s[o] |= this._encodeShort(u * (y || 1), 8 * n)),
                    (s[o] |= this._encodeShort(u * (y || 1), 8 * n + 16));
                  break;
                case 8:
                case 9:
                  (s[o] |= this._encodeByte(u * (y || 1), 8 * n)),
                    (s[o] |= this._encodeByte(u * (y || 1), 8 * n + 8)),
                    (s[o] |= this._encodeByte(u * (y || 1), 8 * n + 16)),
                    (s[o] |= this._encodeByte(u * (y || 1), 8 * n + 24));
                  break;
                case 10:
                  s[o] = this._encodeColor(u);
                  break;
                case 11:
                case 12:
                  this._encodePattern(o, s, u);
                  break;
                default:
                  throw new Error('Unsupported encoding type');
              }
              g++;
            }
          }
          return s;
        }
        getAtributeState(t) {
          let e = 0;
          const r = 3 + 2 * t;
          return (e |= this._bit(r)), (e |= this._bit(r + 1) << 1), e;
        }
        _buildAttributesInfo() {
          const t = [],
            e = {},
            r = {};
          let i = -1;
          const n = this.attributesInfo(),
            a = this.attributes();
          let s = -1;
          for (const o of a) {
            s++;
            const a = this.getAtributeState(s);
            if (0 === a || 3 === a) continue;
            const l = n[o],
              c = [];
            e[o] = c;
            const h = l.type;
            for (let e = 0; e < a; e++) {
              const { dataType: e, bytesPerElement: n, count: a, normalized: s } = u._encodingInfo[
                  h
                ],
                o = n * a;
              let l = r[e],
                p = 0;
              if (!l || l.count + a > 4)
                i++,
                  (l = { dataIndex: i, count: 0, offset: 0 }),
                  4 !== a && (r[e] = l),
                  t.push({ location: -1, name: 'a_data_' + i, count: a, type: e, normalized: s }),
                  (p = Math.ceil(Math.max(o / 4, 1)));
              else {
                const e = t[l.dataIndex];
                (e.count += a),
                  (p =
                    Math.ceil(Math.max((e.count * n) / 4, 1)) -
                    Math.ceil(Math.max(l.offset / 4, 1)));
              }
              c.push({ dataIndex: l.dataIndex, offset: l.offset, bufferElementsToAdd: p }),
                (l.offset += o),
                (l.count += a);
            }
          }
          for (const e of t)
            switch (e.type) {
              case 5120:
              case 5121:
                e.count = 4;
              case 5122:
              case 5123:
                e.count += e.count % 2;
            }
          this._buildVertexBufferLayout(t);
          let o = 0;
          const l = this._layoutInfo.geometry;
          for (const t of l) this._locations.set(t.name, o++);
          const c = this._layoutInfo.opacity;
          if (c) for (const t of c) this._locations.set(t.name, o++);
          this._buildShaderInfo(t, e), (this._propertyEncodingInfo = e);
        }
        _buildVertexBufferLayout(t) {
          const e = {},
            r = this.geometryInfo();
          let i = r[0].stride;
          if (0 === t.length) e.geometry = r;
          else {
            const n = [];
            let a = i;
            for (const e of t) i += c(e.type) * e.count;
            for (const t of r) {
              const e = { ...t };
              (e.stride = i), n.push(e);
            }
            for (const e of t)
              n.push({
                name: e.name,
                count: e.count,
                type: e.type,
                offset: a,
                stride: i,
                normalized: e.normalized || !1,
                divisor: 0,
              }),
                (a += c(e.type) * e.count);
            e.geometry = n;
          }
          this.opacityInfo() && (e.opacity = this.opacityInfo()),
            (this._layoutInfo = e),
            (this._stride = i);
        }
        _buildShaderInfo(t, e) {
          let r = '\n',
            n = '\n';
          const a = [];
          for (const e of t) r += `attribute ${this._getType(e.count)} ${e.name};\n`;
          const s = this.attributes(),
            o = this.attributesInfo();
          let l = -1;
          for (const t of s) {
            l++;
            const { name: s, type: c, precisionFactor: p, isLayout: y } = o[t],
              f = p && 1 !== p ? ' * ' + 1 / p : '',
              { bytesPerElement: d, count: m } = u._encodingInfo[c],
              g = (t) => `a_data_${t.dataIndex}${h(m, t.offset, d)}`;
            switch (this.getAtributeState(l)) {
              case 0:
                {
                  const e = this._getType(m),
                    o = `u_${s}`;
                  a.push({
                    name: o,
                    type: e,
                    getValue: (e, r, n, a) => {
                      const s = y ? e.getLayoutValue(t, r) : e.getPaintValue(t, r);
                      if (11 === c) {
                        const t = e.getDashKey(s, e.getLayoutValue('line-cap', r)),
                          n = a.getMosaicItemPosition(t, !1);
                        if ((0, i.b)(n)) return null;
                        const { tl: o, br: l } = n;
                        return [o[0], l[1], l[0], o[1]];
                      }
                      if (12 === c) {
                        const e = a.getMosaicItemPosition(s, -1 === t.indexOf('line-'));
                        if ((0, i.b)(e)) return null;
                        const { tl: r, br: n } = e;
                        return [r[0], n[1], n[0], r[1]];
                      }
                      if (10 === c) {
                        const t = s[3];
                        return [t * s[0], t * s[1], t * s[2], t];
                      }
                      return s;
                    },
                  }),
                    (r += `uniform ${e} ${o};\n`),
                    (n += `${e} ${s} = ${o};\n`);
                }
                break;
              case 1:
                {
                  const r = g(e[t][0]);
                  n += `${this._getType(m)} ${s} = ${r}${f};\n`;
                }
                break;
              case 2: {
                const i = `u_t_${s}`;
                a.push({
                  name: i,
                  type: 'float',
                  getValue: (e, r, i, n) =>
                    (y
                      ? e.getLayoutProperty(t)
                      : e.getPaintProperty(t)
                    ).interpolator.interpolationUniformValue(i, r),
                }),
                  (r += `uniform float ${i};\n`);
                const o = g(e[t][0]),
                  l = g(e[t][1]);
                n += `${this._getType(m)} ${s} = mix(${o}${f}, ${l}${f}, ${i});\n`;
              }
            }
          }
          (this._shaderHeader = r), (this._shaderMain = n), (this._uniforms = a);
        }
        _bit(t) {
          return (this._key & (1 << t)) >> t;
        }
        _getType(t) {
          switch (t) {
            case 1:
              return 'float';
            case 2:
              return 'vec2';
            case 3:
              return 'vec3';
            case 4:
              return 'vec4';
          }
          throw new Error('Invalid count');
        }
        _encodeColor(t) {
          const e = 255 * t[3];
          return l.i8888to32(t[0] * e, t[1] * e, t[2] * e, e);
        }
        _encodePattern(t, e, r) {
          if (!r || !r.rect) return;
          const i = r.rect,
            n = r.width,
            a = r.height;
          (e[t] = this._encodeShort(i.x + 2, 0)),
            (e[t] |= this._encodeShort(i.y + 2 + a, 16)),
            (e[t + 1] = this._encodeShort(i.x + 2 + n, 0)),
            (e[t + 1] |= this._encodeShort(i.y + 2, 16));
        }
        _encodeByte(t, e) {
          return (255 & t) << e;
        }
        _encodeShort(t, e) {
          return (65535 & t) << e;
        }
      }
      u._encodingInfo = {
        0: { dataType: 5120, bytesPerElement: 1, count: 1, normalized: !1 },
        1: { dataType: 5121, bytesPerElement: 1, count: 1, normalized: !1 },
        2: { dataType: 5122, bytesPerElement: 2, count: 1, normalized: !1 },
        3: { dataType: 5123, bytesPerElement: 2, count: 1, normalized: !1 },
        4: { dataType: 5120, bytesPerElement: 1, count: 2, normalized: !1 },
        5: { dataType: 5121, bytesPerElement: 1, count: 2, normalized: !1 },
        6: { dataType: 5122, bytesPerElement: 2, count: 2, normalized: !1 },
        7: { dataType: 5123, bytesPerElement: 2, count: 2, normalized: !1 },
        8: { dataType: 5120, bytesPerElement: 1, count: 4, normalized: !1 },
        9: { dataType: 5121, bytesPerElement: 1, count: 4, normalized: !1 },
        10: { dataType: 5121, bytesPerElement: 1, count: 4, normalized: !0 },
        11: { dataType: 5123, bytesPerElement: 2, count: 4, normalized: !1 },
        12: { dataType: 5123, bytesPerElement: 2, count: 4, normalized: !1 },
      };
      const c = (t) => {
          switch (t) {
            case 5126:
            case 5124:
            case 5125:
              return 4;
            case 5122:
            case 5123:
              return 2;
            case 5120:
            case 5121:
              return 1;
          }
        },
        h = (t, e, r) => {
          const i = e / r;
          if (1 === t)
            switch (i) {
              case 0:
                return '.x';
              case 1:
                return '.y';
              case 2:
                return '.z';
              case 3:
                return '.w';
            }
          else if (2 === t)
            switch (i) {
              case 0:
                return '.xy';
              case 1:
                return '.yz';
              case 2:
                return '.zw';
            }
          else if (3 === t)
            switch (i) {
              case 0:
                return '.xyz';
              case 1:
                return '.yzw';
            }
          return '';
        };
      class p extends u {
        constructor(t) {
          super(t);
        }
        geometryInfo() {
          return p.GEOMETRY_LAYOUT;
        }
        opacityInfo() {
          return null;
        }
        attributes() {
          return p.ATTRIBUTES;
        }
        attributesInfo() {
          return p.ATTRIBUTES_INFO;
        }
      }
      (p.ATTRIBUTES = []),
        (p.GEOMETRY_LAYOUT = [
          { name: 'a_pos', count: 2, type: 5120, offset: 0, stride: 2, normalized: !1, divisor: 0 },
        ]),
        (p.ATTRIBUTES_INFO = {});
      class y extends u {
        constructor(t) {
          super(t);
        }
        geometryInfo() {
          return y.GEOMETRY_LAYOUT;
        }
        opacityInfo() {
          return null;
        }
        attributes() {
          return y.ATTRIBUTES;
        }
        attributesInfo() {
          return y.ATTRIBUTES_INFO;
        }
      }
      (y.ATTRIBUTES = [
        'circle-radius',
        'circle-color',
        'circle-opacity',
        'circle-stroke-width',
        'circle-stroke-color',
        'circle-stroke-opacity',
        'circle-blur',
      ]),
        (y.GEOMETRY_LAYOUT = [
          { name: 'a_pos', count: 2, type: 5122, offset: 0, stride: 4, normalized: !1, divisor: 0 },
        ]),
        (y.ATTRIBUTES_INFO = {
          'circle-radius': { name: 'radius', type: 1 },
          'circle-color': { name: 'color', type: 10 },
          'circle-opacity': { name: 'opacity', type: 1, precisionFactor: 100 },
          'circle-stroke-width': { name: 'stroke_width', type: 1, precisionFactor: 4 },
          'circle-stroke-color': { name: 'stroke_color', type: 10 },
          'circle-stroke-opacity': { name: 'stroke_opacity', type: 1, precisionFactor: 100 },
          'circle-blur': { name: 'blur', type: 1, precisionFactor: 32 },
        });
      class f extends u {
        constructor(t) {
          super(t);
        }
        geometryInfo() {
          return f.GEOMETRY_LAYOUT;
        }
        opacityInfo() {
          return null;
        }
        attributes() {
          return f.ATTRIBUTES;
        }
        attributesInfo() {
          return f.ATTRIBUTES_INFO;
        }
      }
      (f.ATTRIBUTES = ['fill-color', 'fill-opacity', 'fill-pattern']),
        (f.GEOMETRY_LAYOUT = [
          { name: 'a_pos', count: 2, type: 5122, offset: 0, stride: 4, normalized: !1, divisor: 0 },
        ]),
        (f.ATTRIBUTES_INFO = {
          'fill-color': { name: 'color', type: 10 },
          'fill-opacity': { name: 'opacity', type: 1, precisionFactor: 100 },
          'fill-pattern': { name: 'tlbr', type: 12, isOptional: !0 },
        });
      class d extends u {
        constructor(t, e) {
          super(t), (this.usefillColor = e);
        }
        geometryInfo() {
          return d.GEOMETRY_LAYOUT;
        }
        opacityInfo() {
          return null;
        }
        attributes() {
          return this.usefillColor ? d.ATTRIBUTES_FILL : d.ATTRIBUTES_OUTLINE;
        }
        attributesInfo() {
          return this.usefillColor ? d.ATTRIBUTES_INFO_FILL : d.ATTRIBUTES_INFO_OUTLINE;
        }
      }
      (d.ATTRIBUTES_OUTLINE = ['fill-outline-color', 'fill-opacity']),
        (d.ATTRIBUTES_FILL = ['fill-color', 'fill-opacity']),
        (d.GEOMETRY_LAYOUT = [
          { name: 'a_pos', count: 2, type: 5122, offset: 0, stride: 8, normalized: !1, divisor: 0 },
          {
            name: 'a_offset',
            count: 2,
            type: 5120,
            offset: 4,
            stride: 8,
            normalized: !1,
            divisor: 0,
          },
          {
            name: 'a_xnormal',
            count: 2,
            type: 5120,
            offset: 6,
            stride: 8,
            normalized: !1,
            divisor: 0,
          },
        ]),
        (d.ATTRIBUTES_INFO_OUTLINE = {
          'fill-outline-color': { name: 'color', type: 10 },
          'fill-opacity': { name: 'opacity', type: 1, precisionFactor: 100 },
        }),
        (d.ATTRIBUTES_INFO_FILL = {
          'fill-color': { name: 'color', type: 10 },
          'fill-opacity': { name: 'opacity', type: 1, precisionFactor: 100 },
        });
      class m extends u {
        constructor(t) {
          super(t);
        }
        geometryInfo() {
          return m.GEOMETRY_LAYOUT;
        }
        opacityInfo() {
          return null;
        }
        attributes() {
          return m.ATTRIBUTES;
        }
        attributesInfo() {
          return m.ATTRIBUTES_INFO;
        }
      }
      (m.ATTRIBUTES = [
        'line-blur',
        'line-color',
        'line-gap-width',
        'line-offset',
        'line-opacity',
        'line-width',
        'line-pattern',
        'line-dasharray',
      ]),
        (m.GEOMETRY_LAYOUT = [
          {
            name: 'a_pos',
            count: 2,
            type: 5122,
            offset: 0,
            stride: 16,
            normalized: !1,
            divisor: 0,
          },
          {
            name: 'a_extrude_offset',
            count: 4,
            type: 5120,
            offset: 4,
            stride: 16,
            normalized: !1,
            divisor: 0,
          },
          {
            name: 'a_dir_normal',
            count: 4,
            type: 5120,
            offset: 8,
            stride: 16,
            normalized: !1,
            divisor: 0,
          },
          {
            name: 'a_accumulatedDistance',
            count: 2,
            type: 5123,
            offset: 12,
            stride: 16,
            normalized: !1,
            divisor: 0,
          },
        ]),
        (m.ATTRIBUTES_INFO = {
          'line-width': { name: 'width', type: 1, precisionFactor: 2 },
          'line-gap-width': { name: 'gap_width', type: 1, precisionFactor: 2 },
          'line-offset': { name: 'offset', type: 0, precisionFactor: 2 },
          'line-color': { name: 'color', type: 10 },
          'line-opacity': { name: 'opacity', type: 1, precisionFactor: 100 },
          'line-blur': { name: 'blur', type: 1, precisionFactor: 4 },
          'line-pattern': { name: 'tlbr', type: 12, isOptional: !0 },
          'line-dasharray': { name: 'tlbr', type: 11, isOptional: !0 },
        });
      const g = [
          {
            name: 'a_pos',
            count: 2,
            type: 5122,
            offset: 0,
            stride: 16,
            normalized: !1,
            divisor: 0,
          },
          {
            name: 'a_vertexOffset',
            count: 2,
            type: 5122,
            offset: 4,
            stride: 16,
            normalized: !1,
            divisor: 0,
          },
          {
            name: 'a_texAngleRange',
            count: 4,
            type: 5121,
            offset: 8,
            stride: 16,
            normalized: !1,
            divisor: 0,
          },
          {
            name: 'a_levelInfo',
            count: 4,
            type: 5121,
            offset: 12,
            stride: 16,
            normalized: !1,
            divisor: 0,
          },
        ],
        b = [
          {
            name: 'a_opacityInfo',
            count: 1,
            type: 5121,
            offset: 0,
            stride: 1,
            normalized: !1,
            divisor: 0,
          },
        ];
      class v extends u {
        constructor(t) {
          super(t);
        }
        geometryInfo() {
          return g;
        }
        opacityInfo() {
          return b;
        }
        attributes() {
          return v.ATTRIBUTES;
        }
        attributesInfo() {
          return v.ATTRIBUTES_INFO;
        }
      }
      (v.ATTRIBUTES = [
        'icon-color',
        'icon-opacity',
        'icon-halo-blur',
        'icon-halo-color',
        'icon-halo-width',
        'icon-size',
      ]),
        (v.ATTRIBUTES_INFO = {
          'icon-color': { name: 'color', type: 10 },
          'icon-opacity': { name: 'opacity', type: 1, precisionFactor: 100 },
          'icon-halo-color': { name: 'halo_color', type: 10 },
          'icon-halo-width': { name: 'halo_width', type: 1, precisionFactor: 4 },
          'icon-halo-blur': { name: 'halo_blur', type: 1, precisionFactor: 4 },
          'icon-size': { name: 'size', type: 1, precisionFactor: 32, isLayout: !0 },
        });
      class w extends u {
        constructor(t) {
          super(t);
        }
        geometryInfo() {
          return g;
        }
        opacityInfo() {
          return b;
        }
        attributes() {
          return w.ATTRIBUTES;
        }
        attributesInfo() {
          return w.ATTRIBUTES_INFO;
        }
      }
      (w.ATTRIBUTES = [
        'text-color',
        'text-opacity',
        'text-halo-blur',
        'text-halo-color',
        'text-halo-width',
        'text-size',
      ]),
        (w.ATTRIBUTES_INFO = {
          'text-color': { name: 'color', type: 10 },
          'text-opacity': { name: 'opacity', type: 1, precisionFactor: 100 },
          'text-halo-color': { name: 'halo_color', type: 10 },
          'text-halo-width': { name: 'halo_width', type: 1, precisionFactor: 4 },
          'text-halo-blur': { name: 'halo_blur', type: 1, precisionFactor: 4 },
          'text-size': { name: 'size', type: 1, isLayout: !0 },
        });
      const _ = Number.POSITIVE_INFINITY,
        x = Math.PI,
        T = 2 * x,
        P = 128 / x,
        E = x / 180,
        I = 1 / Math.LN2;
      function D(t, e) {
        return (t %= e) >= 0 ? t : t + e;
      }
      function L(t) {
        return D(t * P, 256);
      }
      function k(t) {
        return Math.log(t) * I;
      }
      function A(t, e, r) {
        return t * (1 - r) + e * r;
      }
      const z = { kind: 'null' },
        S = { kind: 'number' },
        M = { kind: 'string' },
        U = { kind: 'boolean' },
        B = { kind: 'color' },
        R = { kind: 'object' },
        O = { kind: 'value' };
      function N(t, e) {
        return { kind: 'array', itemType: t, n: e };
      }
      const F = [z, S, M, U, B, R, N(O)];
      function $(t) {
        if ('array' === t.kind) {
          const e = $(t.itemType);
          return 'number' == typeof t.n
            ? `array<${e}, ${t.n}>`
            : 'value' === t.itemType.kind
            ? 'array'
            : `array<${e}>`;
        }
        return t.kind;
      }
      function V(t) {
        if (null === t) return z;
        if ('string' == typeof t) return M;
        if ('boolean' == typeof t) return U;
        if ('number' == typeof t) return S;
        if (t instanceof n.Z) return B;
        if (Array.isArray(t)) {
          let e;
          for (const r of t) {
            const t = V(r);
            if (e) {
              if (e !== t) {
                e = O;
                break;
              }
            } else e = t;
          }
          return N(e || O, t.length);
        }
        return 'object' == typeof t ? R : O;
      }
      function C(t, e) {
        if ('array' === e.kind)
          return (
            'array' === t.kind &&
            ((0 === t.n && 'value' === t.itemType.kind) || C(t.itemType, e.itemType)) &&
            ('number' != typeof e.n || e.n === t.n)
          );
        if ('value' === e.kind) for (const e of F) if (C(t, e)) return !0;
        return e.kind === t.kind;
      }
      function Z(t) {
        if (null === t) return '';
        const e = typeof t;
        return 'string' === e
          ? t
          : 'number' === e || 'boolean' === e
          ? String(t)
          : t instanceof n.Z
          ? t.toString()
          : JSON.stringify(t);
      }
      class q {
        constructor(t) {
          (this.parent = t), (this.vars = {});
        }
        add(t, e) {
          this.vars[t] = e;
        }
        get(t) {
          return this.vars[t] ? this.vars[t] : this.parent ? this.parent.get(t) : null;
        }
      }
      class j {
        constructor() {
          this.type = O;
        }
        static parse(t) {
          if (t.length > 1) throw new Error('"id" does not expect arguments');
          return new j();
        }
        evaluate(t, e) {
          return null == t ? void 0 : t.id;
        }
      }
      class Y {
        constructor() {
          this.type = M;
        }
        static parse(t) {
          if (t.length > 1) throw new Error('"geometry-type" does not expect arguments');
          return new Y();
        }
        evaluate(t, e) {
          if (!t) return null;
          switch (t.type) {
            case 1:
              return 'Point';
            case 2:
              return 'LineString';
            case 3:
              return 'Polygon';
            default:
              return null;
          }
        }
      }
      class H {
        constructor() {
          this.type = R;
        }
        static parse(t) {
          if (t.length > 1) throw new Error('"properties" does not expect arguments');
          return new H();
        }
        evaluate(t, e) {
          return null == t ? void 0 : t.values;
        }
      }
      class G {
        constructor() {
          this.type = S;
        }
        static parse(t) {
          if (t.length > 1) throw new Error('"zoom" does not expect arguments');
          return new G();
        }
        evaluate(t, e) {
          return e;
        }
      }
      class K {
        constructor(t, e, r) {
          (this.lhs = t), (this.rhs = e), (this.compare = r), (this.type = U);
        }
        static parse(t, e, r) {
          if (3 !== t.length && 4 !== t.length)
            throw new Error(`"${t[0]}" expects 2 or 3 arguments`);
          if (4 === t.length) throw new Error(`"${t[0]}" collator not supported`);
          return new K(It(t[1], e), It(t[2], e), r);
        }
        evaluate(t, e) {
          return this.compare(this.lhs.evaluate(t, e), this.rhs.evaluate(t, e));
        }
      }
      class J {
        constructor(t) {
          (this.arg = t), (this.type = U);
        }
        static parse(t, e) {
          if (2 !== t.length) throw new Error('"!" expects 1 argument');
          return new J(It(t[1], e));
        }
        evaluate(t, e) {
          return !this.arg.evaluate(t, e);
        }
      }
      class W {
        constructor(t) {
          (this.args = t), (this.type = U);
        }
        static parse(t, e) {
          const r = [];
          for (let i = 1; i < t.length; i++) r.push(It(t[i], e));
          return new W(r);
        }
        evaluate(t, e) {
          for (const r of this.args) if (!r.evaluate(t, e)) return !1;
          return !0;
        }
      }
      class Q {
        constructor(t) {
          (this.args = t), (this.type = U);
        }
        static parse(t, e) {
          const r = [];
          for (let i = 1; i < t.length; i++) r.push(It(t[i], e));
          return new Q(r);
        }
        evaluate(t, e) {
          for (const r of this.args) if (r.evaluate(t, e)) return !0;
          return !1;
        }
      }
      class X {
        constructor(t) {
          (this.args = t), (this.type = U);
        }
        static parse(t, e) {
          const r = [];
          for (let i = 1; i < t.length; i++) r.push(It(t[i], e));
          return new X(r);
        }
        evaluate(t, e) {
          for (const r of this.args) if (r.evaluate(t, e)) return !1;
          return !0;
        }
      }
      class tt {
        constructor(t, e, r) {
          (this.type = t), (this.args = e), (this.fallback = r);
        }
        static parse(t, e, r) {
          if (t.length < 4) throw new Error('"case" expects at least 3 arguments');
          if (t.length % 2 == 1) throw new Error('"case" expects an odd number of arguments');
          let i;
          const n = [];
          for (let a = 1; a < t.length - 1; a += 2) {
            const s = It(t[a], e),
              o = It(t[a + 1], e, r);
            i || (i = o.type), n.push({ condition: s, output: o });
          }
          const a = It(t[t.length - 1], e, r);
          return i || (i = a.type), new tt(i, n, a);
        }
        evaluate(t, e) {
          for (const r of this.args) if (r.condition.evaluate(t, e)) return r.output.evaluate(t, e);
          return this.fallback.evaluate(t, e);
        }
      }
      class et {
        constructor(t, e) {
          (this.type = t), (this.args = e);
        }
        static parse(t, e) {
          if (t.length < 2) throw new Error('"coalesce" expects at least 1 argument');
          let r;
          const i = [];
          for (let n = 1; n < t.length; n++) {
            const a = It(t[n], e);
            r || (r = a.type), i.push(a);
          }
          return new et(r, i);
        }
        evaluate(t, e) {
          for (const r of this.args) {
            const i = r.evaluate(t, e);
            if (null !== i) return i;
          }
          return null;
        }
      }
      class rt {
        constructor(t, e, r, i, n) {
          (this.type = t),
            (this.input = e),
            (this.labels = r),
            (this.outputs = i),
            (this.fallback = n);
        }
        static parse(t, e) {
          if (t.length < 3) throw new Error('"match" expects at least 3 arguments');
          if (t.length % 2 == 0) throw new Error('"case" expects an even number of arguments');
          let r;
          const i = It(t[1], e),
            n = [],
            a = {};
          let s;
          for (let i = 2; i < t.length - 1; i += 2) {
            let o = t[i];
            Array.isArray(o) || (o = [o]);
            for (const t of o) {
              const e = typeof t;
              if ('string' !== e && 'number' !== e)
                throw new Error('"match" requires string or number literal as labels');
              if (s) {
                if (e !== s) throw new Error('"match" requires labels to have the same type');
              } else s = e;
              a[t] = n.length;
            }
            const l = It(t[i + 1], e);
            r || (r = l.type), n.push(l);
          }
          return new rt(r, i, a, n, It(t[t.length - 1], e));
        }
        evaluate(t, e) {
          const r = this.input.evaluate(t, e);
          return (this.outputs[this.labels[r]] || this.fallback).evaluate(t, e);
        }
      }
      class it {
        constructor(t, e, r, i, n) {
          (this.operator = t),
            (this.type = e),
            (this.interpolation = r),
            (this.input = i),
            (this.stops = n);
        }
        static parse(t, e, r) {
          const i = t[0];
          if (t.length < 5) throw new Error(`"${i}" expects at least 4 arguments`);
          const n = t[1];
          if (!Array.isArray(n) || 0 === n.length)
            throw new Error(`"${n}" is not a valid interpolation`);
          switch (n[0]) {
            case 'linear':
              if (1 !== n.length) throw new Error('Linear interpolation cannot have parameters');
              break;
            case 'exponential':
              if (2 !== n.length || 'number' != typeof n[1])
                throw new Error('Exponential interpolation requires one numeric argument');
              break;
            case 'cubic-bezier':
              if (5 !== n.length)
                throw new Error(
                  'Cubic bezier interpolation requires four numeric arguments with values between 0 and 1',
                );
              for (let t = 1; t < 5; t++) {
                const e = n[t];
                if ('number' != typeof e || e < 0 || e > 1)
                  throw new Error(
                    'Cubic bezier interpolation requires four numeric arguments with values between 0 and 1',
                  );
              }
              break;
            default:
              throw new Error(`"${t[0]}" unknown interpolation type "${n[0]}"`);
          }
          if (t.length % 2 != 1) throw new Error(`"${i}" expects an even number of arguments`);
          const a = It(t[2], e, S);
          let s;
          'interpolate-hcl' === i || 'interpolate-lab' === i
            ? (s = B)
            : r && 'value' !== r.kind && (s = r);
          const o = [];
          for (let r = 3; r < t.length; r += 2) {
            const n = t[r];
            if ('number' != typeof n)
              throw new Error(`"${i}" requires stop inputs as literal numbers`);
            if (o.length && o[o.length - 1][0] >= n)
              throw new Error(`"${i}" requires strictly ascending stop inputs`);
            const a = It(t[r + 1], e, s);
            s || (s = a.type), o.push([n, a]);
          }
          if (s && s !== B && s !== S && ('array' !== s.kind || s.itemType !== S))
            throw new Error(`"${i}" cannot interpolate type ${$(s)}`);
          return new it(i, s, n, a, o);
        }
        evaluate(t, e) {
          const r = this.stops;
          if (1 === r.length) return r[0][1].evaluate(t, e);
          const i = this.input.evaluate(t, e);
          if (i <= r[0][0]) return r[0][1].evaluate(t, e);
          if (i >= r[r.length - 1][0]) return r[r.length - 1][1].evaluate(t, e);
          let s = 0;
          for (; ++s < r.length && !(i < r[s][0]); );
          const o = r[s - 1][0],
            l = r[s][0],
            u = it.interpolationRatio(this.interpolation, i, o, l),
            c = r[s - 1][1].evaluate(t, e),
            h = r[s][1].evaluate(t, e);
          if ('interpolate' === this.operator) {
            if ('array' === this.type.kind && Array.isArray(c) && Array.isArray(h))
              return c.map((t, e) => A(t, h[e], u));
            if ('color' === this.type.kind && c instanceof n.Z && h instanceof n.Z) {
              const t = new n.Z(c),
                e = new n.Z(h);
              return new n.Z([A(t.r, e.r, u), A(t.g, e.g, u), A(t.b, e.b, u), A(t.a, e.a, u)]);
            }
            if ('number' === this.type.kind && 'number' == typeof c && 'number' == typeof h)
              return A(c, h, u);
            throw new Error(`"${this.operator}" cannot interpolate type ${$(this.type)}`);
          }
          if ('interpolate-hcl' === this.operator) {
            const t = (0, a.c)(c),
              e = (0, a.c)(h),
              r = e.h - t.h,
              i = (0, a.t)({
                h: t.h + u * (r > 180 || r < -180 ? r - 360 * Math.round(r / 360) : r),
                c: A(t.c, e.c, u),
                l: A(t.l, e.l, u),
              });
            return new n.Z({ a: A(c.a, h.a, u), ...i });
          }
          if ('interpolate-lab' === this.operator) {
            const t = (0, a.a)(c),
              e = (0, a.a)(h),
              r = (0, a.t)({ l: A(t.l, e.l, u), a: A(t.a, e.a, u), b: A(t.b, e.b, u) });
            return new n.Z({ a: A(c.a, h.a, u), ...r });
          }
          throw new Error(`Unexpected operator "${this.operator}"`);
        }
        interpolationUniformValue(t, e) {
          const r = this.stops;
          if (1 === r.length) return 0;
          if (t >= r[r.length - 1][0]) return 0;
          let i = 0;
          for (; ++i < r.length && !(t < r[i][0]); );
          const n = r[i - 1][0],
            a = r[i][0];
          return it.interpolationRatio(this.interpolation, e, n, a);
        }
        getInterpolationRange(t) {
          const e = this.stops;
          if (1 === e.length) {
            const t = e[0][0];
            return [t, t];
          }
          const r = e[e.length - 1][0];
          if (t >= r) return [r, r];
          let i = 0;
          for (; ++i < e.length && !(t < e[i][0]); );
          return [e[i - 1][0], e[i][0]];
        }
        static interpolationRatio(t, e, r, i) {
          let n = 0;
          return (
            'linear' === t[0]
              ? (n = it.exponentialInterpolationRatio(e, 1, r, i))
              : 'exponential' === t[0]
              ? (n = it.exponentialInterpolationRatio(e, t[1], r, i))
              : 'cubic-bezier' === t[0] &&
                (n = (0, s.u)(
                  t[1],
                  t[2],
                  t[3],
                  t[4],
                )(it.exponentialInterpolationRatio(e, 1, r, i), 1e-5)),
            n < 0 ? (n = 0) : n > 1 && (n = 1),
            n
          );
        }
        static exponentialInterpolationRatio(t, e, r, i) {
          const n = i - r;
          if (0 === n) return 0;
          const a = t - r;
          return 1 === e ? a / n : (e ** a - 1) / (e ** n - 1);
        }
      }
      class nt {
        constructor(t, e, r) {
          (this.type = t), (this.input = e), (this.stops = r);
        }
        static parse(t, e) {
          if (t.length < 5) throw new Error('"step" expects at least 4 arguments');
          if (t.length % 2 != 1) throw new Error('"step" expects an even number of arguments');
          const r = It(t[1], e, S);
          let i;
          const n = [];
          n.push([-1 / 0, It(t[2], e)]);
          for (let r = 3; r < t.length; r += 2) {
            const a = t[r];
            if ('number' != typeof a)
              throw new Error('"step" requires stop inputs as literal numbers');
            if (n.length && n[n.length - 1][0] >= a)
              throw new Error('"step" requires strictly ascending stop inputs');
            const s = It(t[r + 1], e);
            i || (i = s.type), n.push([a, s]);
          }
          return new nt(i, r, n);
        }
        evaluate(t, e) {
          const r = this.stops;
          if (1 === r.length) return r[0][1].evaluate(t, e);
          const i = this.input.evaluate(t, e);
          let n = 0;
          for (; ++n < r.length && !(i < r[n][0]); );
          return this.stops[n - 1][1].evaluate(t, e);
        }
      }
      class at {
        constructor(t, e) {
          (this.type = t), (this.output = e);
        }
        static parse(t, e, r) {
          if (t.length < 4) throw new Error('"let" expects at least 3 arguments');
          if (t.length % 2 == 1) throw new Error('"let" expects an odd number of arguments');
          const i = new q(e);
          for (let r = 1; r < t.length - 1; r += 2) {
            const n = t[r];
            if ('string' != typeof n)
              throw new Error(`"let" requires a string to define variable names - found ${n}`);
            i.add(n, It(t[r + 1], e));
          }
          const n = It(t[t.length - 1], i, r);
          return new at(n.type, n);
        }
        evaluate(t, e) {
          return this.output.evaluate(t, e);
        }
      }
      class st {
        constructor(t, e) {
          (this.type = t), (this.output = e);
        }
        static parse(t, e, r) {
          if (2 !== t.length || 'string' != typeof t[1])
            throw new Error('"var" requires just one literal string argument');
          const i = e.get(t[1]);
          if (!i)
            throw new Error(`${t[1]} must be defined before being used in a "var" expression`);
          return new st(r || O, i);
        }
        evaluate(t, e) {
          return this.output.evaluate(t, e);
        }
      }
      class ot {
        constructor(t, e, r) {
          (this.type = t), (this.index = e), (this.array = r);
        }
        static parse(t, e) {
          if (3 !== t.length) throw new Error('"at" expects 2 arguments');
          const r = It(t[1], e, S),
            i = It(t[2], e);
          return new ot(i.type.itemType, r, i);
        }
        evaluate(t, e) {
          const r = this.index.evaluate(t, e),
            i = this.array.evaluate(t, e);
          if (r < 0 || r >= i.length) throw new Error('"at" index out of bounds');
          if (r !== Math.floor(r)) throw new Error('"at" index must be an integer');
          return i[r];
        }
      }
      class lt {
        constructor(t, e) {
          (this.key = t), (this.obj = e), (this.type = O);
        }
        static parse(t, e) {
          let r, i;
          switch (t.length) {
            case 2:
              return (r = It(t[1], e)), new lt(r);
            case 3:
              return (r = It(t[1], e)), (i = It(t[2], e)), new lt(r, i);
            default:
              throw new Error('"get" expects 1 or 2 arguments');
          }
        }
        evaluate(t, e) {
          const r = this.key.evaluate(t, e);
          return this.obj ? this.obj.evaluate(t, e)[r] : null == t ? void 0 : t.values[r];
        }
      }
      class ut {
        constructor(t, e) {
          (this.key = t), (this.obj = e), (this.type = U);
        }
        static parse(t, e) {
          let r, i;
          switch (t.length) {
            case 2:
              return (r = It(t[1], e)), new ut(r);
            case 3:
              return (r = It(t[1], e)), (i = It(t[2], e)), new ut(r, i);
            default:
              throw new Error('"has" expects 1 or 2 arguments');
          }
        }
        evaluate(t, e) {
          const r = this.key.evaluate(t, e);
          return this.obj ? r in this.obj.evaluate(t, e) : !(null == t || !t.values[r]);
        }
      }
      class ct {
        constructor(t, e) {
          (this.key = t), (this.vals = e), (this.type = U);
        }
        static parse(t, e) {
          if (3 !== t.length) throw new Error('"in" expects 2 arguments');
          return new ct(It(t[1], e), It(t[2], e));
        }
        evaluate(t, e) {
          const r = this.key.evaluate(t, e);
          return -1 !== this.vals.evaluate(t, e).indexOf(r);
        }
      }
      class ht {
        constructor(t, e, r) {
          (this.item = t), (this.array = e), (this.from = r), (this.type = S);
        }
        static parse(t, e) {
          if (t.length < 3 || t.length > 4) throw new Error('"index-of" expects 3 or 4 arguments');
          const r = It(t[1], e),
            i = It(t[2], e);
          if (4 === t.length) {
            const n = It(t[3], e, S);
            return new ht(r, i, n);
          }
          return new ht(r, i);
        }
        evaluate(t, e) {
          const r = this.item.evaluate(t, e),
            i = this.array.evaluate(t, e);
          if (this.from) {
            const n = this.from.evaluate(t, e);
            if (n !== Math.floor(n)) throw new Error('"index-of" index must be an integer');
            return i.indexOf(r, n);
          }
          return i.indexOf(r);
        }
      }
      class pt {
        constructor(t) {
          (this.arg = t), (this.type = S);
        }
        static parse(t, e) {
          if (2 !== t.length) throw new Error('"length" expects 2 arguments');
          const r = It(t[1], e);
          return new pt(r);
        }
        evaluate(t, e) {
          const r = this.arg.evaluate(t, e);
          if ('string' == typeof r) return r.length;
          if (Array.isArray(r)) return r.length;
          throw new Error('"length" expects string or array');
        }
      }
      class yt {
        constructor(t, e, r, i) {
          (this.type = t), (this.array = e), (this.from = r), (this.to = i);
        }
        static parse(t, e) {
          if (t.length < 3 || t.length > 4) throw new Error('"slice" expects 2 or 3 arguments');
          const r = It(t[1], e),
            i = It(t[2], e, S);
          if (i.type !== S) throw new Error('"slice" index must return a number');
          if (4 === t.length) {
            const n = It(t[3], e, S);
            if (n.type !== S) throw new Error('"slice" index must return a number');
            return new yt(r.type, r, i, n);
          }
          return new yt(r.type, r, i);
        }
        evaluate(t, e) {
          const r = this.array.evaluate(t, e);
          if (!Array.isArray(r) && 'string' != typeof r)
            throw new Error('"slice" input must be an array or a string');
          const i = this.from.evaluate(t, e);
          if (i < 0 || i >= r.length) throw new Error('"slice" index out of bounds');
          if (i !== Math.floor(i)) throw new Error('"slice" index must be an integer');
          if (this.to) {
            const n = this.to.evaluate(t, e);
            if (n < 0 || n >= r.length) throw new Error('"slice" index out of bounds');
            if (n !== Math.floor(n)) throw new Error('"slice" index must be an integer');
            return r.slice(i, n);
          }
          return r.slice(i);
        }
      }
      class ft {
        constructor() {
          this.type = U;
        }
        static parse(t) {
          if (1 !== t.length) throw new Error('"has-id" expects no arguments');
          return new ft();
        }
        evaluate(t, e) {
          return t && void 0 !== t.id;
        }
      }
      class dt {
        constructor(t, e) {
          (this.args = t), (this.calculate = e), (this.type = S);
        }
        static parse(t, e, r) {
          const i = t.slice(1).map((t) => It(t, e));
          return new dt(i, r);
        }
        evaluate(t, e) {
          let r;
          return this.args && (r = this.args.map((r) => r.evaluate(t, e))), this.calculate(r);
        }
      }
      class mt {
        constructor(t, e) {
          (this.args = t), (this.calculate = e), (this.type = S);
        }
        static parse(t, e) {
          const r = t.slice(1).map((t) => It(t, e));
          return new mt(r, mt.ops[t[0]]);
        }
        evaluate(t, e) {
          let r;
          return this.args && (r = this.args.map((r) => r.evaluate(t, e))), this.calculate(r);
        }
      }
      mt.ops = {
        abs: (t) => Math.abs(t[0]),
        acos: (t) => Math.acos(t[0]),
        asin: (t) => Math.asin(t[0]),
        atan: (t) => Math.atan(t[0]),
        ceil: (t) => Math.ceil(t[0]),
        cos: (t) => Math.cos(t[0]),
        e: () => Math.E,
        floor: (t) => Math.floor(t[0]),
        ln: (t) => Math.log(t[0]),
        ln2: () => Math.LN2,
        log10: (t) => Math.log(t[0]) / Math.LN10,
        log2: (t) => Math.log(t[0]) / Math.LN2,
        max: (t) => Math.max(...t),
        min: (t) => Math.min(...t),
        pi: () => Math.PI,
        round: (t) => Math.round(t[0]),
        sin: (t) => Math.sin(t[0]),
        sqrt: (t) => Math.sqrt(t[0]),
        tan: (t) => Math.tan(t[0]),
      };
      class gt {
        constructor(t) {
          (this.args = t), (this.type = M);
        }
        static parse(t, e) {
          return new gt(t.slice(1).map((t) => It(t, e)));
        }
        evaluate(t, e) {
          return this.args.map((r) => r.evaluate(t, e)).join('');
        }
      }
      class bt {
        constructor(t, e) {
          (this.arg = t), (this.calculate = e), (this.type = M);
        }
        static parse(t, e) {
          if (2 !== t.length) throw new Error(`${t[0]} expects 1 argument`);
          const r = It(t[1], e);
          return new bt(r, bt.ops[t[0]]);
        }
        evaluate(t, e) {
          return this.calculate(this.arg.evaluate(t, e));
        }
      }
      bt.ops = { downcase: (t) => t.toLowerCase(), upcase: (t) => t.toUpperCase() };
      class vt {
        constructor(t) {
          (this.args = t), (this.type = B);
        }
        static parse(t, e) {
          if (4 !== t.length) throw new Error('"rgb" expects 3 arguments');
          const r = t.slice(1).map((t) => It(t, e));
          return new vt(r);
        }
        evaluate(t, e) {
          const r = this._validate(this.args[0].evaluate(t, e)),
            i = this._validate(this.args[1].evaluate(t, e)),
            a = this._validate(this.args[2].evaluate(t, e));
          return new n.Z({ r, g: i, b: a });
        }
        _validate(t) {
          if ('number' != typeof t || t < 0 || t > 255)
            throw new Error(`${t}: invalid color component`);
          return Math.round(t);
        }
      }
      class wt {
        constructor(t) {
          (this.args = t), (this.type = B);
        }
        static parse(t, e) {
          if (5 !== t.length) throw new Error('"rgba" expects 4 arguments');
          const r = t.slice(1).map((t) => It(t, e));
          return new wt(r);
        }
        evaluate(t, e) {
          const r = this._validate(this.args[0].evaluate(t, e)),
            i = this._validate(this.args[1].evaluate(t, e)),
            a = this._validate(this.args[2].evaluate(t, e)),
            s = this._validateAlpha(this.args[3].evaluate(t, e));
          return new n.Z({ r, g: i, b: a, a: s });
        }
        _validate(t) {
          if ('number' != typeof t || t < 0 || t > 255)
            throw new Error(`${t}: invalid color component`);
          return Math.round(t);
        }
        _validateAlpha(t) {
          if ('number' != typeof t || t < 0 || t > 1)
            throw new Error(`${t}: invalid alpha color component`);
          return t;
        }
      }
      class _t {
        constructor(t) {
          (this.color = t), (this.type = N(S, 4));
        }
        static parse(t, e) {
          if (2 !== t.length) throw new Error('"to-rgba" expects 1 argument');
          const r = It(t[1], e);
          return new _t(r);
        }
        evaluate(t, e) {
          return new n.Z(this.color.evaluate(t, e)).toRgba();
        }
      }
      class xt {
        constructor(t, e) {
          (this.type = t), (this.args = e);
        }
        static parse(t, e) {
          const r = t[0];
          if (t.length < 2) throw new Error(`${r} expects at least one argument`);
          let i,
            n = 1;
          if ('array' === r) {
            if (t.length > 2) {
              switch (t[1]) {
                case 'string':
                  i = M;
                  break;
                case 'number':
                  i = S;
                  break;
                case 'boolean':
                  i = U;
                  break;
                default:
                  throw new Error('"array" type argument must be string, number or boolean');
              }
              n++;
            } else i = O;
            let e;
            if (t.length > 3) {
              if (
                ((e = t[2]), null !== e && ('number' != typeof e || e < 0 || e !== Math.floor(e)))
              )
                throw new Error('"array" length argument must be a positive integer literal');
              n++;
            }
            i = N(i, e);
          } else
            switch (r) {
              case 'string':
                i = M;
                break;
              case 'number':
                i = S;
                break;
              case 'boolean':
                i = U;
                break;
              case 'object':
                i = R;
            }
          const a = [];
          for (; n < t.length; n++) {
            const r = It(t[n], e);
            a.push(r);
          }
          return new xt(i, a);
        }
        evaluate(t, e) {
          let r;
          for (const i of this.args) {
            const n = i.evaluate(t, e);
            if (((r = V(n)), C(r, this.type))) return n;
          }
          throw new Error(`Expected ${$(this.type)} but got ${$(r)}`);
        }
      }
      class Tt {
        constructor(t, e) {
          (this.type = t), (this.args = e);
        }
        static parse(t, e) {
          const r = t[0],
            i = Tt.types[r];
          if (i === U || i === M) {
            if (2 !== t.length) throw new Error(`${r} expects one argument`);
          } else if (t.length < 2) throw new Error(`${r} expects at least one argument`);
          const n = [];
          for (let r = 1; r < t.length; r++) {
            const i = It(t[r], e);
            n.push(i);
          }
          return new Tt(i, n);
        }
        evaluate(t, e) {
          if (this.type === U) return Boolean(this.args[0].evaluate(t, e));
          if (this.type === M) return Z(this.args[0].evaluate(t, e));
          if (this.type === S) {
            for (const r of this.args) {
              const i = Number(r.evaluate(t, e));
              if (!isNaN(i)) return i;
            }
            return null;
          }
          if (this.type === B) {
            for (const r of this.args)
              try {
                const i = Tt.toColor(r.evaluate(t, e));
                if (i instanceof n.Z) return i;
              } catch {}
            return null;
          }
        }
        static toBoolean(t) {
          return Boolean(t);
        }
        static toString(t) {
          return Z(t);
        }
        static toNumber(t) {
          const e = Number(t);
          if (isNaN(e)) throw new Error(`"${t}" is not a number`);
          return e;
        }
        static toColor(t) {
          if (t instanceof n.Z) return t;
          if ('string' == typeof t) {
            const e = n.Z.fromString(t);
            if (e) return e;
            throw new Error(`"${t}" is not a color`);
          }
          if (Array.isArray(t)) return n.Z.fromArray(t);
          throw new Error(`"${t}" is not a color`);
        }
      }
      Tt.types = { 'to-boolean': U, 'to-color': B, 'to-number': S, 'to-string': M };
      class Pt {
        constructor(t) {
          (this.val = t), (this.type = V(t));
        }
        static parse(t) {
          if (2 !== t.length) throw new Error('"literal" expects 1 argument');
          return new Pt(t[1]);
        }
        evaluate(t, e) {
          return this.val;
        }
      }
      class Et {
        constructor(t) {
          (this.arg = t), (this.type = M);
        }
        static parse(t, e) {
          if (2 !== t.length) throw new Error('"typeof" expects 1 argument');
          return new Et(It(t[1], e));
        }
        evaluate(t, e) {
          return $(V(this.arg.evaluate(t, e)));
        }
      }
      function It(t, e, r) {
        const i = typeof t;
        if ('string' === i || 'boolean' === i || 'number' === i || null === t) {
          if (r)
            switch (r.kind) {
              case 'string':
                'string' !== i && (t = Tt.toString(t));
                break;
              case 'number':
                'number' !== i && (t = Tt.toNumber(t));
                break;
              case 'color':
                t = Tt.toColor(t);
            }
          t = ['literal', t];
        }
        if (!Array.isArray(t) || 0 === t.length)
          throw new Error('Expression must be a non empty array');
        const n = t[0];
        if ('string' != typeof n) throw new Error('First element of expression must be a string');
        const a = Dt[n];
        if (void 0 === a) throw new Error(`Invalid expression operator "${n}"`);
        if (!a) throw new Error(`Unimplemented expression operator "${n}"`);
        return a.parse(t, e, r);
      }
      const Dt = {
        array: xt,
        boolean: xt,
        collator: null,
        format: null,
        image: null,
        literal: Pt,
        number: xt,
        'number-format': null,
        object: xt,
        string: xt,
        'to-boolean': Tt,
        'to-color': Tt,
        'to-number': Tt,
        'to-string': Tt,
        typeof: Et,
        accumulated: null,
        'feature-state': null,
        'geometry-type': Y,
        id: j,
        'line-progress': null,
        properties: H,
        at: ot,
        get: lt,
        has: ut,
        in: ct,
        'index-of': ht,
        length: pt,
        slice: yt,
        '!': J,
        '!=': class extends K {
          static parse(t, e) {
            return K.parse(t, e, (t, e) => t !== e);
          }
        },
        '<': class extends K {
          static parse(t, e) {
            return K.parse(t, e, (t, e) => t < e);
          }
        },
        '<=': class extends K {
          static parse(t, e) {
            return K.parse(t, e, (t, e) => t <= e);
          }
        },
        '==': class extends K {
          static parse(t, e) {
            return K.parse(t, e, (t, e) => t === e);
          }
        },
        '>': class extends K {
          static parse(t, e) {
            return K.parse(t, e, (t, e) => t > e);
          }
        },
        '>=': class extends K {
          static parse(t, e) {
            return K.parse(t, e, (t, e) => t >= e);
          }
        },
        all: W,
        any: Q,
        case: tt,
        coalesce: et,
        match: rt,
        within: null,
        interpolate: it,
        'interpolate-hcl': it,
        'interpolate-lab': it,
        step: nt,
        let: at,
        var: st,
        concat: gt,
        downcase: bt,
        'is-supported-script': null,
        'resolved-locale': null,
        upcase: bt,
        rgb: vt,
        rgba: wt,
        'to-rgba': _t,
        '-': class extends dt {
          static parse(t, e) {
            switch (t.length) {
              case 2:
                return dt.parse(t, e, (t) => -t[0]);
              case 3:
                return dt.parse(t, e, (t) => t[0] - t[1]);
              default:
                throw new Error('"-" expects 1 or 2 arguments');
            }
          }
        },
        '*': class extends dt {
          static parse(t, e) {
            return dt.parse(t, e, (t) => {
              let e = 1;
              for (const r of t) e *= r;
              return e;
            });
          }
        },
        '/': class extends dt {
          static parse(t, e) {
            if (3 === t.length) return dt.parse(t, e, (t) => t[0] / t[1]);
            throw new Error('"/" expects 2 arguments');
          }
        },
        '%': class extends dt {
          static parse(t, e) {
            if (3 === t.length) return dt.parse(t, e, (t) => t[0] % t[1]);
            throw new Error('"%" expects 2 arguments');
          }
        },
        '^': class extends dt {
          static parse(t, e) {
            if (3 === t.length) return dt.parse(t, e, (t) => t[0] ** t[1]);
            throw new Error('"^" expects 1 or 2 arguments');
          }
        },
        '+': class extends dt {
          static parse(t, e) {
            return dt.parse(t, e, (t) => {
              let e = 0;
              for (const r of t) e += r;
              return e;
            });
          }
        },
        abs: mt,
        acos: mt,
        asin: mt,
        atan: mt,
        ceil: mt,
        cos: mt,
        e: mt,
        floor: mt,
        ln: mt,
        ln2: mt,
        log10: mt,
        log2: mt,
        max: mt,
        min: mt,
        pi: mt,
        round: mt,
        sin: mt,
        sqrt: mt,
        tan: mt,
        zoom: G,
        'heatmap-density': null,
        'has-id': ft,
        none: X,
      };
      class Lt {
        constructor(t) {
          this._expression = t;
        }
        filter(t, e) {
          if (!this._expression) return !0;
          try {
            return this._expression.evaluate(t, e);
          } catch (t) {
            return console.log(t.message), !0;
          }
        }
        static createFilter(t) {
          if (!t) return null;
          this.isLegacyFilter(t) && (t = this.convertLegacyFilter(t));
          try {
            const e = It(t, null, U);
            return new Lt(e);
          } catch (t) {
            return console.log(t.message), null;
          }
        }
        static isLegacyFilter(t) {
          if (!Array.isArray(t)) return !0;
          if (0 === t.length) return !0;
          switch (t[0]) {
            case '==':
            case '!=':
            case '>':
            case '<':
            case '>=':
            case '<=':
              return 3 === t.length && 'string' == typeof t[1] && !Array.isArray(t[2]);
            case 'in':
              return t.length >= 3 && 'string' == typeof t[1] && !Array.isArray(t[2]);
            case '!in':
              return !0;
            case 'any':
            case 'all':
              for (let e = 1; e < t.length; e++) if (!this.isLegacyFilter(t[1])) return !1;
              return !0;
            case 'none':
              return !0;
            case 'has':
              return 2 === t.length && ('$id' === t[1] || '$type' === t[1]);
            case '!has':
              return !0;
            default:
              return !1;
          }
        }
        static convertLegacyFilter(t) {
          if (!Array.isArray(t) || 0 === t.length) return !0;
          const e = t[0];
          if (1 === t.length) return 'any' !== e;
          switch (e) {
            case '==':
              return Lt.convertComparison('==', t[1], t[2]);
            case '!=':
              return Lt.negate(Lt.convertComparison('==', t[1], t[2]));
            case '>':
            case '<':
            case '>=':
            case '<=':
              return Lt.convertComparison(e, t[1], t[2]);
            case 'in':
              return Lt.convertIn(t[1], t.slice(2));
            case '!in':
              return Lt.negate(Lt.convertIn(t[1], t.slice(2)));
            case 'any':
            case 'all':
            case 'none':
              return Lt.convertCombining(e, t.slice(1));
            case 'has':
              return Lt.convertHas(t[1]);
            case '!has':
              return Lt.negate(Lt.convertHas(t[1]));
            default:
              throw new Error('Unexpected legacy filter.');
          }
        }
        static convertComparison(t, e, r) {
          switch (e) {
            case '$type':
              return [t, ['geometry-type'], r];
            case '$id':
              return [t, ['id'], r];
            default:
              return [t, ['get', e], r];
          }
        }
        static convertIn(t, e) {
          switch (t) {
            case '$type':
              return ['in', ['geometry-type'], ['literal', e]];
            case '$id':
              return ['in', ['id'], ['literal', e]];
            default:
              return ['in', ['get', t], ['literal', e]];
          }
        }
        static convertHas(t) {
          switch (t) {
            case '$type':
              return !0;
            case '$id':
              return ['has-id'];
            default:
              return ['has', t];
          }
        }
        static convertCombining(t, e) {
          return [t].concat(e.map(this.convertLegacyFilter));
        }
        static negate(t) {
          return ['!', t];
        }
      }
      class kt {}
      (kt.backgroundLayoutDefinition = {
        visibility: { type: 'enum', values: ['visible', 'none'], default: 0 },
      }),
        (kt.fillLayoutDefinition = {
          visibility: { type: 'enum', values: ['visible', 'none'], default: 0 },
        }),
        (kt.lineLayoutDefinition = {
          visibility: { type: 'enum', values: ['visible', 'none'], default: 0 },
          'line-cap': { type: 'enum', values: ['butt', 'round', 'square'], default: 0 },
          'line-join': { type: 'enum', values: ['bevel', 'round', 'miter'], default: 2 },
          'line-miter-limit': { type: 'number', default: 2 },
          'line-round-limit': { type: 'number', default: 1.05 },
        }),
        (kt.symbolLayoutDefinition = {
          visibility: { type: 'enum', values: ['visible', 'none'], default: 0 },
          'symbol-avoid-edges': { type: 'boolean', default: !1 },
          'symbol-placement': {
            type: 'enum',
            values: ['point', 'line', 'line-center'],
            default: 0,
          },
          'symbol-sort-key': { type: 'number', default: -1 },
          'symbol-spacing': { type: 'number', minimum: 1, default: 250 },
          'icon-allow-overlap': { type: 'boolean', default: !1 },
          'icon-anchor': {
            type: 'enum',
            values: [
              'center',
              'left',
              'right',
              'top',
              'bottom',
              'top-left',
              'top-right',
              'bottom-left',
              'bottom-right',
            ],
            default: 0,
          },
          'icon-ignore-placement': { type: 'boolean', default: !1 },
          'icon-image': { type: 'string' },
          'icon-keep-upright': { type: 'boolean', default: !1 },
          'icon-offset': { type: 'array', value: 'number', length: 2, default: [0, 0] },
          'icon-optional': { type: 'boolean', default: !1 },
          'icon-padding': { type: 'number', minimum: 0, default: 2 },
          'icon-rotate': { type: 'number', default: 0 },
          'icon-rotation-alignment': {
            type: 'enum',
            values: ['map', 'viewport', 'auto'],
            default: 2,
          },
          'icon-size': { type: 'number', minimum: 0, default: 1 },
          'text-allow-overlap': { type: 'boolean', default: !1 },
          'text-anchor': {
            type: 'enum',
            values: [
              'center',
              'left',
              'right',
              'top',
              'bottom',
              'top-left',
              'top-right',
              'bottom-left',
              'bottom-right',
            ],
            default: 0,
          },
          'text-field': { type: 'string' },
          'text-font': {
            type: 'array',
            value: 'string',
            default: ['Open Sans Regular', 'Arial Unicode MS Regular'],
          },
          'text-ignore-placement': { type: 'boolean', default: !1 },
          'text-justify': { type: 'enum', values: ['auto', 'left', 'center', 'right'], default: 2 },
          'text-keep-upright': { type: 'boolean', default: !0 },
          'text-letter-spacing': { type: 'number', default: 0 },
          'text-line-height': { type: 'number', default: 1.2 },
          'text-max-angle': { type: 'number', minimum: 0, default: 45 },
          'text-max-width': { type: 'number', minimum: 0, default: 10 },
          'text-offset': { type: 'array', value: 'number', length: 2, default: [0, 0] },
          'text-optional': { type: 'boolean', default: !1 },
          'text-padding': { type: 'number', minimum: 0, default: 2 },
          'text-rotate': { type: 'number', default: 0 },
          'text-rotation-alignment': {
            type: 'enum',
            values: ['map', 'viewport', 'auto'],
            default: 2,
          },
          'text-size': { type: 'number', minimum: 0, default: 16 },
          'text-transform': {
            type: 'enum',
            values: ['none', 'uppercase', 'lowercase'],
            default: 0,
          },
          'text-writing-mode': {
            type: 'array',
            value: 'enum',
            values: ['horizontal', 'vertical'],
            default: [0],
          },
        }),
        (kt.circleLayoutDefinition = {
          visibility: { type: 'enum', values: ['visible', 'none'], default: 0 },
        }),
        (kt.backgroundPaintDefinition = {
          'background-color': { type: 'color', default: [0, 0, 0, 1] },
          'background-opacity': { type: 'number', minimum: 0, maximum: 1, default: 1 },
          'background-pattern': { type: 'string' },
        }),
        (kt.fillPaintDefinition = {
          'fill-antialias': { type: 'boolean', default: !0 },
          'fill-color': { type: 'color', default: [0, 0, 0, 1] },
          'fill-opacity': { type: 'number', minimum: 0, maximum: 1, default: 1 },
          'fill-outline-color': { type: 'color', default: [0, 0, 0, 0] },
          'fill-pattern': { type: 'string' },
          'fill-translate': { type: 'array', value: 'number', length: 2, default: [0, 0] },
          'fill-translate-anchor': { type: 'enum', values: ['map', 'viewport'], default: 0 },
        }),
        (kt.linePaintDefinition = {
          'line-blur': { type: 'number', minimum: 0, default: 0 },
          'line-color': { type: 'color', default: [0, 0, 0, 1] },
          'line-dasharray': { type: 'array', value: 'number', default: [] },
          'line-gap-width': { type: 'number', minimum: 0, default: 0 },
          'line-offset': { type: 'number', default: 0 },
          'line-opacity': { type: 'number', minimum: 0, maximum: 1, default: 1 },
          'line-pattern': { type: 'string' },
          'line-translate': { type: 'array', value: 'number', length: 2, default: [0, 0] },
          'line-translate-anchor': { type: 'enum', values: ['map', 'viewport'], default: 0 },
          'line-width': { type: 'number', minimum: 0, default: 1 },
        }),
        (kt.symbolPaintDefinition = {
          'icon-color': { type: 'color', default: [0, 0, 0, 1] },
          'icon-halo-blur': { type: 'number', minimum: 0, default: 0 },
          'icon-halo-color': { type: 'color', default: [0, 0, 0, 0] },
          'icon-halo-width': { type: 'number', minimum: 0, default: 0 },
          'icon-opacity': { type: 'number', minimum: 0, maximum: 1, default: 1 },
          'icon-translate': { type: 'array', value: 'number', length: 2, default: [0, 0] },
          'icon-translate-anchor': { type: 'enum', values: ['map', 'viewport'], default: 0 },
          'text-color': { type: 'color', default: [0, 0, 0, 1] },
          'text-halo-blur': { type: 'number', minimum: 0, default: 0 },
          'text-halo-color': { type: 'color', default: [0, 0, 0, 0] },
          'text-halo-width': { type: 'number', minimum: 0, default: 0 },
          'text-opacity': { type: 'number', minimum: 0, maximum: 1, default: 1 },
          'text-translate': { type: 'array', value: 'number', length: 2, default: [0, 0] },
          'text-translate-anchor': { type: 'enum', values: ['map', 'viewport'], default: 0 },
        }),
        (kt.rasterPaintDefinition = {
          'raster-opacity': { type: 'number', minimum: 0, maximum: 1, default: 1 },
          'raster-hue-rotate': { type: 'number', default: 0 },
          'raster-brightness-min': { type: 'number', minimum: 0, maximum: 1, default: 0 },
          'raster-brightness-max': { type: 'number', minimum: 0, maximum: 1, default: 1 },
          'raster-saturation': { type: 'number', minimum: -1, maximum: 1, default: 0 },
          'raster-contrast': { type: 'number', minimum: -1, maximum: 1, default: 0 },
          'raster-fade-duration': { type: 'number', minimum: 0, default: 300 },
        }),
        (kt.circlePaintDefinition = {
          'circle-blur': { type: 'number', minimum: 0, default: 0 },
          'circle-color': { type: 'color', default: [0, 0, 0, 1] },
          'circle-opacity': { type: 'number', minimum: 0, maximum: 1, default: 1 },
          'circle-radius': { type: 'number', minimum: 0, default: 5 },
          'circle-stroke-color': { type: 'color', default: [0, 0, 0, 1] },
          'circle-stroke-opacity': { type: 'number', minimum: 0, maximum: 1, default: 1 },
          'circle-stroke-width': { type: 'number', minimum: 0, default: 0 },
          'circle-translate': { type: 'array', value: 'number', length: 2, default: [0, 0] },
          'circle-translate-anchor': { type: 'enum', values: ['map', 'viewport'], default: 0 },
        });
      class At {
        constructor(t, e) {
          let r;
          switch (((this.isDataDriven = !1), (this.interpolator = null), t.type)) {
            case 'number':
            case 'color':
              r = !0;
              break;
            case 'array':
              r = 'number' === t.value;
              break;
            default:
              r = !1;
          }
          if ((null == e && (e = t.default), Array.isArray(e) && e.length > 0 && Dt[e[0]])) {
            const r = { number: S, color: B, string: M, boolean: U, enum: M };
            try {
              const i = It(e, null, 'array' === t.type ? N(r[t.value] || O, t.length) : r[t.type]);
              (this.getValue = this._buildExpression(i, t)),
                (this.isDataDriven = !0),
                i instanceof it && i.input instanceof G && (this.interpolator = i);
            } catch (e) {
              console.log(e.message), (this.getValue = this._buildSimple(t.default));
            }
            return;
          }
          r && 'interval' === e.type && (r = !1);
          const i = e && e.stops && e.stops.length > 0;
          if (i) for (const r of e.stops) r[1] = this._validate(r[1], t);
          if (((this.isDataDriven = !!e && !!e.property), this.isDataDriven))
            if ((void 0 !== e.default && (e.default = this._validate(e.default, t)), i))
              switch (e.type) {
                case 'identity':
                  this.getValue = this._buildIdentity(e, t);
                  break;
                case 'categorical':
                  this.getValue = this._buildCategorical(e, t);
                  break;
                default:
                  this.getValue = r ? this._buildInterpolate(e, t) : this._buildInterval(e, t);
              }
            else this.getValue = this._buildIdentity(e, t);
          else
            i
              ? (this.getValue = r ? this._buildZoomInterpolate(e) : this._buildZoomInterval(e))
              : ((e = this._validate(e, t)), (this.getValue = this._buildSimple(e)));
        }
        _validate(t, e) {
          if ('number' === e.type) {
            if (t < e.minimum) return e.minimum;
            if (t > e.maximum) return e.maximum;
          } else
            'color' === e.type
              ? (t = At._parseColor(t))
              : 'enum' === e.type
              ? 'string' == typeof t && (t = e.values.indexOf(t))
              : 'array' === e.type && 'enum' === e.value
              ? (t = t.map((r) => ('string' == typeof t ? e.values.indexOf(r) : r)))
              : 'string' === e.type && (t = Z(t));
          return t;
        }
        _buildSimple(t) {
          return () => t;
        }
        _buildExpression(t, e) {
          return (r, i) => {
            try {
              const n = t.evaluate(i, r);
              return void 0 === n ? e.default : this._validate(n, e);
            } catch (t) {
              return console.log(t.message), e.default;
            }
          };
        }
        _buildIdentity(t, e) {
          return (r, i) => {
            let n;
            return (
              i && (n = i.values[t.property]),
              void 0 !== n ? this._validate(n, e) : void 0 !== t.default ? t.default : e.default
            );
          };
        }
        _buildCategorical(t, e) {
          return (r, i) => {
            let n;
            return (
              i && (n = i.values[t.property]),
              (n = this._categorical(n, t.stops)),
              void 0 !== n ? n : void 0 !== t.default ? t.default : e.default
            );
          };
        }
        _buildInterval(t, e) {
          return (r, i) => {
            let n;
            return (
              i && (n = i.values[t.property]),
              'number' == typeof n
                ? this._interval(n, t.stops)
                : void 0 !== t.default
                ? t.default
                : e.default
            );
          };
        }
        _buildInterpolate(t, e) {
          return (r, i) => {
            let n;
            return (
              i && (n = i.values[t.property]),
              'number' == typeof n
                ? this._interpolate(n, t.stops, t.base || 1)
                : void 0 !== t.default
                ? t.default
                : e.default
            );
          };
        }
        _buildZoomInterpolate(t) {
          return (e) => this._interpolate(e, t.stops, t.base || 1);
        }
        _buildZoomInterval(t) {
          return (e) => this._interval(e, t.stops);
        }
        _categorical(t, e) {
          const r = e.length;
          for (let i = 0; i < r; i++) if (e[i][0] === t) return e[i][1];
        }
        _interval(t, e) {
          const r = e.length;
          let i = 0;
          for (let n = 0; n < r && e[n][0] <= t; n++) i = n;
          return e[i][1];
        }
        _interpolate(t, e, r) {
          let i, n;
          const a = e.length;
          for (let r = 0; r < a; r++) {
            const a = e[r];
            if (!(a[0] <= t)) {
              n = a;
              break;
            }
            i = a;
          }
          if (i && n) {
            const e = n[0] - i[0],
              a = t - i[0],
              s = 1 === r ? a / e : (r ** a - 1) / (r ** e - 1);
            if (Array.isArray(i[1])) {
              const t = i[1],
                e = n[1],
                r = [];
              for (let i = 0; i < t.length; i++) r.push(A(t[i], e[i], s));
              return r;
            }
            return A(i[1], n[1], s);
          }
          return i ? i[1] : n ? n[1] : void 0;
        }
        static _isEmpty(t) {
          for (const e in t) if (t.hasOwnProperty(e)) return !1;
          return !0;
        }
        static _parseColor(t) {
          return Array.isArray(t)
            ? t
            : ('string' == typeof t && (t = new n.Z(t)),
              t instanceof n.Z ? (this._isEmpty(t) ? void 0 : n.Z.toUnitRGBA(t)) : t);
        }
      }
      class zt {
        constructor(t, e, r, i) {
          switch (
            ((this.type = t),
            (this.typeName = e.type),
            (this.id = e.id),
            (this.source = e.source),
            (this.sourceLayer = e['source-layer']),
            (this.minzoom = e.minzoom),
            (this.maxzoom = e.maxzoom),
            (this.filter = e.filter),
            (this.layout = e.layout),
            (this.paint = e.paint),
            (this.z = r),
            (this.uid = i),
            t)
          ) {
            case 0:
              (this._layoutDefinition = kt.backgroundLayoutDefinition),
                (this._paintDefinition = kt.backgroundPaintDefinition);
              break;
            case 1:
              (this._layoutDefinition = kt.fillLayoutDefinition),
                (this._paintDefinition = kt.fillPaintDefinition);
              break;
            case 2:
              (this._layoutDefinition = kt.lineLayoutDefinition),
                (this._paintDefinition = kt.linePaintDefinition);
              break;
            case 3:
              (this._layoutDefinition = kt.symbolLayoutDefinition),
                (this._paintDefinition = kt.symbolPaintDefinition);
              break;
            case 4:
              (this._layoutDefinition = kt.circleLayoutDefinition),
                (this._paintDefinition = kt.circlePaintDefinition);
          }
          (this._layoutProperties = this._parseLayout(this.layout)),
            (this._paintProperties = this._parsePaint(this.paint));
        }
        getFeatureFilter() {
          return void 0 !== this._featureFilter
            ? this._featureFilter
            : (this._featureFilter = Lt.createFilter(this.filter));
        }
        getLayoutProperty(t) {
          return this._layoutProperties[t];
        }
        getPaintProperty(t) {
          return this._paintProperties[t];
        }
        getLayoutValue(t, e, r) {
          let i;
          const n = this._layoutProperties[t];
          return (
            n && (i = n.getValue(e, r)), void 0 === i && (i = this._layoutDefinition[t].default), i
          );
        }
        getPaintValue(t, e, r) {
          let i;
          const n = this._paintProperties[t];
          return (
            n && (i = n.getValue(e, r)), void 0 === i && (i = this._paintDefinition[t].default), i
          );
        }
        isPainterDataDriven() {
          const t = this._paintProperties;
          if (t) for (const e in t) if (t[e].isDataDriven) return !0;
          return !1;
        }
        _parseLayout(t) {
          const e = {};
          for (const r in t) {
            const i = this._layoutDefinition[r];
            i && (e[r] = new At(i, t[r]));
          }
          return e;
        }
        _parsePaint(t) {
          const e = {};
          for (const r in t) {
            const i = this._paintDefinition[r];
            i && (e[r] = new At(i, t[r]));
          }
          return e;
        }
        computeAttributesKey(t, e, r, i) {
          let n = 0,
            a = 0;
          for (const t of e) {
            let e = 3;
            if (!t || t !== i) {
              const i = r[t],
                { isLayout: n, isOptional: a } = i,
                s = n ? this.getLayoutProperty(t) : this.getPaintProperty(t);
              e =
                null != s && s.interpolator ? 2 : null != s && s.isDataDriven ? 1 : a && !s ? 3 : 0;
            }
            (a |= e << n), (n += 2);
          }
          return (a << 3) | t;
        }
      }
      class St extends zt {
        constructor(t, e, r, i) {
          super(t, e, r, i),
            (this.backgroundMaterial = new p(
              this.computeAttributesKey(0, p.ATTRIBUTES, p.ATTRIBUTES_INFO),
            ));
        }
      }
      class Mt extends zt {
        constructor(t, e, r, i) {
          super(t, e, r, i);
          const n = this.getPaintProperty('fill-color'),
            a = this.getPaintProperty('fill-opacity'),
            s = this.getPaintProperty('fill-pattern');
          (this.hasDataDrivenColor = null == n ? void 0 : n.isDataDriven),
            (this.hasDataDrivenOpacity = null == a ? void 0 : a.isDataDriven),
            (this.hasDataDrivenFill =
              this.hasDataDrivenColor ||
              this.hasDataDrivenOpacity ||
              (null == s ? void 0 : s.isDataDriven));
          const o = this.getPaintProperty('fill-outline-color');
          (this.outlineUsesFillColor = !o),
            (this.hasDataDrivenOutlineColor = null == o ? void 0 : o.isDataDriven),
            (this.hasDataDrivenOutline = o ? o.isDataDriven : !!n && n.isDataDriven),
            (this.hasDataDrivenOutline =
              (o ? this.hasDataDrivenOutlineColor : this.hasDataDrivenColor) ||
              this.hasDataDrivenOpacity),
            (this.fillMaterial = new f(
              this.computeAttributesKey(1, f.ATTRIBUTES, f.ATTRIBUTES_INFO),
            )),
            (this.outlineMaterial = new d(
              this.computeAttributesKey(
                2,
                this.outlineUsesFillColor ? d.ATTRIBUTES_FILL : d.ATTRIBUTES_OUTLINE,
                this.outlineUsesFillColor ? d.ATTRIBUTES_INFO_FILL : d.ATTRIBUTES_INFO_OUTLINE,
              ),
              this.outlineUsesFillColor,
            ));
        }
      }
      class Ut extends zt {
        constructor(t, e, r, i) {
          var n, a, s, l, u, c, h, p, y;
          super(t, e, r, i);
          const f = this.getPaintProperty('line-pattern');
          if (
            ((this.lineMaterial = new m(
              this.computeAttributesKey(
                3,
                m.ATTRIBUTES,
                m.ATTRIBUTES_INFO,
                f ? 'line-dasharray' : '',
              ),
            )),
            (this.hasDataDrivenLine =
              (null == (n = this.getPaintProperty('line-blur')) ? void 0 : n.isDataDriven) ||
              (null == (a = this.getPaintProperty('line-color')) ? void 0 : a.isDataDriven) ||
              (null == (s = this.getPaintProperty('line-gap-width')) ? void 0 : s.isDataDriven) ||
              (null == (l = this.getPaintProperty('line-offset')) ? void 0 : l.isDataDriven) ||
              (null == (u = this.getPaintProperty('line-opacity')) ? void 0 : u.isDataDriven) ||
              (null == (c = this.getPaintProperty('line-pattern')) ? void 0 : c.isDataDriven) ||
              (null == (h = this.getPaintProperty('line-dasharray')) ? void 0 : h.isDataDriven) ||
              (null == (p = this.getLayoutProperty('line-cap')) ? void 0 : p.isDataDriven) ||
              (null == (y = this.getPaintProperty('line-width')) ? void 0 : y.isDataDriven)),
            (this.canUseThinTessellation = !1),
            !this.hasDataDrivenLine)
          ) {
            const t = this.getPaintProperty('line-width');
            if (!t || ('number' == typeof t && 0.5 * t < o.T)) {
              const t = this.getPaintProperty('line-offset');
              (!t || ('number' == typeof t && 0 === t)) && (this.canUseThinTessellation = !0);
            }
          }
        }
        getDashKey(t, e) {
          let r;
          switch (e) {
            case 0:
              r = 'Butt';
              break;
            case 1:
              r = 'Round';
              break;
            case 2:
              r = 'Square';
              break;
            default:
              r = 'Butt';
          }
          return `dasharray-[${t.toString()}]-${r}`;
        }
      }
      class Bt extends zt {
        constructor(t, e, r, i) {
          var n, a, s, o, l, u, c, h, p, y, f, d;
          super(t, e, r, i),
            (this.iconMaterial = new v(
              this.computeAttributesKey(4, v.ATTRIBUTES, v.ATTRIBUTES_INFO),
            )),
            (this.textMaterial = new w(
              this.computeAttributesKey(6, w.ATTRIBUTES, w.ATTRIBUTES_INFO),
            )),
            (this.hasDataDrivenIcon =
              (null == (n = this.getPaintProperty('icon-color')) ? void 0 : n.isDataDriven) ||
              (null == (a = this.getPaintProperty('icon-halo-blur')) ? void 0 : a.isDataDriven) ||
              (null == (s = this.getPaintProperty('icon-halo-color')) ? void 0 : s.isDataDriven) ||
              (null == (o = this.getPaintProperty('icon-halo-width')) ? void 0 : o.isDataDriven) ||
              (null == (l = this.getPaintProperty('icon-opacity')) ? void 0 : l.isDataDriven) ||
              (null == (u = this.getLayoutProperty('icon-size')) ? void 0 : u.isDataDriven)),
            (this.hasDataDrivenText =
              (null == (c = this.getPaintProperty('text-color')) ? void 0 : c.isDataDriven) ||
              (null == (h = this.getPaintProperty('text-halo-blur')) ? void 0 : h.isDataDriven) ||
              (null == (p = this.getPaintProperty('text-halo-color')) ? void 0 : p.isDataDriven) ||
              (null == (y = this.getPaintProperty('text-halo-width')) ? void 0 : y.isDataDriven) ||
              (null == (f = this.getPaintProperty('text-opacity')) ? void 0 : f.isDataDriven) ||
              (null == (d = this.getLayoutProperty('text-size')) ? void 0 : d.isDataDriven));
        }
      }
      class Rt extends zt {
        constructor(t, e, r, i) {
          super(t, e, r, i),
            (this.circleMaterial = new y(
              this.computeAttributesKey(5, y.ATTRIBUTES, y.ATTRIBUTES_INFO),
            ));
        }
      }
      class Ot {
        constructor(t, e, r) {
          var i, n, a, s, o;
          let l;
          (this.allowOverlap = t.getLayoutValue('icon-allow-overlap', e)),
            (this.ignorePlacement = t.getLayoutValue('icon-ignore-placement', e)),
            (this.keepUpright = t.getLayoutValue('icon-keep-upright', e)),
            (this.optional = t.getLayoutValue('icon-optional', e)),
            (this.rotationAlignment = t.getLayoutValue('icon-rotation-alignment', e)),
            2 === this.rotationAlignment && (this.rotationAlignment = r ? 0 : 1),
            (l = t.getLayoutProperty('icon-anchor')),
            null != (i = l) && i.isDataDriven
              ? (this._anchorProp = l)
              : (this.anchor = t.getLayoutValue('icon-anchor', e)),
            (l = t.getLayoutProperty('icon-offset')),
            null != (n = l) && n.isDataDriven
              ? (this._offsetProp = l)
              : (this.offset = t.getLayoutValue('icon-offset', e)),
            (l = t.getLayoutProperty('icon-padding')),
            null != (a = l) && a.isDataDriven
              ? (this._paddingProp = l)
              : (this.padding = t.getLayoutValue('icon-padding', e)),
            (l = t.getLayoutProperty('icon-rotate')),
            null != (s = l) && s.isDataDriven
              ? (this._rotateProp = l)
              : (this.rotate = t.getLayoutValue('icon-rotate', e)),
            (l = t.getLayoutProperty('icon-size')),
            null != (o = l) && o.isDataDriven
              ? (this._sizeProp = l)
              : (this.size = t.getLayoutValue('icon-size', e));
        }
        update(t, e) {
          this._anchorProp && (this.anchor = this._anchorProp.getValue(t, e)),
            this._offsetProp && (this.offset = this._offsetProp.getValue(t, e)),
            this._paddingProp && (this.padding = this._paddingProp.getValue(t, e)),
            this._rotateProp && (this.rotate = this._rotateProp.getValue(t, e)),
            this._sizeProp && (this.size = this._sizeProp.getValue(t, e));
        }
      }
      class Nt {
        constructor(t, e, r) {
          var i, n, a, s, o, l, u, c, h, p, y;
          let f;
          (this.allowOverlap = t.getLayoutValue('text-allow-overlap', e)),
            (this.ignorePlacement = t.getLayoutValue('text-ignore-placement', e)),
            (this.keepUpright = t.getLayoutValue('text-keep-upright', e)),
            (this.optional = t.getLayoutValue('text-optional', e)),
            (this.rotationAlignment = t.getLayoutValue('text-rotation-alignment', e)),
            2 === this.rotationAlignment && (this.rotationAlignment = r ? 0 : 1),
            (f = t.getLayoutProperty('text-anchor')),
            null != (i = f) && i.isDataDriven
              ? (this._anchorProp = f)
              : (this.anchor = t.getLayoutValue('text-anchor', e)),
            (f = t.getLayoutProperty('text-justify')),
            null != (n = f) && n.isDataDriven
              ? (this._justifyProp = f)
              : (this.justify = t.getLayoutValue('text-justify', e)),
            (f = t.getLayoutProperty('text-letter-spacing')),
            null != (a = f) && a.isDataDriven
              ? (this._letterSpacingProp = f)
              : (this.letterSpacing = t.getLayoutValue('text-letter-spacing', e)),
            (f = t.getLayoutProperty('text-line-height')),
            null != (s = f) && s.isDataDriven
              ? (this._lineHeightProp = f)
              : (this.lineHeight = t.getLayoutValue('text-line-height', e)),
            (f = t.getLayoutProperty('text-max-angle')),
            null != (o = f) && o.isDataDriven
              ? (this._maxAngleProp = f)
              : (this.maxAngle = t.getLayoutValue('text-max-angle', e)),
            (f = t.getLayoutProperty('text-max-width')),
            null != (l = f) && l.isDataDriven
              ? (this._maxWidthProp = f)
              : (this.maxWidth = t.getLayoutValue('text-max-width', e)),
            (f = t.getLayoutProperty('text-offset')),
            null != (u = f) && u.isDataDriven
              ? (this._offsetProp = f)
              : (this.offset = t.getLayoutValue('text-offset', e)),
            (f = t.getLayoutProperty('text-padding')),
            null != (c = f) && c.isDataDriven
              ? (this._paddingProp = f)
              : (this.padding = t.getLayoutValue('text-padding', e)),
            (f = t.getLayoutProperty('text-rotate')),
            null != (h = f) && h.isDataDriven
              ? (this._rotateProp = f)
              : (this.rotate = t.getLayoutValue('text-rotate', e)),
            (f = t.getLayoutProperty('text-size')),
            null != (p = f) && p.isDataDriven
              ? (this._sizeProp = f)
              : (this.size = t.getLayoutValue('text-size', e)),
            (f = t.getLayoutProperty('text-writing-mode')),
            null != (y = f) && y.isDataDriven
              ? (this._writingModeProp = f)
              : (this.writingMode = t.getLayoutValue('text-writing-mode', e));
        }
        update(t, e) {
          this._anchorProp && (this.anchor = this._anchorProp.getValue(t, e)),
            this._justifyProp && (this.justify = this._justifyProp.getValue(t, e)),
            this._letterSpacingProp &&
              (this.letterSpacing = this._letterSpacingProp.getValue(t, e)),
            this._lineHeightProp && (this.lineHeight = this._lineHeightProp.getValue(t, e)),
            this._maxAngleProp && (this.maxAngle = this._maxAngleProp.getValue(t, e)),
            this._maxWidthProp && (this.maxWidth = this._maxWidthProp.getValue(t, e)),
            this._offsetProp && (this.offset = this._offsetProp.getValue(t, e)),
            this._paddingProp && (this.padding = this._paddingProp.getValue(t, e)),
            this._rotateProp && (this.rotate = this._rotateProp.getValue(t, e)),
            this._sizeProp && (this.size = this._sizeProp.getValue(t, e)),
            this._writingModeProp && (this.writingMode = this._writingModeProp.getValue(t, e));
        }
      }
      class Ft {
        constructor(t, e) {
          if (
            ((this._style = t),
            (this.backgroundBucketIds = []),
            (this._uidToLayer = new Map()),
            (this._layerByName = {}),
            (this._runningId = 0),
            t.layers || (t.layers = []),
            (this.version = parseFloat(t.version)),
            (this.sprite = e ? e.spriteUrl : t.sprite),
            (this.glyphs = e ? e.glyphsUrl : t.glyphs),
            (this.layers = t.layers.map((t, e, r) => this._create(t, e, r))),
            this.layers)
          ) {
            let t;
            for (let e = 0; e < this.layers.length; e++)
              (t = this.layers[e]),
                (this._layerByName[t.id.toLowerCase()] = t),
                this._uidToLayer.set(t.uid, t),
                0 === t.type && this.backgroundBucketIds.push(t.id);
          }
          this._identifyRefLayers();
        }
        isPainterDataDriven(t) {
          const e = this._layerByName[t.toLowerCase()];
          return !!e && e.isPainterDataDriven();
        }
        getStyleLayerId(t) {
          return t >= this.layers.length ? null : this.layers[t].id;
        }
        getStyleLayerByUID(t) {
          const e = this._uidToLayer.get(t);
          return null != e ? e : null;
        }
        getStyleLayerIndex(t) {
          const e = this._layerByName[t.toLowerCase()];
          return e ? this.layers.indexOf(e) : -1;
        }
        setStyleLayer(t, e) {
          if (!t || !t.id) return;
          const r = this._style;
          null != e && e >= this.layers.length && (e = this.layers.length - 1);
          let i,
            n = !0;
          const a = this._layerByName[t.id.toLowerCase()];
          if (a) {
            const s = this.layers.indexOf(a);
            e || (e = s),
              e === s
                ? ((n = !1), (i = Ft._recreateLayer(t, a)), (this.layers[e] = i), (r.layers[e] = t))
                : (this.layers.splice(s, 1),
                  r.layers.splice(s, 1),
                  (i = this._create(t, e, this.layers)),
                  this.layers.splice(e, 0, i),
                  r.layers.splice(e, 0, t));
          } else
            (i = this._create(t, e, this.layers)),
              !e || e >= this.layers.length
                ? (this.layers.push(i), r.layers.push(t))
                : (this.layers.splice(e, 0, i), r.layers.splice(e, 0, t));
          (this._layerByName[t.id.toLowerCase()] = i),
            this._uidToLayer.set(i.uid, i),
            n && this._recomputeZValues(),
            this._identifyRefLayers();
        }
        getStyleLayer(t) {
          const e = this._layerByName[t.toLowerCase()];
          return e
            ? {
                type: e.typeName,
                id: e.id,
                source: e.source,
                'source-layer': e.sourceLayer,
                minzoom: e.minzoom,
                maxzoom: e.maxzoom,
                filter: e.filter,
                layout: e.layout,
                paint: e.paint,
              }
            : null;
        }
        deleteStyleLayer(t) {
          const e = this._layerByName[t.toLowerCase()];
          if (e) {
            delete this._layerByName[t.toLowerCase()], this._uidToLayer.delete(e.uid);
            const r = this.layers.indexOf(e);
            this.layers.splice(r, 1),
              this._style.layers.splice(r, 1),
              this._recomputeZValues(),
              this._identifyRefLayers();
          }
        }
        getLayerById(t) {
          return this._layerByName[t.toLowerCase()];
        }
        getLayoutProperties(t) {
          const e = this._layerByName[t.toLowerCase()];
          return e ? e.layout : null;
        }
        getPaintProperties(t) {
          const e = this._layerByName[t.toLowerCase()];
          return e ? e.paint : null;
        }
        setPaintProperties(t, e) {
          const r = this._layerByName[t.toLowerCase()];
          if (!r) return;
          const i = {
              type: r.typeName,
              id: r.id,
              source: r.source,
              'source-layer': r.sourceLayer,
              minzoom: r.minzoom,
              maxzoom: r.maxzoom,
              filter: r.filter,
              layout: r.layout,
              paint: e,
            },
            n = Ft._recreateLayer(i, r),
            a = this.layers.indexOf(r);
          (this.layers[a] = n),
            (this._style.layers[a].paint = e),
            (this._layerByName[r.id.toLowerCase()] = n),
            this._uidToLayer.set(r.uid, n);
        }
        setLayoutProperties(t, e) {
          const r = this._layerByName[t.toLowerCase()];
          if (!r) return;
          const i = {
              type: r.typeName,
              id: r.id,
              source: r.source,
              'source-layer': r.sourceLayer,
              minzoom: r.minzoom,
              maxzoom: r.maxzoom,
              filter: r.filter,
              layout: e,
              paint: r.paint,
            },
            n = Ft._recreateLayer(i, r),
            a = this.layers.indexOf(r);
          (this.layers[a] = n),
            (this._style.layers[a].layout = e),
            (this._layerByName[r.id.toLowerCase()] = n),
            this._uidToLayer.set(r.uid, n);
        }
        setStyleLayerVisibility(t, e) {
          const r = this._layerByName[t.toLowerCase()];
          if (!r) return;
          const i = r.layout || {};
          i.visibility = e;
          const n = {
              type: r.typeName,
              id: r.id,
              source: r.source,
              'source-layer': r.sourceLayer,
              minzoom: r.minzoom,
              maxzoom: r.maxzoom,
              filter: r.filter,
              layout: i,
              paint: r.paint,
            },
            a = Ft._recreateLayer(n, r),
            s = this.layers.indexOf(r);
          (this.layers[s] = a),
            (this._style.layers[s].layout = i),
            (this._layerByName[r.id.toLowerCase()] = a),
            this._uidToLayer.set(r.uid, a);
        }
        getStyleLayerVisibility(t) {
          var e;
          const r = this._layerByName[t.toLowerCase()];
          if (!r) return 'none';
          const i = r.layout;
          return null != (e = null == i ? void 0 : i.visibility) ? e : 'visible';
        }
        _recomputeZValues() {
          const t = this.layers,
            e = 1 / (t.length + 1);
          for (let r = 0; r < t.length; r++) t[r].z = 1 - (1 + r) * e;
        }
        _identifyRefLayers() {
          const t = [],
            e = [];
          let r = 0;
          for (const a of this.layers) {
            const s = a.layout;
            if (1 === a.type) {
              var i;
              const e = a;
              let n = a.source + '|' + a.sourceLayer;
              (n += null != (i = '|' + (null == s ? void 0 : s.visibility)) ? i : ''),
                (n += '|' + a.minzoom),
                (n += '|' + a.maxzoom),
                (n += '|' + JSON.stringify(a.filter)),
                (e.hasDataDrivenFill || e.hasDataDrivenOutline) && (n += '|' + r),
                t.push({ key: n, layer: a });
            } else if (2 === a.type) {
              var n;
              const t = a;
              let i = a.source + '|' + a.sourceLayer;
              (i += null != (n = '|' + (null == s ? void 0 : s.visibility)) ? n : ''),
                (i += '|' + a.minzoom),
                (i += '|' + a.maxzoom),
                (i += '|' + JSON.stringify(a.filter)),
                (i += '|' + (void 0 !== s ? s['line-cap'] : '')),
                (i += '|' + (void 0 !== s ? s['line-join'] : '')),
                t.hasDataDrivenLine && (i += '|' + r),
                e.push({ key: i, layer: a });
            }
            ++r;
          }
          this._assignRefLayers(t), this._assignRefLayers(e);
        }
        _assignRefLayers(t) {
          let e, r;
          t.sort((t, e) => (t.key < e.key ? -1 : t.key > e.key ? 1 : 0));
          const i = t.length;
          for (let n = 0; n < i; n++) {
            const a = t[n];
            if (a.key === e) a.layer.refLayerId = r;
            else if (((e = a.key), (r = a.layer.id), 1 === a.layer.type)) {
              if (!a.layer.getPaintProperty('fill-outline-color'))
                for (let s = n + 1; s < i; s++) {
                  const i = t[s];
                  if (i.key !== e) break;
                  if (i.layer.getPaintProperty('fill-outline-color')) {
                    (t[n] = i), (t[s] = a), (r = i.layer.id);
                    break;
                  }
                }
            } else if (2 === a.layer.type) {
              let s = a.layer;
              for (let o = n + 1; o < i; o++) {
                const i = t[o];
                if (i.key !== e) break;
                const l = i.layer;
                ((s.canUseThinTessellation && !l.canUseThinTessellation) ||
                  (!s.canUseThinTessellation &&
                    (l.getPaintProperty('line-pattern') ||
                      l.getPaintProperty('line-dasharray')))) &&
                  ((s = l), (t[n] = i), (t[o] = a), (r = i.layer.id));
              }
            }
          }
        }
        _create(t, e, r) {
          const i = 1 - (1 + e) * (1 / (r.length + 1)),
            n = this._runningId++;
          switch (t.type) {
            case 'background':
              return new St(0, t, i, n);
            case 'fill':
              return new Mt(1, t, i, n);
            case 'line':
              return new Ut(2, t, i, n);
            case 'symbol':
              return new Bt(3, t, i, n);
            case 'raster':
              throw new Error('Unsupported vector tile raster layer');
            case 'circle':
              return new Rt(4, t, i, n);
          }
          throw new Error('Unknown vector tile layer');
        }
        static _recreateLayer(t, e) {
          switch (t.type) {
            case 'background':
              return new St(0, t, e.z, e.uid);
            case 'fill':
              return new Mt(1, t, e.z, e.uid);
            case 'line':
              return new Ut(2, t, e.z, e.uid);
            case 'symbol':
              return new Bt(3, t, e.z, e.uid);
            case 'raster':
              throw new Error('Unsupported vector tile raster layer');
            case 'circle':
              return new Rt(4, t, e.z, e.uid);
          }
        }
      }
    },
    54174: (t, e, r) => {
      'use strict';
      r.d(e, { g: () => n, h: () => s });
      const i = {
        transparent: [0, 0, 0, 0],
        black: [0, 0, 0, 1],
        silver: [192, 192, 192, 1],
        gray: [128, 128, 128, 1],
        white: [255, 255, 255, 1],
        maroon: [128, 0, 0, 1],
        red: [255, 0, 0, 1],
        purple: [128, 0, 128, 1],
        fuchsia: [255, 0, 255, 1],
        green: [0, 128, 0, 1],
        lime: [0, 255, 0, 1],
        olive: [128, 128, 0, 1],
        yellow: [255, 255, 0, 1],
        navy: [0, 0, 128, 1],
        blue: [0, 0, 255, 1],
        teal: [0, 128, 128, 1],
        aqua: [0, 255, 255, 1],
        aliceblue: [240, 248, 255, 1],
        antiquewhite: [250, 235, 215, 1],
        aquamarine: [127, 255, 212, 1],
        azure: [240, 255, 255, 1],
        beige: [245, 245, 220, 1],
        bisque: [255, 228, 196, 1],
        blanchedalmond: [255, 235, 205, 1],
        blueviolet: [138, 43, 226, 1],
        brown: [165, 42, 42, 1],
        burlywood: [222, 184, 135, 1],
        cadetblue: [95, 158, 160, 1],
        chartreuse: [127, 255, 0, 1],
        chocolate: [210, 105, 30, 1],
        coral: [255, 127, 80, 1],
        cornflowerblue: [100, 149, 237, 1],
        cornsilk: [255, 248, 220, 1],
        crimson: [220, 20, 60, 1],
        cyan: [0, 255, 255, 1],
        darkblue: [0, 0, 139, 1],
        darkcyan: [0, 139, 139, 1],
        darkgoldenrod: [184, 134, 11, 1],
        darkgray: [169, 169, 169, 1],
        darkgreen: [0, 100, 0, 1],
        darkgrey: [169, 169, 169, 1],
        darkkhaki: [189, 183, 107, 1],
        darkmagenta: [139, 0, 139, 1],
        darkolivegreen: [85, 107, 47, 1],
        darkorange: [255, 140, 0, 1],
        darkorchid: [153, 50, 204, 1],
        darkred: [139, 0, 0, 1],
        darksalmon: [233, 150, 122, 1],
        darkseagreen: [143, 188, 143, 1],
        darkslateblue: [72, 61, 139, 1],
        darkslategray: [47, 79, 79, 1],
        darkslategrey: [47, 79, 79, 1],
        darkturquoise: [0, 206, 209, 1],
        darkviolet: [148, 0, 211, 1],
        deeppink: [255, 20, 147, 1],
        deepskyblue: [0, 191, 255, 1],
        dimgray: [105, 105, 105, 1],
        dimgrey: [105, 105, 105, 1],
        dodgerblue: [30, 144, 255, 1],
        firebrick: [178, 34, 34, 1],
        floralwhite: [255, 250, 240, 1],
        forestgreen: [34, 139, 34, 1],
        gainsboro: [220, 220, 220, 1],
        ghostwhite: [248, 248, 255, 1],
        gold: [255, 215, 0, 1],
        goldenrod: [218, 165, 32, 1],
        greenyellow: [173, 255, 47, 1],
        grey: [128, 128, 128, 1],
        honeydew: [240, 255, 240, 1],
        hotpink: [255, 105, 180, 1],
        indianred: [205, 92, 92, 1],
        indigo: [75, 0, 130, 1],
        ivory: [255, 255, 240, 1],
        khaki: [240, 230, 140, 1],
        lavender: [230, 230, 250, 1],
        lavenderblush: [255, 240, 245, 1],
        lawngreen: [124, 252, 0, 1],
        lemonchiffon: [255, 250, 205, 1],
        lightblue: [173, 216, 230, 1],
        lightcoral: [240, 128, 128, 1],
        lightcyan: [224, 255, 255, 1],
        lightgoldenrodyellow: [250, 250, 210, 1],
        lightgray: [211, 211, 211, 1],
        lightgreen: [144, 238, 144, 1],
        lightgrey: [211, 211, 211, 1],
        lightpink: [255, 182, 193, 1],
        lightsalmon: [255, 160, 122, 1],
        lightseagreen: [32, 178, 170, 1],
        lightskyblue: [135, 206, 250, 1],
        lightslategray: [119, 136, 153, 1],
        lightslategrey: [119, 136, 153, 1],
        lightsteelblue: [176, 196, 222, 1],
        lightyellow: [255, 255, 224, 1],
        limegreen: [50, 205, 50, 1],
        linen: [250, 240, 230, 1],
        magenta: [255, 0, 255, 1],
        mediumaquamarine: [102, 205, 170, 1],
        mediumblue: [0, 0, 205, 1],
        mediumorchid: [186, 85, 211, 1],
        mediumpurple: [147, 112, 219, 1],
        mediumseagreen: [60, 179, 113, 1],
        mediumslateblue: [123, 104, 238, 1],
        mediumspringgreen: [0, 250, 154, 1],
        mediumturquoise: [72, 209, 204, 1],
        mediumvioletred: [199, 21, 133, 1],
        midnightblue: [25, 25, 112, 1],
        mintcream: [245, 255, 250, 1],
        mistyrose: [255, 228, 225, 1],
        moccasin: [255, 228, 181, 1],
        navajowhite: [255, 222, 173, 1],
        oldlace: [253, 245, 230, 1],
        olivedrab: [107, 142, 35, 1],
        orange: [255, 165, 0, 1],
        orangered: [255, 69, 0, 1],
        orchid: [218, 112, 214, 1],
        palegoldenrod: [238, 232, 170, 1],
        palegreen: [152, 251, 152, 1],
        paleturquoise: [175, 238, 238, 1],
        palevioletred: [219, 112, 147, 1],
        papayawhip: [255, 239, 213, 1],
        peachpuff: [255, 218, 185, 1],
        peru: [205, 133, 63, 1],
        pink: [255, 192, 203, 1],
        plum: [221, 160, 221, 1],
        powderblue: [176, 224, 230, 1],
        rebeccapurple: [102, 51, 153, 1],
        rosybrown: [188, 143, 143, 1],
        royalblue: [65, 105, 225, 1],
        saddlebrown: [139, 69, 19, 1],
        salmon: [250, 128, 114, 1],
        sandybrown: [244, 164, 96, 1],
        seagreen: [46, 139, 87, 1],
        seashell: [255, 245, 238, 1],
        sienna: [160, 82, 45, 1],
        skyblue: [135, 206, 235, 1],
        slateblue: [106, 90, 205, 1],
        slategray: [112, 128, 144, 1],
        slategrey: [112, 128, 144, 1],
        snow: [255, 250, 250, 1],
        springgreen: [0, 255, 127, 1],
        steelblue: [70, 130, 180, 1],
        tan: [210, 180, 140, 1],
        thistle: [216, 191, 216, 1],
        tomato: [255, 99, 71, 1],
        turquoise: [64, 224, 208, 1],
        violet: [238, 130, 238, 1],
        wheat: [245, 222, 179, 1],
        whitesmoke: [245, 245, 245, 1],
        yellowgreen: [154, 205, 5, 10],
      };
      function n(t) {
        var e;
        return null != (e = i[t.toLowerCase()]) ? e : null;
      }
      function a(t, e, r) {
        r < 0 && ++r, r > 1 && --r;
        const i = 6 * r;
        return i < 1
          ? t + (e - t) * i
          : 2 * r < 1
          ? e
          : 3 * r < 2
          ? t + (e - t) * (2 / 3 - r) * 6
          : t;
      }
      function s(t, e, r, i = 1) {
        const n = (((t % 360) + 360) % 360) / 360,
          s = r <= 0.5 ? r * (e + 1) : r + e - r * e,
          o = 2 * r - s;
        return [
          Math.round(256 * a(o, s, n + 1 / 3)),
          Math.round(256 * a(o, s, n)),
          Math.round(256 * a(o, s, n - 1 / 3)),
          i,
        ];
      }
    },
    43916: (t, e, r) => {
      'use strict';
      function i(t) {
        return 'h' in t && 's' in t && 'v' in t;
      }
      function n(t) {
        return 'l' in t && 'a' in t && 'b' in t;
      }
      function a(t) {
        return 'l' in t && 'c' in t && 'h' in t;
      }
      r.d(e, { a: () => d, b: () => f, c: () => m, t: () => y });
      const s = [
          [0.4124, 0.3576, 0.1805],
          [0.2126, 0.7152, 0.0722],
          [0.0193, 0.1192, 0.9505],
        ],
        o = [
          [3.2406, -1.5372, -0.4986],
          [-0.9689, 1.8758, 0.0415],
          [0.0557, -0.204, 1.057],
        ];
      function l(t, e) {
        const r = [];
        let i, n;
        if (t[0].length !== e.length) throw 'dimensions do not match';
        const a = t.length,
          s = t[0].length;
        let o = 0;
        for (i = 0; i < a; i++) {
          for (o = 0, n = 0; n < s; n++) o += t[i][n] * e[n];
          r.push(o);
        }
        return r;
      }
      function u(t) {
        const e = [t.r / 255, t.g / 255, t.b / 255].map((t) =>
            t <= 0.04045 ? t / 12.92 : ((t + 0.055) / 1.055) ** 2.4,
          ),
          r = l(s, e);
        return { x: 100 * r[0], y: 100 * r[1], z: 100 * r[2] };
      }
      function c(t) {
        const e = l(o, [t.x / 100, t.y / 100, t.z / 100]).map((t) => {
          const e = t <= 0.0031308 ? 12.92 * t : 1.055 * t ** (1 / 2.4) - 0.055;
          return Math.min(1, Math.max(e, 0));
        });
        return { r: Math.round(255 * e[0]), g: Math.round(255 * e[1]), b: Math.round(255 * e[2]) };
      }
      function h(t) {
        const e = [t.x / 95.047, t.y / 100, t.z / 108.883].map((t) =>
          t > (6 / 29) ** 3 ? t ** (1 / 3) : (1 / 3) * (29 / 6) ** 2 * t + 4 / 29,
        );
        return { l: 116 * e[1] - 16, a: 500 * (e[0] - e[1]), b: 200 * (e[1] - e[2]) };
      }
      function p(t) {
        const e = t.l,
          r = [(e + 16) / 116 + t.a / 500, (e + 16) / 116, (e + 16) / 116 - t.b / 200].map((t) =>
            t > 6 / 29 ? t ** 3 : 3 * (6 / 29) ** 2 * (t - 4 / 29),
          );
        return { x: 95.047 * r[0], y: 100 * r[1], z: 108.883 * r[2] };
      }
      function y(t) {
        return (function (t) {
          return 'r' in t && 'g' in t && 'b' in t;
        })(t)
          ? t
          : a(t)
          ? (function (t) {
              return c(
                p(
                  (function (t) {
                    const e = t.l,
                      r = t.c,
                      i = t.h;
                    return { l: e, a: r * Math.cos(i), b: r * Math.sin(i) };
                  })(t),
                ),
              );
            })(t)
          : n(t)
          ? (function (t) {
              return c(p(t));
            })(t)
          : (function (t) {
              return 'x' in t && 'y' in t && 'z' in t;
            })(t)
          ? c(t)
          : i(t)
          ? (function (t) {
              const e = ((t.h + 360) % 360) / 60,
                r = t.s / 100,
                i = (t.v / 100) * 255,
                n = i * r,
                a = n * (1 - Math.abs((e % 2) - 1));
              let s;
              switch (Math.floor(e)) {
                case 0:
                  s = { r: n, g: a, b: 0 };
                  break;
                case 1:
                  s = { r: a, g: n, b: 0 };
                  break;
                case 2:
                  s = { r: 0, g: n, b: a };
                  break;
                case 3:
                  s = { r: 0, g: a, b: n };
                  break;
                case 4:
                  s = { r: a, g: 0, b: n };
                  break;
                case 5:
                case 6:
                  s = { r: n, g: 0, b: a };
                  break;
                default:
                  s = { r: 0, g: 0, b: 0 };
              }
              return (
                (s.r = Math.round(s.r + i - n)),
                (s.g = Math.round(s.g + i - n)),
                (s.b = Math.round(s.b + i - n)),
                s
              );
            })(t)
          : t;
      }
      function f(t) {
        return i(t)
          ? t
          : (function (t) {
              const e = t.r,
                r = t.g,
                i = t.b,
                n = Math.max(e, r, i),
                a = n - Math.min(e, r, i);
              let s = n,
                o =
                  0 === a
                    ? 0
                    : n === e
                    ? ((r - i) / a) % 6
                    : n === r
                    ? (i - e) / a + 2
                    : (e - r) / a + 4,
                l = 0 === a ? 0 : a / s;
              return (
                o < 0 && (o += 6), (o *= 60), (l *= 100), (s *= 100 / 255), { h: o, s: l, v: s }
              );
            })(y(t));
      }
      function d(t) {
        return n(t)
          ? t
          : (function (t) {
              return h(u(t));
            })(y(t));
      }
      function m(t) {
        return a(t)
          ? t
          : (function (t) {
              return (function (t) {
                const e = t.l,
                  r = t.a,
                  i = t.b,
                  n = Math.sqrt(r * r + i * i);
                let a = Math.atan2(i, r);
                return (a = a > 0 ? a : a + 2 * Math.PI), { l: e, c: n, h: a };
              })(h(u(t)));
            })(y(t));
      }
    },
    82356: (t, e, r) => {
      'use strict';
      r.d(e, {
        A: () => c,
        D: () => d,
        H: () => p,
        M: () => s,
        N: () => i,
        P: () => m,
        S: () => f,
        T: () => y,
        d: () => g,
        k: () => a,
        l: () => h,
        m: () => u,
        s: () => o,
        t: () => n,
        u: () => l,
      });
      const i = 1e-30,
        n = 4294967295,
        a = 512,
        s = 29,
        o = 8,
        l = { metrics: { width: 15, height: 17, left: 0, top: -7, advance: 14 } },
        u = 1,
        c = 2,
        h = 2,
        p = 1,
        y = 1.05,
        f = 2,
        d = 7,
        m = 500,
        g = 10;
    },
    79682: (t, e, r) => {
      'use strict';
      function i(t, e, r, i) {
        const n = 3 * t,
          a = 3 * (r - t) - n,
          s = 1 - n - a,
          o = 3 * e,
          l = 3 * (i - e) - o,
          u = 1 - o - l;
        function c(t) {
          return ((s * t + a) * t + n) * t;
        }
        return function (t, e = 1e-6) {
          return (
            (r = (function (t, e) {
              let r, i, o, l, u, h;
              for (o = t, h = 0; h < 8; h++) {
                if (((l = c(o) - t), Math.abs(l) < e)) return o;
                if (((u = (3 * s * (p = o) + 2 * a) * p + n), Math.abs(u) < 1e-6)) break;
                o -= l / u;
              }
              var p;
              if (((r = 0), (i = 1), (o = t), o < r)) return r;
              if (o > i) return i;
              for (; r < i; ) {
                if (((l = c(o)), Math.abs(l - t) < e)) return o;
                t > l ? (r = o) : (i = o), (o = 0.5 * (i - r) + r);
              }
              return o;
            })(t, e)),
            ((u * r + l) * r + o) * r
          );
          var r;
        };
      }
      r.d(e, { u: () => i });
      const n = {};
      (n.ease = i(0.25, 0.1, 0.25, 1)),
        (n.linear = i(0, 0, 1, 1)),
        (n.easeIn = n['ease-in'] = i(0.42, 0, 1, 1)),
        (n.easeOut = n['ease-out'] = i(0, 0, 0.58, 1)),
        (n.easeInOut = n['ease-in-out'] = i(0.42, 0, 0.58, 1));
    },
  },
]);
