(self.webpackChunkRemoteClient = self.webpackChunkRemoteClient || []).push([
  [3315],
  {
    91055: (e, t, n) => {
      'use strict';
      n.d(t, { A: () => i, O: () => s });
      class s {
        constructor(e, t, n, s = 1, r = 0) {
          if (
            ((this.ctor = e),
            (this.acquireFunction = t),
            (this.releaseFunction = n),
            (this.allocationSize = s),
            (this._pool = new Array(r)),
            (this._initialSize = r),
            this.ctor)
          )
            for (let e = 0; e < r; e++) this._pool[e] = new this.ctor();
          this.allocationSize = Math.max(s, 1);
        }
        destroy() {
          this.prune(0);
        }
        acquire(...e) {
          let t;
          if (s.test.disabled) t = new this.ctor();
          else {
            if (0 === this._pool.length) {
              const e = this.allocationSize;
              for (let t = 0; t < e; t++) this._pool[t] = new this.ctor();
            }
            t = this._pool.pop();
          }
          return (
            this.acquireFunction
              ? this.acquireFunction(t, ...e)
              : (function (e) {
                  return e && e.acquire && 'function' == typeof e.acquire;
                })(t) && t.acquire(...e),
            t
          );
        }
        release(e) {
          e &&
            !s.test.disabled &&
            (this.releaseFunction
              ? this.releaseFunction(e)
              : (function (e) {
                  return e && e.release && 'function' == typeof e.release;
                })(e) && e.release(),
            this._pool.push(e));
        }
        prune(e = this._initialSize) {
          if (!(e >= this._pool.length)) {
            for (let t = e; t < this._pool.length; ++t) {
              const e = this._pool[t];
              this._dispose(e);
            }
            this._pool.length = e;
          }
        }
        _dispose(e) {
          e.dispose && 'function' == typeof e.dispose && e.dispose();
        }
      }
      function r(e) {
        e.length = 0;
      }
      s.test = { disabled: !1 };
      class i {
        constructor(e = 50, t = 50) {
          this._pool = new s(Array, void 0, r, t, e);
        }
        acquire() {
          return this._pool.acquire();
        }
        release(e) {
          this._pool.release(e);
        }
        prune() {
          this._pool.prune(0);
        }
        static acquire() {
          return a.acquire();
        }
        static release(e) {
          return a.release(e);
        }
        static prune() {
          a.prune();
        }
      }
      const a = new i(100);
    },
    53315: (e, t, n) => {
      'use strict';
      n.r(t), n.d(t, { default: () => j });
      var s = n(50406),
        r = n(76506),
        i = n(96611),
        a = n(20369),
        o = n(19484),
        l = n(11385),
        h = n(91055),
        c = n(11545),
        u = n(45731),
        f = n(78537),
        d = n(40642);
      function p(e) {
        return (
          !(e < 11904) &&
          ((e >= 12704 && e <= 12735) ||
            (e >= 12544 && e <= 12591) ||
            (e >= 65072 && e <= 65103) ||
            (e >= 63744 && e <= 64255) ||
            (e >= 13056 && e <= 13311) ||
            (e >= 11904 && e <= 12031) ||
            (e >= 12736 && e <= 12783) ||
            (e >= 12288 && e <= 12351) ||
            (e >= 13312 && e <= 19903) ||
            (e >= 19968 && e <= 40959) ||
            (e >= 12800 && e <= 13055) ||
            (e >= 65280 && e <= 65519) ||
            (e >= 12352 && e <= 12447) ||
            (e >= 12272 && e <= 12287) ||
            (e >= 12032 && e <= 12255) ||
            (e >= 12784 && e <= 12799) ||
            (e >= 12448 && e <= 12543) ||
            (e >= 65040 && e <= 65055) ||
            (e >= 42128 && e <= 42191) ||
            (e >= 40960 && e <= 42127))
        );
      }
      function y(e) {
        switch (e) {
          case 10:
          case 32:
          case 38:
          case 40:
          case 41:
          case 43:
          case 45:
          case 47:
          case 173:
          case 183:
          case 8203:
          case 8208:
          case 8211:
          case 8231:
            return !0;
        }
        return !1;
      }
      function g(e) {
        switch (e) {
          case 9:
          case 10:
          case 11:
          case 12:
          case 13:
          case 32:
            return !0;
        }
        return !1;
      }
      n(60991),
        n(92143),
        n(31450),
        n(71552),
        n(81172),
        n(48027),
        n(54174),
        n(82426),
        n(91306),
        n(79682),
        n(82356),
        n(66992);
      class x {
        constructor(e, t, n, s, r, i, a) {
          (this._glyphItems = e),
            (this._maxWidth = t),
            (this._lineHeight = n),
            (this._letterSpacing = s),
            (this._hAnchor = r),
            (this._vAnchor = i),
            (this._justify = a);
        }
        getShaping(e, t, n) {
          const s = this._letterSpacing,
            r = this._lineHeight,
            i = this._justify,
            a = this._maxWidth,
            o = [];
          let l = 0,
            h = 0;
          const c = e.length;
          for (let t = 0; t < c; t++) {
            const r = e.charCodeAt(t),
              i =
                n &&
                (746 === (u = r) ||
                  747 === u ||
                  (!(u < 4352) &&
                    ((u >= 12704 && u <= 12735) ||
                      (u >= 12544 && u <= 12591) ||
                      (u >= 65072 && u <= 65103 && !(u >= 65097 && u <= 65103)) ||
                      (u >= 63744 && u <= 64255) ||
                      (u >= 13056 && u <= 13311) ||
                      (u >= 11904 && u <= 12031) ||
                      (u >= 12736 && u <= 12783) ||
                      (u >= 12288 &&
                        u <= 12351 &&
                        !(
                          (u >= 12296 && u <= 12305) ||
                          (u >= 12308 && u <= 12319) ||
                          12336 === u
                        )) ||
                      (u >= 13312 && u <= 19903) ||
                      (u >= 19968 && u <= 40959) ||
                      (u >= 12800 && u <= 13055) ||
                      (u >= 12592 && u <= 12687) ||
                      (u >= 43360 && u <= 43391) ||
                      (u >= 55216 && u <= 55295) ||
                      (u >= 4352 && u <= 4607) ||
                      (u >= 44032 && u <= 55215) ||
                      (u >= 12352 && u <= 12447) ||
                      (u >= 12272 && u <= 12287) ||
                      (u >= 12688 && u <= 12703) ||
                      (u >= 12032 && u <= 12255) ||
                      (u >= 12784 && u <= 12799) ||
                      (u >= 12448 && u <= 12543 && 12540 !== u) ||
                      (u >= 65280 &&
                        u <= 65519 &&
                        !(
                          65288 === u ||
                          65289 === u ||
                          65293 === u ||
                          (u >= 65306 && u <= 65310) ||
                          65339 === u ||
                          65341 === u ||
                          65343 === u ||
                          (u >= 65371 && u <= 65503) ||
                          65507 === u ||
                          (u >= 65512 && u <= 65519)
                        )) ||
                      (u >= 65104 &&
                        u <= 65135 &&
                        !((u >= 65112 && u <= 65118) || (u >= 65123 && u <= 65126))) ||
                      (u >= 5120 && u <= 5759) ||
                      (u >= 6320 && u <= 6399) ||
                      (u >= 65040 && u <= 65055) ||
                      (u >= 19904 && u <= 19967) ||
                      (u >= 40960 && u <= 42127) ||
                      (u >= 42128 && u <= 42191))));
            let a;
            for (const e of this._glyphItems) if (((a = e[r]), a)) break;
            o.push({ codePoint: r, x: l, y: h, vertical: i, glyphMosaicItem: a }),
              a && (l += a.metrics.advance + s);
          }
          var u;
          let f = l;
          a > 0 && (f = l / Math.max(1, Math.ceil(l / a)));
          const d = e.indexOf('​') >= 0,
            x = [];
          for (let e = 0; e < c - 1; e++) {
            const t = o[e].codePoint,
              n = p(t);
            if (y(t) || n) {
              let s = 0;
              if (10 === t) s -= 1e4;
              else if (n && d) s += 150;
              else {
                (40 !== t && 65288 !== t) || (s += 50);
                const n = o[e + 1].codePoint;
                (41 !== n && 65289 !== n) || (s += 50);
              }
              x.push(this._buildBreak(e + 1, o[e].x, f, x, s, !1));
            }
          }
          const _ = this._optimalBreaks(this._buildBreak(c, l, f, x, 0, !0));
          let m = 0;
          const I = t ? -r : r;
          let M = 0;
          for (let e = 0; e < _.length; e++) {
            const t = _[e];
            let n = M;
            for (; n < t && g(o[n].codePoint); ) (o[n].glyphMosaicItem = null), ++n;
            let s = t - 1;
            for (; s > n && g(o[s].codePoint); ) (o[s].glyphMosaicItem = null), --s;
            if (n <= s) {
              const e = o[n].x;
              for (let t = n; t <= s; t++) (o[t].x -= e), (o[t].y = h);
              let t = o[s].x;
              o[s].glyphMosaicItem && (t += o[s].glyphMosaicItem.metrics.advance),
                (m = Math.max(t, m)),
                i && this._applyJustification(o, n, s);
            }
            (M = t), (h += I);
          }
          if (o.length > 0) {
            const e = _.length - 1,
              n = (i - this._hAnchor) * m;
            let s = (-this._vAnchor * (e + 1) + 0.5) * r;
            t && e && (s += e * r);
            for (const e of o) (e.x += n), (e.y += s);
          }
          return o.filter((e) => e.glyphMosaicItem);
        }
        static getTextBox(e, t) {
          if (!e.length) return null;
          let n = 1 / 0,
            s = 1 / 0,
            r = 0,
            i = 0;
          for (const a of e) {
            const e = a.glyphMosaicItem.metrics.advance,
              o = a.x,
              l = a.y - 17,
              h = o + e,
              c = l + t;
            (n = Math.min(n, o)), (r = Math.max(r, h)), (s = Math.min(s, l)), (i = Math.max(i, c));
          }
          return { x: n, y: s, width: r - n, height: i - s };
        }
        static getBox(e) {
          if (!e.length) return null;
          let t = 1 / 0,
            n = 1 / 0,
            s = 0,
            r = 0;
          for (const i of e) {
            const { height: e, left: a, top: o, width: l } = i.glyphMosaicItem.metrics,
              h = i.x,
              c = i.y - (e - Math.abs(o)),
              u = h + l + a,
              f = c + e;
            (t = Math.min(t, h)), (s = Math.max(s, u)), (n = Math.min(n, c)), (r = Math.max(r, f));
          }
          return { x: t, y: n, width: s - t, height: r - n };
        }
        static addDecoration(e, t) {
          const n = e.length;
          if (0 === n) return;
          let s = e[0].x + e[0].glyphMosaicItem.metrics.left,
            r = e[0].y;
          for (let i = 1; i < n; i++) {
            const n = e[i];
            if (n.y !== r) {
              const o =
                e[i - 1].x +
                e[i - 1].glyphMosaicItem.metrics.left +
                e[i - 1].glyphMosaicItem.metrics.width;
              e.push({
                codePoint: 0,
                x: s,
                y: r + t - 3,
                vertical: !1,
                glyphMosaicItem: {
                  sdf: !0,
                  rect: new a.R(4, 0, 4, 8),
                  metrics: { width: o - s, height: 8, left: 0, top: 0, advance: 0 },
                  page: 0,
                  code: 0,
                },
              }),
                (r = n.y),
                (s = n.x + n.glyphMosaicItem.metrics.left);
            }
          }
          const i =
            e[n - 1].x +
            e[n - 1].glyphMosaicItem.metrics.left +
            e[n - 1].glyphMosaicItem.metrics.width;
          e.push({
            codePoint: 0,
            x: s,
            y: r + t - 3,
            vertical: !1,
            glyphMosaicItem: {
              sdf: !0,
              rect: new a.R(4, 0, 4, 8),
              metrics: { width: i - s, height: 8, left: 0, top: 0, advance: 0 },
              page: 0,
              code: 0,
            },
          });
        }
        _breakScore(e, t, n, s) {
          const r = (e - t) * (e - t);
          return s ? (e < t ? r / 2 : 2 * r) : r + Math.abs(n) * n;
        }
        _buildBreak(e, t, n, s, r, i) {
          let a = null,
            o = this._breakScore(t, n, r, i);
          for (const e of s) {
            const s = t - e.x,
              l = this._breakScore(s, n, r, i) + e.score;
            l <= o && ((a = e), (o = l));
          }
          return { index: e, x: t, score: o, previousBreak: a };
        }
        _optimalBreaks(e) {
          return e ? this._optimalBreaks(e.previousBreak).concat(e.index) : [];
        }
        _applyJustification(e, t, n) {
          const s = e[n],
            r = s.vertical ? 24 : s.glyphMosaicItem ? s.glyphMosaicItem.metrics.advance : 0,
            i = (s.x + r) * this._justify;
          for (let s = t; s <= n; s++) e[s].x -= i;
        }
      }
      class _ {
        constructor(e, t, n = 0, s = -1, r = 0.5) {
          (this.x = e), (this.y = t), (this.angle = n), (this.segment = s), (this.minzoom = r);
        }
      }
      class m {
        constructor(e, t, n, s, r, a = 0.5, o = i.b) {
          (this.anchor = e),
            (this.labelAngle = t),
            (this.glyphAngle = n),
            (this.page = s),
            (this.alternateVerticalGlyph = r),
            (this.minzoom = a),
            (this.maxzoom = o);
        }
      }
      class I {
        constructor(e, t, n, s, r, i, a, o, l, h, c, u) {
          (this.tl = e),
            (this.tr = t),
            (this.bl = n),
            (this.br = s),
            (this.mosaicRect = r),
            (this.labelAngle = i),
            (this.minAngle = a),
            (this.maxAngle = o),
            (this.anchor = l),
            (this.minzoom = h),
            (this.maxzoom = c),
            (this.page = u);
        }
      }
      class M {
        constructor(e) {
          this.shapes = e;
        }
      }
      class b {
        getIconPlacement(e, t, n) {
          const s = new o.P(e.x, e.y),
            r = 0 === n.rotationAlignment,
            a = n.keepUpright;
          let l = n.rotate * i.C;
          r && (l += e.angle);
          const h = new M([]);
          return (
            (n.allowOverlap && n.ignorePlacement) || (h.iconColliders = []),
            this._addIconPlacement(h, s, t, n, l),
            r && a && this._addIconPlacement(h, s, t, n, l + i.a),
            h
          );
        }
        _addIconPlacement(e, t, n, s, r) {
          const a = n.pixelRatio,
            l = n.width / a,
            h = n.height / a,
            c = s.offset;
          let u = c[0],
            f = c[1];
          switch (s.anchor) {
            case 0:
              (u -= l / 2), (f -= h / 2);
              break;
            case 1:
              f -= h / 2;
              break;
            case 2:
              (u -= l), (f -= h / 2);
              break;
            case 3:
              u -= l / 2;
              break;
            case 4:
              (u -= l / 2), (f -= h);
              break;
            case 5:
              break;
            case 7:
              f -= h;
              break;
            case 6:
              u -= l;
              break;
            case 8:
              (u -= l), (f -= h);
          }
          const d = n.rect,
            p = 2 / a,
            y = u - p,
            g = f - p,
            x = y + d.width / a,
            _ = g + d.height / a,
            m = new o.P(y, g),
            M = new o.P(x, _),
            b = new o.P(y, _),
            w = new o.P(x, g);
          if (0 !== r) {
            const e = Math.cos(r),
              t = Math.sin(r);
            m.rotate(e, t), M.rotate(e, t), b.rotate(e, t), w.rotate(e, t);
          }
          const P = new I(m, w, b, M, d, r, 0, 256, t, 0.5, i.b, 0);
          if ((e.shapes.push(P), !s.allowOverlap || !s.ignorePlacement)) {
            const n = s.size,
              a = s.padding,
              o = {
                xTile: t.x,
                yTile: t.y,
                dxPixels: u * n - a,
                dyPixels: f * n - a,
                hard: !s.optional,
                partIndex: 0,
                width: l * n + 2 * a,
                height: h * n + 2 * a,
                angle: r,
                minLod: 0.5,
                maxLod: i.b,
              };
            e.iconColliders.push(o);
          }
        }
        getTextPlacement(e, t, n, s) {
          const r = new o.P(e.x, e.y),
            a = s.rotate * i.C,
            l = 0 === s.rotationAlignment,
            h = s.keepUpright,
            c = s.padding;
          let u = 0.5;
          const f = l ? e.angle : 0,
            d = e.segment >= 0 && l,
            p = s.allowOverlap && s.ignorePlacement ? null : [],
            y = [],
            g = !d;
          let _ = Number.POSITIVE_INFINITY,
            b = Number.NEGATIVE_INFINITY,
            w = _,
            P = b;
          const k = (d || l) && h,
            v = s.size / 24;
          let V = !1;
          for (const e of t)
            if (e.vertical) {
              V = !0;
              break;
            }
          let A,
            D = 0,
            B = 0;
          if (!d && V) {
            const e = x.getTextBox(t, 24 * s.lineHeight);
            switch (s.anchor) {
              case 1:
                (D = e.height / 2), (B = -e.width / 2);
                break;
              case 2:
                (D = -e.height / 2), (B = e.width / 2);
                break;
              case 3:
                (D = e.height / 2), (B = e.width / 2);
                break;
              case 4:
                (D = -e.height / 2), (B = -e.width / 2);
                break;
              case 5:
                D = e.height;
                break;
              case 7:
                B = -e.width;
                break;
              case 6:
                B = e.width;
                break;
              case 8:
                D = -e.height;
            }
          }
          (D += 24 * s.offset[0]), (B += 24 * s.offset[1]);
          for (const x of t) {
            const t = x.glyphMosaicItem;
            if (!t || t.rect.isEmpty) continue;
            const M = t.rect,
              L = t.metrics,
              S = t.page;
            if (p && g) {
              if (void 0 !== A && A !== x.y) {
                let t, n, r, o;
                V
                  ? ((t = -P + D), (n = _ + B), (r = P - w), (o = b - _))
                  : ((t = _ + D), (n = w + B), (r = b - _), (o = P - w));
                const l = {
                  xTile: e.x,
                  yTile: e.y,
                  dxPixels: t * v - c,
                  dyPixels: n * v - c,
                  hard: !s.optional,
                  partIndex: 1,
                  width: r * v + 2 * c,
                  height: o * v + 2 * c,
                  angle: a,
                  minLod: 0.5,
                  maxLod: i.b,
                };
                p.push(l),
                  (_ = Number.POSITIVE_INFINITY),
                  (b = Number.NEGATIVE_INFINITY),
                  (w = _),
                  (P = b);
              }
              A = x.y;
            }
            const T = [];
            if (d) {
              const s = 0.5 * t.metrics.width,
                r = (x.x + L.left - 4 + s) * v * 8;
              if (
                ((u = this._placeGlyph(e, u, r, n, e.segment, 1, x.vertical, S, T)),
                h && (u = this._placeGlyph(e, u, r, n, e.segment, -1, x.vertical, S, T)),
                u >= 2)
              )
                break;
            } else
              T.push(new m(r, f, f, S, !1)), l && h && T.push(new m(r, f + i.a, f + i.a, S, !1));
            const C = x.x + L.left,
              F = x.y - 17 - L.top,
              z = C + L.width,
              U = F + L.height;
            let N, E, R, q, O, G, j, K;
            if (!d && V)
              if (x.vertical) {
                const e = (C + z) / 2 - L.height / 2,
                  t = (F + U) / 2 + L.width / 2;
                (N = new o.P(-t - 4 + D, e - 4 + B)),
                  (E = new o.P(N.x + M.width, N.y + M.height)),
                  (R = new o.P(N.x, E.y)),
                  (q = new o.P(E.x, N.y));
              } else
                (N = new o.P(4 - F + D, C - 4 + B)),
                  (E = new o.P(N.x - M.height, N.y + M.width)),
                  (R = new o.P(E.x, N.y)),
                  (q = new o.P(N.x, E.y));
            else
              (N = new o.P(C - 4 + D, F - 4 + B)),
                (E = new o.P(N.x + M.width, N.y + M.height)),
                (R = new o.P(N.x, E.y)),
                (q = new o.P(E.x, N.y));
            for (const t of T) {
              let n, r, i, l;
              if (t.alternateVerticalGlyph) {
                if (!O) {
                  const e = (F + U) / 2 + B;
                  (O = new o.P((C + z) / 2 + D - L.height / 2 - 4, e + L.width / 2 + 4)),
                    (G = new o.P(O.x + M.height, O.y - M.width)),
                    (j = new o.P(G.x, O.y)),
                    (K = new o.P(O.x, G.y));
                }
                (n = O), (r = j), (i = K), (l = G);
              } else (n = N), (r = R), (i = q), (l = E);
              const h = F,
                u = U,
                f = t.glyphAngle + a;
              if (0 !== f) {
                const e = Math.cos(f),
                  t = Math.sin(f);
                (n = n.clone()),
                  (r = r.clone()),
                  (i = i.clone()),
                  (l = l.clone()),
                  n.rotate(e, t),
                  l.rotate(e, t),
                  r.rotate(e, t),
                  i.rotate(e, t);
              }
              let m = 0,
                A = 256;
              if (
                (d && V
                  ? x.vertical
                    ? t.alternateVerticalGlyph
                      ? ((m = 32), (A = 96))
                      : ((m = 224), (A = 32))
                    : ((m = 224), (A = 96))
                  : ((m = 192), (A = 64)),
                y.push(
                  new I(n, i, r, l, M, t.labelAngle, m, A, t.anchor, t.minzoom, t.maxzoom, t.page),
                ),
                p && (!k || this._legible(t.labelAngle)))
              )
                if (g) C < _ && (_ = C), h < w && (w = h), z > b && (b = z), u > P && (P = u);
                else if (t.minzoom < 2) {
                  const n = {
                    xTile: e.x,
                    yTile: e.y,
                    dxPixels: (C + D) * v - c,
                    dyPixels: (h + D) * v - c,
                    hard: !s.optional,
                    partIndex: 1,
                    width: (z - C) * v + 2 * c,
                    height: (u - h) * v + 2 * c,
                    angle: f,
                    minLod: t.minzoom,
                    maxLod: t.maxzoom,
                  };
                  p.push(n);
                }
            }
          }
          if (u >= 2) return null;
          if (p && g) {
            let t, n, r, o;
            V
              ? ((t = -P + D), (n = _ + B), (r = P - w), (o = b - _))
              : ((t = _ + D), (n = w + B), (r = b - _), (o = P - w));
            const l = {
              xTile: e.x,
              yTile: e.y,
              dxPixels: t * v - c,
              dyPixels: n * v - c,
              hard: !s.optional,
              partIndex: 1,
              width: r * v + 2 * c,
              height: o * v + 2 * c,
              angle: a,
              minLod: 0.5,
              maxLod: i.b,
            };
            p.push(l);
          }
          const L = new M(y);
          return p && p.length > 0 && (L.textColliders = p), L;
        }
        _legible(e) {
          const t = (0, i.r)(e);
          return t < 65 || t >= 193;
        }
        _placeGlyph(e, t, n, s, r, a, l, h, c) {
          let u = a;
          const f = u < 0 ? (0, i.p)(e.angle + i.a, i.c) : e.angle;
          let d = 0;
          n < 0 && ((u *= -1), (n *= -1), (d = i.a)), u > 0 && ++r;
          let p = new o.P(e.x, e.y),
            y = s[r],
            g = i.b;
          if (s.length <= r) return g;
          for (;;) {
            const e = y.x - p.x,
              a = y.y - p.y,
              o = Math.sqrt(e * e + a * a),
              x = Math.max(n / o, t),
              _ = e / o,
              I = a / o,
              M = (0, i.p)(Math.atan2(I, _) + d, i.c);
            if (
              (c.push(new m(p, f, M, h, !1, x, g)),
              l && c.push(new m(p, f, M, h, !0, x, g)),
              x <= t)
            )
              return x;
            p = y.clone();
            do {
              if (((r += u), s.length <= r || r < 0)) return x;
              y = s[r];
            } while (p.isEqual(y));
            let b = y.x - p.x,
              w = y.y - p.y;
            const P = Math.sqrt(b * b + w * w);
            (b *= o / P), (w *= o / P), (p.x -= b), (p.y -= w), (g = x);
          }
        }
      }
      class w {
        constructor(e, t) {
          this.values = {};
          const n = t.keys,
            s = t.values;
          for (; e.next(); )
            switch (e.tag()) {
              case 1:
                this.id = e.getUInt64();
                break;
              case 2: {
                const t = e.getMessage(),
                  r = this.values;
                for (; !t.empty(); ) {
                  const e = t.getUInt32(),
                    i = t.getUInt32();
                  r[n[e]] = s[i];
                }
                t.release();
                break;
              }
              case 3:
                this.type = e.getUInt32();
                break;
              case 4:
                this._pbfGeometry = e.getMessage();
                break;
              default:
                e.skip();
            }
        }
        getGeometry(e) {
          if (void 0 !== this._geometry) return this._geometry;
          if (!this._pbfGeometry) return null;
          const t = this._pbfGeometry;
          let n, s;
          (this._pbfGeometry = null), e ? e.reset(this.type) : (n = []);
          let r,
            i = 1,
            a = 0,
            l = 0,
            h = 0;
          for (; !t.empty(); ) {
            if (0 === a) {
              const e = t.getUInt32();
              (i = 7 & e), (a = e >> 3);
            }
            switch ((a--, i)) {
              case 1:
                (l += t.getSInt32()),
                  (h += t.getSInt32()),
                  e ? e.moveTo(l, h) : (s && n.push(s), (s = []), s.push(new o.P(l, h)));
                break;
              case 2:
                (l += t.getSInt32()),
                  (h += t.getSInt32()),
                  e ? e.lineTo(l, h) : s.push(new o.P(l, h));
                break;
              case 7:
                e ? e.close() : s && !s[0].equals(l, h) && s.push(s[0].clone());
                break;
              default:
                throw (t.release(), new Error('Invalid path operation'));
            }
          }
          return (
            e ? (r = e.result()) : (s && n.push(s), (r = n)), t.release(), (this._geometry = r), r
          );
        }
      }
      class P extends i.M {
        constructor() {
          super(12);
        }
        add(e, t, n) {
          const s = this.array;
          s.push(e), s.push(t), s.push(n);
        }
      }
      class k {
        constructor(e) {
          for (
            this.extent = 4096, this.keys = [], this.values = [], this._pbfLayer = e.clone();
            e.next();

          )
            switch (e.tag()) {
              case 1:
                this.name = e.getString();
                break;
              case 3:
                this.keys.push(e.getString());
                break;
              case 4:
                this.values.push(e.processMessage(k._parseValue));
                break;
              case 5:
                this.extent = e.getUInt32();
                break;
              default:
                e.skip();
            }
        }
        getData() {
          return this._pbfLayer;
        }
        static _parseValue(e) {
          for (; e.next(); )
            switch (e.tag()) {
              case 1:
                return e.getString();
              case 2:
                return e.getFloat();
              case 3:
                return e.getDouble();
              case 4:
                return e.getInt64();
              case 5:
                return e.getUInt64();
              case 6:
                return e.getSInt64();
              case 7:
                return e.getBool();
              default:
                e.skip();
            }
          return null;
        }
      }
      class v extends i.M {
        constructor(e) {
          super(e);
        }
        add(e, t, n, s, r, a, o, l, h, c, u, f) {
          const d = this.array;
          let p = i.M.i1616to32(e, t);
          d.push(p);
          const y = 31;
          (p = i.M.i8888to32(
            Math.round(y * n),
            Math.round(y * s),
            Math.round(y * r),
            Math.round(y * a),
          )),
            d.push(p),
            (p = i.M.i8888to32(
              Math.round(y * o),
              Math.round(y * l),
              Math.round(y * h),
              Math.round(y * c),
            )),
            d.push(p),
            (p = i.M.i1616to32(u, 0)),
            d.push(p),
            f && d.push(...f);
        }
      }
      class V extends i.M {
        constructor(e) {
          super(e);
        }
        add(e, t, n) {
          const s = this.array;
          s.push(i.M.i1616to32(e, t)), n && s.push(...n);
        }
      }
      class A extends i.M {
        constructor(e) {
          super(e);
        }
        add(e, t, n, s, r, a, o) {
          const l = this.array,
            h = this.index;
          let c = i.M.i1616to32(e, t);
          return (
            l.push(c),
            (c = i.M.i8888to32(Math.round(15 * n), Math.round(15 * s), r, a)),
            l.push(c),
            o && l.push(...o),
            h
          );
        }
      }
      class D extends i.M {
        constructor(e) {
          super(e);
        }
        add(e, t, n, s, r, a, o, l, h, c, u, f) {
          const d = this.array;
          let p = i.M.i1616to32(e, t);
          d.push(p),
            (p = i.M.i1616to32(Math.round(8 * n), Math.round(8 * s))),
            d.push(p),
            (p = i.M.i8888to32(r / 4, a / 4, l, h)),
            d.push(p),
            (p = i.M.i8888to32(0, (0, i.r)(o), 10 * c, Math.min(10 * u, 255))),
            d.push(p),
            f && d.push(...f);
        }
      }
      class B extends i.M {
        constructor(e) {
          super(e);
        }
        add(e, t, n, s, r) {
          const a = this.array,
            o = i.M.i1616to32(2 * e + n, 2 * t + s);
          a.push(o), r && a.push(...r);
        }
      }
      class L {
        constructor(e, t, n) {
          (this.layerExtent = 4096),
            (this._features = []),
            (this.layer = e),
            (this.zoom = t),
            (this._spriteInfo = n),
            (this._filter = e.getFeatureFilter());
        }
        pushFeature(e) {
          (this._filter && !this._filter.filter(e, this.zoom)) || this._features.push(e);
        }
        hasFeatures() {
          return this._features.length > 0;
        }
        getResources(e, t, n) {}
      }
      class S extends L {
        constructor(e, t, n, s, r) {
          super(e, t, n),
            (this.type = 4),
            (this._circleVertexBuffer = s),
            (this._circleIndexBuffer = r);
        }
        get circleIndexStart() {
          return this._circleIndexStart;
        }
        get circleIndexCount() {
          return this._circleIndexCount;
        }
        processFeatures(e) {
          const t = this._circleVertexBuffer,
            n = this._circleIndexBuffer;
          (this._circleIndexStart = 3 * n.index), (this._circleIndexCount = 0);
          const s = this.layer,
            r = this.zoom;
          e && e.setExtent(this.layerExtent);
          for (const i of this._features) {
            const a = i.getGeometry(e);
            if (!a) continue;
            const o = s.circleMaterial.encodeAttributes(i, r, s);
            for (const e of a)
              if (e)
                for (const s of e) {
                  const e = t.index;
                  t.add(s.x, s.y, 0, 0, o),
                    t.add(s.x, s.y, 0, 1, o),
                    t.add(s.x, s.y, 1, 0, o),
                    t.add(s.x, s.y, 1, 1, o),
                    n.add(e + 0, e + 1, e + 2),
                    n.add(e + 1, e + 2, e + 3),
                    (this._circleIndexCount += 6);
                }
          }
        }
        serialize() {
          let e = 6;
          (e += this.layerUIDs.length),
            (e += this._circleVertexBuffer.array.length),
            (e += this._circleIndexBuffer.array.length);
          const t = new Uint32Array(e),
            n = new Int32Array(t.buffer);
          let s = 0;
          (t[s++] = this.type), (t[s++] = this.layerUIDs.length);
          for (let e = 0; e < this.layerUIDs.length; e++) t[s++] = this.layerUIDs[e];
          (t[s++] = this._circleIndexStart),
            (t[s++] = this._circleIndexCount),
            (t[s++] = this._circleVertexBuffer.array.length);
          for (let e = 0; e < this._circleVertexBuffer.array.length; e++)
            n[s++] = this._circleVertexBuffer.array[e];
          t[s++] = this._circleIndexBuffer.array.length;
          for (let e = 0; e < this._circleIndexBuffer.array.length; e++)
            t[s++] = this._circleIndexBuffer.array[e];
          return t.buffer;
        }
      }
      const T = new o.T();
      class C extends L {
        constructor(e, t, n, s, r, i, a) {
          super(e, t, n),
            (this.type = 1),
            (this._patternMap = new Map()),
            (this._fillVertexBuffer = s),
            (this._fillIndexBuffer = r),
            (this._outlineVertexBuffer = i),
            (this._outlineIndexBuffer = a);
        }
        get fillIndexStart() {
          return this._fillIndexStart;
        }
        get fillIndexCount() {
          return this._fillIndexCount;
        }
        get outlineIndexStart() {
          return this._outlineIndexStart;
        }
        get outlineIndexCount() {
          return this._outlineIndexCount;
        }
        getResources(e, t, n) {
          const s = this.layer,
            r = this.zoom,
            i = s.getPaintProperty('fill-pattern');
          if (i)
            if (i.isDataDriven)
              for (const e of this._features) t.add({ name: i.getValue(r, e), repeat: !0 });
            else t.add({ name: i.getValue(r), repeat: !0 });
        }
        processFeatures(e) {
          (this._fillIndexStart = 3 * this._fillIndexBuffer.index),
            (this._fillIndexCount = 0),
            (this._outlineIndexStart = 3 * this._outlineIndexBuffer.index),
            (this._outlineIndexCount = 0);
          const t = this.layer,
            n = this.zoom,
            {
              fillMaterial: s,
              outlineMaterial: r,
              hasDataDrivenFill: i,
              hasDataDrivenOutline: a,
            } = t;
          e && e.setExtent(this.layerExtent);
          const o = t.getPaintProperty('fill-pattern'),
            l = null == o ? void 0 : o.isDataDriven;
          let h = !o && t.getPaintValue('fill-antialias', n);
          if (t.outlineUsesFillColor) {
            if (h && !t.hasDataDrivenOpacity) {
              const e = t.getPaintValue('fill-opacity', n),
                s = t.getPaintValue('fill-opacity', n + 1);
              e < 1 && s < 1 && (h = !1);
            }
            if (h && !t.hasDataDrivenColor) {
              const e = t.getPaintValue('fill-color', n),
                s = t.getPaintValue('fill-color', n + 1);
              e[3] < 1 && s[3] < 1 && (h = !1);
            }
          }
          const c = this._features,
            u = null == e ? void 0 : e.validateTessellation;
          if (l) {
            const i = [];
            for (const l of c) {
              const c = o.getValue(n, l),
                f = this._spriteInfo[c];
              if (!f || !f.rect) continue;
              const d = s.encodeAttributes(l, n, t, f),
                p = h && a ? r.encodeAttributes(l, n, t) : [],
                y = l.getGeometry(e);
              i.push({ ddFillAttributes: d, ddOutlineAttributes: p, page: f.page, geometry: y }),
                i.sort((e, t) => e.page - t.page);
              for (const { ddFillAttributes: e, ddOutlineAttributes: n, page: s, geometry: r } of i)
                this._processFeature(r, h, t.outlineUsesFillColor, e, n, u, s);
            }
          } else
            for (const o of c) {
              const l = i ? s.encodeAttributes(o, n, t) : null,
                c = h && a ? r.encodeAttributes(o, n, t) : null,
                f = o.getGeometry(e);
              this._processFeature(f, h, t.outlineUsesFillColor, l, c, u);
            }
        }
        serialize() {
          let e = 10;
          (e += this.layerUIDs.length),
            (e += this._fillVertexBuffer.array.length),
            (e += this._fillIndexBuffer.array.length),
            (e += this._outlineVertexBuffer.array.length),
            (e += this._outlineIndexBuffer.array.length),
            (e += 3 * this._patternMap.size + 1);
          const t = new Uint32Array(e),
            n = new Int32Array(t.buffer);
          let s = 0;
          (t[s++] = this.type), (t[s++] = this.layerUIDs.length);
          for (let e = 0; e < this.layerUIDs.length; e++) t[s++] = this.layerUIDs[e];
          (t[s++] = this._fillIndexStart),
            (t[s++] = this._fillIndexCount),
            (t[s++] = this._outlineIndexStart),
            (t[s++] = this._outlineIndexCount);
          const r = this._patternMap,
            i = r.size;
          if (((t[s++] = i), i > 0))
            for (const [e, [n, i]] of r) (t[s++] = e), (t[s++] = n), (t[s++] = i);
          t[s++] = this._fillVertexBuffer.array.length;
          for (let e = 0; e < this._fillVertexBuffer.array.length; e++)
            n[s++] = this._fillVertexBuffer.array[e];
          t[s++] = this._fillIndexBuffer.array.length;
          for (let e = 0; e < this._fillIndexBuffer.array.length; e++)
            t[s++] = this._fillIndexBuffer.array[e];
          t[s++] = this._outlineVertexBuffer.array.length;
          for (let e = 0; e < this._outlineVertexBuffer.array.length; e++)
            n[s++] = this._outlineVertexBuffer.array[e];
          t[s++] = this._outlineIndexBuffer.array.length;
          for (let e = 0; e < this._outlineIndexBuffer.array.length; e++)
            t[s++] = this._outlineIndexBuffer.array[e];
          return t.buffer;
        }
        _processFeature(e, t, n, s, r, i, a) {
          if (!e) return;
          const o = e.length,
            l = !r || 0 === r.length;
          if (t && (!n || l)) for (let t = 0; t < o; t++) this._processOutline(e[t], r);
          let h;
          for (let t = 0; t < o; t++) {
            const n = C._area(e[t]);
            n > 32
              ? (void 0 !== h && this._processFill(e, h, s, i, a), (h = [t]))
              : n < -32 && void 0 !== h && h.push(t);
          }
          void 0 !== h && this._processFill(e, h, s, i, a);
        }
        _processOutline(e, t) {
          const n = this._outlineVertexBuffer,
            s = this._outlineIndexBuffer,
            r = s.index;
          let i, a, l;
          const h = new o.P(0, 0),
            c = new o.P(0, 0),
            u = new o.P(0, 0);
          let f = -1,
            d = -1,
            p = -1,
            y = -1,
            g = -1,
            x = !1,
            _ = e.length;
          if (_ < 2) return;
          const m = e[0];
          let I = e[_ - 1];
          for (; _ && I.isEqual(m); ) --_, (I = e[_ - 1]);
          if (!(_ - 0 < 2)) {
            for (let r = 0; r < _; ++r) {
              0 === r
                ? ((i = e[_ - 1]),
                  (a = e[0]),
                  (l = e[1]),
                  h.assignSub(a, i),
                  h.normalize(),
                  h.rightPerpendicular())
                : ((i = a), (a = l), (l = r !== _ - 1 ? e[r + 1] : e[0]), h.assign(c));
              const o = this._isClipEdge(i, a);
              -1 === y && (x = o), c.assignSub(l, a), c.normalize(), c.rightPerpendicular();
              const m = h.x * c.y - h.y * c.x;
              u.assignAdd(h, c), u.normalize();
              const I = -u.x * -h.x + -u.y * -h.y;
              let M = Math.abs(0 !== I ? 1 / I : 1);
              M > 8 && (M = 8),
                m >= 0
                  ? ((p = n.add(a.x, a.y, h.x, h.y, 0, 1, t)),
                    -1 === y && (y = p),
                    f >= 0 && d >= 0 && p >= 0 && !o && s.add(f, d, p),
                    (d = n.add(a.x, a.y, M * -u.x, M * -u.y, 0, -1, t)),
                    -1 === g && (g = d),
                    f >= 0 && d >= 0 && p >= 0 && !o && s.add(f, d, p),
                    (f = d),
                    (d = p),
                    (p = n.add(a.x, a.y, u.x, u.y, 0, 1, t)),
                    f >= 0 && d >= 0 && p >= 0 && !o && s.add(f, d, p),
                    (d = n.add(a.x, a.y, c.x, c.y, 0, 1, t)),
                    f >= 0 && d >= 0 && p >= 0 && !o && s.add(f, d, p))
                  : ((p = n.add(a.x, a.y, M * u.x, M * u.y, 0, 1, t)),
                    -1 === y && (y = p),
                    f >= 0 && d >= 0 && p >= 0 && !o && s.add(f, d, p),
                    (d = n.add(a.x, a.y, -h.x, -h.y, 0, -1, t)),
                    -1 === g && (g = d),
                    f >= 0 && d >= 0 && p >= 0 && !o && s.add(f, d, p),
                    (f = d),
                    (d = p),
                    (p = n.add(a.x, a.y, -u.x, -u.y, 0, -1, t)),
                    f >= 0 && d >= 0 && p >= 0 && !o && s.add(f, d, p),
                    (f = n.add(a.x, a.y, -c.x, -c.y, 0, -1, t)),
                    f >= 0 && d >= 0 && p >= 0 && !o && s.add(f, d, p));
            }
            f >= 0 && d >= 0 && y >= 0 && !x && s.add(f, d, y),
              f >= 0 && y >= 0 && g >= 0 && !x && s.add(f, g, y),
              (this._outlineIndexCount += 3 * (s.index - r));
          }
        }
        _processFill(e, t, n, s, r) {
          let i;
          t.length > 1 && (i = []);
          let a = 0;
          for (const n of t) 0 !== a && i.push(a), (a += e[n].length);
          const o = 2 * a,
            l = h.A.acquire();
          for (const n of t) {
            const t = e[n],
              s = t.length;
            for (let e = 0; e < s; ++e) l.push(t[e].x, t[e].y);
          }
          const u = (0, c.e)(l, i, 2);
          if (c.e.deviation(l, i, 2, u) > 0) {
            const s = [],
              i = [];
            if (
              ((function (e, t, n, s) {
                let r, i;
                T.beginPolygon(e, t);
                for (const e of s) {
                  const t = n[e];
                  if (!(t.length < 3)) {
                    T.beginContour();
                    for (let e = 0; e < t.length; ++e) {
                      (r = t[e].x), (i = t[e].y);
                      const n = [r, i, 0];
                      T.addVertex(n, n);
                    }
                    T.endContour();
                  }
                }
                T.endPolygon();
              })(s, i, e, t),
              i.length > 0)
            ) {
              const e = this._fillVertexBuffer.index;
              let t = 0;
              for (; t < s.length; ) this._fillVertexBuffer.add(s[t++], s[t++], n);
              let a = 0;
              for (; a < i.length; )
                this._fillIndexBuffer.add(e + i[a + 0], e + i[a + 1], e + i[a + 2]), (a += 3);
              if (void 0 !== r) {
                const e = this._patternMap,
                  t = e.get(r);
                t
                  ? (t[1] += i.length)
                  : e.set(r, [this._fillIndexStart + this._fillIndexCount, i.length]);
              }
              this._fillIndexCount += i.length;
            }
          } else {
            const e = u.length;
            if (e > 0) {
              const t = this._fillVertexBuffer.index;
              let s = 0;
              for (; s < o; ) this._fillVertexBuffer.add(l[s++], l[s++], n);
              let i = 0;
              for (; i < e; ) this._fillIndexBuffer.add(t + u[i++], t + u[i++], t + u[i++]);
              if (void 0 !== r) {
                const t = this._patternMap,
                  n = t.get(r);
                n ? (n[1] += e) : t.set(r, [this._fillIndexStart + this._fillIndexCount, e]);
              }
              this._fillIndexCount += e;
            }
          }
          h.A.release(l);
        }
        _isClipEdge(e, t) {
          return e.x === t.x
            ? e.x <= -64 || e.x >= 4160
            : e.y === t.y && (e.y <= -64 || e.y >= 4160);
        }
        static _area(e) {
          let t = 0;
          const n = e.length - 1;
          for (let s = 0; s < n; s++) t += (e[s].x - e[s + 1].x) * (e[s].y + e[s + 1].y);
          return (t += (e[n].x - e[0].x) * (e[n].y + e[0].y)), 0.5 * t;
        }
      }
      class F extends L {
        constructor(e, t, n, s, r) {
          super(e, t, n),
            (this.type = 2),
            (this._tessellationOptions = { pixelCoordRatio: 8, halfWidth: 0, offset: 0 }),
            (this._patternMap = new Map()),
            (this.tessellationProperties = {
              _lineVertexBuffer: null,
              _lineIndexBuffer: null,
              _ddValues: null,
            }),
            (this.tessellationProperties._lineVertexBuffer = s),
            (this.tessellationProperties._lineIndexBuffer = r),
            (this._lineTessellator = new u.L(
              z(this.tessellationProperties),
              U(this.tessellationProperties),
              e.canUseThinTessellation,
            ));
        }
        get lineIndexStart() {
          return this._lineIndexStart;
        }
        get lineIndexCount() {
          return this._lineIndexCount;
        }
        getResources(e, t, n) {
          const s = this.layer,
            r = this.zoom,
            i = s.hasDataDrivenLine,
            a = s.getPaintProperty('line-pattern'),
            o = s.getPaintProperty('line-dasharray'),
            l = s.getLayoutProperty('line-cap');
          if (!a && !o) return;
          const h = (null == l ? void 0 : l.getValue(r)) || 0,
            c = null == l ? void 0 : l.isDataDriven;
          if (i) {
            const e = null == a ? void 0 : a.isDataDriven,
              n = null == o ? void 0 : o.isDataDriven;
            if (!e && !n) return;
            for (const n of this._features)
              e
                ? t.add(a.getValue(r, n))
                : t.add({ name: this._getDashArrayKey(n, r, s, o, c, l, h) });
          } else if (a) t.add(a.getValue(r));
          else if (o) {
            const e = o.getValue(r);
            t.add({ name: s.getDashKey(e, h) });
          }
        }
        processFeatures(e) {
          var t, n, s, r, i, a;
          (this._lineIndexStart = 3 * this.tessellationProperties._lineIndexBuffer.index),
            (this._lineIndexCount = 0);
          const o = this.layer,
            l = this.zoom,
            h = this._features,
            c = this._tessellationOptions,
            { hasDataDrivenLine: u, lineMaterial: f } = o;
          e && e.setExtent(this.layerExtent);
          const d = o.getPaintProperty('line-pattern'),
            p = o.getPaintProperty('line-dasharray'),
            y = null == d ? void 0 : d.isDataDriven,
            g = null == p ? void 0 : p.isDataDriven;
          let x;
          x = o.getLayoutProperty('line-cap');
          const _ = null != (t = x) && t.isDataDriven ? x : null,
            m = _ ? null : o.getLayoutValue('line-cap', l),
            I = m || 0,
            M = !!_;
          x = o.getLayoutProperty('line-join');
          const b = null != (n = x) && n.isDataDriven ? x : null,
            w = b ? null : o.getLayoutValue('line-join', l);
          x = o.getLayoutProperty('line-miter-limit');
          const P = null != (s = x) && s.isDataDriven ? x : null,
            k = P ? null : o.getLayoutValue('line-miter-limit', l);
          x = o.getLayoutProperty('line-round-limit');
          const v = null != (r = x) && r.isDataDriven ? x : null,
            V = v ? null : o.getLayoutValue('line-round-limit', l);
          x = o.getPaintProperty('line-width');
          const A = null != (i = x) && i.isDataDriven ? x : null,
            D = A ? null : o.getPaintValue('line-width', l);
          x = o.getPaintProperty('line-offset');
          const B = null != (a = x) && a.isDataDriven ? x : null,
            L = B ? null : o.getPaintValue('line-offset', l);
          if (y || g) {
            const t = [];
            for (const n of h) {
              const s = y ? d.getValue(l, n) : this._getDashArrayKey(n, l, o, p, M, _, I),
                r = this._spriteInfo[s];
              if (!r || !r.rect) continue;
              const i = f.encodeAttributes(n, l, o, r),
                a = n.getGeometry(e);
              t.push({
                ddAttributes: i,
                page: r.page,
                cap: _ ? _.getValue(l, n) : m,
                join: b ? b.getValue(l, n) : w,
                miterLimit: P ? P.getValue(l, n) : k,
                roundLimit: v ? v.getValue(l, n) : V,
                halfWidth: 0.5 * (A ? A.getValue(l, n) : D),
                offset: B ? B.getValue(l, n) : L,
                geometry: a,
              });
            }
            t.sort((e, t) => e.page - t.page), (c.textured = !0);
            for (const {
              ddAttributes: e,
              page: n,
              cap: s,
              join: r,
              miterLimit: i,
              roundLimit: a,
              halfWidth: o,
              offset: l,
              geometry: h,
            } of t)
              (c.capType = s),
                (c.joinType = r),
                (c.miterLimit = i),
                (c.roundLimit = a),
                (c.halfWidth = o),
                (c.offset = l),
                this._processFeature(h, e, n);
          } else {
            (c.textured = !(!d && !p)),
              (c.capType = m),
              (c.joinType = w),
              (c.miterLimit = k),
              (c.roundLimit = V),
              (c.halfWidth = 0.5 * D),
              (c.offset = L);
            for (const t of h) {
              const n = u ? f.encodeAttributes(t, l, o) : null;
              _ && (c.capType = _.getValue(l, t)),
                b && (c.joinType = b.getValue(l, t)),
                P && (c.miterLimit = P.getValue(l, t)),
                v && (c.roundLimit = v.getValue(l, t)),
                A && (c.halfWidth = 0.5 * A.getValue(l, t)),
                B && (c.offset = B.getValue(l, t));
              const s = t.getGeometry(e);
              this._processFeature(s, n);
            }
          }
        }
        serialize() {
          let e = 6;
          (e += this.layerUIDs.length),
            (e += this.tessellationProperties._lineVertexBuffer.array.length),
            (e += this.tessellationProperties._lineIndexBuffer.array.length),
            (e += 3 * this._patternMap.size + 1);
          const t = new Uint32Array(e),
            n = new Int32Array(t.buffer);
          let s = 0;
          (t[s++] = this.type), (t[s++] = this.layerUIDs.length);
          for (let e = 0; e < this.layerUIDs.length; e++) t[s++] = this.layerUIDs[e];
          (t[s++] = this._lineIndexStart), (t[s++] = this._lineIndexCount);
          const r = this._patternMap,
            i = r.size;
          if (((t[s++] = i), i > 0))
            for (const [e, [n, i]] of r) (t[s++] = e), (t[s++] = n), (t[s++] = i);
          t[s++] = this.tessellationProperties._lineVertexBuffer.array.length;
          for (let e = 0; e < this.tessellationProperties._lineVertexBuffer.array.length; e++)
            n[s++] = this.tessellationProperties._lineVertexBuffer.array[e];
          t[s++] = this.tessellationProperties._lineIndexBuffer.array.length;
          for (let e = 0; e < this.tessellationProperties._lineIndexBuffer.array.length; e++)
            t[s++] = this.tessellationProperties._lineIndexBuffer.array[e];
          return t.buffer;
        }
        _processFeature(e, t, n) {
          if (!e) return;
          const s = e.length;
          for (let r = 0; r < s; r++) this._processGeometry(e[r], t, n);
        }
        _processGeometry(e, t, n) {
          if (e.length < 2) return;
          let s,
            r,
            i = e[0],
            a = 1;
          for (; a < e.length; )
            (s = e[a].x - i.x),
              (r = e[a].y - i.y),
              s * s + r * r < 1e-6 ? e.splice(a, 1) : ((i = e[a]), ++a);
          if (e.length < 2) return;
          const o = this.tessellationProperties._lineIndexBuffer,
            l = 3 * o.index;
          (this._tessellationOptions.initialDistance = 0),
            (this._tessellationOptions.wrapDistance = 65535),
            (this.tessellationProperties._ddValues = t),
            this._lineTessellator.tessellate(e, this._tessellationOptions);
          const h = 3 * o.index - l;
          if (void 0 !== n) {
            const e = this._patternMap,
              t = e.get(n);
            t ? (t[1] += h) : e.set(n, [l + this._lineIndexCount, h]);
          }
          this._lineIndexCount += h;
        }
        _getDashArrayKey(e, t, n, s, r, i, a) {
          const o = r ? i.getValue(t, e) : a,
            l = s.getValue(t, e);
          return n.getDashKey(l, o);
        }
      }
      const z = (e) => (t, n, s, r, i, a, o, l, h, c, u) => (
          e._lineVertexBuffer.add(t, n, o, l, s, r, i, a, h, c, u, e._ddValues),
          e._lineVertexBuffer.index - 1
        ),
        U = (e) => (t, n, s) => {
          e._lineIndexBuffer.add(t, n, s);
        };
      function N(e, t) {
        return e.iconMosaicItem && t.iconMosaicItem
          ? e.iconMosaicItem.page === t.iconMosaicItem.page
            ? 0
            : e.iconMosaicItem.page - t.iconMosaicItem.page
          : e.iconMosaicItem && !t.iconMosaicItem
          ? 1
          : !e.iconMosaicItem && t.iconMosaicItem
          ? -1
          : 0;
      }
      class E extends L {
        constructor(e, t, n, s, r, i, a, o) {
          super(e, t, o.getSpriteItems()),
            (this.type = 3),
            (this._markerMap = new Map()),
            (this._glyphMap = new Map()),
            (this._glyphBufferDataStorage = new Map()),
            (this._isIconSDF = !1),
            (this._iconVertexBuffer = n),
            (this._iconIndexBuffer = s),
            (this._textVertexBuffer = r),
            (this._textIndexBuffer = i),
            (this._placementEngine = a),
            (this._workerTileHandler = o);
        }
        get markerPageMap() {
          return this._markerMap;
        }
        get glyphsPageMap() {
          return this._glyphMap;
        }
        get symbolInstances() {
          return this._symbolInstances;
        }
        getResources(e, t, n) {
          const s = this.layer,
            r = this.zoom;
          e && e.setExtent(this.layerExtent);
          const i = s.getLayoutProperty('icon-image'),
            a = s.getLayoutProperty('text-field');
          let o = s.getLayoutProperty('text-transform'),
            l = s.getLayoutProperty('text-font');
          const h = [];
          let c, u, f, p;
          i && !i.isDataDriven && (c = i.getValue(r)),
            a && !a.isDataDriven && (u = a.getValue(r)),
            (o && o.isDataDriven) || ((f = s.getLayoutValue('text-transform', r)), (o = null)),
            (l && l.isDataDriven) || ((p = s.getLayoutValue('text-font', r)), (l = null));
          for (const y of this._features) {
            const g = y.getGeometry(e);
            if (!g || 0 === g.length) continue;
            let x, _;
            i &&
              ((x = i.isDataDriven ? i.getValue(r, y) : this._replaceKeys(c, y.values)),
              x && t.add({ name: x }));
            let m = !1;
            if (
              a &&
              ((_ = a.isDataDriven ? a.getValue(r, y) : this._replaceKeys(u, y.values)), _)
            ) {
              switch (((_ = _.replace(/\\n/g, '\n')), o && (f = o.getValue(r, y)), f)) {
                case 2:
                  _ = _.toLowerCase();
                  break;
                case 1:
                  _ = _.toUpperCase();
              }
              if (E._bidiEngine.hasBidiChar(_)) {
                let e;
                (e = 'rtl' === E._bidiEngine.checkContextual(_) ? 'IDNNN' : 'ICNNN'),
                  (_ = E._bidiEngine.bidiTransform(_, e, 'VLYSN')),
                  (m = !0);
              }
              const e = _.length;
              if (e > 0) {
                l && (p = l.getValue(r, y));
                for (const t of p) {
                  let s = n[t];
                  s || (s = n[t] = new Set());
                  for (let t = 0; t < e; t++) {
                    const e = _.charCodeAt(t);
                    s.add(e);
                  }
                }
              }
            }
            if (!x && !_) continue;
            const I = s.getLayoutValue('symbol-sort-key', r, y),
              M = {
                feature: y,
                sprite: x,
                label: _,
                rtl: m,
                geometry: g,
                hash: (_ ? (0, d.n)(_) : 0) ^ (x ? (0, d.n)(x) : 0),
                priority: I,
                textFont: p,
              };
            h.push(M);
          }
          this._symbolFeatures = h;
        }
        processFeatures(e) {
          e && e.setExtent(this.layerExtent);
          const t = this.layer,
            n = this.zoom,
            s = t.getLayoutValue('symbol-placement', n),
            r = 0 !== s,
            a = 8 * t.getLayoutValue('symbol-spacing', n),
            o = t.getLayoutProperty('icon-image'),
            l = t.getLayoutProperty('text-field'),
            h = o ? new i.I(t, n, r) : null,
            c = l ? new i.T(t, n, r) : null,
            u = this._workerTileHandler;
          let f;
          o && (f = u.getSpriteItems()),
            (this._iconIndexStart = 3 * this._iconIndexBuffer.index),
            (this._textIndexStart = 3 * this._textIndexBuffer.index),
            (this._iconIndexCount = 0),
            (this._textIndexCount = 0),
            this._markerMap.clear(),
            this._glyphMap.clear();
          const d = [];
          let p = 1;
          c && c.size && (p = c.size / 24);
          const y = c ? c.maxAngle * i.C : 0,
            g = c ? 8 * c.size : 0;
          for (const e of this._symbolFeatures) {
            let t, i;
            h && f && e.sprite && ((t = f[e.sprite]), t && t.sdf && (this._isIconSDF = !0)),
              t && h.update(n, e.feature);
            let o = 0;
            const l = e.label;
            if (l) {
              c.update(n, e.feature);
              const t = r ? c.keepUpright : c.writingMode && c.writingMode.indexOf(1) >= 0;
              let s = 0.5;
              switch (c.anchor) {
                case 5:
                case 1:
                case 7:
                  s = 0;
                  break;
                case 6:
                case 2:
                case 8:
                  s = 1;
              }
              let a = 0.5;
              switch (c.anchor) {
                case 5:
                case 3:
                case 6:
                  a = 0;
                  break;
                case 7:
                case 4:
                case 8:
                  a = 1;
              }
              let h = 0.5;
              switch (c.justify) {
                case 0:
                  h = s;
                  break;
                case 1:
                  h = 0;
                  break;
                case 3:
                  h = 1;
              }
              const f = 24 * c.letterSpacing,
                d = r ? 0 : 24 * c.maxWidth,
                y = 24 * c.lineHeight,
                g = e.textFont.map((e) => u.getGlyphItems(e));
              if (((i = new x(g, d, y, f, s, a, h).getShaping(l, e.rtl, t)), i && i.length > 0)) {
                let e = 1e30,
                  t = -1e30;
                for (const n of i) (e = Math.min(e, n.x)), (t = Math.max(t, n.x));
                o = (t - e + 48) * p * 8;
              }
            }
            for (let n of e.geometry) {
              const l = [];
              if (1 === s) {
                if (i && i.length > 0 && c && c.size) {
                  const e = 8 * c.size * (2 + Math.min(2, 4 * Math.abs(c.offset[1])));
                  n = E._smoothVertices(n, e);
                }
                E._pushAnchors(l, n, a, o);
              } else
                2 === s
                  ? E._pushCenterAnchor(l, n)
                  : 3 === e.feature.type
                  ? E._pushCentroid(l, n)
                  : l.push(new _(n[0].x, n[0].y));
              for (const s of l) {
                if (s.x < 0 || s.x > 4096 || s.y < 0 || s.y > 4096) continue;
                if (
                  r &&
                  o > 0 &&
                  0 === c.rotationAlignment &&
                  !E._honorsTextMaxAngle(n, s, o, y, g)
                )
                  continue;
                const a = {
                  shaping: i,
                  line: n,
                  iconMosaicItem: t,
                  anchor: s,
                  symbolFeature: e,
                  textColliders: [],
                  iconColliders: [],
                  textVertexRanges: [],
                  iconVertexRanges: [],
                };
                d.push(a), this._processFeature(a, h, c);
              }
            }
          }
          d.sort(N), this._addPlacedGlyphs(), (this._symbolInstances = d);
        }
        serialize() {
          let e = 11;
          (e += this.layerUIDs.length),
            (e += 3 * this.markerPageMap.size),
            (e += 3 * this.glyphsPageMap.size),
            (e += E.symbolsSerializationLength(this._symbolInstances)),
            (e += this._iconVertexBuffer.array.length),
            (e += this._iconIndexBuffer.array.length),
            (e += this._textVertexBuffer.array.length),
            (e += this._textIndexBuffer.array.length);
          const t = new Uint32Array(e),
            n = new Int32Array(t.buffer),
            s = new Float32Array(t.buffer);
          let r = 0;
          (t[r++] = this.type), (t[r++] = this.layerUIDs.length);
          for (let e = 0; e < this.layerUIDs.length; e++) t[r++] = this.layerUIDs[e];
          (t[r++] = this._isIconSDF ? 1 : 0), (t[r++] = this.markerPageMap.size);
          for (const [e, [n, s]] of this.markerPageMap) (t[r++] = e), (t[r++] = n), (t[r++] = s);
          t[r++] = this.glyphsPageMap.size;
          for (const [e, [n, s]] of this.glyphsPageMap) (t[r++] = e), (t[r++] = n), (t[r++] = s);
          (t[r++] = this._iconVertexBuffer.index / 4),
            (t[r++] = this._textVertexBuffer.index / 4),
            (r = E.serializeSymbols(t, n, s, r, this._symbolInstances)),
            (t[r++] = this._iconVertexBuffer.array.length);
          for (let e = 0; e < this._iconVertexBuffer.array.length; e++)
            n[r++] = this._iconVertexBuffer.array[e];
          t[r++] = this._iconIndexBuffer.array.length;
          for (let e = 0; e < this._iconIndexBuffer.array.length; e++)
            t[r++] = this._iconIndexBuffer.array[e];
          t[r++] = this._textVertexBuffer.array.length;
          for (let e = 0; e < this._textVertexBuffer.array.length; e++)
            n[r++] = this._textVertexBuffer.array[e];
          t[r++] = this._textIndexBuffer.array.length;
          for (let e = 0; e < this._textIndexBuffer.array.length; e++)
            t[r++] = this._textIndexBuffer.array[e];
          return t.buffer;
        }
        static symbolsSerializationLength(e) {
          let t = 0;
          t += 1;
          for (const n of e || []) {
            (t += 4), (t += 1);
            for (const e of n.textColliders) t += 10;
            for (const e of n.iconColliders) t += 10;
            (t += 1),
              (t += 2 * n.textVertexRanges.length),
              (t += 1),
              (t += 2 * n.iconVertexRanges.length);
          }
          return t;
        }
        static serializeSymbols(e, t, n, s, r) {
          (r = r || []), (t[s++] = r.length);
          for (const e of r) {
            (t[s++] = e.anchor.x),
              (t[s++] = e.anchor.y),
              (t[s++] = e.symbolFeature.hash),
              (t[s++] = e.symbolFeature.priority),
              (t[s++] = e.textColliders.length + e.iconColliders.length);
            for (const r of e.textColliders)
              (t[s++] = r.xTile),
                (t[s++] = r.yTile),
                (t[s++] = r.dxPixels),
                (t[s++] = r.dyPixels),
                (t[s++] = r.hard ? 1 : 0),
                (t[s++] = r.partIndex),
                (n[s++] = r.minLod),
                (n[s++] = r.maxLod),
                (t[s++] = r.width),
                (t[s++] = r.height);
            for (const r of e.iconColliders)
              (t[s++] = r.xTile),
                (t[s++] = r.yTile),
                (t[s++] = r.dxPixels),
                (t[s++] = r.dyPixels),
                (t[s++] = r.hard ? 1 : 0),
                (t[s++] = r.partIndex),
                (n[s++] = r.minLod),
                (n[s++] = r.maxLod),
                (t[s++] = r.width),
                (t[s++] = r.height);
            t[s++] = e.textVertexRanges.length;
            for (const [n, r] of e.textVertexRanges) (t[s++] = n), (t[s++] = r);
            t[s++] = e.iconVertexRanges.length;
            for (const [n, r] of e.iconVertexRanges) (t[s++] = n), (t[s++] = r);
          }
          return s;
        }
        _replaceKeys(e, t) {
          return e.replace(/{([^{}]+)}/g, function (e, n) {
            return n in t ? t[n] : '';
          });
        }
        _processFeature(e, t, n) {
          const { line: s, iconMosaicItem: r, shaping: a, anchor: o } = e,
            l = this.zoom,
            h = this.layer,
            c = !!r;
          let u = !0;
          c && (u = t.optional || !r);
          const f = a && a.length > 0;
          let d,
            p,
            y = !0;
          if (
            (f && (y = n.optional),
            c && (d = this._placementEngine.getIconPlacement(o, r, t)),
            (d || u) && (f && (p = this._placementEngine.getTextPlacement(o, a, s, n)), p || y))
          ) {
            if (
              ((d && p) ||
                (y || u ? (y || p ? u || d || (p = null) : (d = null)) : ((d = null), (p = null))),
              p)
            ) {
              const t = h.hasDataDrivenText
                ? h.textMaterial.encodeAttributes(e.symbolFeature.feature, l, h)
                : null;
              if (
                (this._storePlacedGlyphs(e, p.shapes, l, n.rotationAlignment, t), p.textColliders)
              ) {
                e.textColliders = p.textColliders;
                for (const e of p.textColliders) {
                  (e.minLod = Math.max(l + (0, i.l)(e.minLod), 0)),
                    (e.maxLod = Math.min(l + (0, i.l)(e.maxLod), 25));
                  const t = e.angle;
                  if (t) {
                    const n = Math.cos(t),
                      s = Math.sin(t),
                      r = e.dxPixels * n - e.dyPixels * s,
                      i = e.dxPixels * s + e.dyPixels * n,
                      a = (e.dxPixels + e.width) * n - e.dyPixels * s,
                      o = (e.dxPixels + e.width) * s + e.dyPixels * n,
                      l = e.dxPixels * n - (e.dyPixels + e.height) * s,
                      h = e.dxPixels * s + (e.dyPixels + e.height) * n,
                      c = (e.dxPixels + e.width) * n - (e.dyPixels + e.height) * s,
                      u = (e.dxPixels + e.width) * s + (e.dyPixels + e.height) * n,
                      f = Math.min(r, a, l, c),
                      d = Math.max(r, a, l, c),
                      p = Math.min(i, o, h, u),
                      y = Math.max(i, o, h, u);
                    (e.dxPixels = f), (e.dyPixels = p), (e.width = d - f), (e.height = y - p);
                  }
                }
              }
            }
            if (d) {
              const n = h.hasDataDrivenIcon
                ? h.iconMaterial.encodeAttributes(e.symbolFeature.feature, l, h)
                : null;
              if (
                (this._addPlacedIcons(e, d.shapes, l, r.page, 1 === t.rotationAlignment, n),
                d.iconColliders)
              ) {
                e.iconColliders = d.iconColliders;
                for (const e of d.iconColliders) {
                  (e.minLod = Math.max(l + (0, i.l)(e.minLod), 0)),
                    (e.maxLod = Math.min(l + (0, i.l)(e.maxLod), 25));
                  const t = e.angle;
                  if (t) {
                    const n = Math.cos(t),
                      s = Math.sin(t),
                      r = e.dxPixels * n - e.dyPixels * s,
                      i = e.dxPixels * s + e.dyPixels * n,
                      a = (e.dxPixels + e.width) * n - e.dyPixels * s,
                      o = (e.dxPixels + e.width) * s + e.dyPixels * n,
                      l = e.dxPixels * n - (e.dyPixels + e.height) * s,
                      h = e.dxPixels * s + (e.dyPixels + e.height) * n,
                      c = (e.dxPixels + e.width) * n - (e.dyPixels + e.height) * s,
                      u = (e.dxPixels + e.width) * s + (e.dyPixels + e.height) * n,
                      f = Math.min(r, a, l, c),
                      d = Math.max(r, a, l, c),
                      p = Math.min(i, o, h, u),
                      y = Math.max(i, o, h, u);
                    (e.dxPixels = f), (e.dyPixels = p), (e.width = d - f), (e.height = y - p);
                  }
                }
              }
            }
          }
        }
        _addPlacedIcons(e, t, n, s, r, a) {
          const o = Math.max(n - 1, 0),
            l = this._iconVertexBuffer,
            h = this._iconIndexBuffer,
            c = this._markerMap;
          for (const u of t) {
            const t = r ? 0 : Math.max(n + (0, i.l)(u.minzoom), o),
              f = r ? 25 : Math.min(n + (0, i.l)(u.maxzoom), 25);
            if (f <= t) continue;
            const d = u.tl,
              p = u.tr,
              y = u.bl,
              g = u.br,
              x = u.mosaicRect,
              _ = u.labelAngle,
              m = u.minAngle,
              I = u.maxAngle,
              M = u.anchor,
              b = l.index,
              w = x.x,
              P = x.y,
              k = w + x.width,
              v = P + x.height,
              V = l.index;
            l.add(M.x, M.y, d.x, d.y, w, P, _, m, I, t, f, a),
              l.add(M.x, M.y, p.x, p.y, k, P, _, m, I, t, f, a),
              l.add(M.x, M.y, y.x, y.y, w, v, _, m, I, t, f, a),
              l.add(M.x, M.y, g.x, g.y, k, v, _, m, I, t, f, a),
              e.iconVertexRanges.length > 0 &&
              e.iconVertexRanges[0][0] + e.iconVertexRanges[0][1] === V
                ? (e.iconVertexRanges[0][1] += 4)
                : e.iconVertexRanges.push([V, 4]),
              h.add(b + 0, b + 1, b + 2),
              h.add(b + 1, b + 2, b + 3),
              c.has(s)
                ? (c.get(s)[1] += 6)
                : c.set(s, [this._iconIndexStart + this._iconIndexCount, 6]),
              (this._iconIndexCount += 6);
          }
        }
        _addPlacedGlyphs() {
          const e = this._textVertexBuffer,
            t = this._textIndexBuffer,
            n = this._glyphMap;
          for (const [s, r] of this._glyphBufferDataStorage)
            for (const i of r) {
              const r = e.index,
                a = i.symbolInstance,
                o = i.ddAttributes,
                l = e.index;
              e.add(
                i.glyphAnchor[0],
                i.glyphAnchor[1],
                i.tl[0],
                i.tl[1],
                i.xmin,
                i.ymin,
                i.labelAngle,
                i.minAngle,
                i.maxAngle,
                i.minLod,
                i.maxLod,
                o,
              ),
                e.add(
                  i.glyphAnchor[0],
                  i.glyphAnchor[1],
                  i.tr[0],
                  i.tr[1],
                  i.xmax,
                  i.ymin,
                  i.labelAngle,
                  i.minAngle,
                  i.maxAngle,
                  i.minLod,
                  i.maxLod,
                  o,
                ),
                e.add(
                  i.glyphAnchor[0],
                  i.glyphAnchor[1],
                  i.bl[0],
                  i.bl[1],
                  i.xmin,
                  i.ymax,
                  i.labelAngle,
                  i.minAngle,
                  i.maxAngle,
                  i.minLod,
                  i.maxLod,
                  o,
                ),
                e.add(
                  i.glyphAnchor[0],
                  i.glyphAnchor[1],
                  i.br[0],
                  i.br[1],
                  i.xmax,
                  i.ymax,
                  i.labelAngle,
                  i.minAngle,
                  i.maxAngle,
                  i.minLod,
                  i.maxLod,
                  o,
                ),
                a.textVertexRanges.length > 0 &&
                a.textVertexRanges[0][0] + a.textVertexRanges[0][1] === l
                  ? (a.textVertexRanges[0][1] += 4)
                  : a.textVertexRanges.push([l, 4]),
                t.add(r + 0, r + 1, r + 2),
                t.add(r + 1, r + 2, r + 3),
                n.has(s)
                  ? (n.get(s)[1] += 6)
                  : n.set(s, [this._textIndexStart + this._textIndexCount, 6]),
                (this._textIndexCount += 6);
            }
          this._glyphBufferDataStorage.clear();
        }
        _storePlacedGlyphs(e, t, n, s, r) {
          const a = Math.max(n - 1, 0),
            o = 1 === s;
          let l, h, c, u, f, d, p, y, g, x, _;
          for (const s of t)
            (l = o ? 0 : Math.max(n + (0, i.l)(s.minzoom), a)),
              (h = o ? 25 : Math.min(n + (0, i.l)(s.maxzoom), 25)),
              h <= l ||
                ((c = s.tl),
                (u = s.tr),
                (f = s.bl),
                (d = s.br),
                (p = s.labelAngle),
                (y = s.minAngle),
                (g = s.maxAngle),
                (x = s.anchor),
                (_ = s.mosaicRect),
                this._glyphBufferDataStorage.has(s.page) ||
                  this._glyphBufferDataStorage.set(s.page, []),
                this._glyphBufferDataStorage.get(s.page).push({
                  glyphAnchor: [x.x, x.y],
                  tl: [c.x, c.y],
                  tr: [u.x, u.y],
                  bl: [f.x, f.y],
                  br: [d.x, d.y],
                  xmin: _.x,
                  ymin: _.y,
                  xmax: _.x + _.width,
                  ymax: _.y + _.height,
                  labelAngle: p,
                  minAngle: y,
                  maxAngle: g,
                  minLod: l,
                  maxLod: h,
                  placementLod: a,
                  symbolInstance: e,
                  ddAttributes: r,
                }));
        }
        static _pushAnchors(e, t, n, s) {
          n += s;
          let r = 0;
          const a = t.length - 1;
          for (let e = 0; e < a; e++) r += o.P.distance(t[e], t[e + 1]);
          let l = s || n;
          if (((l *= 0.5), r <= l)) return;
          const h = l / r;
          let c = 0,
            u = -(n = r / Math.max(Math.round(r / n), 1)) / 2;
          const f = t.length - 1;
          for (let s = 0; s < f; s++) {
            const r = t[s],
              a = t[s + 1],
              o = a.x - r.x,
              l = a.y - r.y,
              f = Math.sqrt(o * o + l * l);
            let d;
            for (; u + n < c + f; ) {
              u += n;
              const t = (u - c) / f,
                p = (0, i.i)(r.x, a.x, t),
                y = (0, i.i)(r.y, a.y, t);
              void 0 === d && (d = Math.atan2(l, o)), e.push(new _(p, y, d, s, h));
            }
            c += f;
          }
        }
        static _pushCenterAnchor(e, t) {
          let n = 0;
          const s = t.length - 1;
          for (let e = 0; e < s; e++) n += o.P.distance(t[e], t[e + 1]);
          const r = n / 2;
          let a = 0;
          const l = t.length - 1;
          for (let n = 0; n < l; n++) {
            const s = t[n],
              o = t[n + 1],
              l = o.x - s.x,
              h = o.y - s.y,
              c = Math.sqrt(l * l + h * h);
            if (r < a + c) {
              const t = (r - a) / c,
                u = (0, i.i)(s.x, o.x, t),
                f = (0, i.i)(s.y, o.y, t),
                d = Math.atan2(h, l);
              return void e.push(new _(u, f, d, n, 0));
            }
            a += c;
          }
        }
        static _deviation(e, t, n) {
          const s = (t.x - e.x) * (n.x - t.x) + (t.y - e.y) * (n.y - t.y),
            r = (t.x - e.x) * (n.y - t.y) - (t.y - e.y) * (n.x - t.x);
          return Math.atan2(r, s);
        }
        static _honorsTextMaxAngle(e, t, n, s, r) {
          let i = 0;
          const a = n / 2;
          let l = new o.P(t.x, t.y),
            h = t.segment + 1;
          for (; i > -a; ) {
            if ((--h, h < 0)) return !1;
            (i -= o.P.distance(e[h], l)), (l = e[h]);
          }
          i += o.P.distance(e[h], e[h + 1]);
          const c = [];
          let u = 0;
          const f = e.length;
          for (; i < a; ) {
            const t = e[h];
            let n,
              a = h;
            do {
              if ((++a, a === f)) return !1;
              n = e[a];
            } while (n.isEqual(t));
            let l,
              d = a;
            do {
              if ((++d, d === f)) return !1;
              l = e[d];
            } while (l.isEqual(n));
            const p = this._deviation(t, n, l);
            for (c.push({ deviation: p, distToAnchor: i }), u += p; i - c[0].distToAnchor > r; )
              u -= c.shift().deviation;
            if (Math.abs(u) > s) return !1;
            (i += o.P.distance(n, l)), (h = a);
          }
          return !0;
        }
        static _smoothVertices(e, t) {
          if (t <= 0) return e;
          let n = e.length;
          if (n < 3) return e;
          const s = [];
          let r = 0,
            i = 0;
          s.push(0);
          for (let t = 1; t < n; t++) {
            const n = o.P.distance(e[t], e[t - 1]);
            n > 0 && ((r += n), s.push(r), i++, i !== t && (e[i] = e[t]));
          }
          if (((n = i + 1), n < 3)) return e;
          t = Math.min(t, 0.2 * r);
          const a = e[0].x,
            l = e[0].y,
            h = e[n - 1].x,
            c = e[n - 1].y,
            u = o.P.sub(e[0], e[1]);
          u.normalize(),
            (e[0].x += t * u.x),
            (e[0].y += t * u.y),
            u.assignSub(e[n - 1], e[n - 2]),
            u.normalize(),
            (e[n - 1].x += t * u.x),
            (e[n - 1].y += t * u.y),
            (s[0] -= t),
            (s[n - 1] += t);
          const f = [];
          f.push(new o.P(a, l));
          const d = 1e-6,
            p = 0.5 * t;
          for (let r = 1; r < n - 1; r++) {
            let i = 0,
              a = 0,
              l = 0;
            for (let n = r - 1; n >= 0; n--) {
              const o = p + s[n + 1] - s[r];
              if (o < 0) break;
              const h = s[n + 1] - s[n],
                c = s[r] - s[n] < p ? 1 : o / h;
              if (c < d) break;
              const u = c * c,
                f = c * o - 0.5 * u * h,
                y = (c * h) / t,
                g = e[n + 1],
                x = e[n].x - g.x,
                _ = e[n].y - g.y;
              (i += (y / f) * (g.x * c * o + 0.5 * u * (o * x - h * g.x) - (u * c * h * x) / 3)),
                (a += (y / f) * (g.y * c * o + 0.5 * u * (o * _ - h * g.y) - (u * c * h * _) / 3)),
                (l += y);
            }
            for (let o = r + 1; o < n; o++) {
              const n = p - s[o - 1] + s[r];
              if (n < 0) break;
              const h = s[o] - s[o - 1],
                c = s[o] - s[r] < p ? 1 : n / h;
              if (c < d) break;
              const u = c * c,
                f = c * n - 0.5 * u * h,
                y = (c * h) / t,
                g = e[o - 1],
                x = e[o].x - g.x,
                _ = e[o].y - g.y;
              (i += (y / f) * (g.x * c * n + 0.5 * u * (n * x - h * g.x) - (u * c * h * x) / 3)),
                (a += (y / f) * (g.y * c * n + 0.5 * u * (n * _ - h * g.y) - (u * c * h * _) / 3)),
                (l += y);
            }
            f.push(new o.P(i / l, a / l));
          }
          return (
            f.push(new o.P(h, c)), (e[0].x = a), (e[0].y = l), (e[n - 1].x = h), (e[n - 1].y = c), f
          );
        }
        static _pushCentroid(e, t) {
          const n = 4096,
            s = 4096,
            r = t.length - 1;
          let i = 0,
            a = 0,
            o = 0,
            l = t[0].x,
            h = t[0].y;
          l > n && (l = n), l < 0 && (l = 0), h > s && (h = s), h < 0 && (h = 0);
          for (let e = 1; e < r; e++) {
            let r = t[e].x,
              c = t[e].y,
              u = t[e + 1].x,
              f = t[e + 1].y;
            r > n && (r = n),
              r < 0 && (r = 0),
              c > s && (c = s),
              c < 0 && (c = 0),
              u > n && (u = n),
              u < 0 && (u = 0),
              f > s && (f = s),
              f < 0 && (f = 0);
            const d = (r - l) * (f - h) - (u - l) * (c - h);
            (i += d * (l + r + u)), (a += d * (h + c + f)), (o += d);
          }
          (i /= 3 * o), (a /= 3 * o), isNaN(i) || isNaN(a) || e.push(new _(i, a));
        }
      }
      var R, q;
      (E._bidiEngine = new f.B()),
        ((q = R || (R = {}))[(q.INITIALIZED = 0)] = 'INITIALIZED'),
        (q[(q.NO_DATA = 1)] = 'NO_DATA'),
        (q[(q.READY = 2)] = 'READY'),
        (q[(q.MODIFIED = 3)] = 'MODIFIED'),
        (q[(q.INVALID = 4)] = 'INVALID');
      class O {
        constructor(e, t, n, s, r) {
          if (
            ((this._pbfTiles = {}),
            (this._tileClippers = {}),
            (this._client = n),
            (this._tile = t),
            r)
          ) {
            this._styleLayerUIDs = new Set();
            for (const e of r) this._styleLayerUIDs.add(e);
          }
          (this._styleRepository = s), (this._layers = this._styleRepository.layers);
          const [i, a, h] = t.tileKey.split('/').map(parseFloat);
          this._level = i;
          const c = 8 + Math.max(5 * (this._level - 14), 0);
          for (const t of Object.keys(e)) {
            const n = e[t];
            if (
              ((this._pbfTiles[t] = new l.P(
                new Uint8Array(n.protobuff),
                new DataView(n.protobuff),
              )),
              n.refKey)
            ) {
              const [e] = n.refKey.split('/').map(parseFloat),
                s = i - e;
              if (s > 0) {
                const e = (1 << s) - 1,
                  n = a & e,
                  r = h & e;
                this._tileClippers[t] = new o.a(s, n, r, 8, c);
              }
            }
            this._tileClippers[t] || (this._tileClippers[t] = new o.S());
          }
        }
        _canParseStyleLayer(e) {
          return !this._styleLayerUIDs || this._styleLayerUIDs.has(e);
        }
        async parse(e) {
          const t = this._initialize(e),
            { returnedBuckets: n } = t;
          this._processLayers(t), this._linkReferences(t), this._filterFeatures(t);
          const s = new Set(),
            r = {};
          for (const e of n) e.getResources(e.tileClipper, s, r);
          if (this._tile.status === R.INVALID) return Promise.resolve([]);
          const i = this._fetchResources(s, r, e);
          return Promise.all(i).then(() => this._processFeatures(t.returnedBuckets));
        }
        _initialize(e) {
          return {
            signal: e && e.signal,
            sourceNameToTileData: this._parseTileData(this._pbfTiles),
            layers: this._layers,
            zoom: this._level,
            sourceNameToTileClipper: this._tileClippers,
            sourceNameToUniqueSourceLayerBuckets: {},
            sourceNameToUniqueSourceLayers: {},
            returnedBuckets: [],
            layerIdToBucket: {},
            referencerUIDToReferencedId: new Map(),
          };
        }
        _processLayers(e) {
          const {
            sourceNameToTileData: t,
            layers: n,
            zoom: s,
            sourceNameToTileClipper: r,
            sourceNameToUniqueSourceLayerBuckets: i,
            sourceNameToUniqueSourceLayers: a,
            returnedBuckets: o,
            layerIdToBucket: l,
            referencerUIDToReferencedId: h,
          } = e;
          for (let e = n.length - 1; e >= 0; e--) {
            const c = n[e];
            if (
              !this._canParseStyleLayer(c.uid) ||
              (c.minzoom && s < Math.floor(c.minzoom)) ||
              (c.maxzoom && s >= c.maxzoom) ||
              0 === c.type
            )
              continue;
            if (!t[c.source] || !r[c.source]) continue;
            const u = t[c.source],
              f = r[c.source],
              d = c.sourceLayer,
              p = u[d];
            if (p) {
              let e = a[c.source];
              if ((e || (e = a[c.source] = new Set()), e.add(c.sourceLayer), c.refLayerId))
                h.set(c.uid, c.refLayerId);
              else {
                const e = this._createBucket(c);
                if (e) {
                  (e.layerUIDs = [c.uid]), (e.layerExtent = p.extent), (e.tileClipper = f);
                  let t = i[c.source];
                  t || (t = i[c.source] = {});
                  let n = t[d];
                  n || (n = t[d] = []), n.push(e), o.push(e), (l[c.id.toLowerCase()] = e);
                }
              }
            }
          }
        }
        _linkReferences(e) {
          const { layerIdToBucket: t, referencerUIDToReferencedId: n } = e;
          n.forEach((e, n) => {
            (e = e.toLowerCase()), t[e] && t[e].layerUIDs.push(n);
          });
        }
        _filterFeatures(e) {
          const {
              signal: t,
              sourceNameToTileData: n,
              sourceNameToUniqueSourceLayerBuckets: r,
              sourceNameToUniqueSourceLayers: i,
            } = e,
            a = 10 * this._level,
            o = 10 * (this._level + 1),
            l = [],
            h = [];
          for (const e of Object.keys(i))
            i[e].forEach((t) => {
              l.push(t), h.push(e);
            });
          for (let e = 0; e < l.length; e++) {
            const i = h[e],
              c = l[e];
            if (!n[i] || !r[i]) continue;
            const u = n[i][c],
              f = r[i][c];
            if (!f || 0 === f.length) continue;
            if ((0, s.Hc)(t)) return;
            const d = u.getData();
            for (; d.nextTag(2); ) {
              const e = d.getMessage(),
                t = new w(e, u);
              e.release();
              const n = t.values;
              if (n) {
                const e = n._minzoom;
                if (e && e >= o) continue;
                const t = n._maxzoom;
                if (t && t <= a) continue;
              }
              for (const e of f) e.pushFeature(t);
            }
          }
        }
        _fetchResources(e, t, n) {
          const s = [],
            r = this._tile.getWorkerTileHandler();
          let i, a;
          e.size > 0 && ((i = r.fetchSprites(e, this._client, n)), s.push(i));
          for (const e in t) {
            const i = t[e];
            i.size > 0 &&
              ((a = r.fetchGlyphs(this._tile.tileKey, e, i, this._client, n)), s.push(a));
          }
          return s;
        }
        _processFeatures(e) {
          const t = e.filter((e) => e.hasFeatures() || this._canParseStyleLayer(e.layer.uid));
          for (const e of t) e.processFeatures(e.tileClipper);
          return t;
        }
        _parseTileData(e) {
          const t = {};
          for (const n of Object.keys(e)) {
            const s = e[n],
              r = {};
            for (; s.next(); )
              switch (s.tag()) {
                case 3: {
                  const e = s.getMessage(),
                    t = new k(e);
                  e.release(), (r[t.name] = t);
                  break;
                }
                default:
                  s.skip();
              }
            t[n] = r;
          }
          return t;
        }
        _createBucket(e) {
          switch (e.type) {
            case 0:
              return null;
            case 1:
              return this._createFillBucket(e);
            case 2:
              return this._createLineBucket(e);
            case 4:
              return this._createCircleBucket(e);
            case 3:
              return this._createSymbolBucket(e);
          }
        }
        _createFillBucket(e) {
          return new C(
            e,
            this._level,
            this._tile.getWorkerTileHandler().getSpriteItems(),
            new V(e.fillMaterial.getStride()),
            new P(),
            new A(e.outlineMaterial.getStride()),
            new P(),
          );
        }
        _createLineBucket(e) {
          return new F(
            e,
            this._level,
            this._tile.getWorkerTileHandler().getSpriteItems(),
            new v(e.lineMaterial.getStride()),
            new P(),
          );
        }
        _createCircleBucket(e) {
          return new S(
            e,
            this._level,
            this._tile.getWorkerTileHandler().getSpriteItems(),
            new B(e.circleMaterial.getStride()),
            new P(),
          );
        }
        _createSymbolBucket(e) {
          const t = this._tile;
          return new E(
            e,
            this._level,
            new D(e.iconMaterial.getStride()),
            new P(),
            new D(e.textMaterial.getStride()),
            new P(),
            t.placementEngine,
            t.getWorkerTileHandler(),
          );
        }
      }
      class G {
        constructor(e, t, n, s) {
          (this.status = R.INITIALIZED),
            (this.placementEngine = new b()),
            (this.tileKey = e),
            (this.refKeys = t),
            (this._workerTileHandler = n),
            (this._styleRepository = s);
        }
        release() {
          (this.tileKey = ''),
            (this.refKeys = null),
            (this.status = R.INITIALIZED),
            (this._workerTileHandler = null);
        }
        async parse(e, t, n) {
          const i = n && n.signal;
          if ((0, r.i)(i)) {
            const e = () => {
              i.removeEventListener('abort', e), (this.status = R.INVALID);
            };
            i.addEventListener('abort', e);
          }
          let a;
          try {
            a = await this._parse(e, n);
          } catch (e) {
            if ((0, s.D_)(e)) throw e;
            return { result: [], transferList: [] };
          }
          this.status = R.READY;
          const o = [];
          for (const e of a) {
            const t = e.serialize();
            o.push(t);
          }
          return { result: o, transferList: o.length <= t && o };
        }
        setObsolete() {
          this.status = R.INVALID;
        }
        getLayers() {
          return this._workerTileHandler.getLayers();
        }
        getWorkerTileHandler() {
          return this._workerTileHandler;
        }
        async _parse(e, t) {
          const n = e.sourceName2DataAndRefKey;
          return 0 === Object.keys(n).length
            ? []
            : ((this.status = R.MODIFIED),
              new O(n, this, t.client, this._styleRepository, e.styleLayerUIDs).parse(t));
        }
      }
      const j = class {
        constructor() {
          (this._spriteInfo = {}), (this._glyphInfo = {});
        }
        reset() {
          return (this._spriteInfo = {}), (this._glyphInfo = {}), Promise.resolve();
        }
        getLayers() {
          var e;
          return null == (e = this._styleRepository) ? void 0 : e.layers;
        }
        async createTileAndParse(e, t) {
          const { key: n } = e,
            r = {};
          for (const t of Object.keys(e.sourceName2DataAndRefKey)) {
            const n = e.sourceName2DataAndRefKey[t];
            r[t] = n.refKey;
          }
          const i = new G(n, r, this, this._styleRepository);
          try {
            return await i.parse(e, this._vectorTileLayerMaxBuffers, t);
          } catch (e) {
            if ((i.setObsolete(), i.release(), !(0, s.D_)(e))) throw e;
            return null;
          }
        }
        updateStyle(e) {
          if (!e || 0 === e.length || !this._styleRepository) return;
          const t = this._styleRepository;
          for (const n of e) {
            const e = n.type,
              s = n.data;
            switch (e) {
              case 0:
                t.setPaintProperties(s.layer, s.paint);
                break;
              case 1:
                t.setLayoutProperties(s.layer, s.layout);
                break;
              case 3:
                t.deleteStyleLayer(s.layer);
                break;
              case 2:
                t.setStyleLayer(s.layer, s.index);
            }
          }
        }
        setStyle(e) {
          (this._styleRepository = new i.S(e.style)),
            (this._spriteInfo = {}),
            (this._glyphInfo = {}),
            (this._vectorTileLayerMaxBuffers = e.vectorTileLayerMaxBuffers);
        }
        fetchSprites(e, t, n) {
          const s = [],
            r = this._spriteInfo;
          return (
            e.forEach((e) => {
              void 0 === r[e.name] && s.push(e);
            }),
            0 === s.length
              ? Promise.resolve()
              : t.invoke('getSprites', s, { signal: n && n.signal }).then((e) => {
                  for (const t in e) {
                    const n = e[t];
                    r[t] = n;
                  }
                })
          );
        }
        getSpriteItems() {
          return this._spriteInfo;
        }
        fetchGlyphs(e, t, n, s, r) {
          const i = [];
          let a = this._glyphInfo[t];
          return (
            a
              ? n.forEach((e) => {
                  a[e] || i.push(e);
                })
              : ((a = this._glyphInfo[t] = []), n.forEach((e) => i.push(e))),
            0 === i.length
              ? Promise.resolve()
              : s.invoke('getGlyphs', { tileID: e, font: t, codePoints: i }, r).then((e) => {
                  for (let t = 0; t < e.length; t++) e[t] && (a[t] = e[t]);
                })
          );
        }
        getGlyphItems(e) {
          return this._glyphInfo[e];
        }
      };
    },
    91306: (e, t, n) => {
      'use strict';
      n.d(t, {
        I: () => v,
        a: () => k,
        b: () => _,
        c: () => D,
        d: () => w,
        e: () => x,
        f: () => P,
        g: () => M,
        h: () => m,
        i: () => A,
        j: () => b,
        k: () => p,
        l: () => o,
        m: () => l,
        n: () => a,
        t: () => V,
      }),
        n(76506);
      const s = n(92143).L.getLogger('esri.core.Accessor');
      function r(e) {
        return null == e ? e : new Date(e);
      }
      function i(e) {
        return null == e ? e : !!e;
      }
      function a(e) {
        return null == e ? e : e.toString();
      }
      function o(e) {
        return null == e ? e : ((e = parseFloat(e)), isNaN(e) ? 0 : e);
      }
      function l(e) {
        return null == e ? e : Math.round(parseFloat(e));
      }
      function h(e) {
        return e && e.constructor && void 0 !== e.constructor.__accessorMetadata__;
      }
      function c(e, t) {
        return null != t && e && !(t instanceof e);
      }
      function u(e) {
        return e && 'isCollection' in e;
      }
      function f(e) {
        return e && e.Type ? ('function' == typeof e.Type ? e.Type : e.Type.base) : null;
      }
      function d(e, t) {
        return (
          !!h(t) &&
          (s.error(
            'Accessor#set',
            "Assigning an instance of '" +
              (t.declaredClass || 'unknown') +
              "' which is not a subclass of '" +
              y(e) +
              "'",
          ),
          !0)
        );
      }
      function p(e, t) {
        return null == t
          ? t
          : u(e)
          ? (function (e, t) {
              if (!t || !t.constructor || !u(t.constructor)) return d(e, t) ? t : new e(t);
              const n = f(e.prototype.itemType),
                s = f(t.constructor.prototype.itemType);
              return n
                ? s
                  ? n === s
                    ? t
                    : n.prototype.isPrototypeOf(s.prototype)
                    ? new e(t)
                    : (d(e, t), t)
                  : new e(t)
                : t;
            })(e, t)
          : c(e, t)
          ? d(e, t)
            ? t
            : new e(t)
          : t;
      }
      function y(e) {
        return (e && e.prototype && e.prototype.declaredClass) || 'unknown';
      }
      function g(e) {
        switch (e) {
          case Number:
            return o;
          case v:
            return l;
          case Boolean:
            return i;
          case String:
            return a;
          case Date:
            return r;
          default:
            return p.bind(null, e);
        }
      }
      function x(e, t) {
        const n = g(e);
        return 1 === arguments.length ? n : n(t);
      }
      function _(e, t, n) {
        return 1 === arguments.length
          ? _.bind(null, e)
          : t
          ? Array.isArray(t)
            ? t.map((t) => e(t, n))
            : [e(t, n)]
          : t;
      }
      function m(e, t) {
        return 1 === arguments.length ? _(x.bind(null, e)) : _(x.bind(null, e), t);
      }
      function I(e, t, n) {
        return 0 !== t && Array.isArray(n) ? n.map((n) => I(e, t - 1, n)) : e(n);
      }
      function M(e, t, n) {
        if (2 === arguments.length) return M.bind(null, e, t);
        if (!n) return n;
        let s = t,
          r = (n = I(e, t, n));
        for (; s > 0 && Array.isArray(r); ) s--, (r = r[0]);
        if (void 0 !== r) for (let e = 0; e < s; e++) n = [n];
        return n;
      }
      function b(e, t, n) {
        return 2 === arguments.length ? M(x.bind(null, e), t) : M(x.bind(null, e), t, n);
      }
      function w(e) {
        return (
          !!Array.isArray(e) &&
          !e.some((t) => {
            const n = typeof t;
            return !('string' === n || 'number' === n || ('function' === n && e.length > 1));
          })
        );
      }
      function P(e, t) {
        if (2 === arguments.length) return P(e).call(null, t);
        const n = new Set(),
          r = e.filter((e) => 'function' != typeof e),
          i = e.filter((e) => 'function' == typeof e);
        for (const t of e) ('string' != typeof t && 'number' != typeof t) || n.add(t);
        let a = null,
          o = null;
        return (e, t) => {
          if (null == e) return e;
          const l = typeof e,
            h = 'string' === l || 'number' === l;
          return (h &&
            (n.has(e) ||
              i.some(
                (e) => ('string' === l && e === String) || ('number' === l && e === Number),
              ))) ||
            ('object' === l && i.some((t) => !c(e, t)))
            ? e
            : (h && r.length
                ? (a || (a = r.map((e) => ('string' == typeof e ? `'${e}'` : `${e}`)).join(', ')),
                  s.error(
                    'Accessor#set',
                    `'${e}' is not a valid value for this property, only the following values are valid: ${a}`,
                  ))
                : 'object' == typeof e && i.length
                ? (o || (o = i.map((e) => y(e)).join(', ')),
                  s.error(
                    'Accessor#set',
                    `'${e}' is not a valid value for this property, value must be one of ${o}`,
                  ))
                : s.error('Accessor#set', `'${e}' is not a valid value for this property`),
              t && (t.valid = !1),
              null);
        };
      }
      function k(e, t) {
        if (2 === arguments.length) return k(e).call(null, t);
        const n = {},
          r = [],
          i = [];
        for (const t in e.typeMap) {
          const s = e.typeMap[t];
          (n[t] = x(s)), r.push(y(s)), i.push(t);
        }
        const a = () => `'${r.join("', '")}'`,
          o = () => `'${i.join("', '")}'`,
          l = 'string' == typeof e.key ? (t) => t[e.key] : e.key;
        return (t) => {
          if (e.base && !c(e.base, t)) return t;
          if (null == t) return t;
          const r = l(t) || e.defaultKeyValue,
            i = n[r];
          if (!i)
            return (
              s.error(
                'Accessor#set',
                `Invalid property value, value needs to be one of ${a()}, or a plain object that can autocast (having .type = ${o()})`,
              ),
              null
            );
          if (!c(e.typeMap[r], t)) return t;
          if ('string' == typeof e.key && !h(t)) {
            const n = {};
            for (const s in t) s !== e.key && (n[s] = t[s]);
            return i(n);
          }
          return i(t);
        };
      }
      class v {}
      const V = {
        native: (e) => ({ type: 'native', value: e }),
        array: (e) => ({ type: 'array', value: e }),
        oneOf: (e) => ({ type: 'one-of', values: e }),
      };
      function A(e) {
        if (!e || !('type' in e)) return !1;
        switch (e.type) {
          case 'native':
          case 'array':
          case 'one-of':
            return !0;
        }
        return !1;
      }
      function D(e) {
        switch (e.type) {
          case 'native':
            return x(e.value);
          case 'array':
            return _(D(e.value));
          case 'one-of':
            return (function (e) {
              let t = null;
              return (n, r) =>
                L(n, e)
                  ? n
                  : (null == t && (t = B(e)),
                    s.error(
                      'Accessor#set',
                      `Invalid property value, value needs to be of type ${t}`,
                    ),
                    r && (r.valid = !1),
                    null);
            })(e);
          default:
            return null;
        }
      }
      function B(e) {
        switch (e.type) {
          case 'native':
            switch (e.value) {
              case Number:
                return 'number';
              case String:
                return 'string';
              case Boolean:
                return 'boolean';
              case v:
                return 'integer';
              case Date:
                return 'date';
              default:
                return y(e.value);
            }
          case 'array':
            return `array of ${B(e.value)}`;
          case 'one-of': {
            const t = e.values.map((e) => B(e));
            return `one of ${t.slice(0, t.length - 1)} or ${t[t.length - 1]}`;
          }
        }
        return 'unknown';
      }
      function L(e, t) {
        if (null == e) return !0;
        switch (t.type) {
          case 'native':
            switch (t.value) {
              case Number:
              case v:
                return 'number' == typeof e;
              case Boolean:
                return 'boolean' == typeof e;
              case String:
                return 'string' == typeof e;
            }
            return e instanceof t.value;
          case 'array':
            return !!Array.isArray(e) && !e.some((e) => !L(e, t.value));
          case 'one-of':
            return t.values.some((t) => L(e, t));
        }
      }
    },
    82426: (e, t, n) => {
      'use strict';
      function s() {
        return [0, 0, 0];
      }
      function r(e) {
        return [e[0], e[1], e[2]];
      }
      function i(e, t, n) {
        return [e, t, n];
      }
      function a(e) {
        const t = [0, 0, 0],
          n = Math.min(3, e.length);
        for (let s = 0; s < n; ++s) t[s] = e[s];
        return t;
      }
      function o(e, t) {
        return new Float64Array(e, t, 3);
      }
      n.d(t, {
        A: () => b,
        B: () => X,
        C: () => D,
        D: () => T,
        E: () => c,
        G: () => j,
        H: () => W,
        I: () => O,
        O: () => h,
        R: () => u,
        S: () => $,
        T: () => a,
        Z: () => l,
        a: () => k,
        a4: () => _,
        a6: () => H,
        aa: () => G,
        b: () => s,
        c: () => K,
        d: () => P,
        e: () => p,
        f: () => m,
        g: () => y,
        h: () => v,
        i: () => J,
        j: () => d,
        k: () => Y,
        l: () => f,
        m: () => Q,
        n: () => w,
        o: () => M,
        p: () => i,
        r: () => Z,
        s: () => g,
        t: () => V,
        u: () => r,
        w: () => I,
        x: () => A,
        y: () => o,
        z: () => S,
      });
      const l = [0, 0, 0],
        h = i(1, 1, 1),
        c = 1e-6,
        u = Math.random;
      function f(e) {
        const t = e[0],
          n = e[1],
          s = e[2];
        return Math.sqrt(t * t + n * n + s * s);
      }
      function d(e, t) {
        return (e[0] = t[0]), (e[1] = t[1]), (e[2] = t[2]), e;
      }
      function p(e, t, n, s) {
        return (e[0] = t), (e[1] = n), (e[2] = s), e;
      }
      function y(e, t, n) {
        return (e[0] = t[0] + n[0]), (e[1] = t[1] + n[1]), (e[2] = t[2] + n[2]), e;
      }
      function g(e, t, n) {
        return (e[0] = t[0] - n[0]), (e[1] = t[1] - n[1]), (e[2] = t[2] - n[2]), e;
      }
      function x(e, t, n) {
        return (e[0] = t[0] * n[0]), (e[1] = t[1] * n[1]), (e[2] = t[2] * n[2]), e;
      }
      function _(e, t, n) {
        return (e[0] = t[0] / n[0]), (e[1] = t[1] / n[1]), (e[2] = t[2] / n[2]), e;
      }
      function m(e, t, n) {
        return (e[0] = t[0] * n), (e[1] = t[1] * n), (e[2] = t[2] * n), e;
      }
      function I(e, t) {
        const n = t[0] - e[0],
          s = t[1] - e[1],
          r = t[2] - e[2];
        return Math.sqrt(n * n + s * s + r * r);
      }
      function M(e, t) {
        const n = t[0] - e[0],
          s = t[1] - e[1],
          r = t[2] - e[2];
        return n * n + s * s + r * r;
      }
      function b(e) {
        const t = e[0],
          n = e[1],
          s = e[2];
        return t * t + n * n + s * s;
      }
      function w(e, t) {
        const n = t[0],
          s = t[1],
          r = t[2];
        let i = n * n + s * s + r * r;
        return (
          i > 0 &&
            ((i = 1 / Math.sqrt(i)), (e[0] = t[0] * i), (e[1] = t[1] * i), (e[2] = t[2] * i)),
          e
        );
      }
      function P(e, t) {
        return e[0] * t[0] + e[1] * t[1] + e[2] * t[2];
      }
      function k(e, t, n) {
        const s = t[0],
          r = t[1],
          i = t[2],
          a = n[0],
          o = n[1],
          l = n[2];
        return (e[0] = r * l - i * o), (e[1] = i * a - s * l), (e[2] = s * o - r * a), e;
      }
      function v(e, t, n, s) {
        const r = t[0],
          i = t[1],
          a = t[2];
        return (
          (e[0] = r + s * (n[0] - r)), (e[1] = i + s * (n[1] - i)), (e[2] = a + s * (n[2] - a)), e
        );
      }
      function V(e, t, n) {
        const s = t[0],
          r = t[1],
          i = t[2];
        return (
          (e[0] = n[0] * s + n[4] * r + n[8] * i + n[12]),
          (e[1] = n[1] * s + n[5] * r + n[9] * i + n[13]),
          (e[2] = n[2] * s + n[6] * r + n[10] * i + n[14]),
          e
        );
      }
      function A(e, t, n) {
        const s = t[0],
          r = t[1],
          i = t[2];
        return (
          (e[0] = s * n[0] + r * n[3] + i * n[6]),
          (e[1] = s * n[1] + r * n[4] + i * n[7]),
          (e[2] = s * n[2] + r * n[5] + i * n[8]),
          e
        );
      }
      function D(e, t, n) {
        const s = n[0],
          r = n[1],
          i = n[2],
          a = n[3],
          o = t[0],
          l = t[1],
          h = t[2];
        let c = r * h - i * l,
          u = i * o - s * h,
          f = s * l - r * o,
          d = r * f - i * u,
          p = i * c - s * f,
          y = s * u - r * c;
        const g = 2 * a;
        return (
          (c *= g),
          (u *= g),
          (f *= g),
          (d *= 2),
          (p *= 2),
          (y *= 2),
          (e[0] = o + c + d),
          (e[1] = l + u + p),
          (e[2] = h + f + y),
          e
        );
      }
      Math.PI, Math.PI;
      const B = [0, 0, 0],
        L = [0, 0, 0];
      function S(e, t) {
        return e[0] === t[0] && e[1] === t[1] && e[2] === t[2];
      }
      function T(e, t, n) {
        const s = n[0] - t[0],
          r = n[1] - t[1],
          i = n[2] - t[2];
        let a = s * s + r * r + i * i;
        return a > 0
          ? ((a = 1 / Math.sqrt(a)), (e[0] = s * a), (e[1] = r * a), (e[2] = i * a), e)
          : ((e[0] = 0), (e[1] = 0), (e[2] = 0), e);
      }
      const C = g,
        F = x,
        z = _,
        U = I,
        N = M,
        E = f,
        R = b;
      Object.freeze({
        __proto__: null,
        length: f,
        copy: d,
        set: p,
        add: y,
        subtract: g,
        multiply: x,
        divide: _,
        ceil: function (e, t) {
          return (e[0] = Math.ceil(t[0])), (e[1] = Math.ceil(t[1])), (e[2] = Math.ceil(t[2])), e;
        },
        floor: function (e, t) {
          return (e[0] = Math.floor(t[0])), (e[1] = Math.floor(t[1])), (e[2] = Math.floor(t[2])), e;
        },
        min: function (e, t, n) {
          return (
            (e[0] = Math.min(t[0], n[0])),
            (e[1] = Math.min(t[1], n[1])),
            (e[2] = Math.min(t[2], n[2])),
            e
          );
        },
        max: function (e, t, n) {
          return (
            (e[0] = Math.max(t[0], n[0])),
            (e[1] = Math.max(t[1], n[1])),
            (e[2] = Math.max(t[2], n[2])),
            e
          );
        },
        round: function (e, t) {
          return (e[0] = Math.round(t[0])), (e[1] = Math.round(t[1])), (e[2] = Math.round(t[2])), e;
        },
        scale: m,
        scaleAndAdd: function (e, t, n, s) {
          return (e[0] = t[0] + n[0] * s), (e[1] = t[1] + n[1] * s), (e[2] = t[2] + n[2] * s), e;
        },
        distance: I,
        squaredDistance: M,
        squaredLength: b,
        negate: function (e, t) {
          return (e[0] = -t[0]), (e[1] = -t[1]), (e[2] = -t[2]), e;
        },
        inverse: function (e, t) {
          return (e[0] = 1 / t[0]), (e[1] = 1 / t[1]), (e[2] = 1 / t[2]), e;
        },
        normalize: w,
        dot: P,
        cross: k,
        lerp: v,
        hermite: function (e, t, n, s, r, i) {
          const a = i * i,
            o = a * (2 * i - 3) + 1,
            l = a * (i - 2) + i,
            h = a * (i - 1),
            c = a * (3 - 2 * i);
          return (
            (e[0] = t[0] * o + n[0] * l + s[0] * h + r[0] * c),
            (e[1] = t[1] * o + n[1] * l + s[1] * h + r[1] * c),
            (e[2] = t[2] * o + n[2] * l + s[2] * h + r[2] * c),
            e
          );
        },
        bezier: function (e, t, n, s, r, i) {
          const a = 1 - i,
            o = a * a,
            l = i * i,
            h = o * a,
            c = 3 * i * o,
            u = 3 * l * a,
            f = l * i;
          return (
            (e[0] = t[0] * h + n[0] * c + s[0] * u + r[0] * f),
            (e[1] = t[1] * h + n[1] * c + s[1] * u + r[1] * f),
            (e[2] = t[2] * h + n[2] * c + s[2] * u + r[2] * f),
            e
          );
        },
        random: function (e, t) {
          t = t || 1;
          const n = 2 * u() * Math.PI,
            s = 2 * u() - 1,
            r = Math.sqrt(1 - s * s) * t;
          return (e[0] = Math.cos(n) * r), (e[1] = Math.sin(n) * r), (e[2] = s * t), e;
        },
        transformMat4: V,
        transformMat3: A,
        transformQuat: D,
        rotateX: function (e, t, n, s) {
          const r = [],
            i = [];
          return (
            (r[0] = t[0] - n[0]),
            (r[1] = t[1] - n[1]),
            (r[2] = t[2] - n[2]),
            (i[0] = r[0]),
            (i[1] = r[1] * Math.cos(s) - r[2] * Math.sin(s)),
            (i[2] = r[1] * Math.sin(s) + r[2] * Math.cos(s)),
            (e[0] = i[0] + n[0]),
            (e[1] = i[1] + n[1]),
            (e[2] = i[2] + n[2]),
            e
          );
        },
        rotateY: function (e, t, n, s) {
          const r = [],
            i = [];
          return (
            (r[0] = t[0] - n[0]),
            (r[1] = t[1] - n[1]),
            (r[2] = t[2] - n[2]),
            (i[0] = r[2] * Math.sin(s) + r[0] * Math.cos(s)),
            (i[1] = r[1]),
            (i[2] = r[2] * Math.cos(s) - r[0] * Math.sin(s)),
            (e[0] = i[0] + n[0]),
            (e[1] = i[1] + n[1]),
            (e[2] = i[2] + n[2]),
            e
          );
        },
        rotateZ: function (e, t, n, s) {
          const r = [],
            i = [];
          return (
            (r[0] = t[0] - n[0]),
            (r[1] = t[1] - n[1]),
            (r[2] = t[2] - n[2]),
            (i[0] = r[0] * Math.cos(s) - r[1] * Math.sin(s)),
            (i[1] = r[0] * Math.sin(s) + r[1] * Math.cos(s)),
            (i[2] = r[2]),
            (e[0] = i[0] + n[0]),
            (e[1] = i[1] + n[1]),
            (e[2] = i[2] + n[2]),
            e
          );
        },
        angle: function (e, t) {
          d(B, e), d(L, t), w(B, B), w(L, L);
          const n = P(B, L);
          return n > 1 ? 0 : n < -1 ? Math.PI : Math.acos(n);
        },
        str: function (e) {
          return 'vec3(' + e[0] + ', ' + e[1] + ', ' + e[2] + ')';
        },
        exactEquals: S,
        equals: function (e, t) {
          const n = e[0],
            s = e[1],
            r = e[2],
            i = t[0],
            a = t[1],
            o = t[2];
          return (
            Math.abs(n - i) <= 1e-6 * Math.max(1, Math.abs(n), Math.abs(i)) &&
            Math.abs(s - a) <= 1e-6 * Math.max(1, Math.abs(s), Math.abs(a)) &&
            Math.abs(r - o) <= 1e-6 * Math.max(1, Math.abs(r), Math.abs(o))
          );
        },
        direction: T,
        sub: C,
        mul: F,
        div: z,
        dist: U,
        sqrDist: N,
        len: E,
        sqrLen: R,
      });
      const q = new Float32Array(1),
        O =
          Number.isFinite ||
          function (e) {
            return 'number' == typeof e && window.isFinite(e);
          },
        G =
          Number.isNaN ||
          function (e) {
            return e != e;
          };
      function j(e) {
        --e;
        for (let t = 1; t < 32; t <<= 1) e |= e >> t;
        return e + 1;
      }
      function K(e, t, n) {
        return Math.min(Math.max(e, t), n);
      }
      function H(e) {
        return 0 == (e & (e - 1));
      }
      Math.sign;
      const W =
        Math.log2 ||
        function (e) {
          return Math.log(e) / Math.LN2;
        };
      function $(e, t, n) {
        return e + (t - e) * n;
      }
      function Y(e) {
        return (e * Math.PI) / 180;
      }
      function Z(e) {
        return (180 * e) / Math.PI;
      }
      function J(e) {
        return Math.acos(K(e, -1, 1));
      }
      function Q(e) {
        return Math.asin(K(e, -1, 1));
      }
      function X(e, t) {
        const n = f(e);
        return p(t, n, Q(e[2] / n), Math.atan2(e[1] / n, e[0] / n)), t;
      }
      !(function (e) {
        (q[0] = e), q[0];
      })(34028234663852886e22);
    },
    11385: (e, t, n) => {
      'use strict';
      n.d(t, { P: () => o });
      var s = n(76506),
        r = n(91055);
      const i = (0, s.h)('esri-text-decoder') ? new TextDecoder('utf-8') : null,
        a = (0, s.h)('safari') || (0, s.h)('ios') ? 6 : (0, s.h)('ff') ? 12 : 32;
      class o {
        constructor(e, t, n = 0, s = e ? e.byteLength : 0) {
          (this._tag = 0), (this._dataType = 99), this.init(e, t, n, s);
        }
        init(e, t, n, s) {
          (this._data = e), (this._dataView = t), (this._pos = n), (this._end = s);
        }
        clone() {
          return new o(this._data, this._dataView, this._pos, this._end);
        }
        pos() {
          return this._pos;
        }
        move(e) {
          this._pos = e;
        }
        nextTag(e) {
          for (;;) {
            if (this._pos === this._end) return !1;
            const t = this._decodeVarint();
            if (((this._tag = t >> 3), (this._dataType = 7 & t), !e || e === this._tag)) break;
            this.skip();
          }
          return !0;
        }
        next() {
          if (this._pos === this._end) return !1;
          const e = this._decodeVarint();
          return (this._tag = e >> 3), (this._dataType = 7 & e), !0;
        }
        empty() {
          return this._pos >= this._end;
        }
        tag() {
          return this._tag;
        }
        getInt32() {
          return this._decodeVarint();
        }
        getInt64() {
          return this._decodeVarint();
        }
        getUInt32() {
          let e = 4294967295;
          return (
            (e = (127 & this._data[this._pos]) >>> 0),
            this._data[this._pos++] < 128
              ? e
              : ((e = (e | ((127 & this._data[this._pos]) << 7)) >>> 0),
                this._data[this._pos++] < 128
                  ? e
                  : ((e = (e | ((127 & this._data[this._pos]) << 14)) >>> 0),
                    this._data[this._pos++] < 128
                      ? e
                      : ((e = (e | ((127 & this._data[this._pos]) << 21)) >>> 0),
                        this._data[this._pos++] < 128
                          ? e
                          : ((e = (e | ((15 & this._data[this._pos]) << 28)) >>> 0),
                            this._data[this._pos++] < 128 ? e : void 0))))
          );
        }
        getUInt64() {
          return this._decodeVarint();
        }
        getSInt32() {
          const e = this.getUInt32();
          return ((e >>> 1) ^ -(1 & e)) | 0;
        }
        getSInt64() {
          return this._decodeSVarint();
        }
        getBool() {
          const e = 0 !== this._data[this._pos];
          return this._skip(1), e;
        }
        getEnum() {
          return this._decodeVarint();
        }
        getFixed64() {
          const e = this._dataView,
            t = this._pos,
            n = e.getUint32(t, !0) + 4294967296 * e.getUint32(t + 4, !0);
          return this._skip(8), n;
        }
        getSFixed64() {
          const e = this._dataView,
            t = this._pos,
            n = e.getUint32(t, !0) + 4294967296 * e.getInt32(t + 4, !0);
          return this._skip(8), n;
        }
        getDouble() {
          const e = this._dataView.getFloat64(this._pos, !0);
          return this._skip(8), e;
        }
        getFixed32() {
          const e = this._dataView.getUint32(this._pos, !0);
          return this._skip(4), e;
        }
        getSFixed32() {
          const e = this._dataView.getInt32(this._pos, !0);
          return this._skip(4), e;
        }
        getFloat() {
          const e = this._dataView.getFloat32(this._pos, !0);
          return this._skip(4), e;
        }
        getString() {
          const e = this._getLength(),
            t = this._pos,
            n = this._toString(this._data, t, t + e);
          return this._skip(e), n;
        }
        getBytes() {
          const e = this._getLength(),
            t = this._pos,
            n = this._toBytes(this._data, t, t + e);
          return this._skip(e), n;
        }
        getLength() {
          return this._getLengthUnsafe();
        }
        processMessageWithArgs(e, t, n, s) {
          const r = this.getMessage(),
            i = e(r, t, n, s);
          return r.release(), i;
        }
        processMessage(e) {
          const t = this.getMessage(),
            n = e(t);
          return t.release(), n;
        }
        getMessage() {
          const e = this._getLength(),
            t = o.pool.acquire();
          return t.init(this._data, this._dataView, this._pos, this._pos + e), this._skip(e), t;
        }
        release() {
          o.pool.release(this);
        }
        dataType() {
          return this._dataType;
        }
        skip() {
          switch (this._dataType) {
            case 0:
              this._decodeVarint();
              break;
            case 1:
              this._skip(8);
              break;
            case 2:
              this._skip(this._getLength());
              break;
            case 5:
              this._skip(4);
              break;
            default:
              throw new Error('Invalid data type!');
          }
        }
        skipLen(e) {
          this._skip(e);
        }
        _skip(e) {
          if (this._pos + e > this._end) throw new Error('Attempt to skip past the end of buffer!');
          this._pos += e;
        }
        _decodeVarint() {
          const e = this._data;
          let t,
            n = this._pos,
            s = 0;
          if (this._end - n >= 10)
            do {
              if (((t = e[n++]), (s |= 127 & t), 0 == (128 & t))) break;
              if (((t = e[n++]), (s |= (127 & t) << 7), 0 == (128 & t))) break;
              if (((t = e[n++]), (s |= (127 & t) << 14), 0 == (128 & t))) break;
              if (((t = e[n++]), (s |= (127 & t) << 21), 0 == (128 & t))) break;
              if (((t = e[n++]), (s += 268435456 * (127 & t)), 0 == (128 & t))) break;
              if (((t = e[n++]), (s += 34359738368 * (127 & t)), 0 == (128 & t))) break;
              if (((t = e[n++]), (s += 4398046511104 * (127 & t)), 0 == (128 & t))) break;
              if (((t = e[n++]), (s += 562949953421312 * (127 & t)), 0 == (128 & t))) break;
              if (((t = e[n++]), (s += 72057594037927940 * (127 & t)), 0 == (128 & t))) break;
              if (((t = e[n++]), (s += 0x8000000000000000 * (127 & t)), 0 == (128 & t))) break;
              throw new Error('Varint too long!');
            } while (0);
          else {
            let r = 1;
            for (; n !== this._end && ((t = e[n]), 0 != (128 & t)); )
              ++n, (s += (127 & t) * r), (r *= 128);
            if (n === this._end) throw new Error('Varint overrun!');
            ++n, (s += t * r);
          }
          return (this._pos = n), s;
        }
        _decodeSVarint() {
          const e = this._decodeVarint();
          return e % 2 ? -(e + 1) / 2 : e / 2;
        }
        _getLength() {
          if (2 !== this._dataType) throw new Error('Not a delimited data type!');
          return this._decodeVarint();
        }
        _getLengthUnsafe() {
          return this.getUInt32();
        }
        _toString(e, t, n) {
          if ((n = Math.min(this._end, n)) - t > a && i) {
            const s = e.subarray(t, n);
            return i.decode(s);
          }
          let s = '',
            r = '';
          for (let i = t; i < n; ++i) {
            const t = e[i];
            128 & t
              ? (r += '%' + t.toString(16))
              : ((s += decodeURIComponent(r) + String.fromCharCode(t)), (r = ''));
          }
          return r.length && (s += decodeURIComponent(r)), s;
        }
        _toBytes(e, t, n) {
          return (n = Math.min(this._end, n)), new Uint8Array(e.buffer, t, n - t);
        }
      }
      o.pool = new r.O(o, null, (e) => {
        (e._data = null), (e._dataView = null);
      });
    },
  },
]);
